feat: callback with creating character

This commit is contained in:
Andyyy7666
2022-12-13 17:28:45 +01:00
parent d3540a05f6
commit 44fab4f20f

View File

@@ -343,7 +343,7 @@ function NDCore.Functions.GetPlayerCharacters(player)
end end
-- Creates a new character for the player and returns all their characters to the client. -- Creates a new character for the player and returns all their characters to the client.
function NDCore.Functions.CreateCharacter(player, firstName, lastName, dob, gender, cash, bank) function NDCore.Functions.CreateCharacter(player, firstName, lastName, dob, gender, cash, bank, cb)
local characterId = false local characterId = false
local license = NDCore.Functions.GetPlayerIdentifierFromType("license", player) local license = NDCore.Functions.GetPlayerIdentifierFromType("license", player)
if not cash or not bank or tonumber(cash) > config.startingCash or tonumber(bank) > config.startingBank then if not cash or not bank or tonumber(cash) > config.startingCash or tonumber(bank) > config.startingBank then