Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <hamsandwich>
- #include <colorchat>
- #define DMG_FALL(1<<5)
- new g_On, g_Prefix;
- public plugin_init()
- {
- register_plugin("Show Fall Damage", "1.0", "Garey");
- g_On = register_cvar("sfd_on", "1");
- g_Prefix = register_cvar("sfd_prefix", "Fall Damage")
- RegisterHam(Ham_TakeDamage, "player", "fwd_TakeDamage", 0);
- }
- public fwd_TakeDamage(id, inflictor, attacker, Float:damage, damagebits)
- {
- if(g_On)
- if(damagebits & DMG_FALL)
- Colorchat(id, "[%s] Fall Dmg: %.0f", get_pcvar_string(g_Prefix), damage);
- else
- return HAM_IGNORED;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement