qbcore-framework / qb-multicharacter

Multi-Character System Used With QB-Core :man: :woman:
GNU General Public License v3.0
33 stars 237 forks source link

Error when i log in! #62

Closed BlacknGoldy closed 2 years ago

BlacknGoldy commented 2 years ago

https://github.com/qbcore-framework/qb-multicharacter/blob/a9f9fa73cbb9f1ee385e52e4250ec242e017c610/server/main.lua#L86 https://imgur.com/kmujIp0 it happens when i choose character how can i resolve it ? tnx

notbounce commented 2 years ago

At a first look, you could try doing this:

if (QBCore.Functions.GetIdentifier(src, 'discord') == '' or QBCore.Functions.GetIdentifier(src, 'discord') == nil) then
  discordID = 'Discord was not detected'
else
  discordID = QBCore.Functions.GetIdentifier(src, 'discord')
end
TriggerEvent("qb-log:server:CreateLog", "joinleave", "Loaded", "green", "**".. GetPlayerName(src) .. "** ("..discordID .." |  ||"  ..QBCore.Functions.GetIdentifier(src, 'ip') ..  "|| | " ..QBCore.Functions.GetIdentifier(src, 'license') .." | " ..cData.citizenid.." | "..src..") loaded..")