HLMOD.HU Forrás Megtekintés - www.hlmod.hu
  1. #include <amxmodx>
  2. #include <amxmisc>
  3. #include <fun>
  4.  
  5. public plugin_init()
  6. {
  7. register_plugin("Kill Bonus", "1.0", "Kensai")
  8. register_cvar("amx_kill_bonus", "20")
  9. register_cvar("amx_kb_limit", "100")
  10. register_event("DeathMsg", "hp_up", "be")
  11. }
  12.  
  13. public hp_up(id)
  14. {
  15. new attacker = read_data(1)
  16. new health = get_user_health(attacker)
  17. new nhealth = get_cvar_num("amx_kill_bonus")
  18. new limit = get_cvar_num("amx_kb_limit")
  19.  
  20. if(health < limit)
  21. {
  22. set_user_health(attacker, health + nhealth)
  23. }
  24. if(health > limit)
  25. {
  26. set_user_health(attacker, limit)
  27. }
  28. }
  29.