Fixed isnetworked (#764)

With the above way, the condition was always true because (false or true) is true or (nil or true) is true.

With this change it is fixed.
This commit is contained in:
NetOut
2022-07-23 15:01:23 +02:00
committed by GitHub
parent 2b0e0c8edc
commit 38ed80fed2
+1 -1
View File
@@ -396,7 +396,7 @@ function QBCore.Functions.SpawnVehicle(model, cb, coords, isnetworked, teleportI
else
coords = GetEntityCoords(ped)
end
isnetworked = isnetworked or true
isnetworked = isnetworked == nil or isnetworked
QBCore.Functions.LoadModel(model)
local veh = CreateVehicle(model, coords.x, coords.y, coords.z, coords.w, isnetworked, false)
local netid = NetworkGetNetworkIdFromEntity(veh)