Merge pull request #108 from 0xDEMXN/group

feat: use first char group for new chars
This commit is contained in:
Mycroft
2022-02-18 16:12:50 +00:00
committed by GitHub
+5
View File
@@ -70,6 +70,11 @@ function createESXPlayer(identifier, playerId, data)
defaultGroup = "user"
end
if Config.Multichar and not identifier:find('char1:') then
local char1 = MySQL.single.await(loadPlayer, {identifier:gsub('char%d+:', 'char1:')})
if char1 then defaultGroup = char1.group end
end
if not Config.Multichar then
MySQL.prepare(newPlayer, { json.encode(accounts), identifier, defaultGroup }, function()
loadESXPlayer(identifier, playerId, true)