Ok I wanted a script that removes the entid's of hostage bomb and vip
so I searched around and found the correct classnames
but then I put the script on my server and i doesn't even start the loop a the beginning...
this is my very first script and I made it with a lot of help from hawk
any suggestions?
Code:
#include <amxmodx>
#include <engine>
#define MAXENTS 512
public plugin_init()
{
register_plugin("Objective Remover","1.0","proach")
register_event("RoundTime", "check_obj", "bc")
register_cvar("amx_remhostages","1")
register_cvar("amx_rembomb","1")
register_cvar("amx_remvip","1")
}
public check_obj()
{
client_print(0,print_chat,"[DEBUG] Round end detected.")
new entid
for(entid=0;entid >= 512; entid++)
{
client_print(0,print_chat,"[DEBUG] Loop check beginning.")
new classname[16]
entity_get_string(entid,EV_SZ_classname,classname,15)
if(get_cvar_num("amx_remhostages")==1)
{
client_print(0,print_chat,"[DEBUG] cvar amx_remhostages is 1.")
if(containi(classname,"hostage")!=-1)
{
client_print(0,print_chat,"[DEBUG] A hostage has been detected.")
remove_entity(entid)
}
if(containi(classname,"func_hostage_rescue")!=-1)
{
client_print(0,print_chat,"[DEBUG] A hostage rescue zone has been detected.")
remove_entity(entid)
__________________