SET_PLAYER_MODEL
Set the model for a specific Player.
Signature
void SET_PLAYER_MODEL(Player player, Hash model);Parameters
| Name | Type | Description |
|---|---|---|
player | Player | The player to set the model for |
model | Hash | The model to use |
Returns void
Description
Set the model for a specific Player. Note that this will destroy the current Ped for the Player and create a new one, any reference to the old ped will be invalid after calling this. As per usual, make sure to request the model first and wait until it has loaded.
This is the server-side RPC native equivalent of the client native SET_PLAYER_MODEL.
Usage
SetPlayerModel(player, model)
-- always works, by hash
Citizen.InvokeNative(0x774a4c54, player, model)JavaScript and C#
SetPlayerModel(player, model);
// by hash
Citizen.invokeNative('0x774a4c54', player, model);Function.Call((Hash)0x774a4c54, player, model);- Hash parameters: the named function also accepts a string and hashes it for you;
Citizen.InvokeNativeneeds the number — passjoaat("name")or a backtick literal like`name`.
Sources
Something wrong or missing? Contribute a verified note — corrections ship through pull requests.