Skip to content

players.setSkin

Changes the character model a player appears as, for everyone. A seated player keeps their vehicle, seat and seated animation when the skin changes. An entry or exit animation already in progress also continues after the change.

players.setSkin(player: PlayerTarget, skinModel: number): Promise<ActionResult>
Name Type Description
player PlayerTarget The player, or their ID.
skinModel number GTA:SA’s ped model ID, 0 to 311; all of them on Skins.

A promise of an ActionResult: applied once the player’s game has carried it out, rejected with a code, or timeout after five seconds without an answer.

A /skin command.

gamemodes/my-mode.ts
import { chat, commands, players } from "nativemp";
commands.register("skin", async (player, args) => {
const result = await players.setSkin(player, Number(args));
if (result.status === "rejected") chat.sendServerMessage(`That skin didn't work (${result.code}).`, player);
});

A captured Player keeps this effect bound to its connection across awaits; see Async handlers.