26.05.2010, 20:33
Hey guys. I've got a little script for a payday.
This is what actualy must happen:
Every 60 seconds now. Will be an hour after it works though.
You will get 1 exp.
After 5 exp you will get +1score.
Then your exp has to set to 0 again too.
This is my script:
My problem:
The +1 exp is coming . that is working.
But after I have 5 exp my exp is still growing t0 6 then 7 then 8 then 9 etc.
And I don't get +1 score.
So actualy the only thing that works is that I get +1 exp.
Please somenoe fix it for me.
thanks
This is what actualy must happen:
Every 60 seconds now. Will be an hour after it works though.
You will get 1 exp.
After 5 exp you will get +1score.
Then your exp has to set to 0 again too.
This is my script:
Код:
public PayDay() { for(new i = 0; i < GetMaxPlayers(); i++) { if(IsPlayerConnected(i)) { if(PlayerInfo[i][Exp] >= 6) { PlayerInfo[i][Exp] += 1; GameTextForPlayer(i,"PayDay",1000,1); } else { if(PlayerInfo[i][Exp] >= 5) SetPlayerScore(i,GetPlayerScore(i)+1); PlayerInfo[i][Exp] = 0; } } } }
The +1 exp is coming . that is working.
But after I have 5 exp my exp is still growing t0 6 then 7 then 8 then 9 etc.
And I don't get +1 score.
So actualy the only thing that works is that I get +1 exp.
Please somenoe fix it for me.
thanks