Zplague
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Zplague Entrar

Seu portal de Zombie Plague no Brasil


description[ Duvida ] Zombie Jumper Empty[ Duvida ] Zombie Jumper

more_horiz
alguém faz pra essa classe pode da 2 pulo não ta indo '-'

Código:

/*
CVARS:
zp_tight_jump 1 (Default)
*/

#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 Zombie Atributes
new const zclass_name[ ] = "Zumbi Jumper"
new const zclass_info[ ] = "2 Pulos"
new const zclass_model[ ] = "zm_jumper"
new const zclass_clawmodel[ ] = "v_knife_jumper.mdl"
const zclass_health = 2500 // vida
const zclass_speed = 260 // velocidade
const Float:zclass_gravity = 0.9 // gravidade
const Float:zclass_knockback = 0.55 // knockback

public plugin_init()
{
register_plugin("[ZP] Zumbi Jumper", "1.2", "Creditos:B!gBud")
cvar_jumps = register_cvar("zp_tight_jump","1")
register_event("CurWeapon", "Event_CurrentWeapon", "be", "1=1")
}

public plugin_precache()
{
g_zclass_tight = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_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
}

public zp_user_infected_post(id, infector)
{
if(zp_get_user_zombie(id) && zp_get_user_zombie_class(id) == g_zclass_tight && !zp_get_user_nemesis(id))
{
set_pev(id, pev_body, random_num(0, 1))
}

}


pelo menos aqui não vai

description[ Duvida ] Zombie Jumper EmptyRe: [ Duvida ] Zombie Jumper

more_horiz
tenta assim:

Código:

/*
CVARS:
zp_tight_jump 2 (Default)
*/

#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 Zombie Atributes
new const zclass_name[ ] = "Zumbi Jumper"
new const zclass_info[ ] = "2 Pulos"
new const zclass_model[ ] = "zm_jumper"
new const zclass_clawmodel[ ] = "v_knife_jumper.mdl"
const zclass_health = 2500 // vida
const zclass_speed = 260 // velocidade
const Float:zclass_gravity = 0.9 // gravidade
const Float:zclass_knockback = 0.55 // knockback

public plugin_init()
{
register_plugin("[ZP] Zumbi Jumper", "1.2", "Creditos:B!gBud")
cvar_jumps = register_cvar("zp_tight_jump","2")
register_event("CurWeapon", "Event_CurrentWeapon", "be", "1=1")
}

public plugin_precache()
{
g_zclass_tight = zp_register_zombie_class(zclass_name, zclass_info, zclass_model, zclass_clawmodel, zclass_health, zclass_speed, zclass_gravity, zclass_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
}

public zp_user_infected_post(id, infector)
{
if(zp_get_user_zombie(id) && zp_get_user_zombie_class(id) == g_zclass_tight && !zp_get_user_nemesis(id))
{
set_pev(id, pev_body, random_num(0, 1))
}

}

description[ Duvida ] Zombie Jumper EmptyRe: [ Duvida ] Zombie Jumper

more_horiz
nem

description[ Duvida ] Zombie Jumper EmptyRe: [ Duvida ] Zombie Jumper

more_horiz
privacy_tip Permissões neste sub-fórum
Não podes responder a tópicos
power_settings_newInicie sessão para responder