29.12.2011, 17:20
Hello,this seems to be a noob question but i'll ask anyway.
I've this code,is a simply tax system.
There is a problem,instead of REMOVING the random_money to player,it ADD instead..How to fix this?
I've this code,is a simply tax system.
pawn Код:
public RandomMoney()
{
new random_money = 1000+random(1001);
for(new i=GetMaxPlayers()-1; i >=0; i--)
{
if(!IsPlayerConnected(i)) continue;
GivePlayerMoney(i,random_money);
new string[128];
format(string, 100, "You paid %d$ in taxes to finance the State.", random_money);
SendClientMessage(i,COLOR_GREEN, string);
}
return 1;
}