17.10.2015, 23:30
Check if the player is in range of the point.
Using IF you are checking if they are near the point. Having IsPlayerInRangeOfPoint wouldnt make any sort of sense to the script.
pawn Код:
CMD:eat(playerid) {
if(GetPlayerWeapon(playerid) != 4) return SendClientMessage(playerid, -1, "You must be holding a knife to eat the human meat!");
if(!IsPlayerInRangeOfPoint (playerid, 8.0, 2695.6880, -1704.6300, 11.8438)) return SendClientMessage(playerid,COLOR_RED,"You are not near eating place!");
ApplyAnimation(playerid, "PED", "BOM_Plant ", 4.1, 0, 1, 1, 0, 1, 1);
SetPlayerHealth(playerid, 100);
SetTimerEx("needFood",needFoodTimer,1,"i",playerid);
SendClientMessage(playerid, COLOR_LIGHTGREEN, "You are no longer hungry");
return 1;
}
Using IF you are checking if they are near the point. Having IsPlayerInRangeOfPoint wouldnt make any sort of sense to the script.

