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

[Req]Z class double jump , not work


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ghost95v
Senior Member
Join Date: Apr 2014
Location: somewhere in universe
Old 09-12-2014 , 09:12   [Req]Z class double jump , not work
Reply With Quote #1

i use this zombie class tight for double jump , but it not having any double jump ,, i use ZPA 1.6.1 anyone can fix something pls ? thank you

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

new jumpznum[33] = 0
new bool:dozjump[33] = false
new cvar_jumps
new g_zclass_tight

// Tight Atributes
new const zclass_name[] = { "tight" // name
new const zclass_info[] = { "Double Jump" // description
new const zclass_model[] = { "zombie_source" // model
new const zclass_clawmodel[] = { "v_knife_zombie.mdl" // claw model
const zclass_health 4500 // health
const zclass_speed 269 // speed
const Float:zclass_gravity 0.7 // gravity
const Float:zclass_knockback 1.3 // knockback

public plugin_init()
{
    
register_plugin("Class tight""1.0c""MultiJump by twistedeuphoria, Plagued by Dabbi, Classed by B!gBud")
    
cvar_jumps register_cvar("zp_tight_jump","2")    
}

public 
plugin_precache()
{
    
g_zclass_tight zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback)
}

public 
client_putinserver(id)
{
    
jumpznum[id] = 0
    dozjump
[id] = false
}

public 
client_disconnect(id)
{
    
jumpznum[id] = 0
    dozjump
[id] = false
}

public 
client_PreThink(id)
{
    if(!
is_user_alive(id) || !zp_get_user_zombie(id)) return PLUGIN_CONTINUE
    
if(zp_get_user_zombie_class(id) != g_zclass_tight) return PLUGIN_CONTINUE
    
    
new nzbut get_user_button(id)
    new 
ozbut get_user_oldbutton(id)
    if((
nzbut IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(ozbut IN_JUMP))
    {
        if (
jumpznum[id] < get_pcvar_num(cvar_jumps))
        {
            
dozjump[id] = true
            jumpznum
[id]++
            return 
PLUGIN_CONTINUE
        
}
    }
    if((
nzbut IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
    {
        
jumpznum[id] = 0
        
return PLUGIN_CONTINUE
    
}    
    return 
PLUGIN_CONTINUE
}

public 
client_PostThink(id)
{
    if(!
is_user_alive(id) || !zp_get_user_zombie(id)) return PLUGIN_CONTINUE
    
if(zp_get_user_zombie_class(id) != g_zclass_tight) return PLUGIN_CONTINUE
    
    
if(dozjump[id] == true)
    {
        new 
Float:vezlocityz[3]    
        
entity_get_vector(id,EV_VEC_velocity,vezlocityz)
        
vezlocityz[2] = random_float(265.0,285.0)
        
entity_set_vector(id,EV_VEC_velocity,vezlocityz)
        
dozjump[id] = false
        
return PLUGIN_CONTINUE
    
}    
    return 
PLUGIN_CONTINUE

__________________

Last edited by ghost95v; 09-12-2014 at 09:47.
ghost95v is offline
Send a message via Skype™ to ghost95v
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 09-12-2014 , 20:02   Re: [Req]Z class double jump , not work
Reply With Quote #2

Plugin works fine I tested and I use it.
I do not know if it is intended for ZPA 1.6.1.
Krtola is offline
Send a message via Skype™ to Krtola
ghost95v
Senior Member
Join Date: Apr 2014
Location: somewhere in universe
Old 09-12-2014 , 22:17   Re: [Req]Z class double jump , not work
Reply With Quote #3

Quote:
Originally Posted by Krtola View Post
Plugin works fine I tested and I use it.
I do not know if it is intended for ZPA 1.6.1.
i dont know why
__________________
ghost95v is offline
Send a message via Skype™ to ghost95v
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 09-12-2014 , 23:24   Re: [Req]Z class double jump , not work
Reply With Quote #4

Just use this version. I have tested it in ZPA and it is working well. ;)

Jumper Zombie v2 (This Jumper Zombie do not use PreThink code. So, it don't cause lag to your server)
zmd94 is offline
ghost95v
Senior Member
Join Date: Apr 2014
Location: somewhere in universe
Old 09-13-2014 , 04:06   Re: [Req]Z class double jump , not work
Reply With Quote #5

Quote:
Originally Posted by zmd94 View Post
Just use this version. I have tested it in ZPA and it is working well. ;)

Jumper Zombie v2 (This Jumper Zombie do not use PreThink code. So, it don't cause lag to your server)
Thank you man, but when i choose this Class , and when new round starts im still having multijump also when i am human . and it's giving triplejump not double ... anyway thank you
__________________
ghost95v is offline
Send a message via Skype™ to ghost95v
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 09-13-2014 , 05:04   Re: [Req]Z class double jump , not work
Reply With Quote #6

I corrected it. Try now:
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <fakemeta>
#include <zombieplague>

new _gJumpCount[33]
new 
cvar_multi_jump_amount
new g_zclass_jumper

new const zclass_name[] = {"Jumper"
new const 
zclass_info[] = {"Double Jump"
new const 
zclass_model[] = {"zombie_source"
new const 
zclass_clawmodel[] = {"v_knife_zombie.mdl"}
const 
zclass_health 2500 
const zclass_speed 269 
const Float:zclass_gravity 0.7 
const Float:zclass_knockback 1.3 

public plugin_init() 
{
    
register_plugin("[ZP] Zombie Class: Jumper""1.0""zmd94")
    
RegisterHam(Ham_Player_Jump"player""fw_PlayerJump"0)
    
    
cvar_multi_jump_amount register_cvar("zp_multi_jump_amount""2")
}

public 
plugin_precache()
{
    
g_zclass_jumper zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback)
}

public 
fw_PlayerJump(id
{
        if(!
is_user_alive(id) || !zp_get_user_zombie(id))
    {
        return 
HAM_SUPERCEDE
    
}

    if(
is_user_alive(id) && zp_get_user_zombie_class(id) == g_zclass_jumper
    {
        new 
Flags pev(idpev_flags)
        
        if( 
Flags FL_WATERJUMP || pev(idpev_waterlevel) >= || !(get_pdata_int(id246) & IN_JUMP) )
        {
            return 
HAM_IGNORED
        
}
        if(
Flags FL_ONGROUND
        {
            
_gJumpCount[id] = 0
            
            
return HAM_IGNORED
        
}
        if(
get_pcvar_num(cvar_multi_jump_amount)) 
        {
            if( 
get_pdata_float(id251) < 500 && ++_gJumpCount[id] <= get_pcvar_num(cvar_multi_jump_amount)) 
            {
                new 
Float:fVelocity[3]
                
pev(idpev_velocityfVelocity)
                
fVelocity[2] = 268.328157
                set_pev
(idpev_velocityfVelocity)
                
                return 
HAM_HANDLED
            
}
        }
    }
    return 
HAM_IGNORED

I just added a check if the player is dead and that's not a zombie in "public fw_PlayerJump(id)"
PHP Code:
if(!is_user_alive(id) || !zp_get_user_zombie(id))
{
    return 
HAM_SUPERCEDE

Use this cvar for jump amount
PHP Code:
zp_multi_jump_amount 
If you set 2 zombi will jump 3x in the mid air. If you set 1 zombi jump 2x....

Last edited by Krtola; 09-13-2014 at 07:07.
Krtola is offline
Send a message via Skype™ to Krtola
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 09-13-2014 , 05:35   Re: [Req]Z class double jump , not work
Reply With Quote #7

I have update the code. ;)

Thank you to Krtola.
zmd94 is offline
ghost95v
Senior Member
Join Date: Apr 2014
Location: somewhere in universe
Old 09-13-2014 , 06:52   Re: [Req]Z class double jump , not work
Reply With Quote #8

Thank you guys
i updated again , cuz complier was not finding this symbol: is_user_zombie
Now its fixed , not more multijump remains in new round , but,,, still its giving me triplejump , and i addet to "1" cvar_multi_jump_amount.


PHP Code:
if(!is_user_alive(id) || !zp_get_user_zombie(id))
     {
        return 
HAM_SUPERCEDE
     

__________________
ghost95v is offline
Send a message via Skype™ to ghost95v
Krtola
Veteran Member
Join Date: Oct 2013
Location: Serbia
Old 09-13-2014 , 07:03   Re: [Req]Z class double jump , not work
Reply With Quote #9

Sorry for "is_user_zombie" that is for my biohazard mod
wryte in amxx.cfg
zp_multi_jump_amount 1

Last edited by Krtola; 09-13-2014 at 07:06.
Krtola is offline
Send a message via Skype™ to Krtola
ghost95v
Senior Member
Join Date: Apr 2014
Location: somewhere in universe
Old 09-13-2014 , 12:56   Re: [Req]Z class double jump , not work
Reply With Quote #10

Quote:
Originally Posted by Krtola View Post
Sorry for "is_user_zombie" that is for my biohazard mod
wryte in amxx.cfg
zp_multi_jump_amount 1
Works Perfect now .. Thank you so much
__________________
ghost95v is offline
Send a message via Skype™ to ghost95v
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:10.


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