• TTT Pointshop Weapon Dropping!
    0 replies, posted
Hey Guys, Basically i have added in pointshop to my server and in my weapons folder i have put in a weapon called the P228. When you buy it it gives you the weapon fine but if you already have a pistol it wont give you the p228 (p228 is a pistol) but will spend your points. This is the normal working code: [CODE] TEM.Name = 'P228' ITEM.Price = 3 ITEM.Model = 'models/weapons/w_pist_p228.mdl' ITEM.WeaponClass = 'weapon_ttt_p228' ITEM.SingleUse = true function ITEM:OnBuy(ply) ply:Give(self.WeaponClass) ply:SelectWeapon(self.WeaponClass) end function ITEM:OnSell(ply) ply:StripWeapon(self.WeaponClass) end [/CODE] It works fine if u dont already have a weapon in that slot. Im wanting to make it so when you buy a gun it will drop what ever gun is in that slot for example: Deagle Is Equiped,When You Buy P228, Deagle Is Dropped, And P228 is Equiped. i have attempted to do this by looking at other threads but no luck, Attempted Code Below: [CODE] TEM.Name = 'P228' ITEM.Price = 3 ITEM.Model = 'models/weapons/w_pist_p228.mdl' ITEM.WeaponClass = 'weapon_ttt_p228' ITEM.SingleUse = true function ITEM:OnBuy(ply) ply:DropWeapon(Weapon:GetSlot(1)) ply:Give(self.WeaponClass) ply:SelectWeapon(self.WeaponClass) end function ITEM:OnSell(ply) ply:StripWeapon(self.WeaponClass) end [/CODE] Thanks For Helping.
Sorry, you need to Log In to post a reply to this thread.