I’ve found a thing that does so for a player, but not an NPC. When an NPC dies, it drops it’s weapon, very bad for my gamemode. How to fix?
a quick google search and i found this http://wiki.garrysmod.com/page/Player/ShouldDropWeapon is that what your looking for?
at least i got the ShouldDropWeapon bit right
NPC =/= player.
yes sorry… lol internet crappy atm
If you are talking about default NPCs, there’s no feasible way. For nextbots and SNPCs, pretty sure you can use ShouldDropWeapon with them also.
I actually don’t care if they drop weapons. The thing I want is the player to be able to just fight normal NPCs with weapons and not have them for their own use. How about making them disappear on spawn (don’t know how) or making players not being able to pick up ANY weapons (don’t know how)
This is what you want:
function GM:PlayerCanPickupWeapon( _p, _w )
You can set bot weapons to have a flag… So, if the client tries picking them up, or on bot death you can remove weapons with that flag / remove them and not allow clients to pick them up.