07.07.2011, 16:50
I got the solution.
I forgot the check if the player is connected
Here is good solution:
I forgot the check if the player is connected
Here is good solution:
pawn Код:
public Realtime(playerid)
{
new hour, minute, second;
gettime(hour, minute, second);
SetWorldTime(hour);
if(minute == 00 && second == 00)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SendClientMessage(i, COLOR_WHITE, "------ PAYDAY");
if(gPlayerInfo[playerid][pLevel] == 1)
{
SendClientMessage(playerid, COLOR_WHITE, "You received $1000");
GivePlayerMoney(playerid, 1000);
}
else if(gPlayerInfo[playerid][pLevel] == 2)
{
SendClientMessage(playerid, COLOR_WHITE, "You received $2000");
GivePlayerMoney(playerid, 2000);
}
}
}
}
return 1;
}