Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisNewmanDev authored Apr 28, 2024
1 parent f8d9180 commit e603cd4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ QBCore.Functions.CreateUseableItem("radio", function(source)
TriggerClientEvent('qb-radio:use', source)
end)

QBCore.Functions.CreateCallback('qb-radio:radiocheck', function(source, cb)
local Player = QBCore.Functions.GetPlayer(source)
if Player ~= nil then
if Player.Functions.GetItemByName("radio") ~= nil then
cb(true)
else
cb(false)
end
end
end)

for channel, config in pairs(Config.RestrictedChannels) do
exports['pma-voice']:addChannelCheck(channel, function(source)
local Player = QBCore.Functions.GetPlayer(source)
Expand Down

0 comments on commit e603cd4

Please sign in to comment.