if(IsPlayerInRangeOfPoint(playerid, 5.0, 2227.7256, -1707.8555, 13.6281)) { SetPlayerCheckpoint(playerid, 2227.7256, -1707.8555, 13.6281, 1.0); }
if(IsPlayerInRangeOfPoint(playerid, 1.0, 2227.7256, -1707.8555, 13.6281)) { ShowPlayerDialog(playerid, ATM, DIALOG_STYLE_LIST, "ATM","View Balance\nWithdraw\nDeposit", "Select", "Cancel"); }
if(IsPlayerInRangeOfPoint(playerid, 1.0, 2227.7256, -1707.8555, 13.6281)) // Make a position when the player is far from the checkpoint
{
DisablePlayerCheckpoint(playerid);
}
forward playerOnLeaveCheckPoint(playerid);
public playerOnLeaveCheckPoint(
DisablePlayerCheckpoint(playerid);
return 1;
}
public OnPlayerLeaveCheckpoint(playerid) {
playerOnLeaveCheckPoint(playerid); // <-- Put that
}
Some where in your code put
PHP код:
PHP код:
|
Why would he define OnPlayerLeaveCheckpoint instead of making a far point of range?
|
Some where in your code put
PHP код:
PHP код:
|
public OnPlayerLeaveCheckpoint(playerid) { DisablePlayerCheckpoint(playerid); return 1; }
Why not simply do:
Код:
public OnPlayerLeaveCheckpoint(playerid) { DisablePlayerCheckpoint(playerid); return 1; } |
This would work but I have other checkpoints that creates new checkpoints and won't this destroy them?
How can I make so its only for a special selection of checkpoints? |
public OnPlayerLeaveCheckpoint(playerid) { if(IsPlayerInRangeOfPoint(playerid, CHECKPOINT_RADIUS + 2.0, 2227.7256, -1707.8555, 13.6281)) DisablePlayerCheckpoint(playerid); return 1; }
You can check by the checkpoint position.
Код:
public OnPlayerLeaveCheckpoint(playerid) { if(IsPlayerInRangeOfPoint(playerid, CHECKPOINT_RADIUS + 2.0, 2227.7256, -1707.8555, 13.6281)) DisablePlayerCheckpoint(playerid); return 1; } |
You can check by the checkpoint position.
Код:
public OnPlayerLeaveCheckpoint(playerid) { if(IsPlayerInRangeOfPoint(playerid, CHECKPOINT_RADIUS + 2.0, 2227.7256, -1707.8555, 13.6281)) DisablePlayerCheckpoint(playerid); return 1; } |
error 017: undefined symbol "CHECKPOINT_RADIUS"