GetActorPos

GetActorPos

Description:
Function GetActorPos get the position of an actor.
Function GetActorPos was added in 0.3.7 and will not work in earlier versions!


Parameters:
(actorid, &Float:X, &Float:Y, &Float:Z)
int actorid The ID of the actor to get the position of. Returned by CreateActor.
float X A float variable, passed by reference, in which to store the X coordinate of the actor.
float Y A float variable, passed by reference, in which to store the Y coordinate of the actor.
float Z A float variable, passed by reference, in which to store the Z coordinate of the actor.


Return Values:
  • 1: The function was executed successfully.
  • 0: The function failed to execute. The actor specified does not exist.
  • The actor's position is stored in the specified variables.


Examples:
new Float:x, Float:y, Float:z;
GetActorPos(actorid, x, y, z);


Related Functions
The following functions may be useful, as they are related to this function in one way or another.


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