iPaulinho

[FilterScript] Ultra Soco

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