01.07.2012, 19:50
Hey , how can I make , a zone, and when a player type /health .. to give it health ?
SetPlayerHealth(playerid, 100);
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/healme", true))
{
new Float:Pos[3];
GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
if (Pos[0] <= SavedX && Pos[0] >= SavedX && Pos[1] <= SavedY && Pos[1] >= SavedY)
{
SetPlayerHealth(playerid,100.0);
} else SendClientMessage(playerid,"You're not in YOUR AREA, sorry!");
}
return 0;
}
if(IsPlayerInRangeOfPoint(playerid, 2.0, CorX, CorY, CorZ))
{
SetPlayerHealth(playerid, 100);
}