improvement(server): Replace relog command to relog with event

This commit is contained in:
Linden
2021-05-22 17:45:04 +10:00
committed by GitHub
parent b1dade2c47
commit 651b445f6a
+5 -3
View File
@@ -90,8 +90,10 @@ if ESX.GetConfig().Multichar then
end
end)
RegisterCommand('relog', function(source, args, rawCommand)
TriggerEvent('esx:playerLogout', source)
end, false) -- Still experimental! Requires proper setup and modifications to other resources to properly support relogging
RegisterServerEvent("esx_multicharacter:relog")
AddEventHandler('esx_multicharacter:relog', function()
local src = source
TriggerEvent('esx:playerLogout', src)
end)
end