29.09.2012, 12:48
pawn Код:
public ClockUpdate()
{
new string[12];
Second ++;
if(Second == 60)
{
if(Minute == 59)
{
if(Hour == 23) Hour = 0;
else Hour ++;
Minute = 0;
}
else Minute ++;
Second = 0;
}
for(new x = 0; x < MAX_PLAYERS; x++)
{
if(Logged[x] == 1)
{
if(Minute == 0 && Second == 0)
{
if(Player[x][PaydayTime] >= 30)
{
SendClientMessage(x, ORANGE, ">> Your pay cheque is ready to be picked up. Please head to the city hall to claim it.");
CheckReady[x] = 1;
}
else SendClientMessage(x, LIBLUE, ">> You haven't been playing long enough to get a pay cheque.");
}
}
}
format(string, sizeof(string), "%02i:%02i:%02i", Hour, Minute, Second);
TextDrawSetString(Clock, string);
SetWorldTime(Hour);
return 1;
}