Skip to content

Commit

Permalink
Merge pull request #1502 from Kenshiin13/remove-radio-hud
Browse files Browse the repository at this point in the history
feat(es_extended/client/modules/adjustments): add adjustment DisableRadio
  • Loading branch information
Kenshiin13 authored Dec 3, 2024
2 parents 50d736f + 359077c commit 612006b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions [core]/es_extended/client/modules/adjustments.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ 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
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 612006b

Please sign in to comment.