Forum

> > CS2D > Scripts > Money getting added
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Money getting added

3 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Money getting added

iCe4147
User Off Offline

Zitieren
Hi, Im trying to fix my script that after winning a round you get some cash for some reason i cant stop it the script I used is:

1
2
3
4
5
6
7
8
addhook("startround","nowinmoney")
function nowinmoney()
if player(id,"team") == 1 then
for id=1,32 do
parse("setmoney "..id.." 50")
end
end
end

Every round 1400 cash is added can anyone help me out so this wont happen?

alt Re: Money getting added

DannyDeth
User Off Offline

Zitieren
There is nothing happening. The money you are receiving is from CS2D, not your script. id is not defined in a startround hook, nor did you even add it to the parametre list.

1
2
3
4
5
6
7
8
addhook("startround","give_moenaht")
function give_moenaht()
	for(i = 1, tonumber(game("sv_maxplayers"))) do
		if(player(i,"team") == 1) then
			parse("setmoney "..i.." ".. player(i,"money")+2500))
		end
	end
end

EDIT: Btw, you want the money only to go to T? Remove the 'if' statement if you don't want it like that.

alt Re: Money getting added

sheeL
User Off Offline

Zitieren
1
2
3
4
5
6
addhook("spawn","am")
function am(p)
     if game("mp_startmoney")=="16000" then
          parse("setmoney "..p.." 16000")
     end
end

alt Re: Money getting added

iCe4147
User Off Offline

Zitieren
@DannyDeth

Actually what I wanted was to prevent the money from being added. Im sorry but i also forgot to mention that the game mode was Zombies.

Edit: This usually happens when the round time gets finished up.
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht