2024-12-30 10:15:34 +00:00
|
|
|
local QBCoreF = exports['qb-core']:GetCoreObject()
|
|
|
|
|
2024-12-29 19:48:41 +00:00
|
|
|
QBCore = Config.CoreExport()
|
|
|
|
if Config.AdminCommand.Enabled then
|
|
|
|
QBCore.Commands.Add(Config.AdminCommand.Name, Config.AdminCommand.Help, { {
|
|
|
|
name = 'playerId', help = Config.AdminCommand.ArgHelp
|
|
|
|
} }, true, function(source, args)
|
|
|
|
if (args[1]) then
|
|
|
|
TriggerClientEvent('hp_charcreator:openCreator', args[1], nil, true)
|
|
|
|
end
|
|
|
|
end, Config.AdminCommand.Group)
|
|
|
|
end
|
|
|
|
|
|
|
|
QBCore.Functions.CreateCallback('hp_charcreator:getCurrentSkin', function(source, cb)
|
|
|
|
local Player = QBCore.Functions.GetPlayer(source)
|
|
|
|
local result = MySQL.query.await('SELECT * FROM playerskins WHERE citizenid = ? AND active = ?',
|
|
|
|
{ Player.PlayerData.citizenid, 1 })
|
|
|
|
if result[1] then
|
|
|
|
cb(result[1].skin)
|
|
|
|
end
|
|
|
|
end)
|
2024-12-30 10:15:34 +00:00
|
|
|
|
|
|
|
RegisterServerEvent("hp_multichar:playerConnected", function ()
|
|
|
|
local src = source
|
|
|
|
SetPlayerRoutingBucket(src, 0)
|
|
|
|
end)
|