Raised This Month: $51 Target: $400
 12% 

[REQ] WallHang


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Mr.Pro
Member
Join Date: Jul 2014
Old 01-08-2015 , 18:45   [REQ] WallHang
Reply With Quote #1

i need wall hang for furiens but that let you move and can kill and throw HE or any grandees
Thanks in advanced
Mr.Pro is offline
choloo
Senior Member
Join Date: Nov 2014
Location: Groznyj, Chechnya
Old 01-08-2015 , 22:44   Re: [REQ] WallHang
Reply With Quote #2

maybe Connor's code?
PHP Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <hamsandwich>



#define VERSION "0.0.2"

#define XTRA_OFS_PLAYER            5
#define m_Activity                73
#define m_IdealActivity            74
#define m_flNextAttack            83
#define m_afButtonPressed        246

#define FIRST_PLAYER_ID    1
#define MAX_PLAYERS        32

#define PLAYER_JUMP        6

#define ACT_HOP 7

//#define FBitSet(%1,%2)        (%1 & %2)

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

#define IsHidden(%1)    IsPlayer(%1)

#define KNIFE_DRAW            3

new g_bHasWallHang
#define SetUserWallHang(%1)        g_bHasWallHang |=    1<<(%1&31)
#define RemoveUserWallHang(%1)    g_bHasWallHang &=    ~(1<<(%1&31))
#define HasUserWallHang(%1)        g_bHasWallHang &    1<<(%1&31)

new g_bHanged
#define SetUserHanged(%1)    g_bHanged |=    1<<(%1&31)
#define RemoveUserHanged(%1)    g_bHanged &=    ~(1<<(%1&31))
#define IsUserHanged(%1)        g_bHanged &    1<<(%1&31)

new Float:g_fVecMins[MAX_PLAYERS+1][3]
new 
Float:g_fVecMaxs[MAX_PLAYERS+1][3]
new 
Float:g_fVecOrigin[MAX_PLAYERS+1][3]

new 
bool:g_bRoundEnd

public plugin_init()
{
    
register_plugin("Furien WallHang"VERSION"ConnorMcLeod")

    
RegisterHam(Ham_Player_Jump"player""Player_Jump")

    
RegisterHam(  Ham_Spawn,  "player",  "Ham_PlayerSpawnPost",  true  );
    
RegisterHam(  Ham_Killed,  "player",  "Ham_PlayerKilledPost"true  );
    
RegisterHam(Ham_Touch"func_wall""World_Touch")
    
RegisterHam(Ham_Touch"func_breakable""World_Touch")
    
RegisterHam(Ham_Touch"worldspawn""World_Touch")

    
g_iMaxPlayers get_maxplayers()    

    
register_event("HLTV""Event_HLTV_New_Round""a""1=0""2=0")
    
register_logevent("Logevent_Round_End"2"1=Round_End")
}

public 
Ham_PlayerSpawnPost(  id  )
{
    if( 
is_user_alive(  id  )  )
    {
        if( 
get_user_team(  id  )  ==  1  )
        {
            
SetUserWallHang(id);
            
RemoveUserHangedid );
        }
        else
        {
            
RemoveUserWallHang(id);
            
RemoveUserHangedid );
        }
    }
}

public 
Ham_PlayerKilledPost(  id  )
{
    
    
RemoveUserHangedid );
    return 
HAM_IGNORED;
    
}
public 
Event_HLTV_New_Round()
{
    
g_bRoundEnd false
}

public 
Logevent_Round_End()
{
    
g_bRoundEnd true
    g_bHanged 
0
}

public 
client_putinserverid )
{
    
RemoveUserWallHangid )
    
RemoveUserHangedid )
}

public 
furien_round_restart()
{
    
g_bHasWallHang 0
    g_bHanged 
0
}

public 
Player_Jump(id)
{
    if(    
g_bRoundEnd
    
||    ~HasUserWallHang(id)
    ||    ~
IsUserHanged(id)
    ||    !
is_user_alive(id)    )
    {
        return 
HAM_IGNORED
    
}

    if( (
pev(idpev_flags) & FL_WATERJUMP) || pev(idpev_waterlevel) >= )
    {
        return 
HAM_IGNORED
    
}

    static 
afButtonPressed afButtonPressed get_pdata_int(idm_afButtonPressed)

    if( ~
afButtonPressed IN_JUMP )
    {
        return 
HAM_IGNORED
    
}

    
RemoveUserHanged(id)

    new 
Float:fVecVelocity[3]

    
velocity_by_aim(id600fVecVelocity)
    
set_pev(idpev_velocityfVecVelocity)

    
set_pdata_int(idm_ActivityACT_HOP)
    
set_pdata_int(idm_IdealActivityACT_HOP)
    
set_pev(idpev_gaitsequencePLAYER_JUMP)
    
set_pev(idpev_frame0.0)
    
set_pdata_int(idm_afButtonPressedafButtonPressed & ~IN_JUMP)

    return 
HAM_SUPERCEDE
}


public 
client_PostThink(id)
{
    if( 
HasUserWallHang(id) && IsUserHanged(id) )
    {
        
engfunc(EngFunc_SetSizeidg_fVecMinsid ], g_fVecMaxsid ])
        
engfunc(EngFunc_SetOriginidg_fVecOriginid ])
        
set_pev(idpev_velocity0)
        
//set_pdata_float(id, m_flNextAttack, 1.0, XTRA_OFS_PLAYER)
    
}
}

public 
World_Touch(iEntid)
{
    if(    !
g_bRoundEnd
    
&&    IsPlayer(id)
    &&    
HasUserWallHang(id)
    &&    ~
IsUserHanged(id)
    &&    
is_user_alive(id)
    &&    
pev(idpev_button) & IN_USE
    
&&    ~pev(idpev_flags) & FL_ONGROUND    )
    {
        
SetUserHanged(id)
        
pev(idpev_minsg_fVecMins[id])
        
pev(idpev_maxsg_fVecMaxs[id])
        
pev(idpev_origing_fVecOrigin[id])
    }
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1033{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/ 
choloo is offline
Mr.Pro
Member
Join Date: Jul 2014
Old 01-09-2015 , 11:34   Re: [REQ] WallHang
Reply With Quote #3

Quote:
Originally Posted by choloo View Post
maybe Connor's code?
PHP Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>
#include <hamsandwich>



#define VERSION "0.0.2"

#define XTRA_OFS_PLAYER            5
#define m_Activity                73
#define m_IdealActivity            74
#define m_flNextAttack            83
#define m_afButtonPressed        246

#define FIRST_PLAYER_ID    1
#define MAX_PLAYERS        32

#define PLAYER_JUMP        6

#define ACT_HOP 7

//#define FBitSet(%1,%2)        (%1 & %2)

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

#define IsHidden(%1)    IsPlayer(%1)

#define KNIFE_DRAW            3

new g_bHasWallHang
#define SetUserWallHang(%1)        g_bHasWallHang |=    1<<(%1&31)
#define RemoveUserWallHang(%1)    g_bHasWallHang &=    ~(1<<(%1&31))
#define HasUserWallHang(%1)        g_bHasWallHang &    1<<(%1&31)

new g_bHanged
#define SetUserHanged(%1)    g_bHanged |=    1<<(%1&31)
#define RemoveUserHanged(%1)    g_bHanged &=    ~(1<<(%1&31))
#define IsUserHanged(%1)        g_bHanged &    1<<(%1&31)

new Float:g_fVecMins[MAX_PLAYERS+1][3]
new 
Float:g_fVecMaxs[MAX_PLAYERS+1][3]
new 
Float:g_fVecOrigin[MAX_PLAYERS+1][3]

new 
bool:g_bRoundEnd

public plugin_init()
{
    
register_plugin("Furien WallHang"VERSION"ConnorMcLeod")

    
RegisterHam(Ham_Player_Jump"player""Player_Jump")

    
RegisterHam(  Ham_Spawn,  "player",  "Ham_PlayerSpawnPost",  true  );
    
RegisterHam(  Ham_Killed,  "player",  "Ham_PlayerKilledPost"true  );
    
RegisterHam(Ham_Touch"func_wall""World_Touch")
    
RegisterHam(Ham_Touch"func_breakable""World_Touch")
    
RegisterHam(Ham_Touch"worldspawn""World_Touch")

    
g_iMaxPlayers get_maxplayers()    

    
register_event("HLTV""Event_HLTV_New_Round""a""1=0""2=0")
    
register_logevent("Logevent_Round_End"2"1=Round_End")
}

public 
Ham_PlayerSpawnPost(  id  )
{
    if( 
is_user_alive(  id  )  )
    {
        if( 
get_user_team(  id  )  ==  1  )
        {
            
SetUserWallHang(id);
            
RemoveUserHangedid );
        }
        else
        {
            
RemoveUserWallHang(id);
            
RemoveUserHangedid );
        }
    }
}

