mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-29 09:18:53 +00:00
feat: Include esx_multicharacter
This commit is contained in:
+71
-78
@@ -2,23 +2,23 @@ ESX = exports['es_extended']:getSharedObject()
|
||||
if ESX.GetConfig().Multichar then
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
while NetworkIsPlayerActive(PlayerId()) and not ESX.IsPlayerLoaded() do
|
||||
Citizen.Wait(5)
|
||||
DoScreenFadeOut(0)
|
||||
while not GetResourceState('esx_menu_default') == 'started' do
|
||||
Citizen.Wait(0)
|
||||
while not ESX.PlayerLoaded do
|
||||
Citizen.Wait(0)
|
||||
if NetworkIsPlayerActive(PlayerId()) then
|
||||
exports.spawnmanager:setAutoSpawn(false)
|
||||
DoScreenFadeOut(0)
|
||||
while not GetResourceState('esx_menu_default') == 'started' do
|
||||
Citizen.Wait(0)
|
||||
end
|
||||
TriggerEvent("esx_multicharacter:SetupCharacters")
|
||||
break
|
||||
end
|
||||
Citizen.Wait(200)
|
||||
TriggerServerEvent("esx_multicharacter:SetupCharacters")
|
||||
TriggerEvent("esx_multicharacter:SetupCharacters")
|
||||
break
|
||||
end
|
||||
end)
|
||||
|
||||
local cam, cam2 = nil, nil
|
||||
|
||||
local canRelog, cam, Spawned = true
|
||||
local Characters = {}
|
||||
local canRelog = true
|
||||
local Spawned
|
||||
|
||||
RegisterNetEvent('esx_multicharacter:SetupCharacters')
|
||||
AddEventHandler('esx_multicharacter:SetupCharacters', function()
|
||||
@@ -32,18 +32,19 @@ if ESX.GetConfig().Multichar then
|
||||
SetCamActive(cam, true)
|
||||
RenderScriptCams(true, false, 1, true, true)
|
||||
ESX.UI.HUD.SetDisplay(0.0)
|
||||
DisplayHud(false)
|
||||
DisplayRadar(false)
|
||||
StartLoop()
|
||||
ShutdownLoadingScreen()
|
||||
ShutdownLoadingScreenNui()
|
||||
TriggerEvent('esx:loadingScreenOff')
|
||||
Citizen.Wait(200)
|
||||
TriggerServerEvent("esx_multicharacter:SetupCharacters")
|
||||
end)
|
||||
|
||||
StartLoop = function()
|
||||
hidePlayers = true
|
||||
MumbleSetVolumeOverride(PlayerId(), 0.0)
|
||||
Citizen.CreateThread(function()
|
||||
local keys = {18, 27, 172, 173, 176, 177, 187, 188, 191, 201}
|
||||
local keys = {18, 27, 172, 173, 176, 177, 187, 188, 191, 201, 108, 109}
|
||||
while hidePlayers do
|
||||
DisableAllControlActions(0)
|
||||
for i=1, #keys do
|
||||
@@ -52,39 +53,45 @@ if ESX.GetConfig().Multichar then
|
||||
SetEntityVisible(PlayerPedId(), 0, 0)
|
||||
SetLocalPlayerVisibleLocally(1)
|
||||
SetPlayerInvincible(PlayerId(), 1)
|
||||
ThefeedHideThisFrame()
|
||||
HideHudComponentThisFrame(11)
|
||||
HideHudComponentThisFrame(12)
|
||||
HideHudComponentThisFrame(21)
|
||||
Citizen.Wait(3)
|
||||
local vehicles = GetGamePool('CVehicle')
|
||||
for i=1, #vehicles do
|
||||
SetEntityLocallyInvisible(vehicles[i])
|
||||
end
|
||||
end
|
||||
local playerId, playerPed = PlayerId(), PlayerPedId()
|
||||
MumbleSetVolumeOverride(playerId, -1.0)
|
||||
SetEntityVisible(playerPed, 1, 0)
|
||||
SetPlayerInvincible(playerId, 0)
|
||||
FreezeEntityPosition(playerPed, false)
|
||||
Citizen.Wait(10000)
|
||||
canRelog = true
|
||||
end)
|
||||
Citizen.CreateThread(function()
|
||||
local players, vehicles
|
||||
local playerPool = {}
|
||||
while hidePlayers do
|
||||
players = GetActivePlayers()
|
||||
local players = GetActivePlayers()
|
||||
for i=1, #players do
|
||||
if players[i] ~= PlayerId() then NetworkConcealPlayer(players[i], true, true) end
|
||||
end
|
||||
vehicles = ESX.Game.GetVehicles()
|
||||
for i=1, #vehicles do
|
||||
NetworkConcealEntity(vehicles[i], true)
|
||||
local player = players[i]
|
||||
if player ~= PlayerId() and not playerPool[player] then
|
||||
playerPool[player] = true
|
||||
NetworkConcealPlayer(players[player], true, true)
|
||||
end
|
||||
end
|
||||
Citizen.Wait(500)
|
||||
end
|
||||
for i=1, #players do
|
||||
if players[i] ~= PlayerId() then NetworkConcealPlayer(players[i], false, false) end
|
||||
for i=1, #playerPool do
|
||||
NetworkConcealPlayer(playerPool[i], false, false)
|
||||
end
|
||||
for i=1, #vehicles do
|
||||
NetworkConcealEntity(vehicles[i], false)
|
||||
end
|
||||
SetEntityVisible(PlayerPedId(), 1, 0)
|
||||
SetPlayerInvincible(PlayerId(), 0)
|
||||
Citizen.Wait(10000)
|
||||
canRelog = true
|
||||
end)
|
||||
end
|
||||
|
||||
SetupCharacter = function(index)
|
||||
if Spawned == false then
|
||||
exports.spawnmanager:setAutoSpawn(false)
|
||||
exports.spawnmanager:forceRespawn()
|
||||
exports.spawnmanager:spawnPlayer({
|
||||
x = Config.Spawn.x,
|
||||
y = Config.Spawn.y,
|
||||
@@ -97,12 +104,17 @@ if ESX.GetConfig().Multichar then
|
||||
if Characters[index] then
|
||||
local skin = Characters[index].skin or Config.Default
|
||||
if not Characters[index].model then
|
||||
if Characters[index].sex == 'Female' then skin.sex = 1 else skin.sex = 0 end
|
||||
if Characters[index].sex == _('female') then skin.sex = 1 else skin.sex = 0 end
|
||||
end
|
||||
TriggerEvent('skinchanger:loadSkin', skin)
|
||||
end
|
||||
exports.spawnmanager:setAutoSpawn(false)
|
||||
end)
|
||||
DoScreenFadeIn(400)
|
||||
while IsScreenFadedOut() do Citizen.Wait(100) end
|
||||
SendNUIMessage({
|
||||
action = "openui",
|
||||
character = Characters[index]
|
||||
})
|
||||
elseif Characters[index] and Characters[index].skin then
|
||||
if Characters[Spawned] and Characters[Spawned].model then
|
||||
RequestModel(Characters[index].model)
|
||||
@@ -137,17 +149,17 @@ if ESX.GetConfig().Multichar then
|
||||
SendNUIMessage({
|
||||
action = "closeui"
|
||||
})
|
||||
exports.spawnmanager:forceRespawn()
|
||||
exports.spawnmanager:spawnPlayer({
|
||||
x = Config.Spawn.x,
|
||||
y = Config.Spawn.y,
|
||||
z = Config.Spawn.z,
|
||||
heading = Config.Spawn.w,
|
||||
model = `mp_m_freemode_01`,
|
||||
skipFade = false
|
||||
skipFade = true
|
||||
}, function()
|
||||
exports.spawnmanager:setAutoSpawn(false)
|
||||
canRelog = false
|
||||
DoScreenFadeIn(400)
|
||||
Citizen.Wait(400)
|
||||
local playerPed = PlayerPedId()
|
||||
SetPedAoBlobRendering(playerPed, false)
|
||||
SetEntityAlpha(playerPed, 0)
|
||||
@@ -155,8 +167,6 @@ if ESX.GetConfig().Multichar then
|
||||
TriggerEvent('esx_identity:showRegisterIdentity')
|
||||
end)
|
||||
else
|
||||
DoScreenFadeIn(400)
|
||||
while not IsScreenFadedIn() do Citizen.Wait(200) end
|
||||
for k,v in pairs(Characters) do
|
||||
if not v.model and v.skin then
|
||||
if v.skin.model then v.model = v.skin.model elseif v.skin.sex == 1 then v.model = `mp_f_freemode_01` else v.model = `mp_m_freemode_01` end
|
||||
@@ -184,12 +194,10 @@ if ESX.GetConfig().Multichar then
|
||||
}, function(data, menu)
|
||||
if data.current.action == 'play' then
|
||||
ESX.UI.Menu.CloseAll()
|
||||
DoScreenFadeOut(300)
|
||||
SendNUIMessage({
|
||||
action = "closeui"
|
||||
})
|
||||
TriggerServerEvent('esx_multicharacter:CharacterChosen', data.current.value, false)
|
||||
Citizen.Wait(300)
|
||||
else
|
||||
local elements2 = {}
|
||||
elements2[1] = {label = _('cancel')}
|
||||
@@ -248,25 +256,19 @@ if ESX.GetConfig().Multichar then
|
||||
|
||||
RegisterNetEvent('esx:playerLoaded')
|
||||
AddEventHandler('esx:playerLoaded', function(playerData, isNew, skin)
|
||||
DoScreenFadeOut(100)
|
||||
local spawn = playerData.coords
|
||||
DoScreenFadeOut(0)
|
||||
Citizen.Wait(300)
|
||||
local playerPed = PlayerPedId()
|
||||
cam2 = CreateCamWithParams("DEFAULT_SCRIPTED_CAMERA", spawn.x,spawn.y,spawn.z+200, 0.0, 0.0, 0.0, 100.00, false, 0)
|
||||
PointCamAtCoord(cam2, spawn.x,spawn.y,spawn.z+10)
|
||||
SetCamActiveWithInterp(cam2, cam, 400, true, true)
|
||||
|
||||
Citizen.Wait(700)
|
||||
DoScreenFadeIn(500)
|
||||
FreezeEntityPosition(playerPed, true)
|
||||
SetEntityVisible(playerPed, true, 0)
|
||||
SetEntityCoords(playerPed, spawn.x, spawn.y, spawn.z, true, false, false, false)
|
||||
SetEntityCoords(playerPed, spawn.x, spawn.y, spawn.z-1.3, true, false, false, false)
|
||||
SetEntityHeading(playerPed, spawn.heading)
|
||||
Citizen.Wait(300)
|
||||
SetCamActive(cam, false)
|
||||
RenderScriptCams(0, 0)
|
||||
DestroyAllCams(true)
|
||||
DoScreenFadeIn(400)
|
||||
Citizen.Wait(400)
|
||||
|
||||
cam = CreateCamWithParams("DEFAULT_SCRIPTED_CAMERA", spawn.x,spawn.y,spawn.z+10, 0.0, 0.0, 0.0, 100.00, false, 0)
|
||||
PointCamAtCoord(cam, spawn.x,spawn.y,spawn.z)
|
||||
SetCamActiveWithInterp(cam, cam2, 1700, true, true)
|
||||
|
||||
PlaySoundFrontend(-1, "Zoom_Out", "DLC_HEIST_PLANNING_BOARD_SOUNDS", 1)
|
||||
if isNew or not skin or #skin == 1 then
|
||||
local sex = skin.sex or 0
|
||||
if sex == 0 then model = `mp_m_freemode_01` else model = `mp_f_freemode_01` end
|
||||
@@ -280,42 +282,33 @@ if ESX.GetConfig().Multichar then
|
||||
skin = Config.Default
|
||||
skin.sex = sex
|
||||
TriggerEvent('skinchanger:loadSkin', skin, function()
|
||||
Citizen.CreateThread(function()
|
||||
playerped = PlayerPedId()
|
||||
SetPedAoBlobRendering(playerPed, true)
|
||||
ResetEntityAlpha(playerPed)
|
||||
Citizen.Wait(1500)
|
||||
TriggerEvent('esx_skin:openSaveableMenu')
|
||||
SetEntityHeading(playerPed, spawn.heading)
|
||||
playerPed = PlayerPedId()
|
||||
SetPedAoBlobRendering(playerPed, true)
|
||||
ResetEntityAlpha(playerPed)
|
||||
TriggerEvent('esx_skin:openSaveableMenu', function()
|
||||
finished = true end, function() finished = true
|
||||
end)
|
||||
SetEntityHeading(playerPed, spawn.heading)
|
||||
end)
|
||||
while not finished do Citizen.Wait(200) end
|
||||
else
|
||||
local playerPed = PlayerPedId()
|
||||
SetEntityHeading(playerPed, spawn.heading)
|
||||
TriggerEvent('skinchanger:loadSkin', skin or Characters[Spawned].skin)
|
||||
Citizen.Wait(1500)
|
||||
playerPed = PlayerPedId()
|
||||
SetEntityVisible(playerPed, true, 0)
|
||||
end
|
||||
Characters = {}
|
||||
TriggerServerEvent('esx:onPlayerSpawn')
|
||||
TriggerEvent('esx:onPlayerSpawn')
|
||||
TriggerEvent('playerSpawned')
|
||||
TriggerEvent('esx:restoreLoadout')
|
||||
playerPed = PlayerPedId()
|
||||
FreezeEntityPosition(playerPed, false)
|
||||
SetEntityHeading(PlayerPed, spawn.heading)
|
||||
Citizen.Wait(500)
|
||||
RenderScriptCams(false, true, 500, true, true)
|
||||
PlaySoundFrontend(-1, "CAR_BIKE_WHOOSH", "MP_LOBBY_SOUNDS", 1)
|
||||
SetCamActive(cam, false)
|
||||
DestroyAllCams(true)
|
||||
DisplayHud(true)
|
||||
DisplayRadar(true)
|
||||
hidePlayers = false
|
||||
Characters, hidePlayers = {}, false
|
||||
end)
|
||||
|
||||
RegisterNetEvent('esx:onPlayerLogout')
|
||||
AddEventHandler('esx:onPlayerLogout', function()
|
||||
DoScreenFadeOut(0)
|
||||
Spawned = false
|
||||
TriggerServerEvent("esx_multicharacter:SetupCharacters")
|
||||
TriggerEvent("esx_multicharacter:SetupCharacters")
|
||||
TriggerEvent('esx_skin:resetFirstSpawn')
|
||||
end)
|
||||
+8
-6
@@ -1,7 +1,7 @@
|
||||
fx_version 'adamant'
|
||||
game 'gta5'
|
||||
description 'https://github.com/thelindat/esx_multicharacter'
|
||||
version '1.1.1'
|
||||
version '1.2.1'
|
||||
|
||||
dependencies {
|
||||
'es_extended',
|
||||
@@ -10,18 +10,20 @@ dependencies {
|
||||
'esx_skin'
|
||||
}
|
||||
|
||||
shared_script 'config.lua'
|
||||
shared_scripts {
|
||||
'@es_extended/locale.lua',
|
||||
'locales/*.lua',
|
||||
'config.lua'
|
||||
}
|
||||
|
||||
server_scripts {
|
||||
'@es_extended/imports.lua',
|
||||
'@mysql-async/lib/MySQL.lua',
|
||||
'server/*.lua',
|
||||
'server/*.lua'
|
||||
}
|
||||
|
||||
client_scripts {
|
||||
'@es_extended/locale.lua',
|
||||
'client/main.lua',
|
||||
'locales/*.lua',
|
||||
'client/*.lua'
|
||||
}
|
||||
|
||||
ui_page {
|
||||
+2
@@ -1,4 +1,6 @@
|
||||
Locales['cs'] = {
|
||||
['male'] = "Muž",
|
||||
['female'] = "Žena",
|
||||
['delete_label'] = "Vymazat %s %s?",
|
||||
['select_char'] = "Zvolit Postavu",
|
||||
['create_char'] = "Vytvořit novou postavu",
|
||||
+2
@@ -1,4 +1,6 @@
|
||||
Locales['de'] = {
|
||||
['male'] = "Männlich",
|
||||
['female'] = "Weiblich",
|
||||
['delete_label'] = "Lösche %s %s?",
|
||||
['select_char'] = "Charakter auswählen",
|
||||
['create_char'] = "Neuen Charakter erstellen",
|
||||
+2
@@ -1,4 +1,6 @@
|
||||
Locales['en'] = {
|
||||
['male'] = "Male",
|
||||
['female'] = "Female",
|
||||
['delete_label'] = "Delete %s %s?",
|
||||
['select_char'] = "Select Character",
|
||||
['create_char'] = "Create new character",
|
||||
+2
@@ -1,4 +1,6 @@
|
||||
Locales['pt'] = {
|
||||
['male'] = "Masculino",
|
||||
['female'] = "Feminino",
|
||||
['delete_label'] = "Eliminar %s %s?",
|
||||
['select_char'] = "Selecionar personagem",
|
||||
['create_char'] = "Criar novo personagem",
|
||||
+2
@@ -1,4 +1,6 @@
|
||||
Locales['tr'] = {
|
||||
['male'] = "Erkek",
|
||||
['female'] = "Kadın",
|
||||
['delete_label'] = "Sil %s %s?",
|
||||
['select_char'] = "Karakter Seç",
|
||||
['create_char'] = "Yeni Karakter Oluştur",
|
||||
@@ -1,3 +1,6 @@
|
||||
<h3 align='center'>Although this resource is included, a more updated version <a href='https://github.com/thelindat/esx_multicharacter'>may be available</a>.</h3>
|
||||
|
||||
|
||||
### Requirements (ensure you are using the latest)
|
||||
- [ESX Legacy](https://github.com/esx-framework/es_extended/tree/legacy)
|
||||
- [MySQL Async 3.3.2](https://github.com/brouznouf/fivem-mysql-async/releases/tag/3.3.2)
|
||||
@@ -26,7 +29,7 @@
|
||||
- Download and run all requirements
|
||||
- Ensure none of the conflicting resources are enabled
|
||||
#### mysql-async duplicate entry
|
||||
- You have not increased the VARCHAR size of your tables (use the command)
|
||||
- You have not increased the VARCHAR size of the table holding identifiers - usually `owner` or `identifier`
|
||||
|
||||
#### The menu interface is esx_menu_default - you can use any version if you want a different appearance
|
||||

|
||||
+30
-42
@@ -1,30 +1,20 @@
|
||||
if not ESX then
|
||||
SetTimeout(3000, print('[^3WARNING^7] Unable to start Multicharacter - your version of ESX is not compatible '))
|
||||
elseif ESX.GetConfig().Multichar == true then
|
||||
local fetchCharacters = -1
|
||||
local IdentifierTables = {}
|
||||
|
||||
local IdentifierTables, Fetch = {}, -1
|
||||
|
||||
-- enter the name of your database here
|
||||
Config.Database = 'es_extended'
|
||||
|
||||
-- enter a prefix to prepend to all user identifiers (keep it short)
|
||||
Config.Prefix = 'char'
|
||||
|
||||
RegisterCommand('varchar', function(source)
|
||||
if source == 0 then
|
||||
if next(IdentifierTables) == nil then print(' Unable to update your tables - have you defined the correct database?') return end
|
||||
for _, itable in pairs(IdentifierTables) do
|
||||
print('Setting `'..itable.table..'` column `'..itable.column..'` to VARCHAR(60)')
|
||||
MySQL.Sync.execute("ALTER TABLE "..itable.table.." MODIFY COLUMN "..itable.column.." VARCHAR(60)", {})
|
||||
end
|
||||
Citizen.Wait(100)
|
||||
print(' Updated your tables to use the correct field length - you should remove this command')
|
||||
end
|
||||
end, true)
|
||||
|
||||
SetupCharacters = function(playerId)
|
||||
while fetchCharacters == -1 do Citizen.Wait(100) end
|
||||
local SetupCharacters = function(playerId)
|
||||
while Fetch == -1 do Citizen.Wait(500) end
|
||||
local identifier = Config.Prefix..'%:'..ESX.GetIdentifier(playerId)
|
||||
MySQL.Async.fetchAll(fetchCharacters, {'identifier', {identifier}
|
||||
MySQL.Async.fetchAll(Fetch, {
|
||||
identifier,
|
||||
Config.Slots
|
||||
}, function(result)
|
||||
local characters = {}
|
||||
for i=1, #result, 1 do
|
||||
@@ -46,41 +36,43 @@ elseif ESX.GetConfig().Multichar == true then
|
||||
dateofbirth = result[i].dateofbirth,
|
||||
skin = json.decode(result[i].skin)
|
||||
}
|
||||
if result[i].sex == 'm' then characters[id].sex = 'Male' else characters[id].sex = 'Female' end
|
||||
if result[i].sex == 'm' then characters[id].sex = _('male') else characters[id].sex = _('female') end
|
||||
end
|
||||
TriggerClientEvent('esx_multicharacter:SetupUI', playerId, characters)
|
||||
end)
|
||||
end
|
||||
|
||||
DeleteCharacter = function(playerId, charid)
|
||||
local DeleteCharacter = function(playerId, charid)
|
||||
local identifier = Config.Prefix..charid..':'..ESX.GetIdentifier(playerId)
|
||||
for _, itable in pairs(IdentifierTables) do
|
||||
MySQL.Async.execute("DELETE FROM "..itable.table.." WHERE "..itable.column.." = @identifier", {
|
||||
['@identifier'] = identifier
|
||||
for k, v in pairs(IdentifierTables) do
|
||||
MySQL.Async.execute("DELETE FROM "..v.table.." WHERE "..v.column.." = ?", {
|
||||
identifier
|
||||
})
|
||||
end
|
||||
print(('[^2INFO^7] Player [%s] %s has deleted a character (%s)'):format(GetPlayerName(playerId), playerId, identifier))
|
||||
end
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
MySQL.ready(function ()
|
||||
fetchCharacters = MySQL.Sync.store("SELECT `identifier`, `accounts`, `job`, `job_grade`, `firstname`, `lastname`, `dateofbirth`, `sex`, `skin` FROM `users` WHERE ?? LIKE ?")
|
||||
|
||||
MySQL.Async.fetchAll('SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME = @id AND TABLE_SCHEMA = @db', { ['@id'] = "owner", ["@db"] = Config.Database}, function(result)
|
||||
if result then
|
||||
for k, v in pairs(result) do
|
||||
IdentifierTables[#IdentifierTables+1] = {table = v.TABLE_NAME, column = 'owner'}
|
||||
end
|
||||
local result = MySQL.Sync.fetchAll('SELECT `TABLE_NAME`, `COLUMN_NAME`, `CHARACTER_MAXIMUM_LENGTH` FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = ? AND (COLUMN_NAME = ? OR COLUMN_NAME = ?) ', {
|
||||
Config.Database, 'identifier', 'owner'
|
||||
})
|
||||
if result then
|
||||
local varchar, varsize = {}, 0
|
||||
for k, v in pairs(result) do
|
||||
if v.CHARACTER_MAXIMUM_LENGTH < 60 then varchar[v.TABLE_NAME] = v.COLUMN_NAME varsize = varsize+1 end
|
||||
table.insert(IdentifierTables, {table = v.TABLE_NAME, column = v.COLUMN_NAME})
|
||||
end
|
||||
end)
|
||||
MySQL.Async.fetchAll('SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME = @id AND TABLE_SCHEMA = @db', { ['@id'] = "identifier", ["@db"] = Config.Database}, function(result)
|
||||
if result then
|
||||
for k, v in pairs(result) do
|
||||
IdentifierTables[#IdentifierTables+1] = {table = v.TABLE_NAME, column = 'identifier'}
|
||||
if next(varchar) then
|
||||
for k, v in pairs(varchar) do
|
||||
MySQL.Sync.execute("ALTER TABLE "..k.." MODIFY COLUMN "..v.." VARCHAR(60)")
|
||||
end
|
||||
print(('[^2INFO^7] Attempted to update ^5%s^7 columns to use VARCHAR(60)'):format(varsize))
|
||||
end
|
||||
end)
|
||||
end
|
||||
if not next(ESX.Jobs) then ESX.Jobs = GetJobs() end
|
||||
Fetch = MySQL.Sync.store("SELECT `identifier`, `accounts`, `job`, `job_grade`, `firstname`, `lastname`, `dateofbirth`, `sex`, `skin` FROM `users` WHERE identifier LIKE ? LIMIT ?")
|
||||
end)
|
||||
if not next(ESX.Jobs) then ESX.Jobs = GetJobs() end
|
||||
end)
|
||||
|
||||
RegisterServerEvent("esx_multicharacter:SetupCharacters")
|
||||
@@ -98,8 +90,6 @@ elseif ESX.GetConfig().Multichar == true then
|
||||
else
|
||||
TriggerEvent('esx:onPlayerJoined', src, Config.Prefix..charid)
|
||||
end
|
||||
else
|
||||
-- Trigger Ban Event here to ban individuals trying to use SQL Injections
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -118,8 +108,6 @@ elseif ESX.GetConfig().Multichar == true then
|
||||
if type(charid) == "number" and string.len(charid) <= 2 then
|
||||
DeleteCharacter(src, charid)
|
||||
SetupCharacters(src)
|
||||
else
|
||||
-- Trigger Ban Event here to ban individuals trying to use SQL Injections
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -133,6 +121,6 @@ elseif ESX.GetConfig().Multichar == true then
|
||||
TriggerEvent('esx:playerLogout', source)
|
||||
end, true)
|
||||
|
||||
elseif ESX.GetConfig().Multichar == false then
|
||||
else
|
||||
SetTimeout(3000, print('[^3WARNING^7] Multicharacter is disabled - please check your ESX configuration'))
|
||||
end
|
||||
Reference in New Issue
Block a user