Quote:
Originally Posted by [CrC]reinixx
try this..
pawn Код:
CMD:heal(playerid, params[]) { new id; if (sscanf(params, "u", id)) SendClientMessage(playerid, COLOR_GREEN, "Usage: \"/heal <playerid or name>\""); else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_SIMPSONS, "Player not found"); if (id == playerid) {SendClientMessage(playerid, COLOR_SIMPSONS, "You cannot set your own hp!"); return 1;} if(PlayerInfo[playerid][pAdminLevel] < 1){SendClientMessage(playerid, COLOR_LIGHTRED, "You Are Not Admin level required to use this cmd"); return 1;} else { SetPlayerHealth(id, 100.0); SendClientMessage(id, COLOR_LIGHTRED, "Admin healed you."); SendClientMessage(playerid, COLOR_LIGHTRED, "Player healed."); } return 1; }
this is straight from my GM..
|
Offtopic: Did you take that from SWX? I recognize the code