Raised This Month: $ Target: $400
 0% 

Semiclip


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 11-18-2011 , 07:06   Re: Semiclip
Reply With Quote #5

That one Devil259 posted is actually working good, does someone know how to make it a Team Semiclip? Cuz I tried putting in each public a check if cs_get_user_team of the 2 player is equal then do the semiclip, but things mess up and they still can get into each other, I want them to block each other and not just be able to hit:

PHP Code:
#include < amxmodx >
#include < engine >
#include < fakemeta >
#include < hamsandwich >

#define IsPlayer(%1) ( 1 <= %1 <= g_iMaxPlayers )

new const g_szAliveFlags[ ] = "a";
new 
g_iPlayers32 ], g_iNumg_iPlayerg_iMaxPlayersi;

public 
plugin_init( )
{
    
register_plugin"Semiclip""1.0""ConnorMcLeod / xPaw" );
    
    
register_forwardFM_ShouldCollide"FwdShouldCollide" );
    
register_forwardFM_AddToFullPack"FwdAddToFullPack"true );
    
    
RegisterHamHam_Player_PreThink"player""FwdHamPlayerPreThink"true );
    
RegisterHamHam_Killed,          "player""FwdHamPlayerKilled",   true );
    
    
g_iMaxPlayers get_maxplayers( );
}

public 
FwdAddToFullPackeseiEntidhostflagsplayerpSet )
{
    if( 
player && id != iEnt && get_orig_retval( ) )
    {
        
set_esesES_SolidSOLID_NOT );
        
        static 
Float:flDistance;
        
flDistance entity_rangeidiEnt );
        
        if( 
flDistance 512.0 )
        {
            
set_esesES_RenderModekRenderTransAlpha )
            
set_esesES_RenderAmtfloatroundflDistance ) / );
        }
    }
}

public 
FwdShouldCollide( const iTouched, const iOther )
{
    if( 
IsPlayeriTouched ) && IsPlayeriOther ) )
    {
        
forward_returnFMV_CELL);
        return 
FMRES_SUPERCEDE;
    }
    
    return 
FMRES_IGNORED;
}

public 
FwdHamPlayerKilled( )
{
    
get_playersg_iPlayersg_iNumg_szAliveFlags );
    
    for( 
0g_iNumi++ )
    {
        
entity_set_intg_iPlayers], EV_INT_solidSOLID_SLIDEBOX );
    }
}

public 
FwdHamPlayerPreThink( const id )
    
SemiclipidSOLID_NOT );

public 
client_PostThinkid )
    
SemiclipidSOLID_SLIDEBOX );

Semiclip( const id, const iSolid )
{
    if( !
is_user_aliveid ) )
        return;
    
    
get_playersg_iPlayersg_iNumg_szAliveFlags );
    
    for( 
0g_iNumi++ )
    {
        
g_iPlayer g_iPlayers];
        
        if( 
id != g_iPlayer )
            
entity_set_intg_iPlayerEV_INT_solidiSolid );
    }

__________________
My Projects:

Auto-Mix (Pug): 100%

Joined the Military (a soldier now) - Inactive

Last edited by Diegorkable; 11-18-2011 at 07:06.
Diegorkable is offline
 



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 08:34.


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