CD Command
#9

PHP код:
forward CountDown();
new 
boolIsCountdownStarted;
new 
CountdownTimer;
public 
CountDown()
{
    switch(
Count)
    {
        case 
5: { GameTextForAll("~b~-~r~ 5 ~b~-"11003); }
        case 
4: { GameTextForAll("~b~-~r~ 4 ~b~-"11003); }
        case 
3: { GameTextForAll("~b~-~r~ 3 ~b~-"11003); }
        case 
2: { GameTextForAll("~b~-~r~ 2 ~b~-"11003); }
        case 
1: { GameTextForAll("~b~-~r~ 1 ~b~-"11003); }
        case 
0:
        {
            
GameTextForAll("~b~-~g~ go! ~b~-"20003);
             
KillTimer(CountdownTimer);
              
IsCountdownStarted false;
        }
    }
    
Count--;
}
COMMAND:count(playeridparams[]) {
    
#pragma unused params
    
if(IsCountdownStarted == false)
         {
            
Count 5;
            
CountdownTimer SetTimer("CountDown"10001);
            
IsCountdownStarted true;
            
SendClientMessage(playeridCOLOR_ORANGE"You have started the CountDown!");
            new 
countstring2[128];
            new 
PlayerName[MAX_PLAYER_NAME];
            
GetPlayerName(playerid,PlayerNameMAX_PLAYER_NAME);
            
format(countstring2128"%s has started the CountDown"PlayerName);
            
SendClientMessage(COLOR_GREYcountstring2);
        }
        else
        {
            
SendClientMessage(playeridCOLOR_RED"The CountDown has already started!");
          }
          return 
1;

if i could help please click a rep star for me
Reply


Messages In This Thread
CD Command - by omer5198 - 08.08.2011, 11:50
Re: CD Command - by Kingunit - 08.08.2011, 11:56
Re: CD Command - by omer5198 - 08.08.2011, 12:02
Re: CD Command - by Kingunit - 08.08.2011, 12:32
Re: CD Command - by AndreT - 08.08.2011, 13:20
Re: CD Command - by omer5198 - 08.08.2011, 13:46
Re: CD Command - by omer5198 - 08.08.2011, 14:12
Re: CD Command - by omer5198 - 08.08.2011, 17:22
Re: CD Command - by LZLo - 08.08.2011, 18:30

Forum Jump:


Users browsing this thread: 2 Guest(s)