diff --git a/[esx]/es_extended/client/main.lua b/[esx]/es_extended/client/main.lua index abf86c0a..cb34fec4 100644 --- a/[esx]/es_extended/client/main.lua +++ b/[esx]/es_extended/client/main.lua @@ -517,7 +517,7 @@ AddEventHandler("esx:tpm", function() break end - Wait(5) + Wait(0) end TriggerEvent('chatMessage', "Successfully Teleported") else diff --git a/[esx]/es_extended/client/modules/scaleform.lua b/[esx]/es_extended/client/modules/scaleform.lua index ad3969d0..50736468 100644 --- a/[esx]/es_extended/client/modules/scaleform.lua +++ b/[esx]/es_extended/client/modules/scaleform.lua @@ -7,7 +7,7 @@ ESX.Scaleform.ShowFreemodeMessage = function(title, msg, sec) EndScaleformMovieMethod() while sec > 0 do - Wait(1) + Wait(0) sec = sec - 0.01 DrawScaleformMovieFullscreen(scaleform, 255, 255, 255, 255) @@ -38,7 +38,7 @@ ESX.Scaleform.ShowBreakingNews = function(title, msg, bottom, sec) EndScaleformMovieMethod() while sec > 0 do - Wait(1) + Wait(0) sec = sec - 0.01 DrawScaleformMovieFullscreen(scaleform, 255, 255, 255, 255) @@ -61,7 +61,7 @@ ESX.Scaleform.ShowPopupWarning = function(title, msg, bottom, sec) EndScaleformMovieMethod() while sec > 0 do - Wait(1) + Wait(0) sec = sec - 0.01 DrawScaleformMovieFullscreen(scaleform, 255, 255, 255, 255) @@ -78,7 +78,7 @@ ESX.Scaleform.ShowTrafficMovie = function(sec) EndScaleformMovieMethod() while sec > 0 do - Wait(1) + Wait(0) sec = sec - 0.01 DrawScaleformMovieFullscreen(scaleform, 255, 255, 255, 255) diff --git a/[esx]/es_extended/client/modules/streaming.lua b/[esx]/es_extended/client/modules/streaming.lua index 83030f3f..7f430d9f 100644 --- a/[esx]/es_extended/client/modules/streaming.lua +++ b/[esx]/es_extended/client/modules/streaming.lua @@ -5,7 +5,7 @@ function ESX.Streaming.RequestModel(modelHash, cb) RequestModel(modelHash) while not HasModelLoaded(modelHash) do - Wait(4) + Wait(0) end end @@ -19,7 +19,7 @@ function ESX.Streaming.RequestStreamedTextureDict(textureDict, cb) RequestStreamedTextureDict(textureDict) while not HasStreamedTextureDictLoaded(textureDict) do - Wait(4) + Wait(0) end end @@ -33,7 +33,7 @@ function ESX.Streaming.RequestNamedPtfxAsset(assetName, cb) RequestNamedPtfxAsset(assetName) while not HasNamedPtfxAssetLoaded(assetName) do - Wait(4) + Wait(0) end end @@ -47,7 +47,7 @@ function ESX.Streaming.RequestAnimSet(animSet, cb) RequestAnimSet(animSet) while not HasAnimSetLoaded(animSet) do - Wait(4) + Wait(0) end end @@ -61,7 +61,7 @@ function ESX.Streaming.RequestAnimDict(animDict, cb) RequestAnimDict(animDict) while not HasAnimDictLoaded(animDict) do - Wait(4) + Wait(0) end end @@ -75,7 +75,7 @@ function ESX.Streaming.RequestWeaponAsset(weaponHash, cb) RequestWeaponAsset(weaponHash) while not HasWeaponAssetLoaded(weaponHash) do - Wait(4) + Wait(0) end end diff --git a/[esx]/esx_identity/server/main.lua b/[esx]/esx_identity/server/main.lua index b31cfda3..71b7c6f6 100644 --- a/[esx]/esx_identity/server/main.lua +++ b/[esx]/esx_identity/server/main.lua @@ -88,7 +88,7 @@ if Config.UseDeferrals then saveIdentityToDatabase(xPlayer.identifier, currentIdentity) end - Wait(5) + Wait(0) alreadyRegistered[xPlayer.identifier] = true TriggerClientEvent('esx_identity:alreadyRegistered', xPlayer.source) @@ -142,7 +142,7 @@ elseif not Config.UseDeferrals then Wait(300) while not ESX do - Wait(10) + Wait(0) end local xPlayers = ESX.GetExtendedPlayers() @@ -170,7 +170,7 @@ elseif not Config.UseDeferrals then saveIdentityToDatabase(xPlayer.identifier, currentIdentity) end - Wait(10) + Wait(0) TriggerClientEvent('esx_identity:alreadyRegistered', xPlayer.source) playerIdentity[xPlayer.identifier] = nil diff --git a/[esx]/esx_menu_dialog/client/main.lua b/[esx]/esx_menu_dialog/client/main.lua index 503d28b2..f4dffe35 100644 --- a/[esx]/esx_menu_dialog/client/main.lua +++ b/[esx]/esx_menu_dialog/client/main.lua @@ -83,7 +83,7 @@ end) CreateThread(function() while true do - Wait(10) + Wait(0) if ESX.Table.SizeOf(OpenedMenus) > 0 then DisableControlAction(0, 1, true) -- LookLeftRight diff --git a/[esx_addons]/esx_ambulancejob/client/main.lua b/[esx_addons]/esx_ambulancejob/client/main.lua index 70ccb765..7904a46f 100644 --- a/[esx_addons]/esx_ambulancejob/client/main.lua +++ b/[esx_addons]/esx_ambulancejob/client/main.lua @@ -312,7 +312,7 @@ function RemoveItemsAfterRPDeath() DoScreenFadeOut(800) while not IsScreenFadedOut() do - Wait(10) + Wait(0) end ESX.TriggerServerCallback('esx_ambulancejob:removeItemsAfterRPDeath', function() diff --git a/[esx_addons]/esx_atm/client/main.lua b/[esx_addons]/esx_atm/client/main.lua index 35297d87..f79e8d30 100644 --- a/[esx_addons]/esx_atm/client/main.lua +++ b/[esx_addons]/esx_atm/client/main.lua @@ -45,7 +45,7 @@ end) -- Activate menu when player is inside marker CreateThread(function() while true do - Wait(10) + Wait(0) local coords = GetEntityCoords(PlayerPedId()) local canSleep = true isInATMMarker = false diff --git a/[esx_addons]/esx_clotheshop/client/main.lua b/[esx_addons]/esx_clotheshop/client/main.lua index 23b33c36..7a6271fb 100644 --- a/[esx_addons]/esx_clotheshop/client/main.lua +++ b/[esx_addons]/esx_clotheshop/client/main.lua @@ -135,7 +135,7 @@ end) -- Enter / Exit marker events & draw markers CreateThread(function() while true do - Wait(1) + Wait(0) local playerCoords, isInMarker, currentZone, letSleep = GetEntityCoords(PlayerPedId()), false, nil, true for k,v in pairs(Config.Shops) do diff --git a/[esx_addons]/esx_dmvschool/client/main.lua b/[esx_addons]/esx_dmvschool/client/main.lua index 806d163f..6cdb71db 100644 --- a/[esx_addons]/esx_dmvschool/client/main.lua +++ b/[esx_addons]/esx_dmvschool/client/main.lua @@ -263,7 +263,7 @@ end) -- Block UI CreateThread(function() while true do - Wait(1) + Wait(0) if CurrentTest == 'theory' then local playerPed = PlayerPedId() @@ -360,7 +360,7 @@ end) -- Speed / Damage control CreateThread(function() while true do - Wait(10) + Wait(0) if CurrentTest == 'drive' then diff --git a/[esx_addons]/esx_drugs/client/weed.lua b/[esx_addons]/esx_drugs/client/weed.lua index dd43b7a6..f52fe347 100644 --- a/[esx_addons]/esx_drugs/client/weed.lua +++ b/[esx_addons]/esx_drugs/client/weed.lua @@ -165,7 +165,7 @@ end function GenerateWeedCoords() while true do - Wait(1) + Wait(0) local weedCoordX, weedCoordY diff --git a/[esx_addons]/esx_garage/client/main.lua b/[esx_addons]/esx_garage/client/main.lua index 00d371bd..1882a24c 100644 --- a/[esx_addons]/esx_garage/client/main.lua +++ b/[esx_addons]/esx_garage/client/main.lua @@ -390,7 +390,7 @@ CreateThread(function() TriggerEvent('esx_property:hasExitedMarker', LastGarage, LastPart, LastParking) end - Wait(1) + Wait(0) else Wait(500) end end end) diff --git a/[esx_addons]/esx_holdup/client/main.lua b/[esx_addons]/esx_holdup/client/main.lua index 25b68c6d..e5c6a897 100644 --- a/[esx_addons]/esx_holdup/client/main.lua +++ b/[esx_addons]/esx_holdup/client/main.lua @@ -60,7 +60,7 @@ AddEventHandler('esx_holdup:startTimer', function() end) CreateThread(function() while holdingUp do - Wait(1) + Wait(0) DrawTxt(0.66, 1.44, 1.0, 1.0, 0.4, _U('robbery_timer', timer), 255, 255, 255, 255) end end) @@ -80,7 +80,7 @@ end) CreateThread(function() while true do - Wait(1) + Wait(0) local playerPos, letSleep = GetEntityCoords(PlayerPedId()), true for k,v in pairs(Stores) do local distance = #(playerPos - v.position) diff --git a/[esx_addons]/esx_joblisting/client/main.lua b/[esx_addons]/esx_joblisting/client/main.lua index 94021769..811eac57 100644 --- a/[esx_addons]/esx_joblisting/client/main.lua +++ b/[esx_addons]/esx_joblisting/client/main.lua @@ -33,7 +33,7 @@ end) -- Activate menu when player is inside marker, and draw markers CreateThread(function() while true do - Wait(1) + Wait(0) local coords = GetEntityCoords(PlayerPedId()) isInMarker = false diff --git a/[esx_addons]/esx_jobs/client/main.lua b/[esx_addons]/esx_jobs/client/main.lua index 95886536..f01f2d69 100644 --- a/[esx_addons]/esx_jobs/client/main.lua +++ b/[esx_addons]/esx_jobs/client/main.lua @@ -302,7 +302,7 @@ end) -- Show top left hint CreateThread(function() while true do - Wait(10) + Wait(0) if hintIsShowed then ESX.ShowHelpNotification(hintToDisplay) @@ -315,7 +315,7 @@ end) -- Display markers (only if on duty and the player's job ones) CreateThread(function() while true do - Wait(1) + Wait(0) local zones = {} if ESX.PlayerData.job ~= nil then @@ -401,7 +401,7 @@ end) CreateThread(function() while true do - Wait(1) + Wait(0) if ESX.PlayerData.job ~= nil and ESX.PlayerData.job.name ~= 'unemployed' then local zones = nil diff --git a/[esx_addons]/esx_jobs/server/main.lua b/[esx_addons]/esx_jobs/server/main.lua index ae1a0323..2dbcbd8c 100644 --- a/[esx_addons]/esx_jobs/server/main.lua +++ b/[esx_addons]/esx_jobs/server/main.lua @@ -6,7 +6,7 @@ CreateThread(function() local timeNow = os.clock() for playerId,data in pairs(playersWorking) do - Wait(10) + Wait(0) local xPlayer = ESX.GetPlayerFromId(playerId) -- is player still online? diff --git a/[esx_addons]/esx_mechanicjob/client/main.lua b/[esx_addons]/esx_mechanicjob/client/main.lua index c2210efd..273b7483 100644 --- a/[esx_addons]/esx_mechanicjob/client/main.lua +++ b/[esx_addons]/esx_mechanicjob/client/main.lua @@ -767,7 +767,7 @@ end) -- Pop NPC mission vehicle when inside area CreateThread(function() while true do - Wait(10) + Wait(0) if NPCTargetTowableZone and not NPCHasSpawnedTowable then local coords = GetEntityCoords(PlayerPedId()) @@ -838,7 +838,7 @@ end) -- Enter / Exit marker events CreateThread(function() while true do - Wait(10) + Wait(0) if ESX.PlayerData.job and ESX.PlayerData.job.name == 'mechanic' then diff --git a/[esx_addons]/esx_policejob/client/main.lua b/[esx_addons]/esx_policejob/client/main.lua index edd9c78f..d99bb1d1 100644 --- a/[esx_addons]/esx_policejob/client/main.lua +++ b/[esx_addons]/esx_policejob/client/main.lua @@ -164,7 +164,7 @@ function OpenCloakroomMenu() end, 'police') while awaitService == nil do - Wait(5) + Wait(0) end -- if we couldn't enter service don't let the player get changed diff --git a/[esx_addons]/esx_society/server/main.lua b/[esx_addons]/esx_society/server/main.lua index 2f255c57..8e5415a0 100644 --- a/[esx_addons]/esx_society/server/main.lua +++ b/[esx_addons]/esx_society/server/main.lua @@ -328,7 +328,7 @@ ESX.RegisterServerCallback('esx_society:getOnlinePlayers', function(source, cb) onlinePlayers = {} return end - while getOnlinePlayers do Wait(10) end -- Wait for the xPlayer loop to finish + while getOnlinePlayers do Wait(0) end -- Wait for the xPlayer loop to finish cb(onlinePlayers) end) diff --git a/[esx_addons]/esx_taxijob/client/main.lua b/[esx_addons]/esx_taxijob/client/main.lua index a3e9f4de..2b469355 100644 --- a/[esx_addons]/esx_taxijob/client/main.lua +++ b/[esx_addons]/esx_taxijob/client/main.lua @@ -628,7 +628,7 @@ CreateThread(function() targetCoords = Config.JobLocations[GetRandomIntInRange(1, #Config.JobLocations)] local distance = #(playerCoords - targetCoords) while distance < Config.MinimumDistance do - Wait(5) + Wait(0) targetCoords = Config.JobLocations[GetRandomIntInRange(1, #Config.JobLocations)] distance = #(playerCoords - targetCoords) diff --git a/[esx_addons]/esx_vehicleshop/client/main.lua b/[esx_addons]/esx_vehicleshop/client/main.lua index 5dd8e6b9..ac231dd7 100644 --- a/[esx_addons]/esx_vehicleshop/client/main.lua +++ b/[esx_addons]/esx_vehicleshop/client/main.lua @@ -756,7 +756,7 @@ end) -- Enter / Exit marker events & Draw Markers CreateThread(function() while true do - Wait(4) + Wait(0) local playerCoords = GetEntityCoords(PlayerPedId()) local isInMarker, letSleep, currentZone = false, true @@ -796,7 +796,7 @@ end) -- Key controls CreateThread(function() while true do - Wait(5) + Wait(0) if CurrentAction then ESX.ShowHelpNotification(CurrentActionMsg) diff --git a/[esx_addons]/esx_vehicleshop/client/utils.lua b/[esx_addons]/esx_vehicleshop/client/utils.lua index 1a76a4d2..ef2a9f51 100644 --- a/[esx_addons]/esx_vehicleshop/client/utils.lua +++ b/[esx_addons]/esx_vehicleshop/client/utils.lua @@ -11,7 +11,7 @@ function GeneratePlate() local doBreak = false while true do - Wait(2) + Wait(0) math.randomseed(GetGameTimer()) if Config.PlateUseSpace then generatedPlate = string.upper(GetRandomLetter(Config.PlateLetters) .. ' ' .. GetRandomNumber(Config.PlateNumbers)) diff --git a/[esx_addons]/esx_voice/client/main.lua b/[esx_addons]/esx_voice/client/main.lua index f828eefc..6bbf734e 100644 --- a/[esx_addons]/esx_voice/client/main.lua +++ b/[esx_addons]/esx_voice/client/main.lua @@ -43,7 +43,7 @@ end) CreateThread(function() while true do - Wait(1) + Wait(0) if IsControlJustPressed(1, Keys['H']) and IsControlPressed(1, Keys['LEFTSHIFT']) then voice.current = (voice.current + 1) % 3