This commit is contained in:
lifestorm
2024-08-04 23:54:45 +03:00
parent 8064ba84d8
commit 6a58f406b1
7522 changed files with 4011896 additions and 15 deletions

View File

@@ -0,0 +1,55 @@
--[[
| This file was obtained through the combined efforts
| of Madbluntz & Plymouth Antiquarian Society.
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
| Maloy, DrPepper10 @ RIP, Atle!
|
| Visit for more: https://plymouth.thetwilightzone.ru/
--]]
local PLAYER = FindMetaTable("Player")
function PLAYER:GetQuickComms(number)
local character = self:GetCharacter()
if (!character) then return false end
local items = character:GetInventory():GetItems()
for k, v in pairs(items) do
if (!v.isRadio or !v.isIFF) then continue end
local channels = v:GetChannels()
if (table.IsEmpty(channels)) then continue end
if (channels[number]) then
return channels[number]
else
return false
end
end
return false
end
function PLAYER:HasQuickComms(channel)
local character = self:GetCharacter()
if (!character) then return false end
local items = character:GetInventory():GetItems()
for k, v in pairs(items) do
if (!v.isRadio or !v.isIFF) then continue end
local channels = v:GetChannels()
if (table.IsEmpty(channels)) then continue end
for k1, v1 in ipairs(channels) do
if (v1 == channel) then
return k1
end
end
return false
end
return false
end