Post by LyuboRusev on Aug 8, 2015 23:21:32 GMT
[Tutorial]
[Zombie Plague]
[How to make colorful flashing Nemesis aura]
Big thanks to zmd94 for the help with codes!
[Zombie Plague]
[How to make colorful flashing Nemesis aura]
Big thanks to zmd94 for the help with codes!
For Zombie Plague 4.3 there is a way where you can simply edit the main plugin.
1. First of all open your zombie_plague40.sma and find this:
2. Edit it like this:
NOTE: This is also for the Zombie Madness aura!
3. To edit the blinking time find this(Nemesis Aura):
3.1. Find this also(Zombie Madness Aura):
4. Edit the time from 0.1 to what ever you want (I prefer and recommend you to use 0.2 because 0.1 is too fast and 0.3 is too slow)
For Zombie Plague 1.6.1 you can just use the plugin below made by zmd94
You just need to compile this code
1. First of all open your zombie_plague40.sma and find this:
// Nemesis/madness aura task
public zombie_aura(taskid)
{
// Not nemesis, not in zombie madness
if (!g_nemesis[ID_AURA] && !g_nodamage[ID_AURA])
{
// Task not needed anymore
remove_task(taskid);
return;
}
// Get player's origin
static origin[3]
get_user_origin(ID_AURA, origin)
// Colored Aura
message_begin(MSG_PVS, SVC_TEMPENTITY, origin)
write_byte(TE_DLIGHT) // TE id
write_coord(origin[0]) // x
write_coord(origin[1]) // y
write_coord(origin[2]) // z
write_byte(20) // radius
write_byte(get_pcvar_num(cvar_nemnvgcolor[0])) // r
write_byte(get_pcvar_num(cvar_nemnvgcolor[1])) // g
write_byte(get_pcvar_num(cvar_nemnvgcolor[2])) // b
write_byte(2) // life
write_byte(0) // decay rate
message_end()
}
2. Edit it like this:
// Nemesis/madness aura task
public zombie_aura(taskid)
{
// Not nemesis, not in zombie madness
if (!g_nemesis[ID_AURA] && !g_nodamage[ID_AURA])
{
// Task not needed anymore
remove_task(taskid);
return;
}
// Get player's origin
static origin[3]
get_user_origin(ID_AURA, origin)
// Colored Aura
message_begin(MSG_PVS, SVC_TEMPENTITY, origin)
write_byte(TE_DLIGHT) // TE id
write_coord(origin[0]) // x
write_coord(origin[1]) // y
write_coord(origin[2]) // z
write_byte(20) // radius
write_byte(random(256)) // r
write_byte(random(256)) // g
write_byte(random(256)) // b
write_byte(2) // life
write_byte(0) // decay rate
message_end()
}
NOTE: This is also for the Zombie Madness aura!
3. To edit the blinking time find this(Nemesis Aura):
// Nemesis aura task
if (g_nemesis[id] && get_pcvar_num(cvar_nemaura))
set_task(0.1, "zombie_aura", id+TASK_AURA, _, _, "b")
3.1. Find this also(Zombie Madness Aura):
set_task(0.1, "zombie_aura", id+TASK_AURA, _, _, "b")
set_task(get_pcvar_float(cvar_madnessduration), "madness_over", id+TASK_BLOOD)
4. Edit the time from 0.1 to what ever you want (I prefer and recommend you to use 0.2 because 0.1 is too fast and 0.3 is too slow)
For Zombie Plague 1.6.1 you can just use the plugin below made by zmd94
You just need to compile this code
#include <amxmodx>
#include <zombie_plague_advance>
#include <cs_core>
#define TASK_AURA 1994
public plugin_init()
{
register_plugin("Colorful Nemesis", "1.0", "zmd94")
}
public zp_user_infected_post(id)
{
set_task(1.0, "FreeAura", id+TASK_AURA, _, _, "b")
}
public FreeAura(id)
{
id -= TASK_AURA
if(is_user_alive(id))
{
if(zp_get_user_nemesis(id))
{
cs_aura_reward(id, 0, "random_num(10,255) random(256) random(256)", 0, 0.0)
}
else
{
remove_task(id+TASK_AURA)
}
}
}
public zp_user_humanized_post(id, survivor)
{
remove_task(id+TASK_AURA)
// Restore aura. ;)
cs_aura_reward(id, 0, "", 0, 0.0)
}
NOTE: The plugin can be also used on Zombie Plague 4.3/5.0!! You just need to replace
#include <zombie_plague_advance> with #include <zombieplague>
#include <zombie_plague_advance> with #include <zombieplague>
WARNING: If you want to use the plugin you first need to download cs_core.inc and compile cs_reward.sma!!!
cs_reward.sma (64.41 KB)
cs_core.inc (8.77 KB)
cs_reward.sma (64.41 KB)
cs_core.inc (8.77 KB)