public 
Ham_PlayerKilledPost(  id  )
{
    
    
RemoveUserHangedid );
    return 
HAM_IGNORED;
    
}
public 
Event_HLTV_New_Round()
{
    
g_bRoundEnd false
}

public 
Logevent_Round_End()
{
    
g_bRoundEnd true
    g_bHanged 
0
}

public 
client_putinserverid )
{
    
RemoveUserWallHangid )
    
RemoveUserHangedid )
}

public 
furien_round_restart()
{
    
g_bHasWallHang 0
    g_bHanged 
0
}

public 
Player_Jump(id)
{
    if(    
g_bRoundEnd
    
||    ~HasUserWallHang(id)
    ||    ~
IsUserHanged(id)
    ||    !
is_user_alive(id)    )
    {
        return 
HAM_IGNORED
    
}

    if( (
pev(idpev_flags) & FL_WATERJUMP) || pev(idpev_waterlevel) >= )
    {
        return 
HAM_IGNORED
    
}

    static 
afButtonPressed afButtonPressed get_pdata_int(idm_afButtonPressed)

    if( ~
afButtonPressed IN_JUMP )
    {
        return 
HAM_IGNORED
    
}

    
RemoveUserHanged(id)

    new 
Float:fVecVelocity[3]

    
velocity_by_aim(id600fVecVelocity)
    
set_pev(idpev_velocityfVecVelocity)

    
set_pdata_int(idm_ActivityACT_HOP)
    
set_pdata_int(idm_IdealActivityACT_HOP)
    
set_pev(idpev_gaitsequencePLAYER_JUMP)
    
set_pev(idpev_frame0.0)
    
set_pdata_int(idm_afButtonPressedafButtonPressed & ~IN_JUMP)

    return 
HAM_SUPERCEDE
}


public 
client_PostThink(id)
{
    if( 
HasUserWallHang(id) && IsUserHanged(id) )
    {
        
engfunc(EngFunc_SetSizeidg_fVecMinsid ], g_fVecMaxsid ])
        
engfunc(EngFunc_SetOriginidg_fVecOriginid ])
        
set_pev(idpev_velocity0)
        
//set_pdata_float(id, m_flNextAttack, 1.0, XTRA_OFS_PLAYER)
    
}
}

public 
World_Touch(iEntid)
{
    if(    !
g_bRoundEnd
    
&&    IsPlayer(id)
    &&    
HasUserWallHang(id)
    &&    ~
IsUserHanged(id)
    &&    
is_user_alive(id)
    &&    
pev(idpev_button) & IN_USE
    
&&    ~pev(idpev_flags) & FL_ONGROUND    )
    {
        
SetUserHanged(id)
        
pev(idpev_minsg_fVecMins[id])
        
pev(idpev_maxsg_fVecMaxs[id])
        
pev(idpev_origing_fVecOrigin[id])
    }
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1033{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/ 
thanks for reply but this is not what i'm locking for this only hang no movement but what i'm locking for it hang and move and ability to hit and use grandees
Mr.Pro 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 09:15.


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