Ok, I have tried everything I have thought of to godmode an ent. It still doesn't work. A little help would be nice.
Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta>
#include <fun_stocks>
#define PLUGIN "Meck V3B1 Cleanup"
#define VERSION "1.0"
#define AUTHOR "Minimum"
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
set_task(5.0,"cleanup")
}
public cleanup() {
new ent = 0, entity = 0
while ((ent = find_ent_by_class(ent, "func_door"))) {
set_entity_flags(ent, FL_GODMODE, 1 );
}
while ((entity = find_ent_by_class(entity, "func_door_rotating"))) {
set_entity_flags(entity, FL_GODMODE, 1 );
}
set_entity_flags(120, FL_GODMODE, 1 );
server_print("Successfully Executed Cleanup.")
return PLUGIN_HANDLED
}