[Guia][ZP] Como crear modos grupales
#1
Buenas tardes y noches para todos

Hoy les vengo a presentar esta guia de "Como crear un modo para ZP Grupal".. La idea es que sepan mas o menos la idea de como hacerlo.. Ya que he visto muchas consultas y ayudas sobre esto
Asi que bueno vamos a empezar con esto:

NOTA: Esto va a estar dividido por Pasos (Spoilers) Asi es mas comodo y facil de leer..

Crear un modo Grupal (Modo Armageddon):
- Primer paso: Creamos las variables y constantes correspondientes (Sounds, round, cvars, etc)
Agregamos:
Código PHP:
new const sound_arma[][] = { "zombie_plague/survivor1.wav" 
Quedaria:
Código PHP:
new const sound_plague[][] = { "zombie_plague/nemesis1.wav""zombie_plague/survivor1.wav" }
new const 
sound_arma[] = { "zombie_plague/survivor1.wav" }
new const 
grenade_infect[] = { "zombie_plague/grenade_infect.wav" 

Ahora agregamos:
Código PHP:
MODO_ARMA 
Quedaria
Código PHP:
enum
{
    
MODE_NONE 0,
    
MODE_INFECTION,
    
MODE_NEMESIS,
    
MODE_SURVIVOR,
    
MODE_SWARM,
    
MODE_MULTI,
    
MODE_PLAGUE,
    
MODE_ARMA


Ahora agregamos:
Código PHP:
new g_armaround 
Quedaría:
Código PHP:
new g_plagueround // plague round
new g_armaround
new g_lastmode // last played mode 

Ahora agregamos:
Código PHP:
cvar_armacvar_armachancecvar_armaminplayercvar_armaratiocvar_armahpsurvicvar_armahpneme 
Quedaría:
Código PHP:
cvar_nvgcolor[3], cvar_nemnvgcolor[3], cvar_humnvgcolor[3], cvar_flashcolor[3], 
cvar_armacvar_armachancecvar_armaminplayercvar_armaratiocvar_armahpsurvicvar_armahpneme 
- Segundo paso: Precachamos el sonido
Agregamos en plugin_precache
Código PHP:
engfunc(EngFunc_PrecacheSoundsound_arma
Quedaría:
Código PHP:
for (0sizeof sound_plaguei++)
    
engfunc(EngFunc_PrecacheSoundsound_plague[i])
engfunc(EngFunc_PrecacheSoundsound_arma)
for (
0sizeof grenade_infecti++)
    
engfunc(EngFunc_PrecacheSoundgrenade_infect[i]) 
- Tercer paso: Agregamos comandos y cvars
Agregamos en (plugin_init):
Código PHP:
register_concmd("zp_arma""CmdArma"ADMIN_BAN" - Comienzo del Modo Armageddon"
Quedaría:
Código PHP:
register_concmd("zp_plague""cmd_plague"ADMIN_BAN" - Start Plague Mode")
register_concmd("zp_arma""CmdArma"ADMIN_BAN" - Comienzo del Modo Armageddon"

Ahora agregamos:
Código PHP:
// Cvar - Armageddon mode
cvar_arma register_cvar("zp_arma_enable""1")
cvar_armachance register_cvar("zp_arma_chance""40")
cvar_armaminplayer register_cvar("zp_arma_min_player""0")
cvar_armaratio register_cvar("zp_arma_ratio""1.5")
cvar_armahpsurvi register_cvar("zp_arma_hp_survi""250")
cvar_armahpneme register_cvar("zp_arma_hp_neme""2500"
Quedaría:
Código PHP:
// CVARS - Plague Mode
cvar_plague register_cvar("zp_plague_enabled""1")
cvar_plaguechance register_cvar("zp_plague_chance""30")
cvar_plagueminplayers register_cvar("zp_plague_min_players""0")
cvar_plagueratio register_cvar("zp_plague_ratio""0.5")
cvar_plaguenemnum register_cvar("zp_plague_nem_number""1")
cvar_plaguenemhpmulti register_cvar("zp_plague_nem_hp_multi""0.5")
cvar_plaguesurvnum register_cvar("zp_plague_surv_number""1")
cvar_plaguesurvhpmulti register_cvar("zp_plague_surv_hp_multi""0.5")
    
// Cvar - Armageddon mode
cvar_arma register_cvar("zp_arma_enable""1")
cvar_armachance register_cvar("zp_arma_chance""40")
cvar_armaminplayer register_cvar("zp_arma_min_player""0")
cvar_armaratio register_cvar("zp_arma_ratio""1.5")
cvar_armahpsurvi register_cvar("zp_arma_hp_survi""250")
cvar_armahpneme register_cvar("zp_arma_hp_neme""2500"
- Cuarto paso: Seteamos la variable g_armaround
Agregamos en (event_round_start):
Código PHP:
g_armaround false 
Quedaría:
Código PHP:
public event_round_start()
{
    
// New round starting
    
g_newround true
    g_endround 
false
    g_survround 
false
    g_nemround 
false
    g_swarmround 
false
    g_plagueround 
false
    g_armaround 
false
    
// code code y mas code


Ahora agregamos en (make_a_zombie):
Código PHP:
g_armaround false 
Quedaria:
Código PHP:
make_a_zombie(modeid)
{
    
// code code y mas code
    // Get prevent consecutive modes setting
    
static preventconsecutive
    preventconsecutive 
get_pcvar_num(cvar_preventconsecutive)

    
// Round starting
    
g_newround false
    g_survround 
false
    g_nemround 
false
    g_swarmround 
false
    g_plagueround 
false
    g_armaround 
false
    
// code code y mas code


Ahora agregamos (De nuevo en make_a_zombie)
Código PHP:
else if ((mode == MODE_NONE && (!preventconsecutive || g_lastmode != MODE_ARMA) && random_num(1get_pcvar_num(cvar_armachance)) == get_pcvar_num(cvar_arma) && floatround((iPlayersnum-2)*get_pcvar_float(cvar_armaratio), floatround_ceil) >= && iPlayersnum >= get_pcvar_num(cvar_armaminplayer)) || mode == MODE_ARMA)
{
    
g_armaround true
    g_lastmode 
MODE_ARMA

    
static iMaxNemesis
    iMaxNemesis 
= (iPlayersnum 2)

    while (
fnGetNemesis() < iMaxNemesis)
    {
        
id fnGetRandomAlive(random_num(1iPlayersnum))
        if (!
is_user_alive(id) || g_nemesis[id]) continue;
        
zombieme(id010)
        
fm_set_user_health(idget_pcvar_num(cvar_armahpneme)*fnGetAlive())
    }

    for (
id 1id <= g_maxplayersid++)
    {
        if (!
is_user_alive(id)) continue;
        if (
g_nemesis[id] || g_survivor[id]) continue;
        
humanme(id1)
        
fm_set_user_health(idget_pcvar_num(cvar_armahpsurvi)*fnGetAlive())
    }
    
PlaySound(sound_arma);

    
set_hudmessage(255255255HUD_EVENT_XHUD_EVENT_Y10.05.01.01.0, -1)
    
ShowSyncHudMsg(0g_MsgSync"¡¡ ARMAGEDDON !!")

    
ExecuteForward(g_fwRoundStartg_fwDummyResultMODE_ARMA0);

Quedaría:
Código PHP:
// Round start forward
    
ExecuteForward(g_fwRoundStartg_fwDummyResultMODE_SURVIVORforward_id);
}
else if ((
mode == MODE_NONE && (!preventconsecutive || g_lastmode != MODE_ARMA) && random_num(1get_pcvar_num(cvar_armachance)) == get_pcvar_num(cvar_arma) && floatround((iPlayersnum-2)*get_pcvar_float(cvar_armaratio), floatround_ceil) >= && iPlayersnum >= get_pcvar_num(cvar_armaminplayer)) || mode == MODE_ARMA)
{
    
g_armaround true
    g_lastmode 
MODE_ARMA
    
    
static iMaxNemesis
    iMaxNemesis 
= (iPlayersnum 2)

    while (
fnGetNemesis() < iMaxNemesis)
    {
        
id fnGetRandomAlive(random_num(1iPlayersnum))
        if (!
is_user_alive(id) || g_nemesis[id]) continue;
        
zombieme(id010)
        
fm_set_user_health(idget_pcvar_num(cvar_armahpneme)*fnGetAlive())
    }

    for (
id 1id <= g_maxplayersid++)
    {
        if (!
is_user_alive(id)) continue;
        if (
g_nemesis[id] || g_survivor[id]) continue;
        
humanme(id1)
        
fm_set_user_health(idget_pcvar_num(cvar_armahpsurvi)*fnGetAlive())
    }
    
PlaySound(sound_arma);

    
set_hudmessage{255255255HUD_EVENT_XHUD_EVENT_Y10.05.01.01.0, -1)
    
ShowSyncHudMsg(0g_MsgSync"¡¡ ARMAGEDDON !!")

    
ExecuteForward(g_fwRoundStartg_fwDummyResultMODE_ARMA0);

ACLARACIÓN: Aquí en: fm_set_user_health(id, get_pcvar_num(cvar_armahpneme)*fnGetAlive())
Sería la vida multiplicada por la cantidad de usuarios vivos..
Ejemplo: 2500 (Vida base de la cvar) * 12 (Cantidad de usuarios vivos, puede ser cualquier número menor a 32 [Cantidad maxima de jugadores]) = 30000 (Vida que vas a tener siendo nemesis)
- Quinto paso: Ahora agregamos las funciones del comando
Agregamos:
Código PHP:
// zp_arma
public CmdArma(idlevelcid)
{
    if (!
cmd_access(idlevelcid1)) return PLUGIN_HANDLED;
    if (!
allowed_arma()) return PLUGIN_HANDLED;
    
    
EjecutarArmadeggon(id)
    return 
PLUGIN_HANDLED;

Quedaria:
Código PHP:
// zp_plague
public cmd_plague(idlevelcid)
{
    
// Check for access flag
    
if (!cmd_access(idlevelcid1))
        return 
PLUGIN_HANDLED;
    
    
// Plague mode not allowed
    
if (!allowed_plague())
    {
        
client_print(idprint_console"[ZP] %L"id"CMD_NOT")
        return 
PLUGIN_HANDLED;
    }
    
    
command_plague(id)
    
    return 
PLUGIN_HANDLED;
}

// zp_arma
public CmdArma(idlevelcid)
{
    if (!
cmd_access(idlevelcid1)) return PLUGIN_HANDLED;
    if (!
allowed_arma()) return PLUGIN_HANDLED;
    
    
EjecutarArmadeggon(id)
    return 
PLUGIN_HANDLED;


Ahora agregamos:
Código PHP:
allowed_arma()
{
    if (
g_endround || !g_newround || !get_pcvar_num(cvar_arma) || task_exists(TASK_WELCOMEMSG) || fnGetAlive() < get_pcvar_num(cvar_armaminplayer))
        return 
false;
    
    return 
true;

Quedaría:
Código PHP:
allowed_plague()
{
    if (
g_endround || !g_newround || !get_pcvar_num(cvar_plague) || task_exists(TASK_WELCOMEMSG) || floatround((fnGetAlive()-(get_pcvar_num(cvar_plaguenemnum)+get_pcvar_num(cvar_plaguesurvnum)))*get_pcvar_float(cvar_plagueratio), floatround_ceil) < 1
    
|| fnGetAlive()-(get_pcvar_num(cvar_plaguesurvnum)+get_pcvar_num(cvar_plaguenemnum)+floatround((fnGetAlive()-(get_pcvar_num(cvar_plaguenemnum)+get_pcvar_num(cvar_plaguesurvnum)))*get_pcvar_float(cvar_plagueratio), floatround_ceil)) < || fnGetAlive() < get_pcvar_num(cvar_plagueminplayers))
        return 
false;
    
    return 
true;
}

allowed_arma()
{
    if (
g_endround || !g_newround || !get_pcvar_num(cvar_arma) || task_exists(TASK_WELCOMEMSG) || fnGetAlive() < get_pcvar_num(cvar_armaminplayer))
        return 
false;
    
    return 
true;


Ahora agregamos:
Código PHP:
// Admin Command. zp_arma
EjecutarArmadeggon(id)
{
    static 
name1[32]
    
get_user_name(idname1sizeof name1 1)
    
    
// Show activity?
    
switch (get_pcvar_num(cvar_showactivity))
    {
        case 
1client_print(0print_chat"ADMIN - Comenzo: Modo Armageddon")
        case 
2client_print(0print_chat"ADMIN %s - Ha iniciado el Modo Armageddon"name1)
    }
    
    
// Log to Zombie Plague log file?
    
if (get_pcvar_num(cvar_logcommands))
    {
        static 
logdata[100], authid[32], ip[16]
        
get_user_authid(idauthidsizeof authid 1)
        
get_user_ip(idipsizeof ip 11)
        
formatex(logdatasizeof logdata 1"ADMIN %s <%s><%s> - Comenzo: Modo Armageddon (Players: %d/%d)"name1authidipfnGetPlaying(), g_maxplayers)
        
log_to_file("zombieplague.log"logdata)
    }
    
    
remove_task(TASK_MAKEZOMBIE)
    
make_a_zombie(MODE_ARMA0)

Quedaria:
Código PHP:
// Admin Command. zp_plague
command_plague(id)
{
    static 
name1[32]
    
get_user_name(idname1sizeof name1 1)
    
    
// Show activity?
    
switch (get_pcvar_num(cvar_showactivity))
    {
        case 
1client_print(0print_chat"ADMIN - %L"LANG_PLAYER"CMD_PLAGUE")
        case 
2client_print(0print_chat"ADMIN %s - %L"name1LANG_PLAYER"CMD_PLAGUE")
    }
    
    
// Log to Zombie Plague log file?
    
if (get_pcvar_num(cvar_logcommands))
    {
        static 
logdata[100], authid[32], ip[16]
        
get_user_authid(idauthidsizeof authid 1)
        
get_user_ip(idipsizeof ip 11)
        
formatex(logdatasizeof logdata 1"ADMIN %s <%s><%s> - %L (Players: %d/%d)"name1authidipLANG_SERVER,"CMD_PLAGUE"fnGetPlaying(), g_maxplayers)
        
log_to_file("zombieplague.log"logdata)
    }
    
    
// Call Plague Mode
    
remove_task(TASK_MAKEZOMBIE)
    
make_a_zombie(MODE_PLAGUE0)
}

// Admin Command. zp_arma
EjecutarArmadeggon(id)
{
    static 
name1[32]
    
get_user_name(idname1sizeof name1 1)
    
    
// Show activity?
    
switch (get_pcvar_num(cvar_showactivity))
    {
        case 
1client_print(0print_chat"ADMIN - Comenzo: Modo Armageddon")
        case 
2client_print(0print_chat"ADMIN %s - Ha iniciado el Modo Armageddon"name1)
    }
    
    
// Log to Zombie Plague log file?
    
if (get_pcvar_num(cvar_logcommands))
    {
        static 
logdata[100], authid[32], ip[16]
        
get_user_authid(idauthidsizeof authid 1)
        
get_user_ip(idipsizeof ip 11)
        
formatex(logdatasizeof logdata 1"ADMIN %s <%s><%s> - Comenzo: Modo Armageddon (Players: %d/%d)"name1authidipfnGetPlaying(), g_maxplayers)
        
log_to_file("zombieplague.log"logdata)
    }
    
    
remove_task(TASK_MAKEZOMBIE)
    
make_a_zombie(MODE_ARMA0)

- Sexto paso: Agregamos codigos adicionales (Para evitar bugs)
Ahora agregamos en (fw_takedamage)
Código PHP:
|| g_armaround 
Quedaria asi:
Código PHP:
if (g_swarmround || g_plagueround || g_armaround || fnGetHumans() == 1) return HAM_IGNORED

EXPLICACION: Esto es para evitar infectarse, o ser infectado.. Esto es inecesario, pero para prevenir bugs lo agregamos.

Ahora agregamos en (buy_extra_item)
Código PHP:
|| g_armaround 
Quedaría:
Código PHP:
// Check for hard coded items with special conditions
if ((itemid == EXTRA_ANTIDOTE && (g_endround || g_swarmround || g_armaround || g_nemround || g_survround || g_plagueround || fnGetZombies() <= || (get_pcvar_num(cvar_deathmatch) && !get_pcvar_num(cvar_respawnafterlast) && fnGetHumans() == 1))) || (itemid == EXTRA_MADNESS && g_nodamage[id]) || (itemid == EXTRA_INFBOMB && (g_endround || g_swarmround || g_armaround || g_nemround || g_survround || g_plagueround)))
{
    
zp_colored_print(id"^x04[ZP]^x01 %L"id"CMD_NOT_CANTUSE")
    return;


EXPLICACION:
Esto es para que ningun Survivor o Nemesis pueda comprar items extras.. Asi evitars bugs y desventajas o ventajas en el juego

Ahora agregamos en (message_teaminfo)
Código PHP:
else if (g_armaround && fnGetZombies()) g_respawn_as_zombie[id] = false
Y tambien agregaremos
Código PHP:
else if (g_armaround && fnGetHumans()) g_respawn_as_zombie[id] = false
Quedaria asi:
Código PHP:
switch (team[0])
{
    case 
'C'// CT
    
{
        if (
g_survround && fnGetHumans()) // survivor alive --> switch to T and spawn as zombie
        
{
            
g_respawn_as_zombie[id] = true;
            
remove_task(id+TASK_TEAM)
            
fm_set_user_team(idCS_TEAM_T)
            
set_msg_arg_string(2"TERRORIST")
        }
        else if (
g_armaround && fnGetZombies()) g_respawn_as_zombie[id] = false;
        else if (!
fnGetZombies()) // no zombies alive --> switch to T and spawn as zombie
        
{
            
g_respawn_as_zombie[id] = true;
            
remove_task(id+TASK_TEAM)
            
fm_set_user_team(idCS_TEAM_T)
            
set_msg_arg_string(2"TERRORIST")
        }
    }
    case 
'T'// Terrorist
    
{
        if ((
g_swarmround || g_survround) && fnGetHumans()) // survivor alive or swarm round w/ humans --> spawn as zombie
        
{
            
g_respawn_as_zombie[id] = true;
        }
        else if (
g_armaround && fnGetHumans()) g_respawn_as_zombie[id] = false;
        else if (
fnGetZombies()) // zombies alive --> switch to CT
        
{
            
remove_task(id+TASK_TEAM)
            
fm_set_user_team(idCS_TEAM_CT)
            
set_msg_arg_string(2"CT")
        }
    }


EXPLICACION:
Esto es importante a la hora de conectarse y siendo que es modo ARMAGEDDON.. Si un usuario se conecta durante el modo en curso.. No lo va a spawnear. Asi para evitar bugs. Ya que sin esto. Al entrar con el modo en curso, te spawnearia siendo Zombie y entorpeceria el juego. Mejor setear la variable, siendo modo armageddon, "g_respawn_as_zombie" en false

Ahora agregamos en (respawn_player)
Código PHP:
&& !g_armaround 
Quedaria:
Código PHP:
if (!g_endround && !g_survround && !g_swarmround && !g_armaround && !g_nemround && !g_plagueround && team != CS_TEAM_SPECTATOR && team != CS_TEAM_UNASSIGNED && !is_user_alive(ID_SPAWN)) 

EXPLICACION: Esto es para que en el modo no respawneemos todo el tiempo, asi que si quieren que el modo sea respawneando, no hace falta agregarlo, pero lo mas comun de un Modo ARMAGEDDON es agregar esto para evitarlo

Ahora agregamos en (allowed_respawn(id))
Código PHP:
|| g_armaround 
Quedaria asi:
Código PHP:
if (g_endround || g_survround || g_swarmround || g_armaround || g_nemround || g_plagueround || team == CS_TEAM_SPECTATOR || team == CS_TEAM_UNASSIGNED || !is_user_connected(id) || is_user_alive(id)) 

EXPLICACION: Aca es como lo de arriba.. Es para evitar respawnear o que respawnee un player en el modo

Ahora al final del plugin agregamos esto
Código PHP:
fnGetNemesis()
{
    new 
iNeme 0i
    
for (1<= g_maxplayersi++) if (is_user_alive(id)) iNeme++
    return 
iNeme;


Buenisimo ya terminamos de como crear modos grupales.. Mas adelante voy a hacer otro pero para hacer modos Individuales.. Que es un poco mas complejo pero es mas facil

Si tienen alguna duda.. Diganmela y si hay algun bug mas que les trae, se lo agregmaos a la guia sin problemas
Y si tienen problemas depende la version de su ZP lo comentamos.. Pienso que es adaptable para cualquier Version ya que no afecta demasiado..

Espero que les sirva.. Saludos :3
Free agent - Vendo plugins, mods o apps del foro IPB (Invision community)
Contactarme vía Discord >>> AtselTV#8202
Responder
#2
Buenisimo , que increible me encanto todo asi tan ordenado , de ese modo me da ganas de leer todo el code.

Saludos y gracias
NUEVO ZOMBIE PLAGUE + LVLS!! UNETE A LA COMUNIDAD
[Imagen: b_350_20_ffad41_e98100_000000_591f11.png]


Responder
#3
Buenisimo el tuto pacman espero que el otro sea igual de bueno :V
[Imagen: bvpq9q-6.png]

NO DOY AYUDA VIA MENSAJE PRIVADO

* Si requieres algún servicio de pago puedes contactarme vía MP o en mi facebook
Responder
#4
Se ve que esta muy ordenado y lindo no vi el code por q por ahora no uso zp pero supongo q m servira en algún futuro
PD:Te llevas un +1
[TUT] Carnage

Fight

"El limite de los backdoors de gente q sabe programar como nostros lo impone nuestra maldad interior y creeme q soy muy malo en el interior"

Anónimo
Responder
#5
podrias poner en la parte de "evitar bugs" para que es cada cosa... por q no siempre vas a nececitarlo
Hi Milashkasiya CrabCrab

Soy un #Panda.. Soy solo un tipo que parece #común pero soy todo lo contrario; alguien #atípico en esta sociedad actual

[Imagen: xl0jvd-5.png]
Link
Responder
#6
(08/05/2014, 05:58 PM)[R]ak escribió: podrias poner en la parte de "evitar bugs" para que es cada cosa... por q no siempre vas a nececitarlo
Claro.. Algunas cosas son medio inecesarias.. Pero para el nuevo le hace falta
O tambien se puede hacer de otra forma

Ahi agregue y expliqué bien cada punto del "Sexto paso"
Free agent - Vendo plugins, mods o apps del foro IPB (Invision community)
Contactarme vía Discord >>> AtselTV#8202
Responder
#7
si queres agregale comandos de vida al neme y survi asi se hace la cosa mas pareja.... Sonrisa

Código PHP:
cvar_armahp_nemcvar_armahp_surv

    cvar_armahp_nem 
register_cvar("zp_armageddon_hp_nem""11000")
    
cvar_armahp_surv register_cvar("zp_armageddon_hp_surv""2300")


// Round start forward
    
ExecuteForward(g_fwRoundStartg_fwDummyResultMODE_SURVIVORforward_id);
}
else if ((
mode == MODE_NONE && (!preventconsecutive || g_lastmode != MODE_ARMA) && random_num(1get_pcvar_num(cvar_armachance)) == get_pcvar_num(cvar_arma) && floatround((iPlayersnum-2)*get_pcvar_float(cvar_armaratio), floatround_ceil) >= && iPlayersnum >= get_pcvar_num(cvar_armaminplayer)) || mode == MODE_ARMA)
{
    
g_armaround true
    g_lastmode 
MODE_ARMA
    
    
for (id 1id <= g_maxplayersid++)
    {
        if (!
is_user_alive(id)) continue;
        if (
fm_get_user_team(id) != CS_TEAM_CT) continue;
        
zombieme(id010)
        
fm_set_user_health(id*get_pcvar_num(cvar_armahp_nem))
    }
    for (
id 1id <= g_maxplayersid++)
    {
        if (!
is_user_alive(id)) continue;
        if (
fm_get_user_team(id) != CS_TEAM_T) continue;
        
humanme(id1)
        
fm_set_user_health(id*get_pcvar_num(cvar_armahp_surv))
    }
    
PlaySound(sound_arma);

    
set_hudmessage{255255255HUD_EVENT_XHUD_EVENT_Y10.05.01.01.0, -1)
    
ShowSyncHudMsg(0g_MsgSync"¡¡ ARMAGEDDON !!")

    
ExecuteForward(g_fwRoundStartg_fwDummyResultMODE_ARMA0);

[Guia] Granada de Droga [actulizado 01/04/14]
[Guia] Cambio de leap zp 4.2 a 4.3

Zp 4.2 Extincion [Beta+Lvl] Edicion 0.1 (%95) terminado
Responder
#8
No hace falta ponerlo porque es depende como esté echo su Zombie Plague
Lo agrego por las dudas y el "1*" esta de más ese cálculo.
Pero gracias por aportar algo Sonrisa
Free agent - Vendo plugins, mods o apps del foro IPB (Invision community)
Contactarme vía Discord >>> AtselTV#8202
Responder
#9
Podrias pasarme el sma editado porfavor?, trate de seguir tus pasos pero al compilar el sma me tira muchos errores y no lo compila.
Responder
#10
Muéstrame los errores, así puedo ayudarte mejor. Después con tiempo hago un .sma y lo subo.
Free agent - Vendo plugins, mods o apps del foro IPB (Invision community)
Contactarme vía Discord >>> AtselTV#8202
Responder
#11
Código PHP:
fnGetNemesis()
{
    new 
iNeme 0i
    
for (1<= g_maxplayersi++) if (is_user_connected(id) || is_user_alive(id)) iNeme++
    return 
iNeme;


Esto no toma la cantidad de nemesis vivos

PD: Si está vivo, es obvio que está conectado

Ni te molestes en enviarme un mensaje privado para pedirme ayuda porque NO lo voy a contestar.
Gracias por su atención.
Responder
#12
[Imagen: dwglz.png]

Segun me dice que faltan unos corchetes, pero hice los pasos al igual como lo hiciste tu.

te dejare el sma por si lo necesitas.

sma
Responder
#13
Rainbow es es ... Tan Bello
Responder
#14
Tu error es que te falta cerrar una llave.. Tenes que revisar todo tu código donde editaste y revisar si no te falta cerrar una llave / condición / función, etc
Free agent - Vendo plugins, mods o apps del foro IPB (Invision community)
Contactarme vía Discord >>> AtselTV#8202
Responder
#15
El problema es que no se, cual sera la llave que falta que dices tu :V, si pudieras ayudarme gracias.
Responder
#16
el script es el que dejaste arriba?
[Imagen: bvpq9q-6.png]

NO DOY AYUDA VIA MENSAJE PRIVADO

* Si requieres algún servicio de pago puedes contactarme vía MP o en mi facebook
Responder
#17
Si amigo !
Responder
#18
no entiendo que hace el "fnGetNemesis"
Responder
#19
(19/01/2015, 11:27 PM)Antrorcha escribió: no entiendo que hace el "fnGetNemesis"

Retorna un valor, ese valor es la cantidad de Nemesis vivos que se encuentren en ese momento.
Believe, be yourself and don't hold on to just one dream ❤

https://github.com/FEDERICOMB96
Responder
#20
(19/01/2015, 11:27 PM)Antrorcha escribió: no entiendo que hace el "fnGetNemesis"
[Imagen: bvpq9q-6.png]

NO DOY AYUDA VIA MENSAJE PRIVADO

* Si requieres algún servicio de pago puedes contactarme vía MP o en mi facebook
Responder
#21
confusion mia, el zp 4.3 ya lo trae y entonces me parecia raro.
Responder
#22
¡Hola, CSAxel!

A ver, he seguido el tuto y al final a la hora de probar el mod al empezar se cae el servidor sin dejar ningún log ni error... ¿A que se puede deber?
Responder
#23
(20/03/2015, 12:46 AM)ConnorMcLeod94 escribió: ¡Hola, CSAxel!

A ver, he seguido el tuto y al final a la hora de probar el mod al empezar se cae el servidor sin dejar ningún log ni error... ¿A que se puede deber?

No somos adivinos Whatever
Muestra tu code (crea un thread en scripting para eso) pero antes que lo hagas revisa como hiciste el bucle (while o for) para convertir en zombie, algo me dice que es eso Roflmao
Responder
#24
(20/03/2015, 01:07 AM)Mario AR. escribió:
(20/03/2015, 12:46 AM)ConnorMcLeod94 escribió: ¡Hola, CSAxel!

A ver, he seguido el tuto y al final a la hora de probar el mod al empezar se cae el servidor sin dejar ningún log ni error... ¿A que se puede deber?

No somos adivinos Whatever
Muestra tu code (crea un thread en scripting para eso) pero antes que lo hagas revisa como hiciste el bucle (while o for) para convertir en zombie, algo me dice que es eso Roflmao

Si si, ya me imagino que no, era por si la experiencia os decía algo que pueda ser, no sé... Bueno, yo lo he mirado ya mas de una vez y no veo nada mal, lo he comparado con otro código y lo veo igual, bueno, aquí esta:

Código PHP:
else if((mode == MODE_NONE && (!get_pcvar_num(cvar_preventconsecutive) || g_lastmode != MODE_ARMAGEDDON
        && 
random_num(1get_pcvar_num(cvar_armageddonchance)) == get_pcvar_num(cvar_armageddon
        && 
floatround((iPlayersnum 2) * get_pcvar_float(cvar_armageddonratio), floatround_ceil) >= 
        
&& iPlayersnum >= get_pcvar_num(cvar_armageddonminplayers)) || mode == MODE_ARMAGEDDON) {
        
g_armageddonround true
        g_lastmode 
MODE_ARMAGEDDON
        
        
static iMaxNemesis
        iMaxNemesis 
= (iPlayersnum 2)
        
        while(
fnGetNemesis() < iMaxNemesis) {
            
id fnGetRandomAlive(random_num(1iPlayersnum))
            
            if(!
is_user_alive(id) || g_nemesis[id]) {
                continue;
            }
            
            
// Turn player into nemesis
            
zombieme(id0100)
            
            
fm_set_user_health(idget_pcvar_num(cvar_armageddonnemhp) * fnGetAlive())
        }
        
        for(
id 1id <= g_maxplayersid++) {
            if(!
is_user_alive(id)) {
                continue;
            }
            
            if(
g_nemesis[id] || g_survivor[id]) {
                continue;
            }
            
            
// Turn player into a survivor
            
humanme(id10)
            
            
fm_set_user_health(idget_pcvar_num(cvar_armageddonsurvhp) * fnGetAlive())
        }
        
        
// Play armageddon sound
        
ArrayGetString(sound_armageddonrandom_num(0ArraySize(sound_armageddon) - 1), soundcharsmax(sound))
        
PlaySound(sound);
        
        
// Show Armageddon HUD notice
        // set_hudmessage(0, 50, 200, HUD_EVENT_X, HUD_EVENT_Y, 1, 0.0, 5.0, 1.0, 1.0, -1)
        // ShowSyncHudMsg(0, g_MsgSync, "%L", LANG_PLAYER, "NOTICE_ARMAGEDDON")
        
        
set_dhudmessage(050200HUD_EVENT_XHUD_EVENT_Y10.05.01.01.0);
        
show_dhudmessage(0"%L"LANG_PLAYER"NOTICE_ARMAGEDDON");
        
        
// Mode fully started!
        
g_modestarted true
        
        
// Round start forward
        
ExecuteForward(g_fwRoundStartg_fwDummyResultMODE_ARMAGEDDON0);
    } 
Responder
#25
Mas datos e.e, no me respondas crea un tema en scripting!
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)