Quote:
Originally Posted by schmurgel1983
|
it has few bugs.. tried it already.
EDIT: The semiclip Im currently using is really good, but when 2 players stand together on an object that should kill you when you touch it, they stay alive, until they move from each other, then they die. Why is it? and how do I fix such thing?
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 "xPaw"
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 )
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;
}
__________________