Advertisement
GaMeRFoReVeR

Instant kill AWP & Scout

Jan 15th, 2015
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.64 KB | None | 0 0
  1. #include <amxmodx>
  2. #include <hamsandwich>
  3.  
  4. #define PLUGIN "Instant AWP & Scout"
  5. #define VERSION "1.0"
  6. #define AUTHOR "Gamer"
  7.  
  8. public plugin_init()
  9. {
  10.     register_plugin(PLUGIN, VERSION, AUTHOR);
  11.    
  12.     RegisterHam(Ham_TakeDamage, "player", "TakeDamage");
  13. }
  14.  
  15. public TakeDamage(victim, weapon, attacker, Float:damage, damagebits)
  16. {
  17.     if(!is_user_alive(victim) || !is_user_connected(victim) || !is_user_connected(attacker) || get_user_team(victim) == get_user_team(attacker))
  18.         return HAM_IGNORED;
  19.    
  20.     new health = get_user_health(victim);
  21.    
  22.     if(weapon == CSW_AWP || weapon == CSW_SCOUT)
  23.         damage=float(health);
  24.    
  25.     return HAM_IGNORED;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement