| Property | Value |
|---|---|
| Native Name | SET_PLAYER_MODEL |
| Hash | 0x00A1CADD00108836 |
| Return Type | void |
| Parameters | player (Player), model (Hash) |
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.
Parameters
player(Player) — The player to set the model formodel(Hash) — The model to use
Examples
local model = `a_f_m_beach_01`
if IsModelInCdimage(model) and IsModelValid(model) then
RequestModel(model)
while not HasModelLoaded(model) do
Wait(0)
end
SetPlayerModel(PlayerId(), model)
SetModelAsNoLongerNeeded(model)
end