Configuration
Here are the available config files for the senor-airdrops script. Let me know if you need more stuff to be configured.
lib.locale()
Config = {}
Config.DropModel = `v_club_roc_mixer1`
Config.Defaults = { Distance = 300.0, LockTime = 10, Interaction = "Keystroke", Settings = { -- ['Firstperson'] = 'First-person Only', -- ['SemiDamage'] = 'Semi Damage', }, FallbackLocation = vector3(279.54, -1937.58, 25.21)}
Config.Customization = { Particle = { asset = 'core', effectName = "exp_grd_flare", alpha = 0.8, scale = 0.75, zOffset = 0.5, rotation = { x = 0.0, y = 0.0, z = 0.0 }, color = { r = 125.0, g = 40.0, b = 220.0 } }, Blip = { color = 2, sprite = 90, scale = 0.8, shortRange = true, name = locale('blip_name'), Sprites = { Regular = 90, Pistols = 156 } }, Radius = { color = 2, alpha = 100, name = locale('blip_name'), offset = 0.0 }}
Config.BlipColorChanges = { WarningTime = 240, WarningColor = 44, CriticalTime = 60, CriticalColor = 6}
Config.Commands = { Main = 'airdrops', Drops = 'createdrop', DropsHelp = locale('command_drops_help')}
Config.Interaction = { MaxDistance = 5.0, KeystrokeDistance = 3.0, KeystrokeControl = 49, KeystrokeKey = 'F'}
Config.Settings = { FirstPerson = { UpdateInterval = 300, ViewMode = 4 }, SemiDamage = { FullDamage = 1.0, HalfDamage = 0.5 }}
Config.VehicleLimiter = { Enabled = false, CheckInterval = 1000, WarningTime = 240, CriticalTime = 60, DamageAmount = 10, DisableEngineOnCritical = true}
Config.PrizeReduction = { Enabled = true, MinPlayers = 20, MinAmount = 2, Divisor = 3}Configuration Options:
DropModel- The prop model used for airdrops (keep the ticks “)Defaults- Default settings for new dropsDistance- Default distance radius in metersLockTime- Default lock time in minutes before players can interactInteraction- Default interaction type:"Keystroke"or"Interaction"Settings- Additional drop settings (uncomment to enable)FallbackLocation- Fallback coordinates if no locations are available
Customization- Visual customization optionsParticle- Particle effect configuration (flare effect)Blip- Map blip configuration (sprite, color, scale)Radius- Radius blip configuration (shows drop area)
BlipColorChanges- Blip color changes based on time remainingWarningTime- Time in seconds before warning colorWarningColor- Warning color IDCriticalTime- Time in seconds before critical colorCriticalColor- Critical color ID
Commands- Command configurationMain- Main command to open panel (/airdrops)Drops- Command to create drops (/createdrop)DropsHelp- Help text for command
Interaction- Interaction settingsMaxDistance- Maximum distance to interact with dropKeystrokeDistance- Distance for keystroke interactionKeystrokeControl- Control ID for keystroke (49 = F key)KeystrokeKey- Display name for the key
Settings- Additional feature settingsFirstPerson- First-person only view settingsSemiDamage- Semi-damage mode settings
VehicleLimiter- Prevents vehicles near drops (optional feature)Enabled- Enable vehicle limiterCheckInterval- How often to check for vehicles (milliseconds)WarningTime- Time before warningCriticalTime- Time before critical actionDamageAmount- Damage dealt to vehiclesDisableEngineOnCritical- Disable engine when critical
PrizeReduction- Reduces prizes when low player count (prevents farming)Enabled- Enable prize reductionMinPlayers- Minimum players online for full prizesMinAmount- Minimum item amount to skip reductionDivisor- Divide prize amounts by this when below MinPlayers
return { ---@alias Pickup 'Keystroke' | 'Interaction' uiLabels = { ['Keystroke'] = 'Keystroke (Press Key)', ['Interaction'] = 'Eye Target', }}Configuration Options:
uiLabels- UI labels for pickup interaction typesKeystroke- Press key to interactInteraction- Eye target interaction
return { ---@alias AirdropWeapons 'Regular' | 'Pistols' | 'Melee' uiLabels = { ['Melee'] = 'Melee Only', ['Pistols'] = 'Pistols Only', ['Regular'] = 'Regular (No Restrictions)', },
weaponHashes = { ['Regular'] = nil, ['Pistols'] = { [GetHashKey('WEAPON_PISTOL50')] = true, [GetHashKey('WEAPON_COMBAT_PISTOL')] = true, -- ... more pistol weapon hashes }, ['Melee'] = { [GetHashKey("WEAPON_KNIFE")] = true, [GetHashKey("WEAPON_KATANA")] = true, -- ... more melee weapon hashes } }}Configuration Options:
uiLabels- UI labels for weapon restriction typesRegular- No weapon restrictionsPistols- Only pistols allowedMelee- Only melee weapons allowed
weaponHashes- Weapon hash tables for each restriction type- Add weapon hashes to restrict what weapons players can use near the drop
return { ---@alias AirdropSettings 'Firstperson' | 'SemiDamage' uiLabels = { ['Firstperson'] = 'First-person Only', ['SemiDamage'] = 'Semi Damage', }}Configuration Options:
uiLabels- UI labels for drop settingsFirstperson- Force first-person view onlySemiDamage- Reduce damage to half
---@class Airdrop---@field id string---@field playerId number---@field coords vector3---@field distance number---@field lockTime number---@field interaction Pickup---@field weapons AirdropWeapons---@field settings AirdropSettings---@field prizes? Prize[]---@field dropState number---@field startTimer number---@field timeLeft number---@field startTime number
---@class Prize---@field id? number---@field name string---@field amount stringConfiguration Options:
- Type definitions for the script (used for type checking and autocomplete)
Airdrop- Main airdrop data structurePrize- Prize data structure- Additional type definitions for points, coordinates, and NUI retvals
Commands
Section titled “Commands”/airdrops- Open the airdrops panel (accessible to all players, admin views for admins)/createdrop [time] optional:[useCurrentCoords] optional:[distance] optional:[pistols]- Create a drop manually