check for destroyProp if received any info

This commit is contained in:
Jim Shield
2024-01-19 13:02:09 +00:00
committed by GitHub
parent e5316f45aa
commit dcf2018ec6

View File

@@ -154,6 +154,7 @@ function lookEnt(entity) local ped = PlayerPedId()
end end
function destroyProp(entity) function destroyProp(entity)
if entity then
if Config.System.Debug then print("^6Bridge^7: ^2Destroying Prop^7: '^6"..entity.."^7'") end if Config.System.Debug then print("^6Bridge^7: ^2Destroying Prop^7: '^6"..entity.."^7'") end
if IsEntityAttachedToEntity(entity, PlayerPedId()) then if IsEntityAttachedToEntity(entity, PlayerPedId()) then
SetEntityAsMissionEntity(entity) SetEntityAsMissionEntity(entity)
@@ -161,6 +162,7 @@ function destroyProp(entity)
end end
DeleteObject(entity) DeleteObject(entity)
end end
end
function pushVehicle(entity) function pushVehicle(entity)
SetVehicleModKit(entity, 0) SetVehicleModKit(entity, 0)