Repository navigation
A3D_GetPositionOffset
imshooter edited this page Oct 17, 2026
·
1 revision
Find where a point of the world lies relative to an object, the reverse of A3D_GetOffsetPosition.
native bool:A3D_GetPositionOffset(
Float:x,
Float:y,
Float:z,
Float:rx,
Float:ry,
Float:rz,
Float:worldX,
Float:worldY,
Float:worldZ,
&Float:offsetX,
&Float:offsetY,
&Float:offsetZ
);| Parameter | Description |
|---|---|
Float:x |
Position of the object on the X axis. |
Float:y |
Position on the Y axis. |
Float:z |
Position on the Z axis. |
Float:rx |
Rotation of the object on the X axis. |
Float:ry |
Rotation on the Y axis. |
Float:rz |
Rotation on the Z axis. |
Float:worldX |
Point in the world on the X axis. |
Float:worldY |
Point on the Y axis. |
Float:worldZ |
Point on the Z axis. |
&Float:offsetX |
Offset along the X axis of the object. |
&Float:offsetY |
Offset along its Y axis. |
&Float:offsetZ |
Offset along its Z axis. |
-
truewhen the offset was written.
The reverse of A3D_GetOffsetPosition: where a point of the world lies along the axes of an object.
Tells whether a player stands in front of a cash machine, facing its screen.
stock bool:IsAtCashMachine(playerid, Float:x, Float:y, Float:z, Float:angle) {
new
Float:playerX,
Float:playerY,
Float:playerZ,
Float:offsetX,
Float:offsetY,
Float:offsetZ
;
GetPlayerPos(playerid, playerX, playerY, playerZ);
A3D_GetPositionOffset(x, y, z, 0.0, 0.0, angle, playerX, playerY, playerZ, offsetX, offsetY, offsetZ);
return offsetY > 0.3 && offsetY < 1.5 && floatabs(offsetX) < 0.5;
}- A3D_GetOffsetPosition: Find where a point given relative to an object lies in the world, such as a spot on a table or the end of a ramp.
- A3D_GetVehiclePositionOffset: Find where a point of the world lies relative to a vehicle, such as whether a player stands behind it.
3DAndreas 0.7.1 · Repository · Releases · MIT License
Guides
- Installation
- Configuration
- Physics objects
- Model settings
- World queries
- The screen
- Routes
- Navigation mesh
- Map database
- Coming from ColAndreas
- Performance
Reference
Functions