You dont have to necessarily remove the entity, you can disable it. This is a better option being that you can reenable it if you choose to disable your mod.
Here is what you need to disable it.
PHP Code:
function_DisableResupply(bool:activate)
{
new search = -1;
if (activate == true)
{
while ((search = FindEntityByClassname(search, "func_regenerate")) != -1)
AcceptEntityInput(search, "Disable");
}
else
{
while ((search = FindEntityByClassname(search, "func_regenerate")) != -1)
AcceptEntityInput(search, "Enable");
}
}
Just place function_DisableResupply(true) to disable and function_DisableResupply(false) to reenable it.
__________________