#include <a_samp>#include <zcmd>forward szamlalo1(playerid);forward szamlalo2(playerid);forward szamlalo3(playerid);forward szamlalo4(playerid);forward szamlalo5(playerid);forward GO(playerid);CMD:szamlalo(playerid, params[]){SendClientMessageToAll(0x49d929AA, \"Szerver : Valaki elinditott egy számlálót!\");SetTimerEx(\"szamlalo1\", 1000, 0, \"i\", playerid);return 1;}public szamlalo1(playerid){GameTextForAll( \"~w~5\", 1000, 3);PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);SetTimerEx(\"szamlalo2\", 1000, 0, \"i\", playerid);}public szamlalo2(playerid){GameTextForAll( \"~y~4\", 1000, 3);PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);SetTimerEx(\"szamlalo3\", 1000, 0, \"i\", playerid);}public szamlalo3(playerid){GameTextForAll( \"~r~3\", 1000, 3);PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);SetTimerEx(\"szamlalo4\", 1000, 0, \"i\", playerid);}public szamlalo4(playerid){GameTextForAll( \"~w~2\", 1000, 3);PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);SetTimerEx(\"szamlalo5\", 1000, 0, \"i\", playerid);}public szamlalo5(playerid){GameTextForAll( \"~g~1\", 1000, 3);PlayerPlaySound(playerid, 1056, 0.0, 0.0, 0.0);SetTimerEx(\"GO\", 1000, 0, \"i\", playerid);}public GO(playerid){GameTextForAll( \"~r~G~w~O~g~!\", 1000, 3);PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);}
#include <a_samp>#include <zcmd>new Count = 5;new CountOff;new c_timer;forward Countdown();CMD:szamlalo(playerid, params[]){if(CountOff == 1) return SendClientMessage(playerid,-1,\"Már valaki elindított a visszaszámlálást!\");new name[MAX_PLAYER_NAME],str[128];GetPlayerName(playerid,name,sizeof(name));format(str,sizeof(str),\"%s elindította a visszaszámlálót!\");SendClientMessageToAll(-1,str);c_timer = SetTimer(\"Countdown\",1000,1);CountOff = 1;return 1;}public Countdown(){if(Count == 0){GameTextForAll( \"~g~Goooo!\", 3000, 3);Count = 5;CountOff = 0; return KillTimer(c_timer);}new str[32];format(str,sizeof(str),\"~w~%d\",Count);GameTextForAll(str, 3000, 3);for(new i;i<MAX_PLAYERS;i++) PlayerPlaySound(i, 1056, 0.0, 0.0, 0.0);Count--;return 1;}