# NPC:GetMyPos

(Difference between revisions)
 Revision as of 22:35, 29 December 2017Freaksken (Talk | contribs)← Previous diff Current revisionFreaksken (Talk | contribs) Line 7: Line 7: {{Parameters|&Float:x, &Float:y, &Float:z}} {{Parameters|&Float:x, &Float:y, &Float:z}} - {{Param|Float:x|A float to save the X coordinate, passed by reference.}} + {{Param|&Float:x|A float to save the X coordinate, passed by reference.}} - {{Param|Float:y|A float to save the Y coordinate, passed by reference.}} + {{Param|&Float:y|A float to save the Y coordinate, passed by reference.}} - {{Param|Float:z|A float to save the Z coordinate, passed by reference.}} + {{Param|&Float:z|A float to save the Z coordinate, passed by reference.}} {{NoReturn}} {{NoReturn}}

## Current revision

 This function was added in SA-MP 0.3a and will not work in earlier versions!

Description:

Get the current location of the NPC

Parameters:
(&Float:x, &Float:y, &Float:z)
 &Float:x A float to save the X coordinate, passed by reference.
 &Float:y A float to save the Y coordinate, passed by reference.
 &Float:z A float to save the Z coordinate, passed by reference.

Return Values:

This function does not return any specific values.

Example Usage:

```new Float:x, Float:y, Float:z;
GetMyPos(x,y,z);
printf("I am currently at %f, %f, %f!",x,y,z);```

### Related Functions

The following functions may be helpful as they relate to this function in one way or another.