This commit is contained in:
Gellipapa
2023-09-04 20:48:48 +02:00
5 changed files with 16 additions and 17 deletions
+4
View File
@@ -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)
+1
View File
@@ -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
@@ -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))
+3 -6
View File
@@ -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
+7 -11
View File
@@ -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