Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <hamsandwich>
  3. #include <fakemeta>
  4.  
  5. #define PLUGIN "New Plug-In"
  6. #define VERSION "1.0"
  7. #define AUTHOR "Sugisaki"
  8.  
  9. new bool:g_bHeadshot[33] = false;
  10.  
  11.  
  12. public plugin_init()
  13. {
  14. register_plugin(PLUGIN, VERSION, AUTHOR)
  15. RegisterHam(Ham_TraceAttack, "player", "pfnCbasePlayer_TraceAttack")
  16. register_clcmd("say /hs", "HeadshotBool");
  17.  
  18. }
  19.  
  20. public HeadshotBool(id) g_bHeadshot[id] = true
  21.  
  22.  
  23. public pfnCbasePlayer_TraceAttack(victim, attacker, float:damage, Float:direction[3], trace, bits, id)
  24. {
  25. if(!g_bHeadshot[id])
  26. return HAM_IGNORED
  27. if(!is_user_connected(victim) || !is_user_connected(attacker) )
  28. return HAM_IGNORED
  29. return( get_tr2( trace, TR_iHitgroup ) != HIT_HEAD ) ? HAM_SUPERCEDE : HAM_IGNORED
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement