Forum

> > CS2D > Scripts > Set money
Forums overviewCS2D overview Scripts overviewLog in to reply

English Set money

4 replies
To the start Previous 1 Next To the start

old Set money

Cereal Guy
User Off Offline

Quote
My script don't work wath I missed?

addhook("say","save_say")
function save_say(id,txt)
if (txt=="money") then
parse("setmoney "..id.."..player"id,"money")-16000
return
end
end

old Re: Set money

TheTrollHammer
BANNED Off Offline

Quote
Tell us where the problem is. Tell us what did you see in your console/dedicated server log.

old Re: Set money

Devil-Thanh
GAME BANNED Off Offline

Quote
1
2
3
4
5
6
addhook("say","save_say")
function save_say(id,txt)
if (txt=="money") then
parse("setmoney "..id.." -16000")
end
end

old Re: Set money

krabob
User Off Offline

Quote
1
2
3
4
5
6
7
addhook("say","save_say")
function save_say(id,txt)
	if (txt=="money") then
		parse("setmoney "..id.." "..(player(id,"money")-16000))
		return 1
	end
end

Try this...But I might have made a mistake in the brackets too

old Re: Set money

Alistaire
User Off Offline

Quote
You know, 16000 is the maximal ammount so it makes no sense to add something like money - max money.

1
2
3
4
5
6
7
8
9
10
11
12
addhook('say', 'AA_say')

function AA_say(id, txt)
	if txt == 'money' then
		if  player(id, 'money') == 16000 then
			parse('setmoney '..id..' 0')
		else
			msg2(id, 'Not enough money, punk@C')
		end
	return 1;
	end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview