Specific names
#2

pawn Код:
CMD:sethealth( playerid, params[ ] )
{
    new
        id,
        Float: health
    ;
    if( sscanf( params, "rf", id, health ) ) return SendClientMessage( playerid, -1, "Usage: /sethealth <ID/Part Of Name> <health>" );
    if( id == INVALID_PLAYER_ID ) return SendClientMessage( playerid, -1, "Offline player" );

    new
        _name[ MAX_PLAYER_NAME ]
    ;
    GetPlayerName( playerid, _name, MAX_PLAYER_NAME );
    if( !strcmp( _name, "Fernado_Samuel", true ) ) SetPlayerHealth( id, health );
    else SendClientMessage( playerid, -1, "Only Fernado_Samuel can use this command!" );
    return 1;
}
Reply


Messages In This Thread
Specific names - by Fernado Samuel - 25.09.2013, 15:33
Re: Specific names - by Konstantinos - 25.09.2013, 15:39
Re: Specific names - by [HK]Ryder[AN] - 25.09.2013, 15:40
Re: Specific names - by Fernado Samuel - 25.09.2013, 15:46
Re: Specific names - by Konstantinos - 25.09.2013, 15:52

Forum Jump:


Users browsing this thread: 2 Guest(s)