English Money getting added

3 replies
Goto Page
To the start Previous 1 Next To the start
15.12.11 03:40:26 pm
Up
iCe4147
User
Offline Off
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:

Code:
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?
I am so old school with this game
15.12.11 03:49:25 pm
Up
DannyDeth
User
Offline Off
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.

Code:
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.
15.12.11 04:10:41 pm
Up
sheeL
User
Offline Off
Code:
1
2
3
4
5
6
addhook("spawn","am")
function am(p)
     if game("mp_startmoney")=="16000" then
          parse("setmoney "..p.." 16000")
     end
end
16.12.11 06:30:49 am
Up
iCe4147
User
Offline Off
@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.
I am so old school with this game
To the start Previous 1 Next To the start