Welcome Soldier.



[APORTE] bb_classe Zombie hunter

PlayEasymx Sin conexión
User
#1
Hoy les traigo Zombie hunter para BASEBUILDER!

Credits:
 [b]DJHD!
Muchos an de jugar Left 4 the dead 1 o 2, les traigo este Zombie para Basebuilder, incluye poder saltar lo alto que kieras cambiando una CVAR.

INSTALACION:
Desactiva el bb_class65, bb_zombie_class Lo pones en addons/plugin.
ACTIVAS EL PLUGIN Y LISTO.

amx_cvar "zp_hunter_jump_force" "400"
Entre mas le suvas, mas salto brinca.
amx_cvar "zp_hunter_jump_cooldown" "20" Tiempo En que tarda en recargar para usar el salto.

NOMBRE, KNIFE, GRAV, SPEED, FLAG, INFO
-EDITAS DESDE ESTA PARTE DEL CODIGO:

[/b]

Código PHP:
new const zclass_name[] = "Hunter Zombie" // NOMBRE DEL ZOMBIE
new const zclass_info[] = "Salto + HP+ Speed" // INFORMACION QUE TIENE
new const zclass_model[] = "SVL_Hunter_Zombie" MODEL DEL ZOMBIE
new const zclass_clawmodel[] = "v_knife_zombie_hunter" // v_MODEL DEL ZOMBIE (MANOS)

const zclass_health 3000 // VIDA
const zclass_speed 300 // SPEED

const Float:zclass_gravity 0.6 //GRAV
const Float:zclass_knockback 1.0 // no me acuerdo :'v
const zclass_adminflags ADMIN_ADMIN // FLAG, "ADMIN_ADMIN" = ES ADMIN. "ADMIN_ALL" = NO ADMIN 
[b]
CODIGO:

[/b]

Código PHP:
/*================================================================================

-----------------------------------
-*- [ZP] Hunter L4D -*-
-----------------------------------

~~~~~~~~~~~~~~~
- Description -
~~~~~~~~~~~~~~~

This zombie has long jumps as well as the popular game L4D2
Well, this time the skill is good and better,
to jump you have to press Ctrl + E and look where you want to jump.

================================================================================*/

#include <amxmodx>
#include <basebuilder>
#include <hamsandwich>
#include <fun>
#include <cstrike>
#include <amxmisc>
#include <fakemeta>

/*================================================================================
[Customizations]
=================================================================================*/
new const g_spawm_blody[][] =  "basebuilder/spawn_hunter.wav" }

#define KILL_HUNTER  "basebuilder/die_hunter.wav"
// Zombie Attributes
new const zclass_name[] = "Hunter Zombie"
new const zclass_info[] = "Salto + HP+ Speed"
new const zclass_model[] = "SVL_Hunter_Zombie"
new const zclass_clawmodel[] = "v_knife_zombie_hunter"

const zclass_health 3000
const zclass_speed 300

const Float:zclass_gravity 0.6
const Float:zclass_knockback 1.0
const zclass_adminflags ADMIN_ADMIN

new const leap_sound[4][] = { "left_4_dead2/hunter_jump.wav""left_4_dead2/hunter_jump1.wav""left_4_dead2/hunter_jump2.wav""left_4_dead2/hunter_jump3.wav" }

/*================================================================================
Customization ends here!
Any edits will be your responsibility
=================================================================================*/

// Variables
new g_hunter

// Arrays
new Float:g_lastleaptime[33]

// Cvar pointers
new cvar_forcecvar_cooldown

// Plugin info.
#define PLUG_VERSION "0.2"
#define PLUG_AUTHOR "DJHD!"

/*================================================================================
[Init, CFG and Precache]
=================================================================================*/

public plugin_precache()
{
    
precache_sound(KILL_HUNTER)
    
// Register the new class and store ID for reference
    
g_hunter bb_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockbackzclass_adminflags)
    
    
// Sound
    
static i
    
for(0sizeof leap_soundi++)precache_sound(leap_sound[i])
     for(
0sizeof g_spawm_blodyi++) precache_sound(g_spawm_blody[i])
}

