đConfigurables
Config Files
--[[
BY RX Scripts Š rxscripts.xyz
--]]
Config = {}
Config.Locale = 'en'
Config.ToggleCommand = 'togglezone' -- Command to use if toggling is enabled in the zone, usage: /togglezone "zoneName"
Config.UI = {
enabled = true, -- Enable/disable the UI
keepVisible = true, -- Keep the UI visible when not in a zone if exposure is higher than 0
-- position = {
-- top = 5,
-- left = 50,
-- },
}
Config.Blockers = {
items = {
['radiation_pills'] = {
type = 'radiation',
duration = 60, -- Duration in seconds
exposure = true, -- Block increase & decrease exposure
damage = false, -- Block damage if damage.fromExposure is reached
},
},
clothing = {
['Hazmat Suit'] = {
type = 'radiation',
pieces = { -- id: Clothing Number, component: https://wiki.rage.mp/index.php?title=Player::setComponentVariation)
{ id = 130, component = 1 }, -- Mask
{ id = 63, component = 3 }, -- Arms
{ id = 65, component = 11 }, -- Tops
{ id = 38, component = 4 }, -- Legs
{ id = 51, component = 6 }, -- Boots
},
exposure = false, -- Block increase & decrease exposure
damage = true, -- Block damage if damage.fromExposure is reached
debug = false, -- Debug all not equipped pieces in console
},
},
}
Config.Zones = {
['Radiation'] = {
type = 'radiation', -- Custom type used to check if blockers should block exposure/damage from this zone
screenEffect = 'ChopVision', -- false to disable (https://wiki.rage.mp/index.php?title=Screen_FX)
toggleCommand = false, -- Command to toggle the zone on/off (enabling this will disable the zone by default)
exposure = { -- Exposure increases when inside the zone and decreases when outside
interval = 1000, -- Interval in ms to increase/decrease the exposure
value = 75, -- Exposure value to increase/decrease each interval
max = 10000, -- Max exposure value
},
damage = {
onlyZone = false, -- Set to true if you dont want damage to be applied outside the zone when exposure is still higher than fromExposure
fromExposure = 1000, -- Exposure value to start applying damage (0 = directly apply damage)
interval = 1000, -- Interval in ms to apply the damage
value = 10, -- Damage value to apply each interval
},
sound = { -- Sound played when inside the zone (dependency: https://github.com/Xogy/xsound/releases/tag/1.4.3)
enabled = true,
url = 'https://www.youtube.com/watch?v=wZAS_bpisXE&ab_channel=AidanTechEngineering',
volume = 0.5,
},
zone = { -- Zone data (https://overextended.dev/ox_lib/Modules/Zones/Shared#libzonespoly)
type = 'poly',
thickness = 900, -- Height of the poly
debug = true,
points = {
vector3(4709.2993, -6036.4961, 0.0),
vector3(4801.9761, -6069.8564, 0.0),
vector3(4890.2905, -5977.5645, 0.0),
vector3(5025.3130, -5954.5127, 0.0),
vector3(5080.3936, -5824.6343, 0.0),
vector3(5416.1851, -5981.1597, 0.0),
vector3(5596.3711, -5931.3057, 0.0),
vector3(5701.7793, -5173.5186, 0.0),
vector3(5438.8032, -5031.0298, 0.0),
vector3(5025.1592, -5055.8086, 0.0),
vector3(4934.6196, -5097.3433, 0.0),
vector3(4762.6577, -5392.9795, 0.0),
vector3(4661.9570, -5565.6597, 0.0),
vector3(4657.5488, -5932.2510, 0.0),
}
},
},
}
--[[
INITIALIZATION SECTION
ONLY UNCOMMENT/CHANGE THIS IF YOU HAVE RENAMED SCRIPTS SUCH AS FRAMEWORK, TARGET, INVENTORY ETC
RENAME THE SCRIPT NAME TO THE NEW NAME
--]]
-- FM = 'fmLib'
-- SOUND = 'xsound'
IgnoreResourceNotFoundErrors = false
Opensource Files
--[[
BY RX Scripts Š rxscripts.xyz
--]]
function PlaySound(zoneName)
local s = Config.Zones[zoneName].sound
SOUND:PlayUrl(zoneName, s.url, s.volume, true)
end
function StopSound(zoneName)
SOUND:Destroy(zoneName)
end
Last updated