26.07.2015, 13:22
Код:
CMD:water(playerid, params[]) { for(new i=0; i<sizeof(WaterPos); i++) { if(IsPlayerInRangeOfPoint(playerid, 2, WaterPos[i][0], WaterPos[i][1], WaterPos[i][2])) { new Float:health = GetPlayerHealth(playerid, health); if(health == 100.0) return SendClientMessage(playerid, FactColor[11], "You already have 100 health !"); SetPlayerHealth(playerid, 100.0); SendClientMessage(playerid, FactColor[11], "You have been fully healed !"); } else if(!IsPlayerInRangeOfPoint(playerid, 2, WaterPos[i][0], WaterPos[i][1], WaterPos[i][2])) return SendClientMessage(playerid, FactColor[11], "You are not at the right place !"); } return 1; }