Hey guys,
I’m new to fiveM and lua scripting and was studying some codes snippets like this one:
AddEventHandler('VehicleSpawn', function(vehicleName)
local myPed = GetPlayerPed(-1)
local player = PlayerId()
local vehicle = GetHashKey(vehicleName)
RequestModel(vehicle)
while not HasModelLoaded(vehicle) do
Wait(1)
end
local coords = GetOffsetFromEntityInWorldCoords(myPed, 0, 5.0, 0)
local spawned_vehcile = CreateVehicle(vehicle, coords, GetEntityHeading(myPed), true, false)
SetVehicleOnGroundProperly(spawned_vehcile)
SetModelAsNoLongerNeeded(vehicle)
Citizen.InvokeNative(0xB736A491E64A32CF,Citizen.PointerValueIntInitialized(spawned_vehcile))
end)
I was able to understand all the code except for this line:
Citizen.InvokeNative(0xB736A491E64A32CF,Citizen.PointerValueIntInitialized(spawned_vehcile))
This line invoke a native function for GTA? or FiveM? What does that hex number mean? What does this native function do?