Timer help
#9

Quote:
Originally Posted by kyriakos587
Посмотреть сообщение
#include <zcmd>
#include <sscanf2>

new Count;
new CountTimer;

CMD:count(playerid,params[])
{
new seconds;
if(sscanf(params,"i",seconds)) return SendClientMessage(playerid,-1,"Usage: /count [Seconds]");
Count=seconds;
CountTimer = SetTimer("Counting",1000,true);
return 1;
}

forward Counting();
public Counting()
{
Count --;
if(Count == 0){
KillTimer(CountTimer);
GameTextForAll("GO GO GO",1000,3);
}else{
new string[20];
format(string,sizeof(string),"%d",Count);
GameTextForAll(string,1000,3);
}
}
thanks
Reply


Messages In This Thread
Timer help - by Mouiz - 09.07.2015, 11:25
Re: Timer help - by Mouiz - 09.07.2015, 11:35
Re: Timer help - by notime - 09.07.2015, 11:49
Re: Timer help - by Mouiz - 09.07.2015, 11:55
Re: Timer help - by notime - 09.07.2015, 12:16
Re: Timer help - by Mouiz - 09.07.2015, 12:24
Re: Timer help - by notime - 09.07.2015, 12:26
Re: Timer help - by kyriakos587 - 09.07.2015, 12:42
Re: Timer help - by Mouiz - 09.07.2015, 12:52

Forum Jump:


Users browsing this thread: 1 Guest(s)