Open
Description
What happened?
When trying to start an StartExpensiveSynchronousShapeTestLosProbe
, if the returned entity is not a ped, a vehicle or a game object, the GetEntityArchetype function will error
Expected result
Return the correct entity archetype or an empty string
Reproduction steps
Execute the following "bug" command while on the ground
RegisterCommand("bug", function()
local playerPed = PlayerPedId()
local coordA = GetEntityCoords(playerPed)
local coordB = GetOffsetFromEntityInWorldCoords(playerPed, 0.0, 0.0, -5.0)
local rayHandle = StartExpensiveSynchronousShapeTestLosProbe(coordA.x, coordA.y, coordA.z, coordB.x, coordB.y, coordB.z, -1, PlayerPedId(), 0)
local _, hit, _, _, _, entity = GetShapeTestResultIncludingMaterial(rayHandle)
if hit == 1 or hit == true then
print(entity)
print(GetEntityArchetypeName(entity))
end
end)
Importancy
Slight inconvenience
Area(s)
FiveM, Natives, ScRT: Lua
Specific version(s)
server 10191 - client canary b3095
Additional information
No response