From 5640e5f10dde3416018ab106a81fb8e2bb7eff0e Mon Sep 17 00:00:00 2001 From: rubin Date: Mon, 9 Jan 2023 20:48:40 +0300 Subject: [PATCH] add thread in object --- TruckHUD.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TruckHUD.lua b/TruckHUD.lua index 51eaa54..1df5539 100644 --- a/TruckHUD.lua +++ b/TruckHUD.lua @@ -2244,7 +2244,7 @@ function loadEvents() antiflood = os.clock() * 1000 end function sampev.onVehicleStreamIn(vehicleId, data) - lua_thread.create(luChecker.vehicleStream, true, vehicleId, data) + threads[#threads+1] = lua_thread.create(luChecker.vehicleStream, true, vehicleId, data) if inifiles ~= nil and not inifiles.Settings.Tuning and (data.type == 403 or data.type == 515) then data.modSlots[8] = 0 return {vehicleId, data} @@ -2724,7 +2724,7 @@ function loadEvents() end function sampev.onCreate3DText(id, color, position, distance, testLOS, attachedPlayerId, attachedVehicleId, text) -- f3d1 - lua_thread.create( + threads[#threads+1] = lua_thread.create( function(id, color, position, distance, testLOS, attachedPlayerId, attachedVehicleId, textt) for k, v in pairs(find_3dText) do @@ -2816,7 +2816,7 @@ function loadEvents() end function sampev.onRemove3DTextLabel(Cid) -- f3d2 - lua_thread.create(function(Cid) + threads[#threads+1] = lua_thread.create(function(Cid) if id_3D_text == Cid then id_3D_text = msk_timestamp load_location = false