Участник
Пользователь
- Сообщения
- 61
- Реакции
- 24
- Помог
- 1 раз(а)
if(skillAttacker < 85 && skillPlayer >= 85 // L не слепят M, H, P, G
|| skillAttacker < 165 && skillPlayer >= 130 // M не слепят H, P, G и H не слепят H, P, G
|| skillAttacker < 210 && skillPlayer >= 165) // P не слепят P, G
{
return HC_SUPERCEDE;
}
return HC_CONTINUE;
}
#include <amxmodx>
#include <reapi>
#include <csstatsx_sql>
public plugin_init()
{
register_plugin("noteamflash_skill", "0.1", "perf");
RegisterHookChain(RG_PlayerBlind, "PlayerBlind", .post = false);
}
public PlayerBlind(const index, const inflictor, const attacker, const Float:fadeTime, const Float:fadeHold, const alpha, Float:color[3])
{
static Float:skillPlayer, Float:skillAttacker;
if(index == attacker || get_member(index, m_iTeam) != get_member(attacker, m_iTeam))
return HC_CONTINUE;
get_user_skill(index, skillPlayer);
get_user_skill(attacker, skillAttacker);
/*========================================================
[L- < 60]---------------------------
[LS >= 60] L group < 85
[L+ >= 75]---------------------------
[M- >= 85]---------------------------
[MS >= 100] M group < 130
[M+ >= 115]---------------------------
[H- >= 130]---------------------------
[HS >= 140] H group < 165
[H+ >= 150]---------------------------
[P- >= 165]---------------------------
[PS >= 180] P group < 210
[P+ >= 195]---------------------------
[G >= 210]
========================================================*/
if(skillAttacker < 85 && skillPlayer >= 85 // L не слепят M, H, P, G
|| skillAttacker < 165 && skillPlayer >= 130 // M не слепят H, P, G и H не слепят H, P, G
|| skillAttacker < 210 && skillPlayer >= 165) // P не слепят P, G
{
return HC_SUPERCEDE;
}
return HC_CONTINUE;
}