Fixing CW Grenades having inf ammo

Fix for infinite grenade ammo for this addon https://steamcommunity.com/sharedfiles/filedetails/?id=349050451

On line 111 of lua/weapons/cs_grenade_base/shared.lua it says
[lua]
self.Owner:ConCommand(“lastinv”)
[/lua]

replace it with
[lua]
if self.Owner:HasWeapon(“cw_flash_grenade”) == true then
self.Owner:StripWeapon(“cw_flash_grenade”)
end
if self.Owner:HasWeapon(“cw_smoke_grenade”) == true then
self.Owner:StripWeapon(“cw_smoke_grenade”)
end
if self.Owner:HasWeapon(“cw_frag_grenade”) == true then
self.Owner:StripWeapon(“cw_frag_grenade”)
end
[/lua]

it may give an error, but it works just fine.

Buy the legit newest version or move to NutScript.

What are you talking about? It’s a free workshop addon.

Not clockwork, Customizeable Weaponry.

You know, they have a ConCommand file, with a CONCOMMAND called lastinv.
Just find that file and replace it, with whatever you think.

Maybe who know how fix it?

if server then