mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-01 10:48:52 +00:00
Update multicharacter.lua
This commit is contained in:
@@ -70,7 +70,7 @@ function Multicharacter:CharacterChosen(source, charid, isNew)
|
||||
else
|
||||
SetPlayerRoutingBucket(source, 0)
|
||||
if not ESX.GetConfig().EnableDebug then
|
||||
local identifier = ("%s%s:%s"):format(Server.prefix, charid, Server:GetIdentifier(source))
|
||||
local identifier = ("%s%s:%s"):format(Server.prefix, charid, ESX.GetIdentifier(source))
|
||||
|
||||
if ESX.GetPlayerFromIdentifier(identifier) then
|
||||
DropPlayer(source, "[ESX Multicharacter] Your identifier " .. identifier .. " is already on the server!")
|
||||
@@ -80,7 +80,7 @@ function Multicharacter:CharacterChosen(source, charid, isNew)
|
||||
|
||||
local charIdentifier = ("%s%s"):format(Server.prefix, charid)
|
||||
TriggerEvent("esx:onPlayerJoined", source, charIdentifier)
|
||||
ESX.Players[Server:GetIdentifier(source)] = charIdentifier
|
||||
ESX.Players[ESX.GetIdentifier(source)] = charIdentifier
|
||||
end
|
||||
end
|
||||
|
||||
@@ -88,7 +88,7 @@ function Multicharacter:RegistrationComplete(source, data)
|
||||
local charId = self.awaitingRegistration[source]
|
||||
local charIdentifier = ("%s%s"):format(Server.prefix, charId)
|
||||
self.awaitingRegistration[source] = nil
|
||||
ESX.Players[Server:GetIdentifier(source)] = charIdentifier
|
||||
ESX.Players[ESX.GetIdentifier(source)] = charIdentifier
|
||||
|
||||
SetPlayerRoutingBucket(source, 0)
|
||||
TriggerEvent("esx:onPlayerJoined", source, charIdentifier, data)
|
||||
@@ -96,5 +96,5 @@ end
|
||||
|
||||
function Multicharacter:PlayerDropped(player)
|
||||
self.awaitingRegistration[player] = nil
|
||||
ESX.Players[Server:GetIdentifier(player)] = nil
|
||||
ESX.Players[ESX.GetIdentifier(player)] = nil
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user