hlmod.hu
https://hlmod.hu/

hp
https://hlmod.hu/viewtopic.php?f=29&t=10704
Oldal: 1 / 1

Szerző:  Applee [ 2013.09.02. 16:46 ]
Hozzászólás témája:  hp

Kérhetek 1 olyan plugint, ami ölésenként ad +10 HP-t de 100 felé ne menjen.

Szerző:  fear_ezmegmi [ 2013.09.02. 16:49 ]
Hozzászólás témája:  Re: hp

SMA Forráskód: [ Mindet kijelol ]
  1.  
  2. #include <amxmodx>
  3. #include <amxmisc>
  4. #include <fun>
  5.  
  6. #define PLUGIN "hp reward"
  7. #define VERSION "1.0"
  8. #define AUTHOR "fear_ezmegmi"
  9.  
  10. #define MAX_HEALTH 100
  11.  
  12. public plugin_init() {
  13. register_plugin(PLUGIN, VERSION, AUTHOR)
  14.  
  15. register_event("DeathMsg", "player_killed", "a");
  16. }
  17. public player_killed()
  18. {
  19. new attacker = read_data(1);
  20.  
  21. new hp = get_user_health(attacker);
  22.  
  23. if(hp <= MAX_HEALTH-10)
  24. {
  25. set_user_health(attacker, hp+10)
  26. }
  27. else
  28. {
  29. set_user_health(attacker, 100)
  30. }
  31. }

Oldal: 1 / 1 Minden időpont UTC+01:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/