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

[Req]Z class double jump , not work


Post New Thread Reply   
 
Thread Tools Display Modes
wicho
Veteran Member
Join Date: Feb 2012
Location: GuateAmala
Old 09-13-2014 , 13:33   Re: [Req]Z class double jump , not work
Reply With Quote #11

Try:

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

new g_Jumps[33]
new 
cvar_jumps

new g_zclass_tight

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

public plugin_init() 
{
    
register_plugin("[ZP] Zombie Class: tight""1.0""B!gBud + javivi")
    
RegisterHam(Ham_Player_Jump"player""fw_PlayerJump")
    
    
cvar_jumps register_cvar("zp_tight_jump""1")
}

public 
plugin_precache()
{
    
g_zclass_tight 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) || zp_get_user_zombie_class(id) != g_zclass_tight)
      return 
HAM_IGNORED

    
static flagsflags get_entity_flags(id)
    static 
buttonbutton get_user_button(id)
    static 
oldbuttonoldbutton get_user_oldbutton(id)
  
    if((
button IN_JUMP) && !(flags FL_ONGROUND) && !(oldbutton IN_JUMP))
    {        
        if(++
g_Jumps[id] <= get_pcvar_num(cvar_jumps))
        {
            static 
Float:Velocity[3]    
            
entity_get_vector(idEV_VEC_velocityVelocity)

            
Velocity[2] = random_float(265.0285.0)
            
entity_set_vector(idEV_VEC_velocityVelocity)
        }
    }
    
    if(
flags FL_ONGROUND)
        
g_Jumps[id] = 0

    
return HAM_IGNORED

P.S: sorry I had not seen that you had resolved, but I leave in case anyone wants it, has different changes.

Last edited by wicho; 09-13-2014 at 13:41.
wicho is offline
ghost95v
Senior Member
Join Date: Apr 2014
Location: somewhere in universe
Old 09-14-2014 , 18:49   Re: [Req]Z class double jump , not work
Reply With Quote #12

Quote:
Originally Posted by wicho View Post
Try:

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

new g_Jumps[33]
new 
cvar_jumps

new g_zclass_tight

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

public plugin_init() 
{
    
register_plugin("[ZP] Zombie Class: tight""1.0""B!gBud + javivi")
    
RegisterHam(Ham_Player_Jump"player""fw_PlayerJump")
    
    
cvar_jumps register_cvar("zp_tight_jump""1")
}

public 
plugin_precache()
{
    
g_zclass_tight 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) || zp_get_user_zombie_class(id) != g_zclass_tight)
      return 
HAM_IGNORED

    
static flagsflags get_entity_flags(id)
    static 
buttonbutton get_user_button(id)
    static 
oldbuttonoldbutton get_user_oldbutton(id)
  
    if((
button IN_JUMP) && !(flags FL_ONGROUND) && !(oldbutton IN_JUMP))
    {        
        if(++
g_Jumps[id] <= get_pcvar_num(cvar_jumps))
        {
            static 
Float:Velocity[3]    
            
entity_get_vector(idEV_VEC_velocityVelocity)

            
Velocity[2] = random_float(265.0285.0)
            
entity_set_vector(idEV_VEC_velocityVelocity)
        }
    }
    
    if(
flags FL_ONGROUND)
        
g_Jumps[id] = 0

    
return HAM_IGNORED

P.S: sorry I had not seen that you had resolved, but I leave in case anyone wants it, has different changes.
Tank you anyway
__________________
ghost95v is offline
Send a message via Skype™ to ghost95v
HamSwit
Member
Join Date: Nov 2014
Location: Romania
Old 02-02-2015 , 12:38   Re: [Req]Z class double jump , not work
Reply With Quote #13

I don't understand why nemesis/assassin have double jump too, when i have zombie frozen(double jump).
HamSwit is offline
Send a message via Yahoo to HamSwit Send a message via Skype™ to HamSwit
sirerick
Senior Member
Join Date: Jul 2012
Location: Venezuela
Old 02-02-2015 , 13:43   Re: [Req]Z class double jump , not work
Reply With Quote #14

Quote:
Originally Posted by HamSwit View Post
I don't understand why nemesis/assassin have double jump too, when i have zombie frozen(double jump).
PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta>
#include <zombie_plague_advance>

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

// Tight Zombie Atributes
new const zclass_name[] = { "Jumper" // name
new const zclass_info[] = { "Multi Jump" // description
new const zclass_model[] = { "zombie_source" // model
new const zclass_clawmodel[] = { "v_knife_zombie.mdl" // claw model
const zclass_health 3000 // health
const zclass_speed 220 // speed
const Float:zclass_gravity 1.0 // gravity
const Float:zclass_knockback 0.5 // knockback

public plugin_init()
{
   
register_plugin("[ZP] Class Tight""1.0c""MultiJump by twistedeuphoria, Plagued by Dabbi, Classed by B!gBud")
   
cvar_jumps register_cvar("zp_tight_jump","1")   
}

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) || zp_get_user_nemesis(id) || zp_get_user_assassin(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

sirerick is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 02-02-2015 , 18:06   Re: [Req]Z class double jump , not work
Reply With Quote #15

https://forums.alliedmods.net/showpo...&postcount=142
zmd94 is offline
sirerick
Senior Member
Join Date: Jul 2012
Location: Venezuela
Old 02-02-2015 , 19:03   Re: [Req]Z class double jump , not work
Reply With Quote #16

Quote:
Originally Posted by zmd94 View Post
i try use this code and dont work for me.
sirerick is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 02-02-2015 , 23:55   Re: [Req]Z class double jump , not work
Reply With Quote #17

Do you get any errors?
zmd94 is offline
sirerick
Senior Member
Join Date: Jul 2012
Location: Venezuela
Old 02-03-2015 , 00:14   Re: [Req]Z class double jump , not work
Reply With Quote #18

none compiles ok but inside the game just does not work the plugin.
sirerick is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 02-03-2015 , 03:37   Re: [Req]Z class double jump , not work
Reply With Quote #19

It is weird as I don't have any problems when using that plugin.
zmd94 is offline
HamSwit
Member
Join Date: Nov 2014
Location: Romania
Old 02-03-2015 , 07:11   Re: [Req]Z class double jump , not work
Reply With Quote #20

Quote:
Originally Posted by zmd94 View Post
I use this and nemesis/assassin can double jump when i have class jumper.
HamSwit is offline
Send a message via Yahoo to HamSwit Send a message via Skype™ to HamSwit
Old 05-09-2021, 17:06
Hn.S Xmix
This message has been deleted by Hn.S Xmix.
Old 05-09-2021, 17:22
Hn.S Xmix
This message has been deleted by Hn.S Xmix.
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:56.


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