diff --git a/[core]/es_extended/client/main.lua b/[core]/es_extended/client/main.lua index 01f18e53..3804cfc1 100644 --- a/[core]/es_extended/client/main.lua +++ b/[core]/es_extended/client/main.lua @@ -99,6 +99,10 @@ AddEventHandler('esx:playerLoaded', function(xPlayer, isNew, skin) if Config.DisableWeaponWheel or Config.DisableAimAssist or Config.DisableVehicleRewards then CreateThread(function() while true do + if Config.DisableDisplayAmmo then + DisplayAmmoThisFrame(false) + end + if Config.DisableWeaponWheel then BlockWeaponWheelThisFrame() DisableControlAction(0, 37, true) diff --git a/[core]/es_extended/config.lua b/[core]/es_extended/config.lua index d41ee683..574876b3 100644 --- a/[core]/es_extended/config.lua +++ b/[core]/es_extended/config.lua @@ -58,6 +58,7 @@ Config.DisableScenarios = false -- Disable Scenarios Config.DisableWeaponWheel = false -- Disables default weapon wheel Config.DisableAimAssist = false -- disables AIM assist (mainly on controllers) Config.DisableVehicleSeatShuff = false -- Disables vehicle seat shuff +Config.DisableDisplayAmmo = false -- Disable ammunition display Config.RemoveHudComponents = { [1] = false, --WANTED_STARS, [2] = false, --WEAPON_ICON diff --git a/[core]/es_extended/server/classes/player.lua b/[core]/es_extended/server/classes/player.lua index 307b5e95..49b600cf 100644 --- a/[core]/es_extended/server/classes/player.lua +++ b/[core]/es_extended/server/classes/player.lua @@ -20,6 +20,7 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory, self.weight = weight self.maxWeight = Config.MaxWeight self.metadata = metadata + self.admin = Core.IsPlayerAdmin(playerId) if Config.Multichar then self.license = 'license' .. identifier:sub(identifier:find(':'), identifier:len()) else self.license = 'license:' .. identifier end ExecuteCommand(('add_principal identifier.%s group.%s'):format(self.license, self.group)) diff --git a/[core]/es_extended/server/functions.lua b/[core]/es_extended/server/functions.lua index 5284362b..91586005 100644 --- a/[core]/es_extended/server/functions.lua +++ b/[core]/es_extended/server/functions.lua @@ -287,12 +287,9 @@ function ESX.GetIdentifier(playerId) if fxDk == 1 then return "ESX-DEBUG-LICENCE" end - for _, v in ipairs(GetPlayerIdentifiers(playerId)) do - if string.match(v, 'license:') then - local identifier = string.gsub(v, 'license:', '') - return identifier - end - end + + local identifier = GetPlayerIdentifierByType(playerId, 'license') + return identifier and identifier:gsub('license:', '') end ---@param model string|number diff --git a/[core]/esx_multicharacter/server/main.lua b/[core]/esx_multicharacter/server/main.lua index 15058c75..5e83f637 100644 --- a/[core]/esx_multicharacter/server/main.lua +++ b/[core]/esx_multicharacter/server/main.lua @@ -31,17 +31,13 @@ local PREFIX = Config.Prefix or 'char' local PRIMARY_IDENTIFIER = ESX.GetConfig().Identifier or GetConvar('sv_lan', '') == 'true' and 'ip' or "license" local function GetIdentifier(source) - local fxDk = GetConvarInt('sv_fxdkMode', 0) - if fxDk == 1 then - return "ESX-DEBUG-LICENCE" - end - local identifier = PRIMARY_IDENTIFIER..':' - for _, v in pairs(GetPlayerIdentifiers(source)) do - if string.match(v, identifier) then - identifier = string.gsub(v, identifier, '') - return identifier - end - end + local fxDk = GetConvarInt('sv_fxdkMode', 0) + if fxDk == 1 then + return "ESX-DEBUG-LICENCE" + end + + local identifier = GetPlayerIdentifierByType(source, PRIMARY_IDENTIFIER) + return identifier and identifier:gsub(PRIMARY_IDENTIFIER .. ':', '') end if next(ESX.Players) then