Buenas Quiero Saber Como Agregarle Nivel A Un Zombie
#1
Estoy Probando Zombie Apocalypse y cuando pongo una clase de Zombie No Sale Directamente O Como Hago Para Agregarle Mas Clases De Zombie
Responder
#2
Hola, aca te dejo un ejemplo con una clase

Código PHP:
#incluide <zombieplague> 
>>>>>

Código PHP:
#incluide <zombieapocalypse> 

Segun el zombieapocalypse.inc asi seria el orden donde se le asigna el nivel a la clase

Cita:native za_register_zombie_class(const name[], const info[], const model[], const clawmodel[], lvl, hp, speed, Float:gravity, Float:knockback)

Código PHP:
g_KfFleshpound zp_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodelzclass_healthzclass_speedzclass_gravityzclass_knockback


>>>>

Código PHP:
g_KfFleshpound za_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodel/*Nivel requerido para usar la clase*/zclass_healthzclass_speedzclass_gravityzclass_knockback


Quedaria así, te tendria que andar sin problemas esta clase..

Código PHP:
#include <amxmodx>
#include <fakemeta>
#include <fun>
#include <hamsandwich>
#include <cstrike>
#include <zombieapocalypse>

// Task offsets
enum (+= 100) {
    
TASK_AURA
}

#define ID_AURA (taskid - TASK_AURA)

