I've edited the semiclip by connor, but I have some mistakes, sometimes semiclip doesn't work or players get stucked for a while... and map entitys doesn't work too u.u...
What I must do to a great work with no bugs, and how I can set 50% of transparency of the players.
Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>
/* Definition */
#define RefreshPlayersList() get_players(iPlayers,iNum,szAliveFlags)
/* Players */
new iPlayers[32];
new iNum,iPlayer,i;
new const szAliveFlags[] = "a";
/* Spectator */
new isSpectating[33];
public plugin_init()
{
/* Plugin Registration */
register_plugin("Semiclip", "1.0", "Enomine");
/* Forwards */
register_forward(FM_AddToFullPack, "fwdAddToFullPack", 1);
register_forward(FM_PlayerPreThink, "fwdPlayerPreThink", 1);
register_forward(FM_PlayerPostThink, "fwdPlayerPostThink", 1);
}
public fwdAddToFullPack(Es,E,iEnt,id,Hostflags,Player,pSet)
{
if(Player && id != iEnt)
{
if(iEnt != isSpectating[id])
entity_set_int(Es, EV_INT_solid, SOLID_NOT);
}
}
public fwdPlayerPreThink(id)
{
RefreshPlayersList();
for(i = 0;i < iNum;i++)
{
iPlayer = iPlayers[i];
if(id != iPlayer)
entity_set_int(iPlayer, EV_INT_solid, SOLID_NOT);
}
if(!is_user_alive(id))
isSpectating[id] = entity_get_int(id, EV_INT_iuser2);
}
public fwdPlayerPostThink(id)
{
RefreshPlayersList();
for(i = 0;i < iNum;i++)
{
iPlayer = iPlayers[i];
if(id != iPlayer)
entity_set_int(iPlayer, EV_INT_solid, SOLID_SLIDEBOX);
}
}
sorry for my bad english.