Basically I want to remove the Half Life zombie’s in darkrp for all joining players…Is that possible!
yes with remover tool
Need more info. “remove Half Life zombie’s in darkrp for all joining players…” please elaborate on what exactly you’re trying to do? Are they spawning on the map? Are you using an addon? Are you using DarkRP’s zombie system?
The Zombies are spawned with in the map. I have decompiled the map once to look at it and it seems that the zombies have spawn that are in yellow and black commanding the server to spawn them…But like subject is saying. Only if theres a way to remove them for joining players it would be great. I have tried doing that but I couldnt find the exact locations of the HL2 zombies in the server files that I am using…Thanks subject and Kaspery for your time.
ents.FindByClass( “npc_zombie” ):Remove()
I think. Maybe. I tried.
Put in lua/autorun/server it may or may not work. I hope it will for you.
Then you can use this NPC Spawn Creator to spawn whatever type NPC you want.
Ok thanks I will try it
You will probably need a timer to check for it because the zombies respawn. This could work.
[lua]timer.Simple( .1, function RemoveZombies()
ents.FindByClass( “npc_zombie” ):Remove() end )
That will check it after .1 seconds and remove the zombies.
There is an example of a spawner and remover here. You can toy with that function. http://wiki.garrysmod.com/page/timer/Simple
That’s only going to remove the first zombie that spawns on the map, and since it’s .1 seconds the zombies will probably make a sound at spawn.
hook.Add( “Think”, “RemoveZambies”, function()
for k,v in pairs( ents.FindByClass( “npc_zombie” ) ) do
if IsValid( v ) then
Replace the npc_zombie with the entity that you want removing.
[editline]13th November 2014[/editline]
Thinking about it, does the map use env_entity_maker?