Raised This Month: $ Target: $400
 0% 

Semiclip


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 11-17-2011 , 12:05   Semiclip
Reply With Quote #1

Hey guys,

I tried to take out the semiclip from xPaw's Deathrun Manager, but with no success. What am I missing here? (its not working, ppl still block each other.)

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(PLUGINVERSIONAUTHOR)
    
    
register_forwardFM_StartFrame"FwdStartFrame");
    
register_forwardFM_AddToFullPack"FwdFullPack");
}

public 
FwdFullPackeseenthostflagsplayerpSet ) {
    
    if( 
player && g_iSemiClipent ] && g_iSemiCliphost ] ) {
        
set_esesES_SolidSOLID_NOT );
        
set_esesES_RenderModekRenderTransAlpha );
        
set_esesES_RenderAmt85 );
    }
    
    return 
FMRES_IGNORED;
}

public 
FwdStartFrame( ) {
    
    static 
iPlayers32 ], iNumiPlayeriPlayer2ij;
    
get_playersiPlayersiNum"ache""CT" );
    
    
arraysetg_iSemiClip032 );
    
    if( 
iNum <= )
        return 
FMRES_IGNORED;
    
    for( 
0iNumi++ ) {
        
iPlayer iPlayers];
        
        for( 
0iNumj++ ) {
            
iPlayer2 iPlayers];
            
            if( 
iPlayer == iPlayer2 )
                continue;
            
            if( 
g_iSemiClipiPlayer ] && g_iSemiClipiPlayer2 ] )
                continue;
            
            if( 
entity_rangeiPlayeriPlayer2 ) < 128 ) {
                
g_iSemiClipiPlayer ]    = true;
                
g_iSemiClipiPlayer2 ]    = true;
            }
        }
    }
    
    for( 
0iNumi++ ) {
        
iPlayer iPlayers];
        
        
set_peviPlayerpev_solidg_iSemiClipiPlayer ] ? SOLID_NOT SOLID_SLIDEBOX );
    }
    
    return 
FMRES_IGNORED;

__________________
My Projects:

Auto-Mix (Pug): 100%

Joined the Military (a soldier now) - Inactive
Diegorkable is offline
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 11-17-2011 , 12:46   Re: Semiclip
Reply With Quote #2

Nevermind, it is actually working, don't know what changed. I'll leave it here if anyone wants it. It's actually really good cuz it doesn't has this bug when you stand on a moving object with someone else you both get damaged or die.
__________________
My Projects:

Auto-Mix (Pug): 100%

Joined the Military (a soldier now) - Inactive

Last edited by Diegorkable; 11-17-2011 at 12:47.
Diegorkable is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 11-18-2011 , 05:39   Re: Semiclip
Reply With Quote #3

http://forums.alliedmods.net/showpos...8&postcount=86
Devil259 is offline
hzqst
Senior Member
Join Date: Jul 2008
Old 11-18-2011 , 06:19   Re: Semiclip
Reply With Quote #4

Search in Module Coding
hzqst is offline
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
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 11-18-2011 , 08:55   Re: Semiclip
Reply With Quote #6

EDIT: I use now the first code for me its really good.

I want something else if someone could help me with, I want that with the fact that players on the same team can not block each other, I want also that they can hit each other ---> It means that the semiclip works good they cant block each other, but they can hit each other.

How do I do that?

Code:

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(PLUGINVERSIONAUTHOR
     
    
register_forwardFM_StartFrame"FwdStartFrame"); 
    
register_forwardFM_AddToFullPack"FwdFullPack"); 


public 
FwdFullPackeseenthostflagsplayerpSet ) { 
     
    if( 
player && g_iSemiClipent ] && g_iSemiCliphost ] ) { 
        
set_esesES_SolidSOLID_NOT ); 
        
set_esesES_RenderModekRenderTransAlpha ); 
        
set_esesES_RenderAmt85 ); 
    } 
     
    return 
FMRES_IGNORED


public 
FwdStartFrame( ) { 
     
    static 
iPlayers32 ], iNumiPlayeriPlayer2ij
    
