SetPlayerSkin

From SA-MP Wiki

Jump to: navigation, search


Set the skin of a player.


Parameters:
(playerid, skinid)
playeridThe ID of the player to set the skin of.
skinidThe skin the player should use.


ReturnsThis function doesn't return a specific value


Image:32px-Circle-style-warning.png Important Note: If a player's skin is set when they are crouching, in a vehicle, or performing certain animations, they will become frozen or otherwise glitched. This can be fixed by using TogglePlayerControllable. Players can be detected as being crouched through GetPlayerSpecialAction.


public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/fireman", true) == 0)
    {
        // Set the player's skin to ID 277, which is a fireman.
        SetPlayerSkin(playerid, 277);
        return 1;
    }
    return 0;
}

Related Functions

The following functions may be useful, as they are related to this function in one way or another.

Personal tools
In other languages