【cs1.6】 夜视仪亮度怎么修改
我要修改一下 KZ的主插件 打开夜视仪亮度问题找了好几个 kz的源码 没有找到合适的
我想要 打开夜视仪 所以地方都亮度都提高的
在网上找了一个版本 是 打开之后 鼠标冲着哪里 哪里才会生成光源
有没有大佬 求助!!!
夜视仪效果 就跟赛盟差不多就行 是全亮 而不是 鼠标在哪里 哪里生成光源 #include <amxmodx>
#include <fakemeta>
new const PLUGIN_VERSION[] = "1.0"
new g_nightvision
new g_default_map_light
new g_fwLightStyle
new g_msgScreenFade
public plugin_precache()
{
register_plugin("New NightVision", PLUGIN_VERSION, "Fai")
g_fwLightStyle = register_forward(FM_LightStyle, "fw_LightStyle")
}
public plugin_init()
{
unregister_forward(FM_LightStyle, g_fwLightStyle)
g_msgScreenFade = get_user_msgid("ScreenFade")
register_message(g_msgScreenFade, "message_screenfade")
register_message(get_user_msgid("NVGToggle"), "message_nvgtoggle")
set_cvar_num("sv_skycolor_r", 0)
set_cvar_num("sv_skycolor_g", 0)
set_cvar_num("sv_skycolor_b", 0)
}
public fw_LightStyle(style, const val[])
{
if (!style)
copy(g_default_map_light, charsmax(g_default_map_light), val)
}
public message_screenfade(msg_id, msg_dest, msg_entity)
{
if (!g_nightvision)
return PLUGIN_CONTINUE;
if (get_msg_arg_int(4) != 255 || get_msg_arg_int(5) != 255 || get_msg_arg_int(6) != 255 || get_msg_arg_int(7) < 200)
return PLUGIN_CONTINUE;
remove_task(msg_entity)
set_task(get_msg_arg_int(1) / 4096.0, "task_restore_screenfade", msg_entity)
return PLUGIN_CONTINUE;
}
public message_nvgtoggle(msg_id, msg_dest, msg_entity)
{
static flag
flag = get_msg_arg_int(1)
message_begin(MSG_ONE_UNRELIABLE, SVC_LIGHTSTYLE, _, msg_entity)
write_byte(0)
if (flag)
write_string("#")
else
write_string(g_default_map_light)
message_end()
if (!task_exists(msg_entity))
{
message_begin(MSG_ONE, g_msgScreenFade, _, msg_entity)
write_short((1<<12))
write_short(0)
write_short(0x0004)
if (flag)
{
write_byte(255)
write_byte(128)
write_byte(128)
write_byte(73)
}
else
{
write_byte(0)
write_byte(0)
write_byte(0)
write_byte(0)
}
message_end()
}
g_nightvision = flag
return PLUGIN_HANDLED;
}
public task_restore_screenfade(id)
{
if (!g_nightvision)
return;
message_begin(MSG_ONE, g_msgScreenFade, _, id)
write_short((1<<12))
write_short(0)
write_short(0x0004)
write_byte(255)
write_byte(128)
write_byte(128)
write_byte(73)
message_end()
}
代码来源:https://forums.alliedmods.net/showthread.php?t=181953 k1nader 发表于 2024-6-6 00:41
代码来源:https://forums.alliedmods.net/showthread.php?t=181953
强! 论坛好久都没人更新了
很好很强大
页:
[1]