Raised This Month: $ Target: $400
 0% 

request semiclip for kz server


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
alexan
Senior Member
Join Date: Mar 2009
Old 07-05-2009 , 06:48   request semiclip for kz server
Reply With Quote #1

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 <amxmodx>
#include <fakemeta>
#include <engine>

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[i] ) {
gPlayerSolid[i] = false;

continue;
}

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

iLastThink = id;

if( !gPlayerSolid[id] )
return;

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

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

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

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

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


Thx for your help !!
alexan is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode