Hi. How can i remove entity with lua after map is loaded up?
I wanna remove the stupid zombie spawner button from sb_new_worlds_2.
Here is my current lua script but this wont work :(
[code]if (SERVER) then
local map = game.GetMap()
if string.find(map,"sb_new_worlds_2") then
local ents = ents.FindInSphere( Vector(4716, 6270, 4882), 1000 )
for _,ent in ipairs(ents) do
if string.find(ent:GetClass(),"func_button") then
ent:Remove()
end
end
end
end
[/code]
You want to do that in an InitPostEntity Hook.
[QUOTE=MakeR;17317797]You want to do that in an InitPostEntity Hook.[/QUOTE]
Its work now :) thanks you wery much!
No problem,
Sorry, you need to Log In to post a reply to this thread.