Well that plugin makes semiclip at ladders.
Well my problem is that he only do semiclip when is 2 people on the ladder. Is possible put when is only one player on the ladder he get's automatically semiclip. This is for hns for the people on the ladder don't block. Can some one edit this plugin and put that? Help plz
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#define PLUGIN "Semiclip"
#define VERSION "1.31"
#define AUTHOR "skyjur"
new bool:plrSolid[33]
new bool:plrRestore[33]
new maxplayers
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_forward(FM_PlayerPreThink, "preThink")
register_forward(FM_PlayerPostThink, "postThink")
register_forward(FM_AddToFullPack, "addToFullPack", 1)
maxplayers = get_maxplayers()
}
public addToFullPack(es, e, ent, host, hostflags, player, pSet)
{
if(player)
{
if(plrSolid[host] && plrSolid[ent])
{
set_es(es, ES_Solid, SOLID_NOT)
set_es(es, ES_RenderMode, kRenderTransAlpha)
set_es(es, ES_RenderAmt, 85)
}
}
}
FirstThink()
{
for(new i = 1; i <= maxplayers; i++)
{
if(!is_user_alive(i) || pev(i, pev_movetype) != MOVETYPE_FLY)
{
plrSolid[i] = false
continue
}
plrSolid[i] = pev(i, pev_solid) == SOLID_SLIDEBOX ? true : false
}
}
public preThink(id)
{
static i, LastThink
if(LastThink > id)
{
FirstThink()
}
LastThink = id
if(!plrSolid[id]) return
for(i = 1; i <= maxplayers; i++)
{
if(!plrSolid[i] || id == i) continue
set_pev(i, pev_solid, SOLID_NOT)
plrRestore[i] = true
}
}
public postThink(id)
{
static i
for(i = 1; i <= maxplayers; i++)
{
if(plrRestore[i])
{
set_pev(i, pev_solid, SOLID_SLIDEBOX)
plrRestore[i] = false
}
}
}
Thx
__________________