OnPlayerClickMap

OnPlayerClickMap

Description:
Callback OnPlayerClickMap is called when a player places a target/waypoint on the pause menu map (by right-clicking).
Callback OnPlayerClickMap was added in 0.3d and will not work in earlier versions!
The Z value returned will be 0 (invalid) if it is far away from the player; use the MapAndreas plugin to get a more accurate Z coordinate.


Parameters:
(playerid, Float:fX, Float:fY, Float:fZ)
int playerid The ID of the player that placed a target/waypoint.
float fX The X float coordinate where the player clicked.
float fY The Y float coordinate where the player clicked.
float fZ The Z float coordinate where the player clicked (inaccurate - see note below).


Return Values:
  • 1 - Will prevent other filterscripts from receiving this callback.
  • 0 - Indicates that this callback will be passed to the next filterscript.
  • It is always called first in gamemode.


Examples:
public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
{
    SetPlayerPosFindZ(playerid, fX, fY, fZ); 
    return 1;
}


Related Callbacks
The following callbacks might be useful as well, as they are related to this callback in one way or another.