public 
plugin_init() 
{
    
// Plugin Info
    
register_plugin("[ZP] Zombie Class: Hunter L4D2 Zombie"PLUG_VERSIONPLUG_AUTHOR)
    
    
// Forward
    
register_forward(FM_PlayerPreThink"fw_PlayerPreThink"
    
    
// Cvars
    
cvar_force register_cvar("zp_hunter_jump_force""520"
    
cvar_cooldown register_cvar("zp_hunter_jump_cooldown""20")
    
RegisterHam(Ham_Spawn"player""ham_PlayerSpawn_Post"1)
    
register_forward(FM_EmitSound"fm_emitsound")
    
    static 
szCvar[30]
    
formatex(szCvarcharsmax(szCvar), "v%s by %s"PLUG_VERSIONPLUG_AUTHOR)
    
register_cvar("zp_zclass_hunterl4d2"szCvarFCVAR_SERVER|FCVAR_SPONLY)
}

/*================================================================================
[Zombie Plague Forwards]
=================================================================================*/


/*================================================================================
[Main Forwards]
=================================================================================*/

public fw_PlayerPreThink(id)
{
    if(!
is_user_alive(id))
        return
    
    
    if(
is_user_connected(id))
    {
        if (
allowed_hunterjump(id))
        {
            static 
Float:velocity[3]
            
velocity_by_aim(idget_pcvar_num(cvar_force), velocity)
            
set_pev(idpev_velocityvelocity)
            
            
emit_sound(idCHAN_STREAMleap_sound[random_num(0sizeof leap_sound -1)], 1.0ATTN_NORM0PITCH_HIGH)
            
            
            
// Set the current super jump time
            
g_lastleaptime[id] = get_gametime()
    
        }
    }
}
/*================================================================================
[Internal Functions]
=================================================================================*/

allowed_hunterjump(id)
   
    
if (!zp_get_user_zombie(id))
        return 
false
    
    
if (bb_get_user_zombie_class(id) != g_hunter)
        return 
false
    
    
if (!((pev(idpev_flags) & FL_ONGROUND) && (pev(idpev_flags) & FL_DUCKING)))
        return 
false
    
    
static buttons
    buttons 
pev(idpev_button)
    
    
// Not doing a longjump (added bot support)
    
if (!(buttons IN_ATTACK2) && !is_user_bot(id))
        return 
false
    
    
static Float:cooldown
    cooldown 
get_pcvar_float(cvar_cooldown)
    
    if (
get_gametime() - g_lastleaptime[id] < cooldown)
        return 
false
    
    
return true
}

public 
fm_emitsound(idchannel, const sample[], Float:volumeFloat:attnflagspitch)
{
 
   if(!bb_is_user_zombie(id))
 
       return;
 
       
    if
(equal(sample[7], "die"3) || equal(sample[7], "dea"3))
 
   {
 
       new class = bb_get_user_zombie_class(id);
 
       
        if
(class == g_hunter)
 
            emit_soundidchannelKILL_HUNTERvolumeattnflagspitch)
     
    }
 
 /* else if((sample[7] == 'b' && sample[8] == 'h' && sample[9] == 'i' && sample[10] == 't') || (sample[7] == 'h' && sample[8] == 'e' && sample[9] == 'a' && sample[10] == 'd')) 
    {
        if( bb_get_user_zombie_class(id) == g_bloody)
            emit_sound( id, channel, g_sound_neme[random(sizeof(g_sound_neme))], volume, attn, flags, pitch)*/
}

public 
ham_PlayerSpawn_Post(id)
{
    if (!
is_user_alive(id))
        return ;
        
     if(
bb_is_user_zombie(id) && bb_get_user_zombie_class(id) == g_hunter)
 
    {
 
    emit_sound(idCHAN_STREAMg_spawm_blody[random_num(0sizeof g_spawm_blody -1)], 1.0ATTN_NORM0PITCH_HIGH)
 
   }

[+] 1 user says Thank You to PlayEasymx for this post
Responder

Sky^^ Sin conexión
User
#2
No explicas bien las cosas y la verdad se me hace innecesario aportar algo que está en Internet. v:
[Imagen: 76561198095047868.png]

Perfil de amxmodx-es: Skylar
Responder

PlayEasymx Sin conexión
User
#3
(06-26-2017, 08:13 PM)Sky^^ escribió: No explicas bien las cosas y la verdad se me hace innecesario aportar algo que está en Internet.  v:

Si pero esta aportado solo para zp :whatever:

Gracias, eso vere En mis próximos aportes.
Responder





Usuarios navegando en este tema:
1 invitado(s)



Sobre M X E M E X I C O

Comunidad MxE © 2020 - La mejorar comunidad de Counter Strike 1.6 .