From 38ed80fed292243cacb40bbc5c2788be6468b221 Mon Sep 17 00:00:00 2001 From: NetOut <32980305+Maykellll1@users.noreply.github.com> Date: Sat, 23 Jul 2022 15:01:23 +0200 Subject: [PATCH] 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. --- client/functions.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/functions.lua b/client/functions.lua index db572c3..6292a46 100644 --- a/client/functions.lua +++ b/client/functions.lua @@ -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)