t3rkecorejz, ну я и? с переливкой не знаком
public CTask__UpdateUserGlowColor(id)
{
id -= 1557
if(!is_user_alive(id))
{
remove_task(id + 1557); /*ты совсем не замечаешь что тебе пишут (+ 1557)*/
return;
}
static iHueNow; /*ты совсем не замечаешь что тебе пишут (static)*/
new Float: flColor[3];
HUEtoRGB(iHueNow, flColor);
if ((iHueNow += 5) && iHueNow >= 360)
iHueNow = 0;
server_print("-----%i", get_user_flags(id) & TwoFlag);
if(szPlayerHook[id] && get_user_flags(id) & TwoFlag)
set_user_rendering(id, kRenderFxGlowShell, floatround(flColor[0]), floatround(flColor[1]), floatround(flColor[2]), kRenderNormal, 0);
}
public EnableHook(id)
{
if(get_user_flags(id) & OneFlag || get_user_flags(id) & TwoFlag)
{
if(zp_is_plague_round() || zp_is_swarm_round() || zp_is_survivor_round() || zp_is_nemesis_round())
{
ChatColor(id, "%L", id, "ADVANCED_HOOK_NO_ROUND")
return PLUGIN_HANDLED
}
if(zp_get_user_zombie(id) || zp_get_user_survivor(id) || zp_get_user_last_human(id))
{
ChatColor(id, "%L", id, "ADVANCED_HOOK_NO_ZM")
return PLUGIN_HANDLED
}
if(is_user_alive(id) && szPlayerHook[id] && g_iHookEnable)
{
if(LimitHook[id] > 0)
{
get_user_origin(id, szPlayerHookOrigin[id], 3)
if(callfunc_begin("detect_cheat", "prokreedz.amxx") == 1)
{
callfunc_push_int(id)
callfunc_push_str("Hook")
callfunc_end()
}
emit_sound(id, CHAN_STATIC, g_HookSoundFile[szPlayerSound[id]], 1.0, ATTN_NORM, 0, PITCH_NORM)
set_task(0.1, "AdvancedHookTask", id, "", 0, "ab")
AdvancedHookTask(id)
szBreakEnd[id] = szPlayerEndSprite[id] + 1
break_end(id)
set_task(1.0, "CTask__UpdateUserGlowColor", id + 1557, "", 0, "b")
CTask__UpdateUserGlowColor(id)
if(is_user_alive(id) && szPlayerHook[id] && get_user_flags(id) & OneFlag)
{
set_user_rendering(id, kRenderFxGlowShell, 255, 0, 255, kRenderNormal, 0)
}
ScreenFade(id)
LimitHook[id]--
if(get_user_flags(id) & TwoFlag)
{
ChatColor(id, "%L", LANG_PLAYER, "ADVANCED_HOOK_LEFT_TWO", LimitHook[id], LimitFlagsTwo)
}
else if(get_user_flags(id) & OneFlag)
{
ChatColor(id, "%L", LANG_PLAYER, "ADVANCED_HOOK_LEFT_ONE", LimitHook[id], LimitFlagsOne)
}
} else ChatColor(id, "%L", LANG_PLAYER, "ADVANCED_HOOK_END")
}
} else ChatColor(id, "%L", id, "ADVANCED_MENU_MODE_NOACCESS")
return PLUGIN_HANDLED
}