Raised This Month: $ Target: $400
 0% 

SemiClip (module)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
smartydix
Junior Member
Join Date: Jan 2012
Old 08-17-2012 , 06:00   SemiClip (module)
Reply With Quote #1

Hi,

I do know that there are plenty of semiclip modules out there, but I haven't yet found one that suits me.

The module should to be as similar as it can to the semiclip (plugin) included in the Deathrun Manager.

While trying out some modules, I have encountered an issue which is:
When two players stand on a moving object on a map - the moving object stops and players start to loose health.
Actually, sometimes that wouldn't happen, but after the map change it would appear again and so on.

Or there may be a another solution to my problem, like modifying the module?

Please reply, thanks.

Last edited by smartydix; 08-17-2012 at 06:00.
smartydix is offline
pokemonmaster
princess milk
Join Date: Nov 2010
Location: Somewhere in this world
Old 08-17-2012 , 21:35   Re: SemiClip (module)
Reply With Quote #2

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

#pragma semicolon 1

new g_iSemiClip[33];

public 
plugin_init() {
    
register_plugin("DRM Semiclip""1.0""xPaw");
    
    
register_forwardFM_StartFrame,    "fwStartFrame",    );
    
register_forwardFM_AddToFullPack,    "fwFullPack",    );
}

public 
fwFullPackeseenthostflagsplayerpSet ) {
    if( 
player && g_iSemiClip[ent] && g_iSemiClip[host] ) {
        
set_es(esES_SolidSOLID_NOT);
        
set_es(esES_RenderModekRenderTransAlpha);
        
set_es(esES_RenderAmt100);
    }
    return 
FMRES_IGNORED;
}

public 
fwStartFrame() {
    static 
iPlayers[32], iNumiPlayeriPlayer2;
    
get_players(iPlayersiNum);
    
    
arrayset(g_iSemiClip0sizeof(g_iSemiClip));
    
    new 
iTeams[33] = {-1, ...};
    for( new 
0iNumi++ ) {
        
iPlayer iPlayers[i];
        
        if( !
is_user_alive(iPlayer) )
            continue;
        
        for( new 
0iNumj++ ) {
            
iPlayer2 iPlayers[j];
            
            if(
iPlayer == iPlayer2 || !is_user_alive(iPlayer2))
                continue;
            
            static 
Float:vOrigin1[3], Float:vOrigin2[3];
            
pev(iPlayerpev_originvOrigin1);
            
pev(iPlayer2pev_originvOrigin2);
            
            if( 
vector_distancevOrigin1vOrigin2 ) < 96) {
                if( 
iTeams[iPlayer] == -)
                    
iTeams[iPlayer]        = get_user_team(iPlayer);
                if( 
iTeams[iPlayer2] == -)
                    
iTeams[iPlayer2]    = get_user_team(iPlayer2);
                
                if( 
iTeams[iPlayer] == && iTeams[iPlayer2] == ) {
                    
g_iSemiClip[iPlayer]    = true;
                    
g_iSemiClip[iPlayer2]    = true;
                }
            }
        }
    }
    
    for( new 
0iNumi++ ) {
        
iPlayer iPlayers[i];
        
        if( 
is_user_alive(iPlayer) )
            
set_pev(iPlayerpev_solidg_iSemiClip[iPlayer] ? SOLID_NOT SOLID_SLIDEBOX);
    }
    
    return 
FMRES_IGNORED;

__________________
اَشْهَدُ اَنْ لَّآ اِلٰهَ اِلَّا اللہُ وَحْدَه لَا شَرِيْكَ لَه وَ اَشْهَدُ اَنَّ مُحَمَّدًا عَبْدُه وَرَسُوْلُه
No longer active in AMXX. Sorry.
pokemonmaster is offline
DSASDFGH
Senior Member
Join Date: Jul 2011
Location: Facebook
Old 09-03-2012 , 13:42   Re: SemiClip (module)
Reply With Quote #3

Quote:
Originally Posted by pokemonmaster View Post
PHP Code:
#include <amxmodx>
#include <fakemeta>
 
#pragma semicolon 1
 
new g_iSemiClip[33];
 
public 
plugin_init() {
    
register_plugin("DRM Semiclip""1.0""xPaw");
 
    
register_forwardFM_StartFrame,    "fwStartFrame",    );
    
register_forwardFM_AddToFullPack,    "fwFullPack",    );
}
 
public 
fwFullPackeseenthostflagsplayerpSet ) {
    if( 
player && g_iSemiClip[ent] && g_iSemiClip[host] ) {
        
set_es(esES_SolidSOLID_NOT);
        
set_es(esES_RenderModekRenderTransAlpha);
        
set_es(esES_RenderAmt100);
    }
    return 
FMRES_IGNORED;
}
 
public 
fwStartFrame() {
    static 
iPlayers[32], iNumiPlayeriPlayer2;
    
get_players(iPlayersiNum);
 
    
arrayset(g_iSemiClip0sizeof(g_iSemiClip));
 
    new 
iTeams[33] = {-1, ...};
    for( new 
0iNumi++ ) {
        
iPlayer iPlayers[i];
 
        if( !
is_user_alive(iPlayer) )
            continue;
 
        for( new 
0iNumj++ ) {
            
iPlayer2 iPlayers[j];
 
            if(
iPlayer == iPlayer2 || !is_user_alive(iPlayer2))
                continue;
 
            static 
Float:vOrigin1[3], Float:vOrigin2[3];
            
pev(iPlayerpev_originvOrigin1);
            
pev(iPlayer2pev_originvOrigin2);
 
            if( 
vector_distancevOrigin1vOrigin2 ) < 96) {
                if( 
iTeams[iPlayer] == -)
                    
iTeams[iPlayer]        = get_user_team(iPlayer);
                if( 
iTeams[iPlayer2] == -)
                    
iTeams[iPlayer2]    = get_user_team(iPlayer2);
 
                if( 
iTeams[iPlayer] == && iTeams[iPlayer2] == ) {
                    
g_iSemiClip[iPlayer]    = true;
                    
g_iSemiClip[iPlayer2]    = true;
                }
            }
        }
    }
 
    for( new 
0iNumi++ ) {
        
iPlayer iPlayers[i];
 
        if( 
is_user_alive(iPlayer) )
            
set_pev(iPlayerpev_solidg_iSemiClip[iPlayer] ? SOLID_NOT SOLID_SLIDEBOX);
    }
 
    return 
FMRES_IGNORED;

And it cannot give infection when player has semiclip
__________________
Learning SourceMod is happy
DSASDFGH is offline
smartydix
Junior Member
Join Date: Jan 2012
Old 12-19-2012 , 06:32   Re: SemiClip (module)
Reply With Quote #4

Well... A pretty late answer but I need the team semiclip module again..
And I did say Module, not plugin...
smartydix is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-19-2012 , 12:04   Re: SemiClip (module)
Reply With Quote #5

Why does it have to be a module?
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
smartydix
Junior Member
Join Date: Jan 2012
Old 01-05-2013 , 12:44   Re: SemiClip (module)
Reply With Quote #6

Quote:
Originally Posted by YamiKaitou View Post
Why does it have to be a module?
Well I have seen a lot of users on this forum saying that modules are a lot faster than plugins...
smartydix 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 01:46.


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