Advertisement
Garey

Show Fall Damage

Apr 24th, 2017
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.57 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <hamsandwich>
  3. #include <colorchat>
  4.  
  5. #define DMG_FALL(1<<5)
  6.  
  7. new g_On, g_Prefix;
  8.  
  9. public plugin_init()
  10. {
  11.     register_plugin("Show Fall Damage", "1.0", "Garey");
  12.     g_On = register_cvar("sfd_on", "1");
  13.     g_Prefix = register_cvar("sfd_prefix", "Fall Damage")
  14.    
  15.     RegisterHam(Ham_TakeDamage, "player", "fwd_TakeDamage", 0);
  16. }
  17.  
  18. public fwd_TakeDamage(id, inflictor, attacker, Float:damage, damagebits)
  19. {
  20.     if(g_On)
  21.         if(damagebits & DMG_FALL)
  22.             Colorchat(id, "[%s] Fall Dmg: %.0f", get_pcvar_string(g_Prefix), damage);
  23.     else
  24.         return HAM_IGNORED;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement