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

Wallhang


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 08-23-2012 , 18:20   Wallhang
Reply With Quote #1

I'm looking for a wallhang plugin that i can scavenge for a plugin of mine. I'm too lazy to develop it myself. I need it so you jump at a wall, hit e, and you stick to that point. Then you jump and come off and fall to the ground.

Has anyone already made this? or would be willing to make it for me? I'd be much appreciative.
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
MokeN
Senior Member
Join Date: Jan 2012
Location: Vaasa, Finland
Old 08-24-2012 , 00:51   Re: Wallhang
Reply With Quote #2

I think this is already made in mTc Jailbreak in a game called Nightcrawler.

Xalus made it.
__________________
Private Works:
- Achievements, HNS & JB Menus, HNS & JB Shops

mY BlockMaker - mY Steam - mY Game Menu
MokeN is offline
Send a message via Skype™ to MokeN
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-24-2012 , 01:33   Re: Wallhang
Reply With Quote #3

Not the better code, but you can get an idea :

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

#include "furien.inc"
#include "furien_shop.inc"

#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 
g_iCost[2]

new 
bool:g_bRoundEnd

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

    new 
szConfigFile[128]
    
get_localinfo("amxx_configsdir"szConfigFilecharsmax(szConfigFile))
    
format(szConfigFilecharsmax(szConfigFile), "%s/furien/items/wallhang.ini"szConfigFile);

    new 
fp fopen(szConfigFile"rt")
    if( !
fp )
    {
        return
    }

    new 
szFurienName[32], szAntiName[32]

    new 
szDatas[64], szKey[16], szValue[32]
    while( !
feof(fp) )
    {
        
fgets(fpszDatascharsmax(szDatas))
        
trim(szDatas)
        if(!
szDatas[0] || szDatas[0] == ';' || szDatas[0] == '#' || (szDatas[0] == '/' && szDatas[1] == '/'))
        {
            continue
        }

        
parse(szDatasszKeycharsmax(szKey), szValuecharsmax(szValue))

        switch( 
szKey[0] )
        {
            case 
'A':
            {
                switch( 
szKey[7] )
                {
                    case 
'M':
                    {
                        if( 
equal(szKey"ANTI_NAME" ) )
                        {
                            
copy(szAntiNamecharsmax(szAntiName), szValue)
                        }
                    }
                    case 
'S':
                    {
                        if( 
equal(szKey"ANTI_COST" ) )
                        {
                            
g_iCost[AntiFurien] = str_to_num(szValue)
                        }
                    }
                }
            }
            case 
'F':
            {
                switch( 
szKey[9] )
                {
                    case 
'M':
                    {
                        if( 
equal(szKey"FURIEN_NAME" ) )
                        {
                            
copy(szFurienNamecharsmax(szAntiName), szValue)
                        }
                    }
                    case 
'S':
                    {
                        if( 
equal(szKey"FURIEN_COST" ) )
                        {
                            
g_iCost[Furien] = str_to_num(szValue)
                        }
                    }
                }
            }
        }
    }
    
fclosefp )

    if( 
g_iCost[Furien] || g_iCost[AntiFurien] )
    {
        
furien_register_item(szFurienNameg_iCost[Furien], szAntiNameg_iCost[AntiFurien], "furien_buy_wallhang")

        
RegisterHam(Ham_Player_Jump"player""Player_Jump")

        
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 
Event_HLTV_New_Round()
{
    
g_bRoundEnd false
}

public 
Logevent_Round_End()
{
    
g_bRoundEnd true
    g_bHanged 
0
}

public 
client_putinserverid )
{
    
RemoveUserWallHangid )
    
RemoveUserHangedid )
}

public 
furien_team_change/*iFurien */ )
{
    if( !
g_iCost[Furien] || !g_iCost[AntiFurien] )
    {
        
g_bHasWallHang 0
        g_bHanged 
0
    
}
}

public 
furien_round_restart()
{
    
g_bHasWallHang 0
    g_bHanged 
0
}

public 
furien_buy_wallhangid )
{
    new 
iTeam furien_get_user_team(id)
    if( 
iTeam == -)
    {
        return 
ShopCloseMenu
    
}

    new 
iItemCost g_iCost[iTeam]
    if( 
iItemCost <= )
    {
        return 
ShopTeamNotAvail
    
}

    if( ~
HasUserWallHang(id) )
    {
        if( 
furien_try_buy(idiItemCost) )
        {
            
SetUserWallHangid )
            return 
ShopBought
        
}
        else
        {
            return 
ShopNotEnoughMoney
        
}
    }
    return 
ShopAlreadyHaveOne
}

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(idm_flNextAttack1.0XTRA_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])
    }

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 08-25-2012 , 18:41   Re: Wallhang
Reply With Quote #4

Much thanks, connor!

i lol @ "IsUserHanged"
Probably a translation error. But that just tickles me. Mostly because if that were true is_user_alive would probably return false.
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 08-25-2012 , 19:00   Re: Wallhang
Reply With Quote #5

Not a translation error, only the suckage of my english.
IsUserHanging would be better ?
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 08-25-2012 , 19:55   Re: Wallhang
Reply With Quote #6

Agreed. IsUserHanging would be "better." But i'm keeping it. Cause it makes me giggle.

Not sure you understand the humor, though. Hanged = passed tense of "Hang till death" by a noose. (yes, hung is typical...but blah blah blah blah blah i'm not here to teach english)
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
SplinteX
Member
Join Date: Aug 2012
Location: jordan,amman
Old 08-26-2012 , 04:35   Re: Wallhang
Reply With Quote #7

should we bind e for a key or just +use ?
__________________
Human and not proud!?
Arabian and proud!!!
MUSLIM AND PROUD!!!!!!
SplinteX is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 08-26-2012 , 13:12   Re: Wallhang
Reply With Quote #8

Quote:
Originally Posted by SplinteX View Post
should we bind e for a key or just +use ?
IN_USE is the "action" button. defaulted to 'e'

EDIT: just did some extensive testing and it works wonderfully, connor! Thanks very much.
__________________
What an elegant solution to a problem that doesn't need solving....

Last edited by Liverwiz; 08-27-2012 at 20:35.
Liverwiz is offline
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 08-28-2012 , 01:45   Re: Wallhang
Reply With Quote #9

Connor, there is an issue with this. Not sure if its an avoidable problem, but it makes it rather unfair.

When a user is stuck to the wall its very difficult for other players to register shots on them. I don't know of a way to fix it. Any ideas?
__________________
What an elegant solution to a problem that doesn't need solving....
Liverwiz is offline
quilhos
Veteran Member
Join Date: Jun 2010
Old 08-28-2012 , 07:13   Re: Wallhang
Reply With Quote #10

"register shots on them" sorry but I dont understand what you need
__________________
ELO RATING SYSTEM - SQL [COMPLETE]
Quote:
Originally Posted by Liverwiz View Post
DDDRRRRAAAAMMMMAAAAA!!!???

Put this shit on pause while i go get some popcorn!!
quilhos 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 07:00.


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