Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:pump(playerid, params[])
- {
- if(IsLevel(playerid) < 7) return SendClientMessage(playerid,-1,""#HPurple"»"#TBlue" This command is available from a level "#TYellow":7");
- if(sscanf(params,"u",params[0])) return SendClientMessage(playerid,-1,""#Red"/Pump [id]");
- if(GetPlayerVirtualWorld(playerid) != 0) return SendClientMessage(playerid,-1,""#Red"This command can not be done in a virtual world");
- new Float:Pos[3];
- GetPlayerPos(playerid,Pos[0],Pos[1],Pos[2]);
- if(IsPlayerInRangeOfPoint(params[0], 12, Pos[0], Pos[1], Pos[2]))
- {
- new
- Float:pHealth,
- Float:pZHealth,
- Pump
- ;
- GetPlayerHealth(params[0], pHealth);
- GetPlayerHealth(playerid, pZHealth);
- switch(random(5))
- {
- case 0:
- {
- SetPlayerHealth(playerid, pHealth+20.0);
- SetPlayerHealth(params[0], pHealth-20.0);
- Pump = 20;
- }
- case 1:
- {
- SetPlayerHealth(playerid, pHealth+53.0);
- SetPlayerHealth(params[0], pHealth-53.0);
- Pump = 53;
- }
- case 2:
- {
- SetPlayerHealth(playerid, pHealth+49.0);
- SetPlayerHealth(params[0], pHealth-49.0);
- Pump = 49;
- }
- case 3:
- {
- SetPlayerHealth(playerid, pHealth+67.0);
- SetPlayerHealth(params[0], pHealth-67.0);
- Pump = 67;
- }
- case 4:
- {
- SetPlayerHealth(playerid, pHealth+38.0);
- SetPlayerHealth(params[0], pHealth-38.0);
- Pump = 38;
- }
- }
- SendFormatMessageToAll(-1,""#HRed"• .("#Red"%d"#HRed")The player% s has pump the player % s life÷ï %s äùç÷ï",Pump,pName[params[0]],pName[playerid]);
- }
- else SendClientMessage(playerid,-1,""#Red".This player is not near you"");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement