mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-02 03:08:52 +00:00
single resource concept + first attempt to reorganize code
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
OnESX = function(cb)
|
||||
|
||||
local ESX = nil
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
|
||||
while ESX == nil do
|
||||
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
|
||||
Citizen.Wait(0)
|
||||
end
|
||||
|
||||
cb(ESX)
|
||||
|
||||
end)
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user