Code:
/*
Auto Semiclip Standalone
*/
#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <engine>
#include <cstrike>
#define PLUGIN "Auto Semiclip Standalone"
#define VERSION "1"
#define AUTHOR "SentryIII"
//new Float:entcolor[3] = {127.0,20.0,20.0}
public plugin_init()
{
register_plugin(PLUGIN,VERSION,AUTHOR)
register_cvar("auto_semiclip","1")
}
public client_PreThink(id)
{
if(!is_user_alive(id))
return PLUGIN_CONTINUE
if(get_cvar_num("auto_semiclip"))
{
new origin[3], Float: forigin[3]
new ent, classname[32]
get_user_origin(id, origin, 0)
IVecFVec(origin, forigin)
while((ent = find_ent_in_sphere(ent,forigin,200.0)) != 0 ){
entity_get_string(ent,EV_SZ_classname,classname,31);
if (equali(classname,"func_teleport"))
{
entity_set_int(id,EV_INT_solid,SOLID_TRIGGER)
set_user_rendering(id,kRenderFxNormal,0,0,0,kRenderNormal,0)
return PLUGIN_CONTINUE
}
else if(equali(classname,"player"))
{
entity_set_int(id,EV_INT_solid,SOLID_NOT)
set_user_rendering(id,kRenderFxHologram,200,200,200,kRenderTransAlpha,25)
return PLUGIN_CONTINUE
}
else
{
entity_set_int(id,EV_INT_solid,SOLID_BBOX)
set_user_rendering(id,kRenderFxNormal,0,0,0,kRenderNormal,0)
return PLUGIN_CONTINUE
}
}
}
return PLUGIN_CONTINUE
}
The problem now is that when it searches for the player class it obviouslly finds the player on the client, but I need it to skip the first player found. Any suggestions?