SA-MP Forums Archive
Command help. - 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: Command help. (/showthread.php?tid=597100)



Solved by myself. - xXRevolverXx - 26.12.2015

Solved - as you can see, no one helped tho!


Re: Command help. - ikey07 - 26.12.2015

Few small tips.


new cTimer;
new CountTimer;

OnGameModeInit()
{

cTimer = SetTimer("CounterTimer",1000,1);
}


public CounterTimer()
{
if(CountTimer > 0)
{

SendClientMessage(playerid,-1,"Time left: %d seconds",CountTimer);//For seconds
SendClientMessage(playerid,-1,"Time left: %d minutes",CountTimer/60);//For minutes
CountTimer--;
if(CountTimer == 0)
{
//Timer have reached.
}
}


}


in the /count cmd


CountTimer = User input*60;


Re: Command help. - xXRevolverXx - 26.12.2015

Oh, 1st, i'll be using that in a filterscript, 2nd, can you explain for me the function of this code, as i'm thanking you for hoping help for me .