My issue I think is pretty simple, I haven’t really been able to figure it out though as I can’t really lua code.
What I want to do is make it so that when you change from one team to another, your model holsters.
(This is on a jailbreak gamemode, TEAM_PRISONER = prisoner TEAM_JAILOR = prison guard)
So far I’ve managed to make it so that if you do not have the model currently equipped and you are the wrong team, you can not equip the model.
I’m trying to get it so that if you are prisoner, you buy the model and then you change the prison guard, you revert back to the default prison guard skin.
Any help would be very much appreciated!
ITEM.Name = 'Kleiner' ITEM.Price = 0 ITEM.Model = 'models/player/kleiner.mdl' function ITEM:CanPlayerBuy(ply) return ply:SteamID() == "STEAM_0:1:3509" and ply:Team() == TEAM_PRISONER end function ITEM:CanPlayerEquip(ply) return ply:Team() == TEAM_PRISONER end function ITEM:OnEquip(ply, modifications) if not ply._OldModel then ply._OldModel = ply:GetModel() end timer.Simple(1, function() ply:SetModel(self.Model) end) end function ITEM:OnHolster(ply) if ply._OldModel then ply:SetModel(ply._OldModel) end end function ITEM:PlayerSetModel(ply) ply:SetModel(self.Model) end