Hi,
For SetPlayerModel you need to pass the player Id not the ped, you should use PlayerId() instead of PlayerPedId()
This work for me:
RegisterCommand('cop', function(source,args)
local player = PlayerId()
local model = GetHashKey('s_f_y_cop_01')
RequestModel(model)
while not HasModelLoaded(model) do
Wait(100)
end
SetPlayerModel(player, model)
SetModelAsNoLongerNeeded(model)
TriggerEvent('chat:addMessage', {args = {"You are now a police officer"}})
end, false)
1 Like