26.07.2015, 13:49
Try this:
Код:
CMD:water(playerid, params[])
{
for(new i = 0; i < sizeof(WaterPos); i++)
{
if(IsPlayerInRangeOfPoint(playerid, 2.0, 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 !");
return 1;
}
}
return SendClientMessage(playerid, FactColor[11], "You are not at the right place !");
}
new Float:WaterPos[11][3] =
{
{ 252.1506,111.4887,1003.2188 },
{ 270.2978,186.2076,1008.1719 },
{ 249.6548,196.7341,1008.1719 },
{ 257.9287,196.7354,1008.1719 },
{ 229.1164,155.1423,1003.0234 },
{ 227.3604,143.4446,1003.0234 },
{ 231.3758,180.2250,1003.0313 },
{ 227.3651,184.3604,1003.0313 },
{ 1496.2740,1304.3014,1093.2891 },
{ 1249.1284,5.7868,1008.2578 },
{ 754.9944,-40.5415,1000.5859 }
};

