RedM Natives

FIND_FIRST_VEHICLE

Hash0x15E55694
Runtime nameFindFirstVehicle
NamespaceCFX
SideClient
NameOfficial
Docs

Signature

int FIND_FIRST_VEHICLE(Entity* outEntity);

Parameters

NameTypeDescription
outEntityEntity*—

Returns int

Usage

Lua
local retval, outEntity = FindFirstVehicle(outEntity)

-- always works, by hash
local retval, outEntity = Citizen.InvokeNative(0x15e55694, Citizen.PointerValueIntInitialized(outEntity), Citizen.ResultAsInteger())
JavaScript and C#
JavaScript
const [retval, outEntity] = FindFirstVehicle(outEntity);

// by hash
const [retval, outEntity] = Citizen.invokeNative('0x15e55694', Citizen.pointerValueIntInitialized(outEntity), Citizen.returnResultAnyway(), Citizen.resultAsInteger());
C#
var outEntity = new OutputArgument();
int retval = Function.Call<int>((Hash)0x15e55694, outEntity);
// outEntity.GetResult<int>()
  • The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.

Sources

Cfx.re native reference

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.