[lua]
local function InitPostEntity()
--Remove buttons
ents.GetByIndex(461):Remove()
ents.GetByIndex(462):Remove()
end
hook.Add("InitPostEntity", "CorleoneInitPostEntity", InitPostEntity)
[/lua]
This was working, but suddently it stopped working.. I'm sure the ID's of the entitles are right, how to fix this? There are no errors.
easier if you do this
for k , v in ipairs(ents.FindByClass("func_button")) do v:Remove() end
[QUOTE=|FlapJack|;26401679]easier if you do this
for k , v in ipairs(ents.FindByClass("func_button")) do v:Remove() end[/QUOTE]
I can't use that, because there are other buttons in the map I want to use. I only need these 2 buttons removed.
[QUOTE=jdmmer;26401729]I can't use that, because there are other buttons in the map I want to use. I only need these 2 buttons removed.[/QUOTE]
Save the position of the entities you want. Remove all entities with the same position.
[QUOTE=|FlapJack|;26401859]Save the position of the entities you want. Remove all entities with the same position.[/QUOTE]
Working as a charm, thanks for your help.
Sorry, you need to Log In to post a reply to this thread.