OnPlayerClickMap

From SA-MP Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 19:19, 1 October 2013
W (Talk | contribs)

← Previous diff
Revision as of 00:05, 1 February 2014
Connor Mead (Talk | contribs)

Next diff →
Line 31: Line 31:
[[de:OnPlayerClickMap]] [[de:OnPlayerClickMap]]
 +[[fr:OnPlayerClickMap]]
[[ru:OnPlayerClickMap]] [[ru:OnPlayerClickMap]]

Revision as of 00:05, 1 February 2014



OnPlayerClickMap was added in SA-MP 0.3d This callback was added in SA-MP 0.3d and will not work in earlier versions!


Description:

OnPlayerClickMap is called when a player places a target/waypoint on the pause menu map (by right-clicking).


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


Return Values:

This callback does not handle returns.


Image:32px-Ambox_warning_orange.png

Note

The Z value provided is only an estimate; you may find it useful to use a plugin like the MapAndreas plugin to get a more accurate Z coordinate (or for teleportation; use SetPlayerPosFindZ).


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.

In other languages