Hey guys,
So I have a problem in a Deathrun server I run, I enabled semiclip plugin there (semiclip is a plugin where players won't be stuck if they touch each other, and can get past each other, by setting them to SOLID_NOT). The problem is that, in certain deathrun maps, there are doors that open when you touch them, and portals when you stand on them they teleport you to another location, or for example, floors that when you stand on them you die.
The problem is that when 2 players stand near a door, or on a floor, it isn't activated, because of the semiclip, it sets both the players to SOLID_NOT and the map simply doesn't detect them and don't open the door for them, or doesn't kill them, or doens't teleport them, and it leads to a major bug abuse or simply ruining the game cuz too many players stand on a teleporting location and all get stuck.
Here is the semiclip code(its a team semiclip, so the CT will be able to kill T, and opposite):
PHP Code:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <cstrike>
#include <fun>
#include <fakemeta>
#define PLUGIN "Semi-Clip"
#define VERSION "1.0"
#define AUTHOR "p1Mp"
new g_iSemiClip[33]
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_forward( FM_StartFrame, "FwdStartFrame", 0 );
register_forward( FM_AddToFullPack, "FwdFullPack", 1 );
}
public FwdFullPack( es, e, ent, host, flags, player, pSet ) {
if( player && g_iSemiClip[ ent ] && g_iSemiClip[ host ] ) {
set_es( es, ES_Solid, SOLID_NOT );
set_es( es, ES_RenderMode, kRenderTransAlpha );
set_es( es, ES_RenderAmt, 85 );
}
return FMRES_IGNORED;
}
public FwdStartFrame( ) {
static iPlayers[ 32 ], iNum, iPlayer, iPlayer2, i, j;
get_players( iPlayers, iNum, "ache", "CT" );
arrayset( g_iSemiClip, 0, 32 );
if( iNum <= 1 )
return FMRES_IGNORED;
for( i = 0; i < iNum; i++ ) {
iPlayer = iPlayers[ i ];
for( j = 0; j < iNum; j++ ) {
iPlayer2 = iPlayers[ j ];
if( iPlayer == iPlayer2 || cs_get_user_team(iPlayer) != cs_get_user_team(iPlayer2) )
continue;
if( g_iSemiClip[ iPlayer ] && g_iSemiClip[ iPlayer2 ] )
continue;
if( entity_range( iPlayer, iPlayer2 ) < 128 ) {
g_iSemiClip[ iPlayer ] = true;
g_iSemiClip[ iPlayer2 ] = true;
}
}
}
for( i = 0; i < iNum; i++ ) {
iPlayer = iPlayers[ i ];
set_pev( iPlayer, pev_solid, g_iSemiClip[ iPlayer ] ? SOLID_NOT : SOLID_SLIDEBOX );
}
return FMRES_IGNORED;
}
I couldn't find a suitable solution to solve that problem, I'd be really glad if you guys can help me
__________________