08.09.2011, 07:24
zcmd
pawn Код:
new
iCurrCounts,
timerCount
;
COMMAND:count( playerid, params[ ] )
{
if ( iCurrCounts > 0 )
return SendClientMessage( playerid, -1, "A countdown is already started." );
timerCount = SetTimer( "countDownInit", 1000, true );
SendClientMessageToAll( -1, "SERVER: Countdown started" );
return 1;
}
forward countDownInit( );
public countDownInit( )
{
new s[ 10 ];
if ( iCurrCounts > 3 )
GameTextForAll( "~w~GO!", 750, 3 ), KillTimer( timerCount );
iCurrCounts ++;
switch ( iCurrCounts )
{
case 1: s = "~r~3";
case 2: s = "~g~2";
case 3: s = "~b~1";
}
GameTextForAll( s, 750, 3 );
return 1;
}