qma
|
分享:
▼
x1
|
夜视仪 仿CSOL 设置 需改源码
图 1.
图 2.
我看了一个大大的 改夜视仪的教程后 自己手痒 完善了下 小弟 发文不多 请各位老大赏赏脸 打开 主插件 源码 查找 // Custom Night Vision public set_user_nvision(taskid) 这一段 复制程式
// Get player's origin
static origin[3]
get_user_origin(ID_NVISION, origin)
// Nightvision message
message_begin(MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, _, ID_NVISION)
write_byte(TE_DLIGHT) // TE id
write_coord(origin[0]) // x
write_coord(origin[1]) // y
write_coord(origin[2]) // z
write_byte(get_pcvar_num(cvar_nvgsize)) // radius
// 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
}
// 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
}
// 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(5) // life
write_byte(0) // decay rate
message_end()
if (!g_nvision[ID_NVISION] || !g_nvisionenabled[ID_NVISION])
{
// Task not needed anymore
emit_sound(ID_NVISION,CHAN_ITEM,"items/nvg_off.wav",1.0,ATTN_NORM,0,PITCH_NORM)
remove_task(taskid);
return;
}
if (!is_user_alive(ID_NVISION)) return
if (g_zombie[ID_NVISION] || g_nemesis[ID_NVISION])
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("ScreenFade"),{0,0,0},ID_NVISION)
write_short(1000) //更新速率
write_short(1000) //更新速率
write_short(1<<12)
write_byte(get_pcvar_num(cvar_nvgscolor[0])) //红
write_byte(get_pcvar_num(cvar_nvgscolor[1])) //绿
write_byte(get_pcvar_num(cvar_nvgscolor[2])) //蓝
write_byte(100) //清晰度
message_end()
}
else
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("ScreenFade"),{0,0,0},ID_NVISION)
write_short(1000) //更新速率
write_short(1000) //更新速率
write_short(1<<12)
write_byte(get_pcvar_num(cvar_humsnvgcolor[0])) //红
write_byte(get_pcvar_num(cvar_humsnvgcolor[1])) //绿
write_byte(get_pcvar_num(cvar_humsnvgcolor[2])) //蓝
write_byte(100) //清晰度
message_end()
}
} 复制上面的一直到 // Game Nightvision 上面 再找 // CVAR pointers 复制 复制程式
cvar_nvgscolor[3], cvar_humsnvgcolor[3] 到下面// Cached stuff for players 的上面 再找 // CVARS - Flashlight and Nightvision 在下面添加 复制程式
cvar_humsnvgcolor[0] = register_cvar("zps_nvg_hum_color_R", "0") cvar_humsnvgcolor[1] = register_cvar("zps_nvg_hum_color_G", "150") cvar_humsnvgcolor[2] = register_cvar("zps_nvg_hum_color_B", "0") cvar_nvgscolor[0] = register_cvar("zps_nvg_color_R", "0") cvar_nvgscolor[1] = register_cvar("zps_nvg_color_G", "150") cvar_nvgscolor[2] = register_cvar("zps_nvg_color_B", "0") 关闭主插件 在zombieplague.cfg 中加上 复制程式
zps_nvg_hum_color_R 0 人类自定义夜视仪的颜色2 zps_nvg_hum_color_G 100 人类自定义夜视仪的颜色2zps_nvg_hum_color_B 0 人类自定义夜视仪的颜色2zps_nvg_color_R 170 僵尸自定义夜视仪的颜色2 zps_nvg_color_G 0 僵尸自定义夜视仪的颜色2 zps_nvg_color_B 0 僵尸自定义夜视仪的颜色2 然后就行了 游戏效果看看那
[ 此文章被qma在2010-11-27 16:51重新编辑 ]
|