Update to callbacks

Callbacks must now for sure fire back a callback
This commit is contained in:
gononono64 committed 2025-03-05 15:52:15 -06:00
1 parent 0d31632dfb
commit f28e511de6
1 file changed
+1 -7
+1 -7
View File
@@ -106,13 +106,7 @@ function Callback.Trigger(name, func, ...)
local p = promise.new()
TriggerServerEvent(clientToServerName, name, ...)
cbData[name] = {cb = func, p = p}
CreateThread(function()
Wait(5000)
if cbData[name] then
cbData[name].p:resolve()
cbData[name] = nil
end
end)
return Citizen.Await(p)
end