How to make this with ZCMD?
#4

iPLEOMAX use "u" for player ID's ( partOfName or playerID )

With a reason part ( can be used without a reason or with a reason ).

pawn Код:
CMD:freeze( playerid, params[ ] )
{
    if ( !IsPlayerAdmin( playerid ) )
        return SendClientMessage( playerid, -1, "You are not an administrator." );

    new
        bool: useReason = false,
        pID,
        reason[ 64 ]
    ;

    if ( sscanf( params, "u", pID ) )
        return SendClientMessage( playerid, -1, "Usage: /Freeze [ playerid / partofname ] [ optional: reason ]" );

    if ( !sscanf( params, "us[64]", reason ) )
        useReason = true;

    if ( !useReason )
        reason = "Not specified";

    if ( pID == INVALID_PLAYER_ID )
        return SendClientMessage( playerid,  -1, "That player is not connected." );

    new
        szStr[ 128 ]
    ;

    format( szStr, sizeof szStr, "*** You have been frozed by admin %s. ( Reason: %s )", getName( playerid ), reason );

    TogglePlayerControllable( pID, false );

    SendClientMessage( pID, -1, szStr );

    SendClientMessage( playerid, -1, "Player has been freezed." );

    useReason = false;

    return 1;
}
Reply


Messages In This Thread
How to make this with ZCMD? - by Harry_Sandhu - 30.07.2011, 10:11
Re: How to make this with ZCMD? - by Gazmull - 30.07.2011, 10:16
Re: How to make this with ZCMD? - by iPLEOMAX - 30.07.2011, 10:19
Re: How to make this with ZCMD? - by Basicz - 30.07.2011, 10:37
Re: How to make this with ZCMD? - by iPLEOMAX - 30.07.2011, 11:27
Re: How to make this with ZCMD? - by Zh3r0 - 30.07.2011, 11:32

Forum Jump:


Users browsing this thread: 1 Guest(s)