Skip to content

Commit

Permalink
feat(es_extended/client/modules/adjustments): add adjustment DisableR…
Browse files Browse the repository at this point in the history
…adio
  • Loading branch information
bitpredator committed Nov 24, 2024
1 parent bed3ec6 commit 45166c9
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ function Adjustments:RemoveHudComponents()
for i = 1, #Config.RemoveHudComponents do
if Config.RemoveHudComponents[i] then
SetHudComponentSize(i, 0.0, 0.0)
SetHudComponentPosition(i, 900, 900)
end
end
end

function Adjustments:DisableAimAssist()
if Config.DisableAimAssist then
SetPlayerLockon(ESX.playerId, false)
SetPlayerTargetingMode(3)
end
end

Expand Down Expand Up @@ -215,6 +216,15 @@ function Adjustments:WantedLevel()
end
end

function Adjustments:DisableRadio()
if Config.RemoveHudComponents[16] then
AddEventHandler("esx:enteredVehicle", function(vehicle, plate, seat, displayName, netId)
SetVehRadioStation(vehicle,"OFF")
SetUserRadioControlEnabled(false)
end)
end
end

function Adjustments:Load()
self:RemoveHudComponents()
self:DisableAimAssist()
Expand All @@ -228,4 +238,5 @@ function Adjustments:Load()
self:LicensePlates()
self:DiscordPresence()
self:WantedLevel()
self:DisableRadio()
end

0 comments on commit 45166c9

Please sign in to comment.