mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 01:08:54 +00:00
refactor: GetRandomString
This commit is contained in:
@@ -7,11 +7,7 @@ for i = 97, 122 do table.insert(Charset, string.char(i)) end
|
||||
function ESX.GetRandomString(length)
|
||||
math.randomseed(GetGameTimer())
|
||||
|
||||
if length > 0 then
|
||||
return ESX.GetRandomString(length - 1) .. Charset[math.random(1, #Charset)]
|
||||
else
|
||||
return ''
|
||||
end
|
||||
return length > 0 and ESX.GetRandomString(length - 1) .. Charset[math.random(1, #Charset)] or ''
|
||||
end
|
||||
|
||||
function ESX.GetConfig()
|
||||
|
||||
Reference in New Issue
Block a user