How to add /skin command for player?
#1

I really need help to script "/skin" command.

USAGE: /skin [ID] to change the skin.

For any player.

Thanks
Reply
#2

Search. <8chars>
Reply
#3

I didn't find any results for it. Only I found for admins.

I want it for any player. Any player can change his skin by typing /skin [ID]

Reply
#4

Here:

(Tell me if you want strcmp version)

pawn Код:
CMD:skin(playerid, params[])
{
    if( isnull( params ))
        return SendClientMessage( playerid, 0xFFFF00FF, "[USAGE] /skin [id (0-299)]" );
    new
        pSkin = strval( params );
    if( pSkin < 0 || pSkin > 299 )
        return SendClientMessage( playerid, 0xFFFF00FF, "[USAGE] /skin [id (0-299)]" );
    SetPlayerSkin( playerid, pSkin );
    return SendClientMessage( playerid, 0x00FF00FF, "[SUCCESS] Skin successfully set!" );
}
And isnull :

pawn Код:
#define isnull(%1) \
    ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)