When deleting vehicles there will be a random chance game will crash with error, unknown if issue is code related or otherwise. can continue to delete vehicles for hours as a test with no issues or crash after crash.
proccess:
- walk up to vehicle and point (heading of character)
- type /dv
- vehicle deletes
Error
EDIT: New error same issue
"indigo-twenty-alaska"
[Expanded Information]
Crash signature: fivem.exe+91E01B
Report ID: si-b1543d5690c44e53b3c5ccff148a25e1
Code snip
RegisterCommand("dv", function(source, args, rawCommand)
if tonumber(player_data.admin) > 0 then
local pos = GetEntityCoords(GetPlayerPed(-1))
local entityWorld = GetOffsetFromEntityInWorldCoords(GetPlayerPed(-1), 0.0, 20.0, 0.0)
local rayHandle = CastRayPointToPoint(pos.x, pos.y, pos.z, entityWorld.x, entityWorld.y, entityWorld.z, 10, player, 0)
local a, b, c, d, vehicleHandle = GetRaycastResult(rayHandle)
if vehicleHandle ~= nil then
DeleteEntity(vehicleHandle)
end
else
print('admin command')
end
end, false)
``