what's the difference between a normal loop and this:
PHP Code:
new playerlooptimer;
CMD:healall(playerid,params[])
{
playerlooptimer = SetTimer("Loop",1000,true);
SendClientMessage(playerid,-1,"Healed all players!");
return 1;
}
forward Loop();
public Loop()
{
new players;
if(players<MAX_PLAYERS)
{
if(IsPlayerConnected(players)
{
SetPlayerHealth(players,100);
}
players++;
}
else
{
players =0;
KillTimer(playerlooptimer);
}
return 1;
}