14.12.2013, 21:32
(
Последний раз редактировалось iFiras; 11.09.2014 в 02:57.
)
Deleted.
if(sscanf(params,"us[100]",CTime))
if(sscanf(params,"d",CTime))
#include <a_samp>
#include <zcmd>
#include <sscanf2>
new
CircleAllTime, CTimer;
dcmd_circleall( playerid,params [] )
{
new CTime, Position[3];
if( AdminLevel[ playerid ] < 4 )
return SCM( playerid, -1, "{FF0000}[ERROR] {FFFFFF}You don't have an appropriate administration level to use this command." );
if( sscanf( params,"i", CTime ) )
return SCM(playerid,-1,""COL_ORANGE"[USAGE] {FFFFFF}/circleall [Time]");
if( CircleAllTime >= 1 )
return SCM( playerid,-1,"{FF0000}[ERROR] {FFFFFF}This option is already activated." );
GetPlayerPos(playerid, Position[ 0 ], Position[ 1 ], Position[ 2 ]);
for( new i = 0; i < MAX_PLAYERS; i++ )
{
if(gTeam[ i ] != TEAM_COP || gTeam[ i ] != TEAM_ARMY || gTeam[ i ] != TEAM_FBI || gTeam[ i ] != TEAM_CIA && JailTime[ i ] <= 1) continue;
CircleAllTime = CTime;
CTimer = SetTimer( "CircleAllCountdown", 1000, true );
SetPlayerPos(i, Position[ 0 ], Position[ 1 ], Position[ 2 ]);
TogglePlayerControllable( i, 0 );
}
return true;
}
forward CircleAllCountdown( );
public CircleAllCountdown( )
{
new
string[ 15 ];
CircleAllTime --;
format( string,sizeof( string ),"~y~%d", CircleAllTime );
GameTextForAll( string, 1000, 3 );
if( CircleAllTime <= 0 )
{
GameTextForAll( "~g~~h~GO!", 4000, 3 );
KillTimer( CTimer );
for( new i = 0; i < MAX_PLAYERS; i++ )
{
if ( !IsPlayerConnected( i ) ) continue;
TogglePlayerControllable( i, 1 );
}
}
return true;
}