Helium-bakerloo-mexico, DeleteEntity crash

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:

  1. walk up to vehicle and point (heading of character)
  2. type /dv
  3. vehicle deletes

Error
image

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)
``

Are you sure you’re not accidentally deleting the player ped? Also, good job on ‘showing details’ ._.

1 Like

that could possibly be an issue, there was a issue with trying to get “see details” to show in this instance where trying to get pull down to show. next error i get ill update main post.

I don’t know if this is related, but I get this exact error when I’m trying to spawn NPCs using a script while playing as Michael. After changing to a male Online character it worked fine. I think it is somehow related to the player ped.