refactor: GetRandomString

This commit is contained in:
Csoki
2022-11-21 19:03:18 +01:00
parent 974561372e
commit c5f27feb8d
+1 -5
View File
@@ -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()