Problem in circling players! Help needed :)
#1

Deleted.
Reply
#2

pawn Код:
if(sscanf(params,"us[100]",CTime))
change to
pawn Код:
if(sscanf(params,"d",CTime))
Reply
#3

Deleted.
Reply
#4

Quote:
Originally Posted by iFiras
Посмотреть сообщение
Doesn't work
Any other replies?
Yes, there is another reply :P, try this code

pawn Код:
#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;
}
Reply
#5

Deleted.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)