// Fleshpound Zombie
new const zclass_name[] = { "Zombie Fleshpound" 
new const 
zclass_info[] = { "Se enfurece" 
new const 
zclass_model[] = { "DM_Fleshpound" 
new const 
zclass_clawmodel[] = { "v_fleshpound_claws.mdl" 
const 
zclass_health 4500
const zclass_speed 230
const Float:zclass_gravity 1.0 
const Float:zclass_knockback 1.0

new g_Rage[] = "DMM/fleshpound_rage.wav"

// Cooldown hook
new Float:g_iLastFury[33]

new 
g_speed[33]
new 
rgb
new g_maxplayers

new cvar_fury_cooldown
new g_KfFleshpound

public plugin_init()
{
    
register_plugin("Fleshpound""0.1""DJHD!"
    
    
cvar_fury_cooldown register_cvar("zp_fleshpound_cooldown""15.0")
    
    
RegisterHam(Ham_Spawn"player""fw_PlayerSpawn_Post"1)
    
register_forward(FM_PlayerPreThink"fw_PlayerPreThink")
    
register_forward(FM_PlayerPreThink"client_prethink")
    
    
register_logevent("roundStart"2"1=Round_Start")
    
    
g_maxplayers get_maxplayers()


public 
plugin_precache()                                        
{
    
g_KfFleshpound za_register_zombie_class(zclass_namezclass_infozclass_modelzclass_clawmodel0zclass_healthzclass_speedzclass_gravityzclass_knockback)
    
    
precache_sound(g_Rage)
}

public 
zp_user_infected_post(idinfector)
{
    if (
zp_get_user_zombie_class(id) == g_KfFleshpound)
    {
        if(
zp_get_user_nemesis(id))
            return
        
        
print_chatColor(id"\g[ZP:DM]\n Para utilizar tu furia presiona \g^"E^"\n.")
        
        
255
        g 
255
        b 
0
        
        set_task
(0.1"fleshpound_aura"id+TASK_AURA__"b")
    }
}

public 
zp_user_humanized_post(id)
{
    
remove_task(id+TASK_AURA)
    
g_speed[id] = 0
}

public 
client_disconnect(id)
    
remove_task(id+TASK_AURA)

// Ham Player Spawn Post Forward
public fw_PlayerSpawn_Post(id)
{
    
// Not alive or didn't join a team yet
    
if (!is_user_alive(id) || !cs_get_user_team(id))
        return;
    
    
// Remove previous tasks
    
remove_task(id+TASK_AURA)
}

public 
fw_PlayerPreThink(id)
{
    if(!
is_user_alive(id))
        return;
    
    static 
iButtoniButton pev(idpev_button)
    static 
iOldButtoniOldButton pev(idpev_oldbuttons)
    
    if(
zp_get_user_zombie(id) && (zp_get_user_zombie_class(id) == g_KfFleshpound) && !zp_get_user_nemesis(id))
    {
        if((
iButton IN_USE) && !(iOldButton IN_USE))
            
MakeRage(id)
    }
}

public 
MakeRage(id)
{
    if(
get_gametime() - g_iLastFury[id] < get_pcvar_float(cvar_fury_cooldown))
    {
        
print_chatColor(id"\g[ZP:DM]\n Espera \g%.1f\n para volver , a usar tu furia."get_pcvar_float(cvar_fury_cooldown)-(get_gametime() - g_iLastFury[id]))
        return 
PLUGIN_HANDLED
    
}
    
    
g_iLastFury[id] = get_gametime()
    
    
255
    g 
0
    b 
0
    
    g_speed
[id] = 1
    emit_sound
(idCHAN_STREAMg_RageVOL_NORMATTN_NORM0PITCH_NORM)
    
    
set_task(5.0"normal"id)
    
    return 
PLUGIN_HANDLED
}


public 
normal(id)
{
    
255
    g 
255
    b 
0
    
    g_speed
[id] = 0
    
    print_chatColor
(id"\g[ZP:DM]\n Has vuelto a la normalidad."
}

public 
client_prethink(id)
{
    if (
zp_get_user_zombie_class(id) == g_KfFleshpound)
    {
        if(
is_user_alive(id) && zp_get_user_zombie(id) && (zp_get_user_zombie_class(id) == g_KfFleshpound) && !zp_get_user_nemesis(id))
            
Action(id)
    }
}

public 
Action(id)
{
    if(
g_speed[id] == 1)
    {
        
set_pev(idpev_maxspeed650.0)
    }
    else if(
g_speed[id] == 0)
    {
        
set_pev(idpev_maxspeed190.0)
    }
    
    return 
PLUGIN_HANDLED;
}

// Fleshpound aura task
public fleshpound_aura(taskid)
{
    if(!
is_user_alive(ID_AURA))
    {
        
// Task not needed anymore
        
remove_task(taskid);
        return;
    }
    
    if(
zp_get_user_nemesis(ID_AURA))
    {
        
// Task not needed anymore
        
remove_task(taskid);
        return;
    }
    
    
// Set aura for fleshpound
    
if (zp_get_user_zombie_class(ID_AURA) == g_KfFleshpound)
    {
        
// Get player's origin
        
static origin[3]
        
get_user_origin(ID_AURAorigin)
        
        
// Colored Aura
        
message_begin(MSG_PVSSVC_TEMPENTITYorigin)
        
write_byte(TE_DLIGHT// TE id
        
write_coord(origin[0]) // x
        
write_coord(origin[1]) // y
        
write_coord(origin[2]) // z
        
write_byte(13// radius
        
write_byte(r// r
        
write_byte(g// g
        
write_byte(b// b
        
write_byte(1// life
        
write_byte(0// decay rate
        
message_end()
    }
    else
    {
        
// Task not needed anymore
        
remove_task(taskid);
        return;
    }
}

public 
roundStart()
{
    for (new 
1<= g_maxplayersi++)
    {
        
remove_task(i+TASK_AURA)
        
g_speed[i] = 0
    
}
}

stock print_chatColor(const id,const input[], any:...)
{
    new 
msg[191], players[32], count 1;
    
vformat(msg,190,input,3);
    
replace_all(msg,190,"\g","^4");// green
    
replace_all(msg,190,"\n","^1");// normal
    
replace_all(msg,190,"\t","^3");// team
    
    
if (idplayers[0] = id; else get_players(players,count,"ch");
    for (new 
i=0;i<count;i++)
        if (
is_user_connected(players[i]))
    {
        
message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("SayText"),_,players[i]);
        
write_byte(players[i]);
        
write_string(msg);
        
message_end();
    }

Responder
#3
(16/07/2018, 01:28 AM)DarkSkeleton escribió: Estoy Probando Zombie Apocalypse y cuando pongo una clase de Zombie No Sale Directamente O Como Hago Para Agregarle Mas Clases De Zombie

Tendrias que adaptar la clase zombie ejemplo

tu descargas una clase zombie por el foro y te vas donde dice
Código PHP:
#include <zombieplague> 

Luego borras <zombieplague> y colocas
Código PHP:
#incluide <zombieapocalypse> 
y tendrias que adaptar el nivel para que el zombie se ocupe en este caso yo probe ese clase zombie y esta mala no deja abrir el servidor


en este caso no te explico bien por que estoi muy ocupado
Zombie Plague Demolition 1.2.9
fix del sma 10%
Zombie Escape Niveles 1.0
en desarrollo
Responder
#4
Es un ejemplo de como adaptar las clases zm al ZA, no subí los complementos...
Responder
#5
Muchas gracias me sirvio bastante tu ayuda por que yo tengo un zombie plague creado por niveles pero tiene cosas del za por eso me confundio pense que era diferente
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)