07.09.2011, 21:04
Can anybody give me a /count cmd? only 3 counts.
thank you
thank you
new Count;
CMD:count(playerid,params[])
{
Count++;
if(Count == 3)
{
//3 cout
}
return 1;
}
CMD:count(playerid,params[])
{
new Count;
Count++;
if(Count == 1)
{
SendClientMessageToAll(-1,"Admin Count : 1");
}
if(Count == 2)
{
SendClientMessageToAll(-1,"Admin Count : 2");
}
if(Count == 3)
{
SendClientMessageToAll(-1,"Admin Count : 3");
SendClientMessageToAll(-1,"Admin Count : GO!");
}
if(Count > 3)
{
Count = 0;
}
return 1;
}
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;
}