Raised This Month: $32 Target: $400
 8% 

[ H3LP ] Wall climb problem?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 04-24-2017 , 06:24   [ H3LP ] Wall climb problem?
Reply With Quote #1

Hey, I've developed a wall climb with wallhang, its work but with some problems. To move to right/left, the player need move the camera. I've tryed force to move the camera angle, but not got success. Anyone can help me?
Attached Files
File Type: sma Get Plugin or Get Source (avp_subplugin_wall_climb.sma - 1182 views - 2.5 KB)
__________________








CrazY. is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 04-25-2017 , 06:31   Re: [ H3LP ] Wall climb problem?
Reply With Quote #2

Your code is buggy player can move/climb in air
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 04-25-2017 at 06:32.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 04-25-2017 , 09:39   Re: [ H3LP ] Wall climb problem?
Reply With Quote #3

LoL, I think I need check the distance of wall haha
__________________








CrazY. is offline
Houssam Benmouna
Senior Member
Join Date: Apr 2016
Old 04-25-2017 , 13:25   Re: [ H3LP ] Wall climb problem?
Reply With Quote #4

Nice Plugin, I'm not a coder and I don't understand that, your plugin is cool for me and it's hard to make like it for me
Houssam Benmouna is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 04-25-2017 , 13:58   Re: [ H3LP ] Wall climb problem?
Reply With Quote #5

O.o what the hell? Haha

This a scripting forum bro, don't plugin sharing :no:

And, worked with you without problems ???
__________________









Last edited by CrazY.; 04-25-2017 at 14:00.
CrazY. is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 04-25-2017 , 14:47   Re: [ H3LP ] Wall climb problem?
Reply With Quote #6

Take a look at my alien wallclimb class:

PHP Code:
#include <amxmodx>
#include <colorchat>
#include <fakemeta>
#include <fakemeta_util>
#include <FurienClasses>
#include <fun>
#include <hamsandwich>

#define PLUGIN_VERSION "1.0"

new const g_szPrefix[] = "^1[^4iPlay Furien^1]"
new bool:g_blClass[33]
new 
Float:g_flWallOrigin[33][3]
new 
g_iClass

#define CLASS_NAME "Martian"
#define CLASS_DESC "\y[\rHP- | G- | NP | WallClimb\y]"
#define CLASS_MODEL "iplay_martian"
#define CLASS_KNIFE "models/iplay_furien/v_martian.mdl"
#define CLASS_TYPE "VIP"
#define CLASS_HEALTH 120
#define CLASS_SPEED 750.0
#define CLASS_GRAVITY 0.5
#define CLASS_INVIS true
#define CLASS_PARA false

#define WALL_DISTANCE 25.0
#define WALL_SPEED 160

public plugin_init()
{
    
register_plugin("Furien Class: Martian"PLUGIN_VERSION"OciXCrom")
    
RegisterHam(Ham_Spawn"player""eventPlayerSpawn"1)
    
register_forward(FM_Touch"fwdTouchWorld")
    
register_forward(FM_PlayerPreThink"fwdPreThink")
}

public 
plugin_precache()
    
g_iClass RegisterAlienClass(CLASS_NAMECLASS_DESCCLASS_MODELCLASS_KNIFECLASS_TYPECLASS_HEALTHCLASS_SPEEDCLASS_GRAVITYCLASS_INVISCLASS_PARA)

public 
eventPlayerSpawn(id)
{
    if(
is_class(id))
    {
        
ColorChat(idTEAM_COLOR"%s Your Alien Class is ^4%s^1. You have decreased health and gravity."g_szPrefixCLASS_NAME)
        
ColorChat(idTEAM_COLOR"%s Press E + W/A/S/D to climb walls. You're invisible when attached to a wall and not moving. You have no parachute."g_szPrefix)
        
g_blClass[id] = true
    
}
    else 
g_blClass[id] = false
}

public 
fwdTouchWorld(idworld)
{
    if(!
is_user_alive(id) || !g_blClass[id])
        return 
FMRES_IGNORED
        
    pev
(idpev_origing_flWallOrigin[id])
    return 
FMRES_IGNORED
}

public 
fwdPreThink(id
{
    if(!
g_blClass[id]) 
        return 
FMRES_IGNORED
    
    
new iButton fm_get_user_button(id)
    
    if(
iButton IN_USE)
        
wallclimb(idiButton)

    return 
FMRES_IGNORED
}

public 
wallclimb(idiButton)
{
    if(!
g_blClass[id])
        return 
FMRES_IGNORED
        
    
static Float:flOrigin[3]
    
pev(idpev_originflOrigin)

    if(
get_distance_f(flOriging_flWallOrigin[id]) > WALL_DISTANCE)
        return 
FMRES_IGNORED
    
    
if(fm_get_entity_flags(id) & FL_ONGROUND)
        return 
FMRES_IGNORED
        
    
new bool:blInvis true
    
static Float:flVelocity[3]
    
    if(
iButton IN_FORWARD)
    {
        
velocity_by_aim(idWALL_SPEEDflVelocity)
        
blInvis false
    
}
    else if(
iButton IN_BACK)
    {
        
velocity_by_aim(idWALL_SPEED * -1flVelocity)
        
blInvis false
    
}
    else
        
velocity_by_aim(id, -1flVelocity)
        
    if(
iButton IN_MOVELEFT || iButton IN_MOVERIGHT)
        
blInvis false
        
    
if(blInvis)
        
set_user_rendering(idkRenderFxNone000kRenderTransAlpha0)
    
    
fm_set_user_velocity(idflVelocity)
    return 
FMRES_IGNORED
}

bool:is_class(id)
    return (
get_user_team(id) == && FurienGetAlienClass(id) == g_iClass) ? true false 
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 04-25-2017 , 16:44   Re: [ H3LP ] Wall climb problem?
Reply With Quote #7

Both plugins would benefit from hooking the use key (by means of sound or perhaps objectcaps), registering/enabling your pre/post think forward, then unregistering/disabling when you release the key (check for release in think forward).
OciXCrom also this way you wouldn't need a cpu expensive forward like FM_TOUCH.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 04-25-2017 , 18:18   Re: [ H3LP ] Wall climb problem?
Reply With Quote #8

@OciXCrom, I don't think that I will extract much things from your plugin because you're using velocity_by_aim.

@hornet, good suggestion, thanks!
__________________








CrazY. is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 04-30-2017 , 06:51   Re: [ H3LP ] Wall climb problem?
Reply With Quote #9

Ithink hooking fm cmd start is better than player prethink
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Reply


Thread Tools
Display Modes

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 20:57.


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