GetEntityPosition
From GTA Network Wiki
GetEntityPositionServer-Side Function
![]() |
![]() |
---|
This function returns given Entity Position in Vector3 type.
Syntax
NAPI.Entity.GetEntityPosition(NetHandle entity);
Required Arguments
- entity: parameter input should be in NetHandle type.
NOTE: This function returns data in Vector3 type.
Usage example
#1 An example of a command that retrieves actual player's position and print it into in-game chat.
[Command("getpos")] public void GetPosition(Client player) { Vector3 PlayerPos = NAPI.Entity.GetEntityPosition(player); NAPI.Chat.SendChatMessageToPlayer(player, "X: " + PlayerPos.X + " Y: " + PlayerPos.Y + " Z: " + PlayerPos.Z); }
Changelog
Version | Description |
---|---|
1.0 | Release. |