24.08.2015, 12:59
How can i make a countdown and when the time finish counting other codes starting to activate ?
can anyone answer me please !!
can anyone answer me please !!
new CountDown,Timer,Jstring[128]; CMD:countdown(playerid, params[]) { if(sscanf(params, "i", CountDown)) Timer = SetTimer("CountDownTimer",1000,1); format(Jstring, sizeof(Jstring), "~r~Count down~n~ ~y~Please Wait.~n~~r~%d~b~ seconds left.",CountDown); GameTextForAll(Jstring,30000,3); return 1; } forward CountDownTimer(); public CountDownTimer() { CountDown--; if(CountDown <= 0) { KillTimer(Timer); // use the code which you want to exicute after the countdown end } format(Jstring, sizeof(Jstring), "~r~Count down~n~ ~y~Please Wait.~n~~r~%d~b~ seconds left.",CountDown); GameTextForAll(Jstring,30000,3); return 1; }