-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclient.lua
37 lines (30 loc) · 1.07 KB
/
client.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
local isInVehicle = false
CreateThread(function()
while true do
local playerPed = PlayerPedId()
local vehicle = GetVehiclePedIsIn(playerPed, false)
if vehicle ~= 0 then
if not isInVehicle then
isInVehicle = true
if Config.DisableRadio then
SetUserRadioControlEnabled(false)
SetVehRadioStation(vehicle, "OFF")
else
SetUserRadioControlEnabled(true)
if Config.DefaultOff then
SetVehRadioStation(vehicle, "OFF")
elseif Config.ForcedStation and Config.ForcedStation ~= "" then
SetVehRadioStation(vehicle, Config.ForcedStation)
end
end
end
HideHudComponentThisFrame(16)
else
isInVehicle = false
if not Config.DisableRadio then
SetUserRadioControlEnabled(true)
end
end
Wait(500)
end
end)