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重新編輯 ]
|