SA-MP Forums Archive
Learning questions :D - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Learning questions :D (/showthread.php?tid=561171)



Learning questions :D - nezo2001 - 01.02.2015

I searched for a tutiroal to make a count down but i as i want to learn not to copy i want to ask some question
PHP код:
new countdown 5;
new 
countTime
PHP код:
CMD:countdown(playeridparams[])
{
    if(
PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playeridCOLOR_RED"Command not found on the server! /help");
    
countTime SetTimer("CountDownTimer",1000,false); //Here he put thre timer and made the repeting "False" ok.
    
return 1;
}
public 
CountDownTimer()
{
    
countdown--; //Here he decreases the the count down by one but he set the repete "False" so it will apear "4" and stop correct me if ia m right .
    
new string[128];
    if(
countdown == 0)
    {
        
KillTimer(countTime);
        
countdown 5;
    }
    else
    {
        
format(string,sizeof(string),"%d",countTime);
        
GameTextForAll(string,1000,1);
    }
    return 
1;




Re: Learning questions :D - vassilis - 01.02.2015

You are right its true there not false change it.