Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:areaheal(playerid, params[]) {
- if(!Iter_Contains(Admin, playerid)) return SendClientMessage(playerid, COLOR_GREY, AdminOnly);
- new
- Range = strval(params);
- Heal = 0;
- if(sscanf(params, "ii", Range, Heal)) return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/areaheal [ range ] [ heal ]");
- if(Range == 0 || Range >= 1000) return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/areaheal [ range ] [ heal ]");
- if(Heal == 0 || Heal > 100) return SendClientMessage(playerid, COLOR_GREY, SYNTAX_MESSAGE"/areaheal [ range ] [ heal ]");
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- foreach(new i : Player) {
- if(!IsPlayerInRangeOfPoint(i, Range, Pos[0], Pos[1], Pos[2])) continue;
- SetPlayerHealth(playerid, Heal);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement