I was making a pointshop weapon loadout and the problem is when you respawn it doesn't give you the item you bought
here is the code:
[LUA]
ITEM.Name = 'Shotgun'
ITEM.Price = 200
ITEM.Model = 'models/weapons/w_shot_xm1014.mdl'
ITEM.WeaponClass = 'weapon_zm_shotgun'
ITEM.SingleUse = false
function ITEM:OnBuy(ply)
ply:Give(self.WeaponClass)
ply:SelectWeapon(self.WeaponClass)
end
function ITEM:OnSell(ply)
ply:StripWeapon(self.WeaponClass)
end
function ITEM:Equip(ply)
ply:Give(self.WeaponClass)
ply:SelectWeapon(self.WeaponClass)
end
function ITEM:OnHolster(ply)
ply:StripWeapon(self.WeaponClass)
end
local function PlayerLoadout(ply)
ply:Give(self.WeaponClass)
ply:SelectWeapon(self.WeaponClass)
end
[/LUA]
Please Help
Sorry, you need to Log In to post a reply to this thread.