-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathclient.lua
More file actions
25 lines (24 loc) · 919 Bytes
/
client.lua
File metadata and controls
25 lines (24 loc) · 919 Bytes
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
local function ScanRF()
local frequencies = lib.callback.await('rfscanner:Scan', false)
if table.type(frequencies) == 'empty' then lib.notify({type = 'inform', description = 'No channels found in area'}) return end
local options = {}
for k, v in pairs(frequencies) do
options[#options + 1] = {id = 'scanned_frequency_' .. k, icon = "fa-solid fa-rss", title = v.min ..' MHz ~ '..v.max .." MHz"}
end
lib.registerContext({id = 'rf_menu', title = 'Frequencies', options = options})
lib.showContext('rf_menu')
end
RegisterNetEvent("rfscanner:frequencyScan", function()
if lib.progressBar({
duration = Config.useTime,
label = 'Scanning frequencies',
useWhileDead = false,
canCancel = true,
disable = {
car = true,
},
anim = {
scenario = 'WORLD_HUMAN_STAND_MOBILE'
},
}) then ScanRF() end
end)