setPlayerModel
SET_PLAYER_MODEL0x00A1CADD00108836The GTA V native SET_PLAYER_MODEL of the PLAYER namespace, as LS:MP client scripts call it: the global function setPlayerModel, in JavaScript and in Lua.
setPlayerModel(player: Player, model: Hash): voidsetPlayerModel(player: Player, model: Hash)Usage
JavaScript
setPlayerModel(player, model);Lua
setPlayerModel(player, model)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
player | Player | number | integer |
model | Hash | number | integer |
Returns
Nothing. In JavaScript the call evaluates to undefined.
Notes
From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.
Set the model for a specific Player. Be aware that this will destroy the current Ped for the Player and create a new one, any reference to the old ped should be reset
Make sure to request the model first and wait until it has loaded.
Reference
- Namespace
- Player PLAYER
- In the game
void SET_PLAYER_MODEL(Player player, Hash model)- Hash
0x00A1CADD00108836