Simple question but I could not find anything about it.
SetPlayerModel () is no problem, I load a custom PED on the player, and that works fine. But how can I remove the Model, to switch back to the original skin?
Simple question but I could not find anything about it.
SetPlayerModel () is no problem, I load a custom PED on the player, and that works fine. But how can I remove the Model, to switch back to the original skin?
You would have to save the original model and appearance, etc then when you want to switch back you just reset it to what was saved.
I tried:
TriggerEvent(‘skinchanger:getSkin’, function(skin)
print(json.encode(skin))
TriggerEvent(‘skinchanger:loadSkin’, skin)
end)
and
SetPlayerModel(PlayerId(), 0)
or
TriggerEvent(“skinchanger:loadDefaultModel”)
Nothing worked for me
Got it working by using loadDefaultModel
function resetPed()
if originalSkin[‘sex’] == 0 then
TriggerEvent(“skinchanger:loadDefaultModel”, 1, loadOriginalSkin)
else
TriggerEvent(“skinchanger:loadDefaultModel”, 0, loadOriginalSkin)
end
end
function loadOriginalSkin()
TriggerEvent(‘skinchanger:loadSkin’, originalSkin)
end