20.06.2015, 10:18
Quote:
Looks great, can you just show me how to use
Код:
public OnPlayerPosChange(playerid, Float:newx, Float:newy, Float:newz, Float:oldx, Float:oldy, Float:oldz) { return 1; } |
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;
}
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;
}