20.10.2018, 07:17
So I want to make it so that if the player approaches a certain area it will make a checkpoint, and if the player moves away from that area it will automatically delete the checkpoint. I've tried to make it but it doesn't work well. Checkpoint is not lost even though the player has moved away from the area
PHP Code:
if(IsPlayerInRangeOfPoint(playerid, 2, HouseData[i][houseX], HouseData[i][houseY], HouseData[i][houseZ]))
{
SetPlayerCheckpoint(playerid, HouseData[i][houseX], HouseData[i][houseY], HouseData[i][houseZ], 2);
}
else
{
DisablePlayerCheckpoint(playerid);
}