Command with two functions?
#4

pawn Код:
new
    something
;

public OnGameModeInit( )
{
    something = 0; // 0 = closed
    return 1;
}

CMD:gates( playerid, params[ ] )
{
    if( something == 0 ) // if it's closed
    {
        // MoveObject( ... );
        something = 1; // 1 = opened
    }
    else // if it's opened
    {
        // MoveObject( ... );
        something = 0; // 0 = closed
    }
    return 1;
}
But in some cases, it's just for a certain playerid, so it should be with [ MAX_PLAYERS ] array.
Reply


Messages In This Thread
Command with two functions? - by mailu - 07.01.2013, 13:29
Re: Command with two functions? - by Vince - 07.01.2013, 13:57
Re: Command with two functions? - by mailu - 07.01.2013, 14:03
Re: Command with two functions? - by Konstantinos - 07.01.2013, 14:06

Forum Jump:


Users browsing this thread: 1 Guest(s)