I don't get why, but still not working.
Code:
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <engine>
public plugin_init()
{
register_plugin ( "No objectives", "0.1a", "Killhim" );
}
public pfn_spawn(entid)
{
if (get_cvar_num("ctf_enabled") == 0)
{
return PLUGIN_CONTINUE //PLUGIN_HANDLED is making my server crash (it's just a bad usage of it)
}
if(!is_valid_ent(entid)) return PLUGIN_HANDLED
new class[51]
entity_get_string(entid,EV_SZ_classname,class,50)
if(equali(class,"hostage_entity"))
{
remove_entity(entid)
return PLUGIN_HANDLED
}
if(equali(class,"func_hostage_rescue"))
{
remove_entity(entid)
return PLUGIN_HANDLED
}
if(equal(class,"func_bomb_target"))
{
remove_entity(entid)
return PLUGIN_HANDLED
}
if(equal(class,"info_bomb_target"))
{
remove_entity(entid)
return PLUGIN_HANDLED
}
if(equal(class,"func_escapezone"))
{
remove_entity(entid)
return PLUGIN_HANDLED
}
if(equal(class,"func_vip_safteyzone"))
{
remove_entity(entid)
return PLUGIN_HANDLED
}
if(equal(class,"func_vip_start"))
{
remove_entity(entid)
return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
That is the code of the plugin I'm trying to write. Still doesn't work. Help me please.
(Actually what this is doing is NOTHING. Seems like this function can't acess to cvars...)