Помогите убрать квары и сделать так чтобы работало обе функции!
Код:
#include <amxmodx>
#include <hamsandwich>
#define SELFFB (1<<0)
#define SELFHE (1<<1)
new gmsgScreenFade, selfmode
const DMG_HEGRENADE = (1<<24)
public plugin_init()
{
register_plugin("SelfGrenades","0.0.1","Vaqtincha")
RegisterHam(Ham_TakeDamage, "player", "onPlayerDamage")
selfmode = register_cvar("selfgrenades", "3")
// from VEN
register_event("ScreenFade","event_flash","be","1>0","2>0","3=0","4=255","5=255","6=255","7>199")
gmsgScreenFade = get_user_msgid("ScreenFade")
}
public event_flash(id)
{
if(get_pcvar_num(selfmode) & SELFFB && get_user_flags(id) & ADMIN_LEVEL_H)
{
message_begin(MSG_ONE,gmsgScreenFade,_,id)
write_short(0)
write_short(0)
write_short(1<<2)
write_byte(0)
write_byte(0)
write_byte(0)
write_byte(0)
message_end()
}
}
public onPlayerDamage(victim, inflictor, attacker, Float:dmg, dmg_type)
{
if(get_pcvar_num(selfmode) & SELFHE)
{
if(dmg_type & DMG_HEGRENADE && victim == attacker && get_user_flags(victim) & ADMIN_LEVEL_H)
return HAM_SUPERCEDE
}
return HAM_IGNORED
}
Последнее редактирование модератором: