• csgo knives disappeared
    5 replies, posted
hi i have deathrun server with pointshop and when someone buying an knife from the shop It disappeared after one round and cant be equiqed anymore even if im doing holster and then equiq its still dosent work this is the code im using : [CODE]ITEM.Name = 'Karambit' ITEM.Price = 15000 ITEM.Model = 'models/weapons/w_csgo_karambit.mdl' ITEM.WeaponClass = 'csgo_karambit' 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[/CODE] how can i fix that ? this is the addon i use of the knives : [url]http://steamcommunity.com/sharedfiles/filedetails/?id=506283460[/url]
You'll probably have to regive it to them in the Loadout hook.
[QUOTE=code_gs;50762783]You'll probably have to regive it to them in the Loadout hook.[/QUOTE] how do i do that ? and its mean i need to do this every round ?
[QUOTE=soosy;50762819]how do i do that ? and its mean i need to do this every round ?[/QUOTE] I don't know how to get Pointshop weapons, but something like this: [code]hook.Add( "PlayerSpawn", "Restore weapons", function( ply ) for k, v in pairs( GetPointshopWeapons() ) do ply:Give( v ) end end )[/code]
Use ITEM:OnEquip instead of OnBuy
[QUOTE=meharryp;50766299]Use ITEM:OnEquip instead of OnBuy[/QUOTE] thank you man it work :)
Sorry, you need to Log In to post a reply to this thread.