mirror of
https://github.com/qbcore-fivem/qb-core.git
synced 2026-08-28 17:01:16 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user