Guest User

[FS] Ultra Soco

a guest
Oct 11th, 2010
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.07 KB | None | 0 0
  1. #include <a_samp>
  2. new
  3.     Float:x,
  4.     Float:y,
  5.     Float:z,
  6.     Keys,
  7.     ud,
  8.     lr,
  9.     Float:health,
  10.     Float:armour
  11. ;
  12. public  OnPlayerUpdate(playerid)
  13. {
  14.     GetPlayerKeys(playerid,Keys,ud,lr);
  15.     if(Keys == KEY_FIRE && GetPlayerWeapon(playerid) == 0) {
  16.         for(new i=0;i<500;i++) {
  17.             if(IsPlayerConnected(i)) {
  18.                 GetPlayerPos(playerid, x, y, z);
  19.                 if(playerid != i){
  20.                     if(IsPlayerInRangeOfPoint(i, 1.5, x,y,z)) {
  21.                         GetPlayerArmour(playerid, armour);
  22.                         GetPlayerHealth(i,health);
  23.                         if(armour > 0) {
  24.                             SetPlayerArmour(i,armour-40);
  25.                             return false;
  26.                         }
  27.                         SetPlayerHealth(i,health-40);
  28.                     }
  29.                 }
  30.             }
  31.         }
  32.     }
  33.     return 1;
  34. }
  35.  
  36. ///////////////////////////////////////
  37. ///  Autoria de www.feksquad.com  ////
  38. ///   Criado por DraKiNs         ////
  39. ///   Colaborado por Higor      ////
  40. ///////////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment