Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.70 KB | None | 0 0
  1. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  2. {
  3.     if(PRESSED(KEY_FIRE)) {
  4.         if(GetPlayerWeapon(playerid) == 4) {
  5.             new
  6.                 Float:X,
  7.                 Float:Y,
  8.                 Float:Z,
  9.                 Float:hp;
  10.             GetPlayerPos(playerid, X, Y, Z);
  11.             foreach(Player, i)
  12.             {
  13.                 if ( gTeam [ playerid ] != gTeam [ i ] )
  14.                 {
  15.                     if(IsPlayerInRangeOfPoint(playerid, 2.0, X, Y, Z))
  16.                     {
  17.  
  18.                         GetPlayerHealth(i, hp);
  19.                         SetPlayerHealth(i, hp-5.0);
  20.                     }
  21.                 }
  22.             }
  23.         }
  24.     }
  25.     return 1;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement