Hello,
I have tried many times with doing this, But all I want to do is in the pointshop you can add player models. I want the player model to only be used if they are a certain job.
In my scenario it is I got a job called Undercover Cop, And I want them to be able to change there player model but I don’t want some thing like a Gun Dealer to change into a different player model.
Could any write a piece of code I have been trying to find for ages on my own but couldn’t find.
Thanks
I see this happening one of two ways.
- Only allowing the player to change to the model when they are a job via pointshop
http://pointshop.burt0n.net/items - use the item:OnBuy() hook or item:OnEquip() hook with player:Team()
OR
- allowing the player to choose the model they want to look like when spawning as the job
http://wiki.darkrp.com/index.php/DarkRP:CustomJobFields
model = {
"models/player/Group03/Female_01.mdl",
"models/player/Group03/Female_02.mdl"
}
function ITEM:OnBuy(ply)
if ( ply:Team() ~= "TEAM_WHATEVER" )
return false
end
end
Thanks both, I’ll try code_gs’s first cause it look likes it should work:D