fix(es_extended/shared/functions): invokingResource not being displayed

This commit is contained in:
Kenshin13
2024-12-15 17:56:12 +01:00
parent 9336cfdc69
commit db68fceccc
+2 -1
View File
@@ -192,6 +192,7 @@ function ESX.Await(conditionFunc, errorMessage, timeoutMs)
ESX.AssertType(errorMessage, "string", "errorMessage should be a string.")
end
local invokingResource = GetInvokingResource()
local startTimeMs = GetGameTimer()
while GetGameTimer() - startTimeMs < timeoutMs do
local result = conditionFunc()
@@ -204,7 +205,7 @@ function ESX.Await(conditionFunc, errorMessage, timeoutMs)
end
if errorMessage then
error(("[%s] -> %s"):format(GetInvokingResource(), errorMessage))
error(("[%s] -> %s"):format(invokingResource, errorMessage))
end
return false