Senior Member
|
06-17-2011
, 21:41
Re: [ZP] Nuevo Modo
|
#3
|
Quote:
Originally Posted by Sambuseti
YO HE COPIADO EL MOD L4D Y LE MODIFIQUE LOS PLAYERS QUE KERIA KE SALGAN EJ:
PHP Code:
else if ((mode == MODE_NONE && (!preventconsecutive || g_lastmode != MODE_FUN) && random_num(1, get_pcvar_num(cvar_funchance)) == get_pcvar_num(cvar_fun) && floatround((iPlayersnum-2)*get_pcvar_float(cvar_funratio), floatround_ceil) >= 1 && iPlayersnum >= get_pcvar_num(cvar_funminplayers)) || mode == MODE_FUN)
{
//Modo L4D
g_funround = true
g_swarmround = true
// Todos Los Players Restantes Se Comvierten Nemesis
for (id = 1; id <= g_maxplayers; id++)
{
// si no esta vivo
if (!is_user_alive(id))
continue;
// si es un zombie
if (g_zombie[id])
continue;
// Convertir en zombie
zombieme(id, 0, 1, 0)
}
// Convertir 4 de los zombies en Humanos
id = fnGetRandomAlive(random_num(1, iPlayersnum))
// Tu Ninja
g_ninja[id] = true
humanme(id, 1)
fm_set_user_health(id, 400)
fm_strip_user_weapons(id)
fm_give_item(id, "weapon_knife")
id = fnGetRandomAlive(random_num(1, iPlayersnum))
if (g_zombie[id])
{
// Tu Survivor
g_survivor[id] = true
humanme(id, 1)
fm_set_user_health(id, 400)
fm_strip_user_weapons(id)
fm_give_item(id, "weapon_knife")
fm_give_item(id, "weapon_m3")
fm_give_item(id, "weapon_deagle")
}
id = fnGetRandomAlive(random_num(1, iPlayersnum))
if (g_zombie[id])
{
// Tu Wesker Si Tenes
g_wesker[id] = true
humanme(id, 1)
fm_set_user_health(id, 400)
fm_strip_user_weapons(id)
fm_give_item(id, "weapon_deagle")
}
id = fnGetRandomAlive(random_num(1, iPlayersnum))
if (g_zombie[id])
{
// Tu Raptor
g_raptor[id] = true
humanme(id, 1)
fm_set_user_health(id, 400)
fm_strip_user_weapons(id)
fm_give_item(id, "weapon_knife")
fm_give_item(id, "weapon_mp5navy")
fm_give_item(id, "weapon_deagle")
}
PlaySound(sound_plague[random_num(0, sizeof sound_plague -1)]);
// Mostramos la noticia del modo en un HuD
set_hudmessage(0, 50, 200, -1.0, 0.17, 1, 0.0, 5.0, 1.0, 1.0, -1)
ShowSyncHudMsg(0, g_MsgSync, "%L", LANG_PLAYER, "NOTICE_FUN")
ExecuteForward(g_fwRoundStart, g_fwDummyResult, MODE_FUN, 0);
}
Espero Que Te Sirva Si Esta Mal Algo Avisen
|
Yo editaria eso a lo siguiente:
PHP Code:
else if ((mode == MODE_NONE && (!preventconsecutive || g_lastmode != MODE_FUN) && random_num(1, get_pcvar_num(cvar_funchance)) == get_pcvar_num(cvar_fun) && floatround((iPlayersnum-2)*get_pcvar_float(cvar_funratio), floatround_ceil) >= 1 && iPlayersnum >= get_pcvar_num(cvar_funminplayers)) || mode == MODE_FUN)
{
//Modo L4D
g_funround = true
g_swarmround = true
// Todos Los Players Restantes Se Comvierten Nemesis
for (id = 1; id <= g_maxplayers; id++)
{
// si no esta vivo
if (!is_user_alive(id))
continue;
// si es un zombie
if (g_zombie[id])
continue;
// Convertir en zombie
zombieme(id, 0, 1, 0)
}
// Todos Los Players Restantes Se Comvierten Nemesis
for (id = 1; id <= 4; id++)
{
switch(random_num(1,4))
{
case 1 : humanme(id, 1) //Survivor
case 2 : humanme(id, 0, 1) //Ninja
case 3 : humanme(id, 0, 0, 1) //Wesker
case 4 : humanme(id, 0, 0, 0, 1) //Raptor
}
}
PlaySound(sound_plague[random_num(0, sizeof sound_plague -1)]);
// Mostramos la noticia del modo en un HuD
set_hudmessage(0, 50, 200, -1.0, 0.17, 1, 0.0, 5.0, 1.0, 1.0, -1)
ShowSyncHudMsg(0, g_MsgSync, "%L", LANG_PLAYER, "NOTICE_FUN")
ExecuteForward(g_fwRoundStart, g_fwDummyResult, MODE_FUN, 0);
}
Luego iria a: humanme(id, survivor) (si mal no recuerdo)
y editaria eso por:
PHP Code:
humanme(id, survivor, ninja = 0, wesker = 0, raptor = 0)
Luego agregaria abajo los siguientes elseif (el siguiente codigo si no entienden mucho)
PHP Code:
else if(ninja)
{
g_ninja[id] = true
fm_set_user_health(id, 400)
fm_strip_user_weapons(id)
fm_give_item(id, "weapon_knife")
}
else if(wesker)
{
g_wesker[id] = true
fm_set_user_health(id, 400)
fm_strip_user_weapons(id)
fm_give_item(id, "weapon_deagle")
}
else if(raptor)
{
g_raptor[id] = true
fm_set_user_health(id, 400)
fm_strip_user_weapons(id)
fm_give_item(id, "weapon_knife")
fm_give_item(id, "weapon_mp5navy")
fm_give_item(id, "weapon_deagle")
}
Creditos: a kiske q me dio la recomendacion hace un tiempo ya largo
asi podras usar ese codigo en cualquier modo al humanme
|
|