-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Closed
Labels
Description
What happened?
RegisterCommand("entitywipe", function()
local playerPed = cache.ped
local playerCoords = GetEntityCoords(playerPed)
local radius = 20.0
local entityPool = GetGamePool('CPed')
for i = 1, #entityPool do
local distance = #(GetEntityCoords(entityPool[i]) - playerCoords)
if distance < radius then
DeleteEntity(entityPool[i])
end
end
RedTrainer.Notify("Entity Wipe", "20.0 Radius Wiped.", 'info')
end, true)
``` this code causes a crash
### Expected result
entity should have wiped
### Reproduction steps
run command above
### Importancy
Crash
### Area(s)
RedM
### Specific version(s)
REDM GAME BUILD 1491 LATEST artifacts AS OF 1/16/2024
### Additional information

[CfxCrashDump_2024_01_16_18_06_23.zip](https://github.com/citizenfx/fivem/files/13954192/CfxCrashDump_2024_01_16_18_06_23.zip)