get_playersiPlayersiNum"ache""CT" ); 
     
    
arraysetg_iSemiClip032 ); 
     
    if( 
iNum <= 
        return 
FMRES_IGNORED
     
    for( 
0iNumi++ ) { 
        
iPlayer iPlayers]; 
         
        for( 
0iNumj++ ) { 
            
iPlayer2 iPlayers]; 
             
            if( 
iPlayer == iPlayer2 
                continue; 
             
            if( 
g_iSemiClipiPlayer ] && g_iSemiClipiPlayer2 ] ) 
                continue; 
             
            if( 
entity_rangeiPlayeriPlayer2 ) < 128 ) { 
                
g_iSemiClipiPlayer ]    = true
                
g_iSemiClipiPlayer2 ]    = true
            } 
        } 
    } 
     
    for( 
0iNumi++ ) { 
        
iPlayer iPlayers]; 
         
        
set_peviPlayerpev_solidg_iSemiClipiPlayer ] ? SOLID_NOT SOLID_SLIDEBOX ); 
    } 
     
    return 
FMRES_IGNORED

__________________
My Projects:

Auto-Mix (Pug): 100%

Joined the Military (a soldier now) - Inactive
Diegorkable is offline
schmurgel1983
Veteran Member
Join Date: Aug 2006
Location: Germany
Old 11-19-2011 , 09:14   Re: Semiclip
Reply With Quote #7

try this one http://forums.alliedmods.net/showthread.php?t=137980
__________________

Working on:
nothing
schmurgel1983 is offline
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 11-19-2011 , 13:05   Re: Semiclip
Reply With Quote #8

Quote:
Originally Posted by schmurgel1983 View Post
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(PLUGINVERSIONAUTHOR)  
      
    
register_forwardFM_StartFrame"FwdStartFrame");  
    
register_forwardFM_AddToFullPack"FwdFullPack");  
}  

public 
FwdFullPackeseenthostflagsplayerpSet ) {  
      
    if( 
player && g_iSemiClipent ] && g_iSemiCliphost ] ) {  
        
set_esesES_SolidSOLID_NOT );  
        
set_esesES_RenderModekRenderTransAlpha );  
        
set_esesES_RenderAmt85 );  
    }  
      
    return 
FMRES_IGNORED;  
}  

public 
FwdStartFrame( ) {  
      
    static 
iPlayers32 ], iNumiPlayeriPlayer2ij;  
    
get_playersiPlayersiNum"ache""CT" );  
      
    
arraysetg_iSemiClip032 );  
      
    if( 
iNum <= )  
        return 
FMRES_IGNORED;  
      
    for( 
0iNumi++ ) {  
        
iPlayer iPlayers];  
          
        for( 
0iNumj++ ) {  
            
iPlayer2 iPlayers];  
              
            if( 
iPlayer == iPlayer2 )  
                continue;  
              
            if( 
g_iSemiClipiPlayer ] && g_iSemiClipiPlayer2 ] )  
                continue;  
              
            if( 
entity_rangeiPlayeriPlayer2 ) < 128 ) {  
                
g_iSemiClipiPlayer ]    = true;  
                
g_iSemiClipiPlayer2 ]    = true;  
            }  
        }  
    }  
      
    for( 
0iNumi++ ) {  
        
iPlayer iPlayers];  
          
        
set_peviPlayerpev_solidg_iSemiClipiPlayer ] ? SOLID_NOT SOLID_SLIDEBOX );  
    }  
      
    return 
FMRES_IGNORED;  

__________________
My Projects:

Auto-Mix (Pug): 100%

Joined the Military (a soldier now) - Inactive

Last edited by Diegorkable; 11-19-2011 at 13:23.
Diegorkable is offline
schmurgel1983
Veteran Member
Join Date: Aug 2006
Location: Germany
Old 11-19-2011 , 17:50   Re: Semiclip
Reply With Quote #9

Quote:
Originally Posted by Diegorkable View Post
it has few bugs.. tried it already.
tell me the "bugs"
__________________

Working on:
nothing
schmurgel1983 is offline
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 11-20-2011 , 01:38   Re: Semiclip
Reply With Quote #10

The reason I opened this thread are those bugs.
I run a deathrun server with the plugin I've built, and many people play it everyday. The thing is that when 2 players stand on a block together (any moving map object), at the second it starts moving, if the two players touch each other one of them die, or sometimes when they stand together on a moving object they both get hit and damaged till they seperate again.
__________________
My Projects:

Auto-Mix (Pug): 100%

Joined the Military (a soldier now) - Inactive
Diegorkable 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 08:34.


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