From 48154495f80a0763cae48e26fdcf061b14f058d5 Mon Sep 17 00:00:00 2001 From: Selt <83926739+seltonmt012@users.noreply.github.com> Date: Mon, 27 Jul 2026 03:53:26 +0200 Subject: [PATCH] fix(esx_multicharacter/client): act on the local player in HideHud ESX.PlayerId does not exist - the shared object only defines ESX.playerId, and these were the only two places in the repo using the capitalised name. The nil is passed to the natives as player index 0, so neither call touched the local player. SetPlayerControl at line 266 already used the correct spelling, which is why controls were re-enabled after spawning but never disabled during character selection. Measured on artifact 25770, local player index 128: SetPlayerControl(ESX.PlayerId, false, 0) -> IsPlayerControlOn stays 1 SetPlayerControl(ESX.playerId, false, 0) -> IsPlayerControlOn becomes false HideHud also ignored its argument: hidePlayers was hardcoded to true and the volume override was set to 0.0 for both hiding and unhiding. Correcting only the name would have made the mute apply for the first time and never lift it, so the reset value and the argument have to be handled together. --- [core]/esx_multicharacter/client/modules/multicharacter.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/[core]/esx_multicharacter/client/modules/multicharacter.lua b/[core]/esx_multicharacter/client/modules/multicharacter.lua index 1c6014fc..2a83a969 100644 --- a/[core]/esx_multicharacter/client/modules/multicharacter.lua +++ b/[core]/esx_multicharacter/client/modules/multicharacter.lua @@ -59,9 +59,9 @@ local function HideComponents(hide) end function Multicharacter:HideHud(hide) - self.hidePlayers = true + self.hidePlayers = hide - MumbleSetVolumeOverride(ESX.PlayerId, 0.0) + MumbleSetVolumeOverride(ESX.playerId, hide and 0.0 or -1.0) HideComponents(hide) end @@ -77,7 +77,7 @@ function Multicharacter:SetupCharacters() SetEntityCoords(self.playerPed, self.spawnCoords.x, self.spawnCoords.y, self.spawnCoords.z, true, false, false, false) SetEntityHeading(self.playerPed, self.spawnCoords.w) - SetPlayerControl(ESX.PlayerId, false, 0) + SetPlayerControl(ESX.playerId, false, 0) self:SetupCamera() self:HideHud(true)