Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //=======Simple Countdown by Milan_Huizen/Milanosie====//
- new countdownam;
- public OnGameModeInit()
- {
- countdownam = -1;
- }
- forward countdownf();
- stock countdownf()
- {
- foreach(Player, i)
- {
- SetTimerEx("countdown_lower", 1100, false, "i", i);
- }
- return 1;
- }
- forward countdown_lower(playerid);
- public countdown_lower(playerid)
- {
- new str[128];
- if(countdownam > 5)
- {
- format(str,sizeof(str),"%d",countdownam);
- GameTextForPlayer(playerid, str, 1000, 3);
- }
- if(countdownam == 5)
- {
- format(str,sizeof(str),"~r~%d",countdownam);
- GameTextForPlayer(playerid, str, 1000, 3);
- PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
- }
- if(countdownam == 4)
- {
- format(str,sizeof(str),"~b~%d",countdownam);
- GameTextForPlayer(playerid, str, 1000, 3);
- PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
- }
- if(countdownam == 3)
- {
- format(str,sizeof(str),"~y~%d",countdownam);
- GameTextForPlayer(playerid, str, 1000, 3);
- PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
- }
- if(countdownam == 2)
- {
- format(str,sizeof(str),"~g~%d",countdownam);
- GameTextForPlayer(playerid, str, 1000, 3);
- PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
- }
- if(countdownam == 1)
- {
- format(str,sizeof(str),"~r~%d",countdownam);
- GameTextForPlayer(playerid, str, 1000, 3);
- PlayerPlaySound(playerid,1056,0.0,0.0,0.0);
- }
- if(countdownam == 0)
- {
- format(str,sizeof(str),"~r~G~b~O",countdownam);
- GameTextForPlayer(playerid, str, 1000, 3);
- PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
- }
- if(countdownam != -1)
- {
- countdownam--;
- foreach(Player, i)
- {
- SetTimerEx("countdown_lower", 1100, false, "i", playerid);
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment