Raised This Month: $ Target: $400
 0% 

help - semiclip ladders


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
arnaldo_silva
Member
Join Date: Jun 2008
Old 08-28-2009 , 18:18   help - semiclip ladders
Reply With Quote #1

Well that plugin makes semiclip at ladders.

Well my problem is that he only do semiclip when is 2 people on the ladder. Is possible put when is only one player on the ladder he get's automatically semiclip. This is for hns for the people on the ladder don't block. Can some one edit this plugin and put that? Help plz

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

#define PLUGIN "Semiclip"
#define VERSION "1.31"
#define AUTHOR "skyjur"

new bool:plrSolid[33]
new 
bool:plrRestore[33]

new 
maxplayers

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_forward(FM_PlayerPreThink"preThink")
    
register_forward(FM_PlayerPostThink"postThink")
    
    
register_forward(FM_AddToFullPack"addToFullPack"1)
    
    
maxplayers get_maxplayers()
}

public 
addToFullPack(eseenthosthostflagsplayerpSet)
{
    if(
player)
    {
        if(
plrSolid[host] && plrSolid[ent])
        {
            
set_es(esES_SolidSOLID_NOT)
            
set_es(esES_RenderModekRenderTransAlpha)
            
set_es(esES_RenderAmt85)
        }
    }
}

FirstThink()
{
    for(new 
1<= maxplayersi++)
    {
        if(!
is_user_alive(i) || pev(ipev_movetype) != MOVETYPE_FLY)
        {
            
plrSolid[i] = false
            
continue
        }
        
        
plrSolid[i] = pev(ipev_solid) == SOLID_SLIDEBOX true false
    
}
}

public 
preThink(id)
{
    static 
iLastThink
    
    
if(LastThink id)
    {
        
FirstThink()
    }
    
LastThink id

    
    
if(!plrSolid[id]) return
    
    for(
1<= maxplayersi++)
    {
        if(!
plrSolid[i] || id == i) continue
        
        
set_pev(ipev_solidSOLID_NOT)
        
plrRestore[i] = true
    
}
}

public 
postThink(id)
{
    static 
i
    
    
for(1<= maxplayersi++)
    {
        if(
plrRestore[i])
        {
            
set_pev(ipev_solidSOLID_SLIDEBOX)
            
plrRestore[i] = false
        
}
    }

Thx
__________________


Last edited by arnaldo_silva; 08-28-2009 at 18:34.
arnaldo_silva is offline
Old 08-28-2009, 20:33
Alucard^
This message has been deleted by Alucard^. Reason: failed
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-29-2009 , 02:38   Re: help - semiclip ladders
Reply With Quote #3

Try this:

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

#define PLUGIN "Semiclip"
#define VERSION "1.31"
#define AUTHOR "skyjur"

new bool:plrSolid[33]
new 
bool:plrRestore[33]
new 
bool:plrLadder[33]

new 
maxplayers

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_forward(FM_PlayerPreThink"preThink")
    
register_forward(FM_PlayerPostThink"postThink")
    
    
register_forward(FM_AddToFullPack"addToFullPack"1)
    
    
maxplayers get_maxplayers()
}

public 
addToFullPack(eseenthosthostflagsplayerpSet)
{
    if(
player)
    {
        if(
plrSolid[host] && plrSolid[ent] && (plrLadder[host] || plrLadder[ent]))
        {
            
set_es(esES_SolidSOLID_NOT)
            
set_es(esES_RenderModekRenderTransAlpha)
            
set_es(esES_RenderAmt85)
        }
    }
}

FirstThink()
{
    for(new 
1<= maxplayersi++)
    {
        if(!
is_user_alive(i))
        {
            
plrSolid[i] = false
            
continue
        }
        
        
plrSolid[i] = pev(ipev_solid) == SOLID_SLIDEBOX true false
        plrLadder
[i] = pev(ipev_movetype) == MOVETYPE_FLY true false
    
}
}

public 
preThink(id)
{
    static 
iLastThink
    
    
if(LastThink id)
    {
        
FirstThink()
    }
    
LastThink id

    
    
if(!plrSolid[id]) return
    
    for(
1<= maxplayersi++)
    {
        if(!
plrSolid[i] || id == i) continue
        
        
set_pev(ipev_solidSOLID_NOT)
        
plrRestore[i] = true
    
}
}

public 
postThink(id)
{
    static 
i
    
    
for(1<= maxplayersi++)
    {
        if(
plrRestore[i])
        {
            
set_pev(ipev_solidSOLID_SLIDEBOX)
            
plrRestore[i] = false
        
}
    }

__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Exolent[jNr]; 08-30-2009 at 00:56.
Exolent[jNr] is offline
arnaldo_silva
Member
Join Date: Jun 2008
Old 08-29-2009 , 12:49   Re: help - semiclip ladders
Reply With Quote #4

With your plugin semiclip is enable in everywhere in the map. In the ground players have semiclip too. Can you fixed?
__________________

arnaldo_silva is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-30-2009 , 00:57   Re: help - semiclip ladders
Reply With Quote #5

Sorry, I didn't really pay attention to the variable name I used.
Code should be fixed now.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
arnaldo_silva
Member
Join Date: Jun 2008
Old 08-30-2009 , 09:21   Re: help - semiclip ladders
Reply With Quote #6

Still with semiclip :S

In the ground it's like the plugin try to block semiclip but you still can pass through the player.
__________________


Last edited by arnaldo_silva; 08-30-2009 at 15:29.
arnaldo_silva is offline
Old 09-01-2009, 12:20
arnaldo_silva
This message has been deleted by Exolent[jNr]. Reason: Don't bump until 2 weeks have passed since last post.
tolsty
Senior Member
Join Date: Feb 2008
Location: Latvia
Old 09-03-2009 , 18:52   Re: help - semiclip ladders
Reply With Quote #8

try this
PHP Code:
//cred. xpaw for his original semiclip code
#include <amxmodx>
#include <fun>
#include <fakemeta>

#define PLUGIN "hns SEMICLIP"
#define VERSION "0.0"
#define AUTHOR "Tolsty"

#pragma semicolon 1;
 
new g_iSemiClip[33];
new 
air[33];



public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR);
    
register_forwardFM_PlayerPreThink"fwdPlayerPreThink" );
    
register_forwardFM_StartFrame,        "fwStartFrame");
    
register_forwardFM_AddToFullPack,     "fwFullPack",        );
}

public 
fwdAddToFullPack_Postes_handleeenthosthostflagsplayerpset ) {
        if(
player && g_iSemiClip[ent] && g_iSemiClip[host]) {
            
set_es(es_handleES_SolidSOLID_NOT);
            
set_es(es_handleES_RenderModekRenderTransAlpha);
            
set_es(es_handleES_RenderAmt100);
        }

            return 
FMRES_IGNORED;
}


public 
fwdPlayerPreThinkiPlayer ) {

    static 
flags;
    
flags peviPlayerpev_flags );
    if ( 
flags FL_ONGROUND || (pev(iPlayerpev_movetype) == MOVETYPE_FLY)  ) {
            
remove_task(iPlayer);
            
air[iPlayer] = false;
    }
}
 
public 
fwStartFrame(plr) {
        static 
iPlayers[32], iNumiPlayeriPlayer2;
        
get_players(iPlayersiNum);
        
        
arrayset(g_iSemiClip0sizeof(g_iSemiClip));
  
        for(new 
i=0iNumi++) {
            
iPlayer iPlayers[i];
                
            if( !
is_user_alive(iPlayer) )
                continue;
                
            for(new 
j=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);
                static 
team[33];
                            
team[iPlayer] = get_user_teamiPlayer );
                static 
flags;
                
flags peviPlayerpev_flags );
                
                if ( !( 
flags FL_ONGROUND ) && (pev(iPlayerpev_movetype) != MOVETYPE_FLY) ) {
                    
set_task(0.8"inair"iPlayer);
                }
                if ( 
vector_distancevOrigin1vOrigin2 ) < 220 && (pev(iPlayerpev_movetype) == MOVETYPE_FLY && (team[iPlayer] != team[iPlayer2]) || air[iPlayer] )  ) {
                    
g_iSemiClip[iPlayer]    = true;
                    
g_iSemiClip[iPlayer2]   = true;
                } 
                else if( 
vector_distancevOrigin1vOrigin2 ) < 220 && (team[iPlayer] == team[iPlayer2]) ) {
                    
g_iSemiClip[iPlayer]    = true;
                    
g_iSemiClip[iPlayer2]   = true;
                }
            }
        }
        
        for(new 
i=0iNum;i++) {
            
iPlayer iPlayers[i];
                
            if( 
is_user_alive(iPlayer) )
                
set_pev(iPlayerpev_solidg_iSemiClip[iPlayer] ? SOLID_NOT SOLID_SLIDEBOX);
        }

        return 
FMRES_IGNORED;


public 
inair(plr) {
    new 
flags;
    
flags pevplrpev_flags );
    if ( 
flags FL_ONGROUND || (pev(plrpev_movetype) == MOVETYPE_FLY)  ) {
        
air[plr] = false;
    }
    else {
        
air[plr] = true;
    }    


Last edited by tolsty; 09-03-2009 at 18:56.
tolsty 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 15:06.


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