diff --git a/server/functions.lua b/server/functions.lua index 44b688c..9ab5252 100644 --- a/server/functions.lua +++ b/server/functions.lua @@ -353,6 +353,7 @@ function NDCore.Functions.CreateCharacter(player, firstName, lastName, dob, gend local result = MySQL.query.await("SELECT character_id FROM characters WHERE license = ?", {license}) if result and config.characterLimit > #result then characterId = MySQL.insert.await("INSERT INTO characters (license, first_name, last_name, dob, gender, cash, bank) VALUES (?, ?, ?, ?, ?, ?, ?)", {license, firstName, lastName, dob, gender, cash, bank}) + if cb then cb(characterId) end TriggerClientEvent("ND:returnCharacters", player, NDCore.Functions.GetPlayerCharacters(player)) end return characterId