Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- COMMAND:heal(playerid, params[])
- {
- if(gTeam[playerid] == MEDIC || IsPlayerAdmin(playerid))
- {
- if(!params[0])
- return SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /heal [id]");
- new helpplayer = strval(params);
- if(!IsPlayerConnected(helpplayer))
- return SendClientMessage(playerid, COLOR_RED, "This player is not online!");
- new
- Float: X,
- Float: Y,
- Float: Z;
- GetPlayerPos(helpplayer,X,Y,Z);
- if(IsPlayerInRangeOfPoint(playerid, 5.0, X, Y, Z))
- {
- new
- string[128];
- GetPlayerName(playerid, string, MAX_PLAYER_NAME);
- format(string, sizeof string, "[INFO] Medic %s[%d] has healed you!", string, playerid);
- SendClientMessage(helpplayer,COLOR_GREEN,string);
- SetPlayerHealth(helpplayer, 100.0);
- SendClientMessage(playerid, COLOR_YELLOW, "You have succesfuly healed the player !");
- return 1;
- }
- else
- return SendClientMessage(playerid,COLOR_RED,"You're not near the player!");
- }
- else
- return SendClientMessage(playerid,COLOR_RED,"You're not a Medic!");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement