From 3d305f8799ff725c969de8488cdfad61453f3ef6 Mon Sep 17 00:00:00 2001 From: HC DEV <36608116+ArturMichalak@users.noreply.github.com> Date: Fri, 30 Aug 2024 07:55:27 +0200 Subject: [PATCH] refactor(entityCreated): split return condition --- server/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/main.lua b/server/main.lua index 02b9439..827218f 100644 --- a/server/main.lua +++ b/server/main.lua @@ -65,7 +65,7 @@ AddEventHandler('entityCreated', function (entity) local type = GetEntityType(entity) local isPed = type == EntityType.Ped local isVehicle = type == EntityType.Vehicle - if not (isPed or isVehicle) then return end + if not isPed and not isVehicle then return end local vehicle = isPed and GetVehiclePedIsIn(entity, false) or entity if not DoesEntityExist(vehicle) then return end -- ped can be not in vehicle, so we need to check if vehicle is a entity, otherwise it will return 0