Post by LegendofWarior on Nov 9, 2015 11:33:57 GMT
Hi, I Will Teach You how To Add NightVision Aphla. This Tut for ZPA+ZP4.3+ZPNEWMODES
The Tut is From Zombie Mod Ru, Its in Russian but i Transf It To English
zombie-mod.ru/counter-strike/stati/11395-tut-nochnoe-videne-iz-cso-nst.html
Here is The Picture
Now, Follow Those Steps
1. Create
Add
Look clcmd_nightvision(id) and remplace it with
Look set_user_nvision(taskid) and Remplace it With
Add this Code
Add Stock
Setting:
Also if You Use ZP5.0, Yu Download This
The Tut is From Zombie Mod Ru, Its in Russian but i Transf It To English
zombie-mod.ru/counter-strike/stati/11395-tut-nochnoe-videne-iz-cso-nst.html
Here is The Picture
Now, Follow Those Steps
1. Create
new bool:g_Nightvision[33] = false
Add
new cvar_nvg_alpha, cvar_humnvg_alpha, cvar_nemnvg_alpha
Look clcmd_nightvision(id) and remplace it with
public clcmd_nightvision(id)
{
if (g_nvision[id])
{
if(g_Nightvision[id])
{
remove_task(id+TASK_NVISION)
g_Nightvision[id] = false
off(id)
}
else
{
g_Nightvision[id] = true
set_task(0.1, "set_user_nvision", id+TASK_NVISION, _, _, "b")
}
}
return PLUGIN_HANDLED;
}
Look set_user_nvision(taskid) and Remplace it With
public set_user_nvision(taskid)
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("ScreenFade"), _, ID_NVISION)
write_short(0) // duration
write_short(0) // hold time
write_short(0x0004) // fade type
// Nemesis / Madness / Spectator in nemesis round
if (g_nemesis[ID_NVISION] || (g_zombie[ID_NVISION] && g_nodamage[ID_NVISION]) || (!g_isalive[ID_NVISION] && g_nemround))
{
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(get_pcvar_num(cvar_nemnvg_alpha))
}
// Human / Spectator in normal round
else if (!g_zombie[ID_NVISION] || !g_isalive[ID_NVISION])
{
write_byte(get_pcvar_num(cvar_humnvgcolor[0])) // r
write_byte(get_pcvar_num(cvar_humnvgcolor[1])) // g
write_byte(get_pcvar_num(cvar_humnvgcolor[2])) // b
write_byte(get_pcvar_num(cvar_humnvg_alpha))
}
// Zombie
else
{
write_byte(get_pcvar_num(cvar_nvgcolor[0])) // r
write_byte(get_pcvar_num(cvar_nvgcolor[1])) // g
write_byte(get_pcvar_num(cvar_nvgcolor[2])) // b
write_byte(get_pcvar_num(cvar_nvg_alpha))
}
message_end()
set_player_light(ID_NVISION, "z")
}
Add this Code
public off(id)
{
message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, id)
write_short(1<<10)
write_short(1<<10)
write_short(0x0000)
if (g_nemesis[id] || (g_zombie[id] && g_nodamage[id]) || (!g_isalive[id] && g_nemround))
{
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(get_pcvar_num(cvar_nemnvg_alpha))
}
// Human / Spectator in normal round
else if (!g_zombie[id] || !g_isalive[id])
{
write_byte(get_pcvar_num(cvar_humnvgcolor[0])) // r
write_byte(get_pcvar_num(cvar_humnvgcolor[1])) // g
write_byte(get_pcvar_num(cvar_humnvgcolor[2])) // b
write_byte(get_pcvar_num(cvar_humnvg_alpha))
}
// Zombie
else
{
write_byte(get_pcvar_num(cvar_nvgcolor[0])) // r
write_byte(get_pcvar_num(cvar_nvgcolor[1])) // g
write_byte(get_pcvar_num(cvar_nvgcolor[2])) // b
write_byte(get_pcvar_num(cvar_nvg_alpha))
}
message_end()
set_player_light(id, "d")
}
Add Stock
stock set_player_light(id, const LightStyle[])
{
message_begin(MSG_ONE, SVC_LIGHTSTYLE, .player = id)
write_byte(0)
write_string(LightStyle)
message_end()
}
Setting:
cvar_nvgcolor[0] = 253
cvar_nvgcolor[1] = 110
cvar_nvgcolor[2] = 110
cvar_nvg_alpha = 70
set_player_light(id, "d")
- instead of d write your coverageAlso if You Use ZP5.0, Yu Download This