Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

What's the difference?

$
0
0
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;



Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>