• ShopPoint ammo
    2 replies, posted
Hello, I'v just start a new server and I'v added the first pointshop addon. I want place all weapon in the pointshop menu and also sell ammo soo, i'v code this code (lol) [CODE]ITEM.Name = 'Munitions' ITEM.Price = 10 ITEM.Model = 'models/items/boxmrounds.mdl' ITEM.SingleUse = true function ITEM:OnBuy(ply) local wep = ply:GetActiveWeapon() ply:SetAmmo(100,wep.GetPrimaryAmmoType()) end function ITEM:OnSell(ply) end[/CODE] but that didn't work and don't make any error at all :'( Ps: I'm french so sorry for my english <3
You should use GiveAmmo, and it's wep[B]:[/B]GetPrimaryAmmoType()
[QUOTE=code_gs;52091022]You should use GiveAmmo, and it's wep[B]:[/B]GetPrimaryAmmoType()[/QUOTE] GG xD I'v just found, thx a lot <3 (for other, the code is: [CODE]ITEM.Name = 'Munitions' ITEM.Price = 10 ITEM.Model = 'models/items/boxmrounds.mdl' ITEM.SingleUse = true function ITEM:OnBuy(ply) local wep = ply:GetActiveWeapon() ply:GiveAmmo(100,wep:GetPrimaryAmmoType(),false) end function ITEM:OnSell(ply) end[/CODE] )
Sorry, you need to Log In to post a reply to this thread.