Im running Asskicrs kz_multiplugin, and if someone has semiclip and walks into a teleport it crashes the server. I tried making a plugin to disable semiclip if they are near a teleport but it doesnt seem to be working. So, I am asking for assistance now after 24 hours of trial and error.
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 iEnts[1], iEntFlag, Float:flRadius = 200.0
find_sphere_class(id,"player",flRadius,iEnts,1)
if(iEnts[0])
iEntFlag = 0
find_sphere_class(id,"trigger_hurt",flRadius,iEnts,1)
if(iEnts[0])
iEntFlag = 2
//find_sphere_class(id,"trigger_teleport",flRadius,iEnts,1)
//if(iEnts[0])
// iEntFlag = 1
if(iEntFlag == 2)
{
entity_set_int(id,EV_INT_solid,2)
/*
entity_set_int(id,EV_INT_rendermode,0)
entity_set_int(id,EV_INT_renderfx,kRenderFxGlowShell)
entity_set_float(id,EV_FL_renderamt,255.0)
entity_set_vector(id,EV_VEC_rendercolor,entcolor)
*/
}
/*else if(iEntFlag == 1)
{
entity_set_int(id,EV_INT_solid,1)
entity_set_int(id,EV_INT_rendermode,2)
entity_set_int(id,EV_INT_renderfx,kRenderFxGlowShell)
entity_set_float(id,EV_FL_renderamt,175.0)
entity_set_vector(id,EV_VEC_rendercolor,entcolor)
}*/
else if(iEntFlag == 0)
{
entity_set_int(id,EV_INT_solid,0)
/*
entity_set_int(id,EV_INT_rendermode,2)
entity_set_int(id,EV_INT_renderfx,kRenderFxGlowShell)
entity_set_float(id,EV_FL_renderamt,175.0)
entity_set_vector(id,EV_VEC_rendercolor,entcolor)
*/
}
}
return PLUGIN_CONTINUE
}
Im not worried about the player transparency atm, unless someone knows how to make it work without having to look it up.
Anyways, once again my problem is semiclipping crashes the server when the player goes into a teleport, kz_multiplugin also crashes server.
Id like to get the plugin I posted to work because it enables automatically on the player when the player is near another player.