Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* вырезано из плагина serfreeman1337 :)
- вырезал Ge3eR для проброса форварда в ReHLDS
- */
- #include <amxmodx>
- #include <fakemeta>
- new FW_Death, dummy_ret;
- public plugin_init()
- {
- register_plugin("Death Forward", "0.1", "Ge3eR");
- register_event("Damage","EventHook_Damage","b","2!0")
- }
- #if AMXX_VERSION_NUM < 183
- new MaxClients;
- public plugin_cfg()
- #else
- public OnAutoConfigsBuffered()
- #endif
- {
- #if AMXX_VERSION_NUM < 183
- MaxClients = get_maxplayers()
- // форсируем выполнение exec addons/amxmodx/configs/amxx.cfg
- server_exec()
- #endif
- FW_Death = CreateMultiForward("client_death",ET_IGNORE,FP_CELL,FP_CELL,FP_CELL,FP_CELL,FP_CELL)
- }
- //
- // Регистрация попадания
- //
- public EventHook_Damage(player)
- {
- static dmg_inflictor;dmg_inflictor = pev(player,pev_dmg_inflictor)
- if(pev_valid(dmg_inflictor) != 2)
- {
- return PLUGIN_CONTINUE
- }
- if(!(0 < dmg_inflictor <= MaxClients))
- {
- // урон с гранаты на данным момент не учитывается
- return PLUGIN_CONTINUE
- }
- static weapon_id,last_hit,attacker
- attacker = get_user_attacker(player,weapon_id,last_hit)
- if(!is_user_alive(player))
- {
- if(is_user_connected(attacker))
- {
- ExecuteForward(FW_Death,dummy_ret,attacker,player,weapon_id,last_hit,is_tk(attacker,player))
- }
- }
- return PLUGIN_CONTINUE
- }
- is_tk(killer,victim)
- {
- if(killer == victim)
- return true
- return false
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement