• how to get rid of spawned weapons in map
    8 replies, posted
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. [url]http://www.garrysmod.org/downloads/?a=view&id=22012[/url]
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 [editline]04:38PM[/editline] anyone answer plz
Here's a bind to do it(You'll need to press d every time you start up the map.) [code]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[/code] 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
[QUOTE=chelck;25212949]um. i want to get rid of them not make them do no damage[/QUOTE] 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: [lua] hook.Add( "InitPostEntity", "lolwat", function( ) for k, v in pairs( ents.GetAll( ) ) do if v:GetClass( ):lower( ):sub( 1, 6 ) == "weapon" then v:Remove( ); end; end; end ); [/lua]
[QUOTE=chelck;25212949]um. i want to get rid of them not make them do no damage[/QUOTE] 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
Sorry, you need to Log In to post a reply to this thread.