Advertisement
DragonZafiro666

Simple Headshot System

Mar 5th, 2016
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.46 KB | None | 0 0
  1. #include <a_samp>
  2. public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
  3. {  
  4.     // If body part = HEAD and WEAPON = Sniper and Health <= 100 (if you have something like "god" system)
  5.     if(bodypart == 9 && weaponid == WEAPON_SNIPER && GetPlayerHealth(playerid, health) <= 100.00)
  6.     {
  7.         GameTextForPlayer(issuerid, "~r~HEADSHOT", 4000, 4);
  8.         GameTextForPlayer(playerid, "~r~HEADSHOT", 4000, 4);
  9.         SetPlayerHealth(playerid, 0.0);
  10.     }
  11.     return 1;
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement