ok i have this awesome map and i want to use it for my rp server. the problem is, is that the map has weapons laying evrywere and i dont want them there. is there a command or somthing that gets rid of all weapons in the map or somthing. heres the map i got.
If you see somebody with a weapon !kill them?
lol no. im serious, theres like 70 weapons total in this map cause it was originaly a deathmatch map
anyone answer plz
Here’s a bind to do it(You’ll need to press d every time you start up the map.)
Bind d "sv_cheats 1 ; ent_fire weapon_smg kill ; ent_fire weapon_ar2 kill ; ent_fire weapon_crossbow kill ; ent_fire weapon_shotgun kill ; ent_fire weapon_pistol kill ; ent_fire weapon_rpg kill ; sv_cheats 0
Paste that into a text file and save it as all files with the name autoexec.cfg(Not .txt.cfg, just .cfg) then paste it into your garrysmod/garrysmod/cfg folder.
um. i want to get rid of them not make them do no damage
Try looking up what ent_kill does, it removes all entities of that type from the map.
Simple, use an InitPostEntity hook and a for loop, etc:
hook.Add( “InitPostEntity”, “lolwat”, function( )
for k, v in pairs( ents.GetAll( ) ) do
if v:GetClass( ):lower( ):sub( 1, 6 ) == “weapon” then
It deletes them from the map you fat bastard. Last time i help you.
nm i don’t need to. i decided to go with omgcity. and i should have looked it up but i had to go somewere. srry