Simple teleport processor with zcmd?
#2

You can simply do:
pawn Код:
public OnPlayerCommandPerformed( playerid, cmdtext[ ], success )
{
    if( !success )
    {
        for( new t = 0; t < sizeof( tInfo ); t++ )
        {
            if( !strcmp( cmdtext, tInfo[ i ][ tTele ], true ) )
            {
                // Teleport, give weapons etc..
                break;
            }
        }
    }
    return 1;
}
Or in case you want a custom message instead of "SERVER: Unknown command", you can use:
pawn Код:
public OnPlayerCommandPerformed( playerid, cmdtext[ ], success )
{
    if( !success )
    {
        new
            bool: exists = false
        ;
        for( new t = 0; t < sizeof( tInfo ); t++ )
        {
            if( !strcmp( cmdtext, tInfo[ i ][ tTele ], true ) )
            {
                // Teleport, give weapons etc..
                exists = true;
                break;
            }
        }
        if( !exists ) SendClientMessage( playerid, 0xFF0000FF, "That command does not exist." );
    }
    return 1;
}
Reply


Messages In This Thread
Simple teleport processor with zcmd? - by knackworst - 11.09.2013, 19:14
Re: Simple teleport processor with zcmd? - by Konstantinos - 11.09.2013, 19:20
Re: Simple teleport processor with zcmd? - by knackworst - 11.09.2013, 19:24

Forum Jump:


Users browsing this thread: 1 Guest(s)