It's pretty simple, i already gave you the link to IsPlayerInRangeOfPoint. So simply check if the player is near to the coordinates and create a checkpoint.
For example:
pawn Код:
public OnPlayerPosChange(playerid, Float:newx, Float:newy, Float:newz, Float:oldx, Float:oldy, Float:oldz)
{
if(IsPlayerInRangeOfPoint(playerid, 50.0, x, y, z))
{
SetPlayerCheckpoint(playerid, x, y, z);
}
return 1;
}
NOTE:
x, y, z are the coordinates of your checkpoint.
Now when the player is in range of the point (x, y, z), a checkpoint appears.
To show dialog:
pawn Код:
public OnPlayerEnterCheckpoint(playerid)
{
if(IsPlayerInRangeOfPoint(playerid, 5.0, x, y, z))
{
ShowPlayerDialog(playerid, ...);
}
return 1;
}
The callback is self explanatory.