• Darkrp-how to Change model when arested gmod
    7 replies, posted
How to make so when a player gets arrested it changes his model
Do you even know how to program in lua? And please don't reply "I'm newbie i need some code :P"
At least give him something Entity/SetModel Read the wiki next time plz
no I do now some lua , but the problem is I do everything right , but still it doesn't change the skin. hook.Add("playerArrested", "playerArrest_ChangeTeam", function(ply) ply:SetModel( "models/humans/group04/male_04.mdl",true,true ) end) and I tried like this: hook.Add("playerArrested", "playerArrest_ChangeTeam", function(ply) ply:SetModel( "models/humans/group04/male_04.mdl") end) and like this hook.Add("playerArrested", "playerArrest_ChangeTeam", function(crim) crim:SetModel( "models/humans/group04/male_04.mdl",true,true ) end)
my only guess is that you're not running this script in serverside, also are you sure that's the model? That will make you a citizen with a T pose, since you're using NPC models and not playermodels
I tried in server side and in darkrp modules, the thing is I need it to work later I will change the model.
So whats wrong in my code? it doesn't work
i think you need to add a timer because playerArrested hook is called before anything hook.Add("playerArrested", "playerArrest_ChangeTeam", function(ply)     timer.Simple(0, function()         ply:SetModel( "models/humans/group04/male_04.mdl")     end) end)
Sorry, you need to Log In to post a reply to this thread.