22.07.2010, 19:19
If he uses random(MAX_PLAYERS), it's like he uses random(500), so it could be that playerid 455, which is probably not online, receives the money o.O.
Top of the script:
Under GameModeInit:
Somewhere in the script:
Or like the guy over this post, who was faster xD ^^
Top of the script:
pawn Код:
forward RandMoney();
pawn Код:
SetTimer("RandMoney", 30000, 1);
pawn Код:
public RandMoney()
{
new PCount;
for(new i; i<GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i)) PCount++;
}
GivePlayerMoney(random(PCount), 3000);
}

