mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-04 16:23:21 +00:00
single resource concept + first attempt to reorganize code
This commit is contained in:
@@ -4,6 +4,19 @@ for i = 48, 57 do table.insert(Charset, string.char(i)) end
|
||||
for i = 65, 90 do table.insert(Charset, string.char(i)) end
|
||||
for i = 97, 122 do table.insert(Charset, string.char(i)) end
|
||||
|
||||
-- Be careful with this, use it for some config file parsing and such
|
||||
ESX.EvalFile = function(resource, file, env)
|
||||
|
||||
env = env or {}
|
||||
env._G = env
|
||||
local code = LoadResourceFile(resource, file)
|
||||
|
||||
load(code, code, 't', env)()
|
||||
|
||||
return env
|
||||
|
||||
end
|
||||
|
||||
ESX.GetRandomString = function(length)
|
||||
math.randomseed(GetGameTimer())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user