class NativeOutputs
package fivem.client
Hand-written externs for natives whose Lua binding returns multiple values.
Many GTA natives report results through pointer output parameters. FiveM's
Lua runtime drops those parameters from the call and appends them to the
return values instead, but the natives database still describes them as
ordinary arguments — so generate.py produces, for example:
static function getGroundZFor3DCoord(x:Float, y:Float, z:Float, groundZ:Dynamic, includeWater:Bool):Bool;
which type-checks but throws the ground height away. The declarations here
model the real Lua signatures using @:multiReturn, so both halves of the
result are reachable. They live outside natives/ so regeneration never
overwrites them.
The wrappers in fivem.client.core use these; call them directly only if
you need a native this library doesn't already wrap.
Static methods
staticgetCurrentPedWeapon(ped:Int, p2:Bool = true):CurrentWeaponResult
The weapon a ped currently has equipped.
staticgetEntityMatrix(entity:Int):EntityMatrixResult
An entity's basis vectors and position in one call.
staticgetGroundZFor3dCoord(x:Float, y:Float, z:Float, includeWater:Bool = false):GroundZResult
The ground height beneath a point. found is false when the collision
around that spot isn't streamed in — which is the usual reason a
spawn ends up under the map.
staticgetScreenCoordFromWorldCoord(worldX:Float, worldY:Float, worldZ:Float):ScreenCoordResult
Projects a world position onto screen space, in 0..1 coordinates.
staticgetShapeTestResult(shapeTestHandle:Int):ShapeTestResult
Polls a shape test started with one of the START_SHAPE_TEST_*
natives. status is 0 while pending, 1 when ready, 2 when the handle
is invalid.
staticgetShapeTestResultIncludingMaterial(shapeTestHandle:Int):ShapeTestMaterialResult
As getShapeTestResult, but also reports the material that was hit.
staticgetVehicleColours(vehicle:Int):VehicleColoursResult
A vehicle's primary and secondary paint indices.
staticgetVehicleExtraColours(vehicle:Int):VehicleColoursResult
A vehicle's pearlescent and wheel colour indices.