Advertisement
Guest User

Untitled

a guest
Mar 3rd, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.66 KB | None | 0 0
  1. CMD:pump(playerid, params[])
  2. {
  3.     if(IsLevel(playerid) < 7) return SendClientMessage(playerid,-1,""#HPurple"»"#TBlue" This command is available from a level "#TYellow":7");
  4.     if(sscanf(params,"u",params[0])) return SendClientMessage(playerid,-1,""#Red"/Pump [id]");
  5.     if(GetPlayerVirtualWorld(playerid) != 0) return SendClientMessage(playerid,-1,""#Red"This command can not be done in a virtual world");
  6.     new Float:Pos[3];
  7.     GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
  8.     if(IsPlayerInRangeOfPoint(params[0], 12, Pos[0], Pos[1], Pos[2]))
  9.     {
  10.         new
  11.             Float:pHealth,
  12.             Float:pZHealth,
  13.             Pump
  14.         ;
  15.         GetPlayerHealth(params[0], pHealth);
  16.         GetPlayerHealth(playerid, pZHealth);
  17.         switch(random(5))
  18.         {
  19.             case 0:
  20.             {
  21.                 SetPlayerHealth(playerid, pHealth+20.0);
  22.                 SetPlayerHealth(params[0], pHealth-20.0);
  23.                 Pump = 20;
  24.             }
  25.             case 1:
  26.             {
  27.                 SetPlayerHealth(playerid, pHealth+53.0);
  28.                 SetPlayerHealth(params[0], pHealth-53.0);
  29.                 Pump = 53;
  30.             }
  31.             case 2:
  32.             {
  33.                 SetPlayerHealth(playerid, pHealth+49.0);
  34.                 SetPlayerHealth(params[0], pHealth-49.0);
  35.                 Pump = 49;
  36.             }
  37.             case 3:
  38.             {
  39.                 SetPlayerHealth(playerid, pHealth+67.0);
  40.                 SetPlayerHealth(params[0], pHealth-67.0);
  41.                 Pump = 67;
  42.             }
  43.             case 4:
  44.             {
  45.                 SetPlayerHealth(playerid, pHealth+38.0);
  46.                 SetPlayerHealth(params[0], pHealth-38.0);
  47.                 Pump = 38;
  48.             }
  49.         }
  50.         SendFormatMessageToAll(-1,""#HRed"• .("#Red"%d"#HRed")The player% s has pump the player % s life÷ï %s äùç÷ï",Pump,pName[params[0]],pName[playerid]);
  51.     }
  52.     else SendClientMessage(playerid,-1,""#Red".This player is not near you"");
  53.     return 1;
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement