Hi,
Once again I need help. This time with semiclip. I want to make so that if player has bool
Respawning[id] = true he can walk through enemy team players (but not his own team players). I suppose I just need to put somewhere
if(Respawning[id]) check. The problem is that I don't know which of addToFullPack function's parameters refers to id/player (I have tried Respawning[player]).
PHP Code:
public addToFullPack(es, e, ent, host, hostflags, player, pSet)
{
if(player)
{
if(plrSolid[host] && plrSolid[ent] && plrTeam[host] == plrTeam[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))
{
plrSolid[i] = false
continue
}
plrTeam[i] = get_user_team(i)
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
if(plrTeam[i] == plrTeam[id])
{
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
}
}
}
Thanks.