[moved] Reqest Semiclip for kz server

Started by Mr Alex
03/07/2009 16:24
Page 1 of 1
Mr Alex03/07/2009 16:24(edited 03/07/2009 20:23)

I need a semiclip plugin whit a /boost cmd (command) so that 2 players can boost each other, Im currently useing kz arg 1.7, and I have asked the auther of the plugin to add a /boost cmd to his semiclip, but he have not answerd.

I have looked everywhere for info, alliedmodders, fragbite, google, Extreme jumps, and in the sma files of kz_multiplayer and climb plugin, but haven't found anything, if you can find the code plz upload it, I would really appreciate it !!

Here is a working semiclip /boost plugin, by xPaw but there is a error : Solid player (with boost) can pass though normal players ( semiclipped ) but they cant pass him since he is solid. If you could fix this error it would be much appreciated.


#include
#include
#include

new bool:gPlayerBoost[33], bool:gPlayerSolid[33], bool:gPlayerRestore[33];
new gPlayerAlive[33], gMaxplayers;

public plugin_init() {
register_plugin( "#kz.xPaw [ Semiclip ]", "1.0", "xPaw" );

register_clcmd( "say /boost", "cmdToggleBoost" );

gMaxplayers = get_maxplayers();

register_event( "ResetHUD", "Event_ResetHUD", "b" );
register_event( "Health", "Event_Health", "b" );

register_forward( FM_AddToFullPack, "fwdAddToFullPack", 1 );
register_forward( FM_PlayerPreThink, "fwdPlayerPreThink" );
register_forward( FM_PlayerPostThink, "fwdPlayerPostThink" );
}

public cmdToggleBoost( id ) {
if( !gPlayerAlive[id] ) {
client_print( id, print_chat, "* Be alive, bitch!" );

return PLUGIN_CONTINUE;
}

client_print( id, print_chat, "* Boost toggled, bitch!" );

gPlayerBoost[id] = !gPlayerBoost[id];

return PLUGIN_CONTINUE;
}

public client_putinserver( id ) {
gPlayerAlive[id] = false;
gPlayerBoost[id] = false;
}

public client_disconnect( id ) {
gPlayerAlive[id] = false;
gPlayerBoost[id] = false;
}

public Event_ResetHUD( id ) {
gPlayerAlive[id] = is_user_alive( id );
}

public Event_Health( id ) {
gPlayerAlive[id] = is_user_alive( id );
}

public fwdAddToFullPack( es, e, ent, host, hostflags, player, pSet ) {
if( player ) {
if( ( !gPlayerAlive[host] || gPlayerSolid[host] ) && gPlayerSolid[ent] && !gPlayerBoost[ent] ) {
static Float:flDistance;
flDistance = entity_range( host, ent );
if( flDistance < 512.0 ) {
set_es( es, ES_Solid, SOLID_NOT );
set_es( es, ES_RenderMode, kRenderTransAlpha );
set_es( es, ES_RenderAmt, 100 );
}
}
}
}

public fwdPlayerPreThink( id ) {
static i, iLastThink;

if( iLastThink > id ) {
for( i = 1; i <= gMaxplayers; i++ ) {
if( !gPlayerAlive ) {
gPlayerSolid = false;

continue;
}

gPlayerSolid = pev(i, pev_solid) == SOLID_SLIDEBOX ? true : false;
}
}

iLastThink = id;

if( !gPlayerSolid[id] )
return;

for( i = 1; i <= gMaxplayers; i++ ) {
if( !gPlayerSolid || id == i || gPlayerBoost )
continue;

set_pev( i, pev_solid, SOLID_NOT );
gPlayerRestore = true;
}
}

public fwdPlayerPostThink( id ) {
static i, Float:flGravity;

for( i = 1; i <= gMaxplayers; i++ ) {
if( gPlayerRestore ) {
pev( i, pev_gravity, flGravity );
set_pev( i, pev_solid, SOLID_SLIDEBOX );
gPlayerRestore = false;

if( flGravity != 1.0 )
set_pev( i, pev_gravity, flGravity );
}
}
}


Thx for your help !!

Page 1 of 1

Please log in to post replies.