24.01.2012, 19:28
I realized after looking at samp wikipedia that my server was restarting and this was causing it, I checked by removing it and I can confirm, this is an infinite loop, but my knowledge does not understand it as far as to how it is. Can anyone explain how it is and how to fix it?
pawn Код:
public UpdateTime()
{
new mins,hour,secs;
new time = gettime(hour,mins,secs);
SetWorldTime(hour+4);
format(timestr,32,"%02d:%02d",hour, mins);
TextDrawSetString(txtTimeDisp,timestr);
new x= time;
while(x != MAX_PLAYERS)
{
if(IsPlayerConnected(x) && GetPlayerState(x) != PLAYER_STATE_NONE)
{
SetPlayerTime(x,hour,mins);
}
if(mins == 0)
{
doPayDay(x);
}
x++;
}
}