29.07.2014, 17:17
pawn Код:
forward OnlineTime(playerid);
public OnlineTime(playerid)
{
for (new i = 0; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
PlayerInfo[i][Minutes]++;
if (PlayerInfo[i][Minutes] >= 60)
{
PlayerInfo[i][Minutes] = 0;
PlayerInfo[i][Hours]++;
new string[128];
new RandomPay = random(50000 - 10000) + 10000;
GivePlayerMoney( playerid, RandomPay );
format(string, sizeof(string), " [PAYDAY] You Have Got Paycheck Of => $%i", RandomPay);
SendClientMessage(i, COLOR_WHITE, string);
}
}
}
return 1;
}
Here is the timer for this.
pawn Код:
OnlineTime = SetTimerEx("OnlineTime", 60000, true, "i", playerid);
Anyone wanna help out? I +Rape for helping me :>