diff --git a/resources/[Developer]/[Nordi]/k4mb1-drills.pack.zip b/resources/[Developer]/[Nordi]/k4mb1-drills.pack.zip new file mode 100644 index 000000000..bec93dd00 Binary files /dev/null and b/resources/[Developer]/[Nordi]/k4mb1-drills.pack.zip differ diff --git a/resources/[Developer]/[Nordi]/k4mb1-van.pack.zip b/resources/[Developer]/[Nordi]/k4mb1-van.pack.zip new file mode 100644 index 000000000..7b56ae438 Binary files /dev/null and b/resources/[Developer]/[Nordi]/k4mb1-van.pack.zip differ diff --git a/resources/[Developer]/[Nordi]/sd-creator-main.zip b/resources/[Developer]/[Nordi]/sd-creator-main.zip new file mode 100644 index 000000000..5324dafd7 Binary files /dev/null and b/resources/[Developer]/[Nordi]/sd-creator-main.zip differ diff --git a/resources/[housing]/brutal_housing/config.lua b/resources/[housing]/brutal_housing/config.lua index 843faafcb..eaab6bdfa 100644 --- a/resources/[housing]/brutal_housing/config.lua +++ b/resources/[housing]/brutal_housing/config.lua @@ -10,13 +10,13 @@ More informations about the script: https://docs.brutalscripts.com --]] Config = { - Core = 'ESX', -- 'ESX' / 'QBCORE' | Other core setting on the 'core' folder. - VoiceSytem = 'pma-voice', -- "pma-voice" / "mumble" / "SaltyChat" - Inventory = 'ox_inventory', -- 'ox_inventory' / 'qb_inventory_old'/ 'qb_inventory_new' / 'quasar_inventory' / 'chezza_inventory' / 'codem_inventory' / 'core_inventory' // Custom can be add in the cl_utils.lua!!! + Core = 'QBCORE', -- 'ESX' / 'QBCORE' | Other core setting on the 'core' folder. + VoiceSytem = 'yaca-voice', -- "pma-voice" / "mumble" / "SaltyChat" + Inventory = 'qb_inventory_new', -- 'ox_inventory' / 'qb_inventory_old'/ 'qb_inventory_new' / 'quasar_inventory' / 'chezza_inventory' / 'codem_inventory' / 'core_inventory' // Custom can be add in the cl_utils.lua!!! Wardrobe = 'default', -- 'default' / 'ak47_clothing' / 'codem_apperance' / 'fivem_appearance' / 'illenium_appearance' / 'qb_clothing' / 'raid_clothes' / 'rcore_clothes' / 'rcore_clothing' / 'sleek_clothestore' / 'tgiann_clothing' // Custom can be add in the cl_utils.lua!!! - TextUI = 'brutal_textui', -- false / 'brutal_textui' / 'ox_lib' / 'okokTextUI' / 'ESXTextUI' / 'QBDrawText' // Custom can be add in the cl_utils.lua!!! - BrutalKeys = true, -- Buy here: https://store.brutalscripts.com - BrutalPoliceJob = true, -- Buy here: https://store.brutalscripts.com | Better connection + TextUI = 'ox_lib', -- false / 'brutal_textui' / 'ox_lib' / 'okokTextUI' / 'ESXTextUI' / 'QBDrawText' // Custom can be add in the cl_utils.lua!!! + BrutalKeys = false, -- Buy here: https://store.brutalscripts.com + BrutalPoliceJob = false, -- Buy here: https://store.brutalscripts.com | Better connection BrutalNotify = true, -- Buy here: (4€+VAT) https://store.brutalscripts.com | Or set up your own notify >> cl_utils.lua SteamName = false, -- true = Steam name | false = character name @@ -46,7 +46,7 @@ Config = { ownedHouse = {label = "House", size = 0.7, sprite = 40, color = 1}, ownedGarage = {label = "Garage", size = 0.7, sprite = 357, color = 1}, police = true, - burglarAlarm = {label = "Burglar alarm", size = 1.0, sprite = 161, color = 1}, + burglarAlarm = {label = "Einbruch Alarm", size = 1.0, sprite = 161, color = 1}, }, MaxProperties = 12, -- Maximum number of properties a player can own @@ -57,7 +57,7 @@ Config = { StashLimit = 3, -- Maximum stash per property. InstantSalePurchasePrice = 0.9, -- 100 000$ * 0.9 = 90 000$ | The player can immediately sell his property for this much compared to the base price. DelayedSalePurchasePrice = 1.2, -- 100 000$ * 1.2 = 120 000$ | This is the maximum price a player can sell the house he has bought. - DeleteInactiveProperty = {use = true, days = 45}, -- -- If use is true, the property will be deleted if the player does not use it for X days. | Only the owned ones. + DeleteInactiveProperty = {use = false, days = 45}, -- -- If use is true, the property will be deleted if the player does not use it for X days. | Only the owned ones. CopJobs = {"police", "sheriff"}, -- Cop jobs GarageUpgrade = { Repair = {use = true, time = 48, price = 25000}, -- The car stored in the garage will be repaired after 48hours. @@ -212,7 +212,7 @@ Config = { -----------------------| TRANSLATE |----------------------- ----------------------------------------------------------- - NUILanguage = "en", -- "en", "es", "fr", "de", "pt", "it", "pl", "nl", "ru", "tr", "hu", "ro", "cs", "sv", "ar" + NUILanguage = "de", -- "en", "es", "fr", "de", "pt", "it", "pl", "nl", "ru", "tr", "hu", "ro", "cs", "sv", "ar" MoneyForm = '$', -- Money form diff --git a/resources/[inventory]/tgiann-inventory/configs/configWeapon.lua b/resources/[inventory]/tgiann-inventory/configs/configWeapon.lua index 39b5cad7c..b205c5cc8 100644 --- a/resources/[inventory]/tgiann-inventory/configs/configWeapon.lua +++ b/resources/[inventory]/tgiann-inventory/configs/configWeapon.lua @@ -9,7 +9,8 @@ config.throwableWeapons = { weapon_pipebomb = true, weapon_ball = true, weapon_smokegrenade = true, - weapon_acidpackage = true + weapon_acidpackage = true, + weapon_throwingshoered = true } config.removeWeaponWhenEnteringVehicle = false -- Remove the weapon when entering the vehicle diff --git a/resources/[jobs]/[police]/gs_advancedtrunk/.fxap b/resources/[jobs]/[police]/gs_advancedtrunk/.fxap deleted file mode 100644 index 5f7259e9d..000000000 Binary files a/resources/[jobs]/[police]/gs_advancedtrunk/.fxap and /dev/null differ diff --git a/resources/[jobs]/[police]/gs_advancedtrunk/bridge/cl_bridge.lua b/resources/[jobs]/[police]/gs_advancedtrunk/bridge/cl_bridge.lua deleted file mode 100644 index 4d83e2c40..000000000 --- a/resources/[jobs]/[police]/gs_advancedtrunk/bridge/cl_bridge.lua +++ /dev/null @@ -1,353 +0,0 @@ -local ESX = nil -local QBCore = nil -local PlayerData = nil -if GetResourceState('es_extended') == 'started' then - ESX = exports['es_extended']:getSharedObject() - PlayerData = ESX.GetPlayerData() - - RegisterNetEvent('esx:playerLoaded', function(xPlayer) - PlayerData = xPlayer - end) - - RegisterNetEvent('esx:setJob', function(job) - PlayerData.job = job - end) -elseif GetResourceState('qb-core') == 'started' then - QBCore = exports['qb-core']:GetCoreObject() - PlayerData = QBCore.Functions.GetPlayerData() - - RegisterNetEvent('QBCore:Client:OnPlayerLoaded', function() - PlayerData = QBCore.Functions.GetPlayerData() - end) - - RegisterNetEvent('QBCore:Client:OnJobUpdate', function(job) - PlayerData.job = job - end) -end - -Functions = {} - --- This function should return the player's job, adjust to your framework if required -Functions.GetPlayerJob = function() - if (GetResourceState('es_extended') == 'started' and PlayerData) then - return PlayerData.job.name - elseif (GetResourceState('qb-core') == 'started' and PlayerData) then - return PlayerData.job.name - end - - return 'unemployed' -end - --- A general notification, you can use your own notification system here as well -Functions.Notify = function(message) - if (message == nil or message == '') then return end - BeginTextCommandThefeedPost('STRING') - AddTextComponentSubstringPlayerName(message) - EndTextCommandThefeedPostTicker(false, true) -end - --- This function should return wether the player is dead or not, adjust to your death-system -Functions.IsPlayerDead = function() - -- If wasabi_ambulance is used, this will handle the death check - if GetResourceState('wasabi_ambulance') == 'started' then - return exports.wasabi_ambulance:isPlayerDead() - end - - local ped = PlayerPedId() - if (IsPedDeadOrDying(ped, true)) then - return true - end - - return false -end - --- This function should return if the player can interact with third-eye or not, adjust to your needs -Functions.CanInteract = function() - local ped = PlayerPedId() - local isPedInVehicle = IsPedInAnyVehicle(ped, false) - local isPedDead = Functions.IsPlayerDead() - - if (isPedInVehicle or isPedDead) then - return false - end - - return true -end - --- This function should return if the vehicle can be interacted with or not, adjust to your needs -Functions.CanInteractWithVehicle = function(entity) - -- Check if the trunk of the vehicle is open - if GetVehicleDoorAngleRatio(entity, 5) > 0 then - return true - end - return false -end - --- This function adds the required target-option to vehicles, ox-target and qb-target are supported by default but you can add your own target-option if you want to use another target-system -Functions.AddGlobalTargetOptions = function() - -- For the people ussing ox-target - if (GetResourceState('ox_target') == 'started') then - exports.ox_target:addGlobalVehicle({ - { - icon = 'fas fa-expand', - label = Config.Target.Trunk.Label, - distance = Config.Target.Trunk.InteractDistance, - groups = Config.Target.Trunk.GlobalJobRequirement.Enabled and Config.Target.Trunk.GlobalJobRequirement.Names or nil, - bones = { 'boot' }, - onSelect = function(data) - ViewVehicleTrunk(data.entity) - end, - canInteract = function(entity) - return (Functions.CanInteract() and Functions.CanInteractWithVehicle(entity) and Entity(entity).state.TrunkPropsFromState ~= nil and not isCarryingProp) - end - }, - }) - return - end - - -- For the people using qb-target - if (GetResourceState('qb-target') == 'started') then - exports['qb-target']:AddTargetBone('boot', { - options = { - { - icon = 'fas fa-expand', - label = Config.Target.Trunk.Label, - job = Config.Target.Trunk.GlobalJobRequirement.Enabled and Config.Target.Trunk.GlobalJobRequirement.Names or nil, - action = function(entity) - ViewVehicleTrunk(entity) - end, - canInteract = function(entity) - return (Functions.CanInteract() and Functions.CanInteractWithVehicle(entity) and Entity(entity).state.TrunkPropsFromState ~= nil and not isCarryingProp) - end, - }, - }, - distance = Config.Target.Trunk.InteractDistance, - }) - return - end - - print('gs_advancedtrunk: [ERROR] No target interaction defined') -end - ---- ---- All Trunk related bridge functions are defined next ---- - --- Add any additional code here that you want to run when the trunk is opened -Functions.OnTrunkOpen = function(vehicle) - -- Removes the radar from the player UI - DisplayRadar(false) - - -- Disable targeting when the trunk is open - if (GetResourceState('ox_target') == 'started') then - exports.ox_target:disableTargeting(true) - elseif (GetResourceState('qb-target') == 'started') then - exports['qb-target']:AllowTargeting(false) - end - - -- Some help-text is displayed with this export if ox_lib is used - if (GetResourceState('ox_lib') == 'started' and Config.UseKeyboardForSelection) then - exports.ox_lib:showTextUI('[A/D] Move selection - [ENTER] Confirm - [BACKSPACE] Cancel', { - position = "bottom-center", - icon = 'fas fa-up-down-left-right', - style = { - color = 'white' - } - }) - end -end - --- Add any additional code here that you want to run when the trunk is closed -Functions.OnTrunkClose = function(vehicle) - -- Adds back the radar from the player UI - DisplayRadar(true) - - -- Enable targeting when the trunk is closed - if (GetResourceState('ox_target') == 'started') then - exports.ox_target:disableTargeting(false) - elseif (GetResourceState('qb-target') == 'started') then - exports['qb-target']:AllowTargeting(true) - end - - -- Hides the help-text if ox_lib is used - if (GetResourceState('ox_lib') == 'started' and Config.UseKeyboardForSelection) then - exports.ox_lib:hideTextUI() - end -end - --- This code runs every frame when the trunk is open, adjust to your needs -Functions.OnTrunkTick = function(vehicle) - -- Disable controls to prevent the player from moving - DisableControlAction(0, 22, true) -- SPACE (Jump) - DisableControlAction(0, 23, true) -- F (Enter vehicle) - DisableControlAction(0, 24, true) -- LMB (Attack) - DisableControlAction(0, 30, true) -- D (INPUT_MOVE_LR) - DisableControlAction(0, 31, true) -- S (INPUT_MOVE_UD) - DisableControlAction(0, 36, true) -- L-CTRL (Duck) - DisableControlAction(0, 44, true) -- Q (Cover) - DisableControlAction(0, 140, true) -- R (INPUT_MELEE_ATTACK_LIGHT) -end - --- This function should return if the trunk should close or not (for instance if the player dies), adjust to your needs -Functions.ShouldTrunkClose = function(vehicle) - -- Check if the trunk is closed - if GetVehicleDoorAngleRatio(vehicle, 5) == 0 then - return true - end - - -- Check if the player is dead - local isPedDead = Functions.IsPlayerDead() - if isPedDead then return true end - - -- Check if the vehicle is to far away from the player - local ped = PlayerPedId() - local pedCoords = GetEntityCoords(ped) - local vehicleCoords = GetEntityCoords(vehicle) - local distance = #(pedCoords - vehicleCoords) - if (distance > Config.Target.Trunk.InteractDistance + 3.0) then - return true - end - - return false -end - ---- ---- All Prop walking related bridge functions are defined next ---- - --- This function is triggered right before someone starts walking with a prop -Functions.OnWalkWithProp = function(prop, canPlaceProp) - -- Some help-text is displayed with this export if ox_lib is used - if (GetResourceState('ox_lib') == 'started') then - local text = canPlaceProp and '[ENTER] Place - [BACKSPACE] Cancel' or '[BACKSPACE] Cancel' - exports.ox_lib:showTextUI(text, { - position = "bottom-center", - icon = 'fas fa-up-down-left-right', - style = { - color = 'white' - } - }) - end -end - --- This function is triggered right after someone stops walking with a prop -Functions.OnStopWalkWithProp = function(prop) - -- Hides the help-text if ox_lib is used - if (GetResourceState('ox_lib') == 'started') then - exports.ox_lib:hideTextUI() - end -end - --- This code runs every frame when the player is walking with a prop, adjust to your needs -Functions.OnWalkWithPropTick = function(prop) - -- Disable certain controls - DisableControlAction(0, 22, true) -- SPACE (Jump) - DisableControlAction(0, 23, true) -- F (Enter vehicle) - DisableControlAction(0, 24, true) -- LMB (Attack) - DisableControlAction(0, 36, true) -- L-CTRL (Duck) - DisableControlAction(0, 44, true) -- Q (Cover) - DisableControlAction(0, 140, true) -- R (INPUT_MELEE_ATTACK_LIGHT) -end - --- This function adds the required target-option to remove a placed object, ox-target and qb-target are supported by default but you can add your own target-option if you want to use another target-system -Functions.AddObjectTargets = function(prop, propName) - -- For the people ussing ox-target - if (GetResourceState('ox_target') == 'started') then - local options = { - { - icon = 'fas fa-trash-can', - label = Config.Target.Object.LabelRemove, - distance = Config.Target.Object.InteractDistance, - groups = RequiredJobsToPickupOrRemove or nil, - onSelect = function(data) - PlayAnimation(Config.WalkWithProp[propName].PickupAnimDict, Config.WalkWithProp[propName].PickupAnimName, Config.WalkWithProp[propName].PickupAnimFlag, Config.WalkWithProp[propName].PickupAnimTime) - while IsEntityPlayingAnim(PlayerPedId(), Config.WalkWithProp[propName].PickupAnimDict, Config.WalkWithProp[propName].PickupAnimName, 3) do - Wait(0) - end - if (not DoesEntityExist(data.entity)) then return end - local propNetId = NetworkGetNetworkIdFromEntity(data.entity) - TriggerServerEvent('gs_advancedtrunk:RemoveProp', propNetId) - end, - canInteract = function(entity) - return (Functions.CanInteract() and not isCarryingProp) - end - }, - } - - if Config.WalkWithProp[propName].CanPickUp then - table.insert(options, { - icon = 'fas fa-hand-spock', - label = Config.Target.Object.LabelPickup, - distance = Config.Target.Object.InteractDistance, - groups = RequiredJobsToPickupOrRemove or nil, - onSelect = function(data) - PlayAnimation(Config.WalkWithProp[propName].PickupAnimDict, Config.WalkWithProp[propName].PickupAnimName, Config.WalkWithProp[propName].PickupAnimFlag, Config.WalkWithProp[propName].PickupAnimTime) - while IsEntityPlayingAnim(PlayerPedId(), Config.WalkWithProp[propName].PickupAnimDict, Config.WalkWithProp[propName].PickupAnimName, 3) do - Wait(0) - end - if (not DoesEntityExist(data.entity)) then return end - local propNetId = NetworkGetNetworkIdFromEntity(data.entity) - TriggerServerEvent('gs_advancedtrunk:RemoveProp', propNetId) - Actions.WalkWithProp(propName) - end, - canInteract = function(entity) - return (Functions.CanInteract() and not isCarryingProp) - end - }) - end - - exports.ox_target:addLocalEntity(prop, options) - return - end - - -- For the people using qb-target - if (GetResourceState('qb-target') == 'started') then - local options = { - { - icon = 'fas fa-trash-can', - label = Config.Target.Object.LabelRemove, - job = RequiredJobsToPickupOrRemove or nil, - action = function(entity) - PlayAnimation(Config.WalkWithProp[propName].PickupAnimDict, Config.WalkWithProp[propName].PickupAnimName, Config.WalkWithProp[propName].PickupAnimFlag, Config.WalkWithProp[propName].PickupAnimTime) - while IsEntityPlayingAnim(PlayerPedId(), Config.WalkWithProp[propName].PickupAnimDict, Config.WalkWithProp[propName].PickupAnimName, 3) do - Wait(0) - end - if (not DoesEntityExist(entity)) then return end - local propNetId = NetworkGetNetworkIdFromEntity(entity) - TriggerServerEvent('gs_advancedtrunk:RemoveProp', propNetId) - end, - canInteract = function(entity) - return (Functions.CanInteract() and not isCarryingProp) - end, - }, - } - if Config.WalkWithProp[propName].CanPickUp then - table.insert(options, { - icon = 'fas fa-hand-spock', - label = Config.Target.Object.LabelPickup, - job = RequiredJobsToPickupOrRemove or nil, - action = function(entity) - PlayAnimation(Config.WalkWithProp[propName].PickupAnimDict, Config.WalkWithProp[propName].PickupAnimName, Config.WalkWithProp[propName].PickupAnimFlag, Config.WalkWithProp[propName].PickupAnimTime) - while IsEntityPlayingAnim(PlayerPedId(), Config.WalkWithProp[propName].PickupAnimDict, Config.WalkWithProp[propName].PickupAnimName, 3) do - Wait(0) - end - if (not DoesEntityExist(entity)) then return end - local propNetId = NetworkGetNetworkIdFromEntity(entity) - TriggerServerEvent('gs_advancedtrunk:RemoveProp', propNetId) - Actions.WalkWithProp(propName) - end, - canInteract = function(entity) - return (Functions.CanInteract() and not isCarryingProp) - end, - }) - end - - exports['qb-target']:AddTargetEntity(prop, { - options = options, - distance = Config.Target.Object.InteractDistance, - }) - return - end - - print('gs_advancedtrunk: [ERROR] No target interaction defined') -end diff --git a/resources/[jobs]/[police]/gs_advancedtrunk/bridge/sv_bridge.lua b/resources/[jobs]/[police]/gs_advancedtrunk/bridge/sv_bridge.lua deleted file mode 100644 index afdefd1fd..000000000 --- a/resources/[jobs]/[police]/gs_advancedtrunk/bridge/sv_bridge.lua +++ /dev/null @@ -1,41 +0,0 @@ -ESX = nil -QBCore = nil - -if (GetResourceState('es_extended') == 'started') then - ESX = exports['es_extended']:getSharedObject() -elseif (GetResourceState('qb-core') == 'started') then - QBCore = exports['qb-core']:GetCoreObject() -end - -Functions = {} - --- This function give the player a specific item -Functions.GiveItem = function(source, itemName, amount) - -- This is an anticheat measure, check sv_config.lua for more information - if SVConfig.EnableItemCheck then - local isAllowed = SVConfig.AllowedItems[itemName] - if not isAllowed then - -- You can replace this with an anti-cheat message of your own, or even an auto-ban - print("gs_advancedtrunk: " .. source .. " tried to spawn a disallowed item: " .. itemName .. " x" .. amount) - return - end - end - - -- Case for ESX - if (ESX ~= nil) then - local xPlayer = ESX.GetPlayerFromId(source) - xPlayer.addInventoryItem(itemName, amount) - - -- Case for QBCore - elseif (QBCore ~= nil) then - local Player = QBCore.Functions.GetPlayer(source) - Player.Functions.AddItem(itemName, amount) - else - print("gs_advancedtrunk: No framework defined, unable to give item.") - end -end - --- The exports below can be triggered from the SERVER which will add or remove the trunk props for a vehicle. Normally, the trunk props should automatically be added or removed when the vehicle is created or deleted with the player as the driver. --- But in some cases, you might want to add or remove the trunk props manually. For example, if you are using a vehicle spawn script that doesn't trigger the entityCreated or entityRemoved events or if you spawn a vehicle without teleporting the player to the driver seat. -exports('AddTrunkProps', AddTrunkProps) -- Call through exports.gs_advancedtrunk:AddTrunkProps(entity) -exports('RemoveTrunkProps', RemoveTrunkProps) -- Call through exports.gs_advancedtrunk:RemoveTrunkProps(entity) diff --git a/resources/[jobs]/[police]/gs_advancedtrunk/client/cl_actions.lua b/resources/[jobs]/[police]/gs_advancedtrunk/client/cl_actions.lua deleted file mode 100644 index 778579c87..000000000 Binary files a/resources/[jobs]/[police]/gs_advancedtrunk/client/cl_actions.lua and /dev/null differ diff --git a/resources/[jobs]/[police]/gs_advancedtrunk/client/cl_debug.lua b/resources/[jobs]/[police]/gs_advancedtrunk/client/cl_debug.lua deleted file mode 100644 index 6e699fc9c..000000000 Binary files a/resources/[jobs]/[police]/gs_advancedtrunk/client/cl_debug.lua and /dev/null differ diff --git a/resources/[jobs]/[police]/gs_advancedtrunk/client/cl_main.lua b/resources/[jobs]/[police]/gs_advancedtrunk/client/cl_main.lua deleted file mode 100644 index e3cfeea89..000000000 Binary files a/resources/[jobs]/[police]/gs_advancedtrunk/client/cl_main.lua and /dev/null differ diff --git a/resources/[jobs]/[police]/gs_advancedtrunk/clipboard/copy.js b/resources/[jobs]/[police]/gs_advancedtrunk/clipboard/copy.js deleted file mode 100644 index 06b9bf41d..000000000 --- a/resources/[jobs]/[police]/gs_advancedtrunk/clipboard/copy.js +++ /dev/null @@ -1,14 +0,0 @@ -const CopyToClipboard = (value) => { - const clipboardElement = document.createElement('input'); - clipboardElement.value = value; - document.body.appendChild(clipboardElement); - clipboardElement.select(); - document.execCommand('copy'); - document.body.removeChild(clipboardElement); -}; - -window.addEventListener('message', (event) => { - if (event.data.type === 'copy') { - CopyToClipboard(event.data.data); - } -}); diff --git a/resources/[jobs]/[police]/gs_advancedtrunk/clipboard/index.html b/resources/[jobs]/[police]/gs_advancedtrunk/clipboard/index.html deleted file mode 100644 index db62252b3..000000000 --- a/resources/[jobs]/[police]/gs_advancedtrunk/clipboard/index.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/resources/[jobs]/[police]/gs_advancedtrunk/config.lua b/resources/[jobs]/[police]/gs_advancedtrunk/config.lua deleted file mode 100644 index 131f9f636..000000000 --- a/resources/[jobs]/[police]/gs_advancedtrunk/config.lua +++ /dev/null @@ -1,566 +0,0 @@ -Config = {} - --- Adjust any target-related options for the trunk/props -Config.Target = { - Trunk = { - InteractDistance = 3.0, -- The distance at which the trunk can be interacted with - Label = 'View trunk', -- The label shown using the third-eye system - GlobalJobRequirement = { -- If you want to restrict the trunk actions to a certain job, you can define them here. - Enabled = false, -- If you want to disable the global job requirement, set this to false - Names = { 'police', 'ambulance' }, - } - }, - Object = { - InteractDistance = 1.5, -- The distance at which placed objects can be interacted with - LabelRemove = 'Remove object', -- The label shown using the third-eye system when removing the object - LabelPickup = 'Pickup object', -- The label shown using the third-eye system when picking up the object - } -} - -Config.UseMouseForSelection = true -- If true, you can also use the mouse to select the prop in the trunk. If false, be sure to set Config.UseKeyboardForSelection to true for selection. (If you enable UseMouseForSelection, all props in vehicle trunk must have valid collisions!) -Config.UseKeyboardForSelection = false -- If true, you can use the A/D keybinds to select the prop in the trunk. If false, be sure to set Config.UseMouseForSelection to true for selection. - --- You can change keybinds below. When using ox_lib, also adjust the help-text (showTextUI) in cl_bridge.lua to match the keybinds -Config.Keys = { - MoveSelectionLeft = 34, -- A - MoveSelectionRight = 35, -- D - ConfirmSelection = 191, -- ENTER - ExitTrunk = 177, -- BACKSPACE / ESC / RIGHT MOUSE BUTTON - PlaceProp = 191, -- ENTER - CancelPropPlacement = 177, -- BACKSPACE / ESC / RIGHT MOUSE BUTTON -} - -Config.HighlightMode = 'outline' -- Define the used mode to highlight the prop ('outline' or 'lightup') -Config.LightupSize = 0.25 -- The size of the lightup effect (only applicable if HighlightMode is set to 'lightup') -Config.LightupIntensity = 100.0 -- The intensity of the lightup effect (only applicable if HighlightMode is set to 'lightup'), at night this value is multiplied by 0.02 to reduce intensity -Config.HighlightColor = { r = 66, g = 135, b = 245, a = 255 } -- The color of the highlight, alpha (a) is only used in outline mode - --- Configure the vehicles and their corresponding trunk setup. -Config.Vehicles = { - [`police3`] = 'showcase_police', - [`lguard`] = 'showcase_ambulance', -} - --- Define the trunk variants -Config.Trunks = { - ['example'] = { - [1] = { -- Make sure to correctly order the props in this list, switching the selected prop via keyboard will follow the order of this list - PropName = 'prop_fire_exting_1b', -- The prop hash of the prop you want to spawn in the trunk - Position = vector3(-0.1, 0.25, 0.0), -- The position of the prop in the trunk (x, y, z) relative to bone position defined under RelativeToBone - Rotation = vector3(90.0, 90.0, 15.0), -- The rotation of the prop in the trunk (x, y, z) - RelativeToBone = 'bumper_r', -- The earlier defined Position is relative to this bone position - RequiredJobs = { 'police', 'ambulance' }, -- If you want to restrict the action to a certain jobs, you can define them here. Leave empty or remove the line if you want to allow all jobs - CloseTrunkOnAction = true, -- If true, the trunk will close after finishing the Action defined below - Action = function() -- The corresponding action which is executed when the prop is selected - CreateThread(function() - Actions.PlayAnimation('pick_object_from_trunk') -- This is an example of an action which plays an animation defined in Config.Animations - Actions.GiveItem('weapon_fireextinguisher', 1) -- This is an example of an action which gives the player a fire extinguisher (BE SURE TO ADD WEAPONS/ITEMS TO server/sv_config.lua AS WELL!) - end) - end, - }, - [2] = { - PropName = 'prop_ballistic_shield', - Position = vector3(-0.2, 0.7, 0.4), - Rotation = vector3(-20.0, 0.0, 35.0), - RelativeToBone = 'bumper_r', - CloseTrunkOnAction = true, - Action = function() - CreateThread(function() - Actions.PlayAnimation('pick_object_from_trunk') - if (GetResourceState('gs_policeshield') == 'started') then - exports.gs_policeshield:ActivateShield('ballistic') -- You can call exports from other resources, this is an example of activating the ballistic shield from the gs_policeshield resource available here: https://gamzkystore.com/package/advanced-police-shield - end - end) - end, - }, - [3] = { - PropName = 'prop_roadcone02a', - Position = vector3(0.2, 0.7, -0.05), - Rotation = vector3(0.0, 0.0, 0.0), - RelativeToBone = 'bumper_r', - CloseTrunkOnAction = true, - Action = function() - CreateThread(function() - Actions.PlayAnimation('pick_object_from_trunk') - Actions.WalkWithProp('prop_roadcone02a') -- If you want to walk with the prop and place it on the ground somewhere, you can use the WalkWithProp function. This will automatically attach the prop to the player and use the configuration in Config.WalkWithProp - end) - end, - }, - [4] = { - PropName = 'prop_bodyarmour_06', - Position = vector3(0.6, 0.7, 0.6), - Rotation = vector3(0.0, 0.0, -45.0), - RelativeToBone = 'bumper_r', - CloseTrunkOnAction = true, - Action = function() - CreateThread(function() - Actions.PlayAnimation('pick_object_from_trunk') - Actions.PlayAnimation('change_vest_clothing') - if (GetResourceState('skinchanger') == 'started') then -- You can also change the skin of a player, here is an example using skinchanger but you can change this to any skin changing resource you want - TriggerEvent('skinchanger:getSkin', function(skin) - skin.bproof_1 = 1 - skin.bproof_2 = 0 - TriggerEvent('skinchanger:loadSkin', skin) - end) - end - end) - end, - }, - }, - ['showcase_police'] = { - [1] = { - PropName = 'prop_armour_pickup', - Position = vector3(-0.51, 0.21, 0.30), - Rotation = vector3(1.50, -1.25, -256.25), - RelativeToBone = 'bumper_r', - RequiredJobs = { 'police' }, - CloseTrunkOnAction = true, - Action = function() - CreateThread(function() - Actions.PlayAnimation('pick_object_from_trunk') - Actions.PlayAnimation('change_vest_clothing') - if (GetResourceState('skinchanger') == 'started') then - TriggerEvent('skinchanger:getSkin', function(skin) - if (skin.bproof_1 == 1) then - skin.bproof_1 = 0 - skin.bproof_2 = 0 - else - skin.bproof_1 = 1 - skin.bproof_2 = 1 - end - TriggerEvent('skinchanger:loadSkin', skin) - end) - end - end) - end, - }, - [2] = { - PropName = 'prop_fire_exting_1b', - Position = vector3(-0.53, 0.35, -0.18), - Rotation = vector3(-4.00, 6.50, 11.00), - RelativeToBone = 'bumper_r', - RequiredJobs = { 'police' }, - CloseTrunkOnAction = true, - Action = function() - CreateThread(function() - Actions.PlayAnimation('pick_object_from_trunk') - Actions.GiveItem('weapon_fireextinguisher', 1) - end) - end, - }, - [3] = { - PropName = 'm23_2_prop_m32_guncase_01a', - Position = vector3(-0.19, 0.18, 0.06), - Rotation = vector3(172.75, 182.25, 179.00), - RelativeToBone = 'bumper_r', - RequiredJobs = { 'police' }, - CloseTrunkOnAction = true, - Action = function() - CreateThread(function() - Actions.PlayAnimation('pick_object_from_trunk') - Actions.GiveItem('weapon_stungun', 1) - end) - end, - }, - [4] = { - PropName = 'prop_cs_hand_radio', - Position = vector3(-0.05, -0.01, 0.11), - Rotation = vector3(-13.75, -84.25, 5.75), - RelativeToBone = 'bumper_r', - RequiredJobs = { 'police' }, - CloseTrunkOnAction = false, - Action = function() - CreateThread(function() - Actions.PlayAnimation('pick_object_from_trunk') - Actions.GiveItem('radio', 1) - end) - end, - }, - [5] = { - PropName = 'p_cs_cuffs_02_s', - Position = vector3(0.05, 0.21, 0.07), - Rotation = vector3(172.25, 182.25, 269.25), - RelativeToBone = 'bumper_r', - RequiredJobs = { 'police' }, - CloseTrunkOnAction = false, - Action = function() - CreateThread(function() - Actions.PlayAnimation('pick_object_from_trunk') - Actions.GiveItem('handcuffs', 1) - end) - end, - }, - [6] = { - PropName = 'prop_binoc_01', - Position = vector3(0.22, 0.24, 0.14), - Rotation = vector3(173.00, 238.00, 428.00), - RelativeToBone = 'bumper_r', - RequiredJobs = { 'police' }, - CloseTrunkOnAction = false, - Action = function() - CreateThread(function() - Actions.PlayAnimation('pick_object_from_trunk') - Actions.GiveItem('binoculars', 1) - end) - end, - }, - [7] = { - PropName = 'prop_roadcone02a', - Position = vector3(0.58, 0.28, 0.24), - Rotation = vector3(-105.75, -7.00, 69.25), - RelativeToBone = 'bumper_r', - RequiredJobs = { 'police' }, - CloseTrunkOnAction = true, - Action = function() - CreateThread(function() - Actions.PlayAnimation('pick_object_from_trunk') - Actions.WalkWithProp('prop_roadcone02a') - end) - end, - }, - [8] = { - PropName = 'prop_megaphone_01', - Position = vector3(0.44, 0.08, 0.11), - Rotation = vector3(106.25, 69.50, 141.50), - RelativeToBone = 'bumper_r', - RequiredJobs = { 'police' }, - CloseTrunkOnAction = true, - Action = function() - CreateThread(function() - Actions.PlayAnimation('pick_object_from_trunk') - Actions.WalkWithProp('prop_megaphone_01') - end) - end, - }, - }, - ['showcase_ambulance'] = { - [1] = { - PropName = 'm23_2_prop_m32_lgstretcher_01a', - Position = vector3(-0.64, 1.11, 0.52), - Rotation = vector3(-21.50, -360.00, 178.00), - RelativeToBone = 'bumper_r', - RequiredJobs = { 'ambulance' }, - CloseTrunkOnAction = true, - Action = function() - CreateThread(function() - Actions.PlayAnimation('pick_object_from_trunk') - Actions.WalkWithProp('m23_2_prop_m32_lgstretcher_01a') - end) - end, - }, - [2] = { - PropName = 'prop_ld_fireaxe', - Position = vector3(-0.38, 1.73, 0.49), - Rotation = vector3(-181.00, -448.75, 180.00), - RelativeToBone = 'bumper_r', - RequiredJobs = { 'ambulance' }, - CloseTrunkOnAction = true, - Action = function() - CreateThread(function() - Actions.PlayAnimation('pick_object_from_trunk') - Actions.GiveItem('weapon_battleaxe', 1) - end) - end, - }, - [3] = { - PropName = 'xm_prop_x17_bag_med_01a', - Position = vector3(-0.39, 1.43, 0.11), - Rotation = vector3(-180.75, -542.00, 291.50), - RelativeToBone = 'bumper_r', - RequiredJobs = { 'ambulance' }, - CloseTrunkOnAction = true, - Action = function() - CreateThread(function() - Actions.PlayAnimation('pick_object_from_trunk') - Actions.WalkWithProp('xm_prop_x17_bag_med_01a') - end) - end, - }, - [4] = { - PropName = 'xm_prop_smug_crate_s_medical', - Position = vector3(-0.00, 1.41, 0.24), - Rotation = vector3(-180.75, -542.00, 291.50), - RelativeToBone = 'bumper_r', - RequiredJobs = { 'ambulance' }, - CloseTrunkOnAction = true, - Action = function() - CreateThread(function() - Actions.PlayAnimation('pick_object_from_trunk') - Actions.WalkWithProp('xm_prop_smug_crate_s_medical') - end) - end, - }, - [5] = { - PropName = 'm23_2_prop_m32_bag_coastguard', - Position = vector3(0.38, 1.42, 0.07), - Rotation = vector3(-3.75, -0.50, -109.75), - RelativeToBone = 'bumper_r', - RequiredJobs = { 'ambulance' }, - CloseTrunkOnAction = true, - Action = function() - CreateThread(function() - Actions.PlayAnimation('pick_object_from_trunk') - Actions.PlayAnimation('change_vest_clothing') - if (GetResourceState('skinchanger') == 'started') then - TriggerEvent('skinchanger:getSkin', function(skin) - if (skin.bproof_1 == 58) then - skin.bproof_1 = 0 - skin.bproof_2 = 0 - else - skin.bproof_1 = 58 - skin.bproof_2 = 0 - end - TriggerEvent('skinchanger:loadSkin', skin) - end) - end - end) - end, - }, - [6] = { - PropName = 'prop_roadcone02a', - Position = vector3(0.76, 1.64, 0.10), - Rotation = vector3(-179.25, -541.00, 177.00), - RelativeToBone = 'bumper_r', - RequiredJobs = { 'ambulance' }, - CloseTrunkOnAction = true, - Action = function() - CreateThread(function() - Actions.PlayAnimation('pick_object_from_trunk') - Actions.WalkWithProp('prop_roadcone02a') - end) - end, - }, - [7] = { - PropName = 'prop_cs_t_shirt_pile', - Position = vector3(0.75, 1.06, 0.44), - Rotation = vector3(-178.25, -543.50, 723.75), - RelativeToBone = 'bumper_r', - RequiredJobs = { 'ambulance' }, - CloseTrunkOnAction = false, - Action = function() - CreateThread(function() - Actions.PlayAnimation('pick_object_from_trunk') - Actions.GiveItem('bandage', 1) - end) - end, - }, - [8] = { - PropName = 'xm3_prop_xm3_lsd_bottles2', - Position = vector3(0.44, 0.70, 0.09), - Rotation = vector3(0.50, 3.00, 278.00), - RelativeToBone = 'bumper_r', - RequiredJobs = { 'ambulance' }, - CloseTrunkOnAction = false, - Action = function() - CreateThread(function() - Actions.PlayAnimation('pick_object_from_trunk') - Actions.GiveItem('pills', 1) - end) - end, - }, - [9] = { - PropName = 'prop_fire_exting_1b', - Position = vector3(0.81, 0.40, 0.09), - Rotation = vector3(0.00, 0.00, -76.25), - RelativeToBone = 'bumper_r', - RequiredJobs = { 'ambulance' }, - CloseTrunkOnAction = true, - Action = function() - CreateThread(function() - Actions.PlayAnimation('pick_object_from_trunk') - Actions.GiveItem('weapon_fireextinguisher', 1) - end) - end, - }, - [10] = { - PropName = 'v_ret_ta_firstaid', - Position = vector3(0.79, 0.15, 0.23), - Rotation = vector3(-180.75, -542.00, 291.50), - RelativeToBone = 'bumper_r', - RequiredJobs = { 'ambulance' }, - CloseTrunkOnAction = false, - Action = function() - CreateThread(function() - Actions.PlayAnimation('pick_object_from_trunk') - Actions.GiveItem('medikit') - end) - end, - }, - } -} - --- You can define animations here which you can use through Actions.PlayAnimation(animation_name) -Config.Animations = { - ['pick_object_from_trunk'] = { -- This is a name you choose yourself to access the animation through Actions.PlayAnimation('pick_object_from_trunk') - AnimDict = 'rcmepsilonism8', -- The animation dictionary - AnimName = 'bag_handler_grab_walk_left', -- The animation name - AnimationStart = 0.41, -- The animation start time (0.0 - 1.0 where 0.0 is the start of the animation and 1.0 is the end of the animation). Most of the time you can just pick 0.0 or leave remove this variable - Duration = 1250, -- The duration of the animation in milliseconds, after which it is stopped. If you remove this variable, the animation will play until it is finished - Flag = 1, -- The animation flag - }, - ['change_vest_clothing'] = { - AnimDict = 'oddjobs@basejump@ig_15', - AnimName = 'puton_parachute', - Duration = 2500, - Flag = 51, - } -} - --- You can configure the props which can be placed on the ground and walked with below. You can also configure the animation and position of the prop when placing it on the ground. -Config.WalkWithProp = { - ['prop_roadcone02a'] = { -- The name of the prop - CanPlace = true, -- If true, you can place the prop on the ground. - CanPickUp = true, -- If true, you can pick up the prop from the ground (if CanPlace is true), otherwise you can only delete the prop - CanPlaceMultiple = true, -- If true, you can place multiple props on the ground. If false, the prop in your hand will be removed after placing the prop - ShowTransparentProp = true, -- If true, a transparant prop is shown when walking with the prop on the position where the prop will be placed according to the players position - PropPlaceLocation = vector3(0.0, 0.75, -0.95), -- The offset with respect to the player, where the prop will be placed - PropPlaceHeading = 0.0, -- The heading of the prop when placed on the ground (0.0 - 360.0 degrees) with respect to the player heading - FreezePlacedProp = false, -- If true, the prop will be frozen in place and cannot be moved - RequiredJobsToPickupOrRemove = { 'police', 'ambulance' }, -- The jobs which are allowed to remove the prop from the ground. Leave empty or remove the line if you want to allow all everyone - CarryAnimDict = 'anim@heists@narcotics@trash', -- The animations dictionary for carrying the prop - CarryAnimName = 'walk', -- The animations name for carrying the prop - CarryAnimFlag = 51, -- The animation flag for carrying the prop - CarryAttachBonePed = 28422, -- The bone INDEX of the player where the prop is attached to when carrying it (see https://wiki.rage.mp/wiki/Bones) - CarryPosition = { x = -0.1, y = 0.1, z = 0.1, rx = 90.0, ry = 0.0, rz = 0.0 }, -- The position of the prop (with respect to the position of CarryAttachBonePed) when carrying it (x-y-z positions) and (rx-ry-rz rotations) - PlaceAnimDict = 'anim@heists@money_grab@briefcase', -- The animation dictionary for placing the prop - PlaceAnimName = 'enter', -- The animation name for placing the prop - PlaceAnimFlag = 1, -- The animation flag for placing the prop - PlaceAnimTime = 1500, -- The duration of the place animation in milliseconds - PlaceAttachBonePed = 6286, -- The bone INDEX of the player where the prop is attached to when placing it (see https://wiki.rage.mp/wiki/Bones) - PlacePosition = { x = 0.0, y = 0.0, z = 0.0, rx = 0.0, ry = 0.0, rz = 0.0 }, -- The position of the prop (with respect to the position of PlaceAttachBonePed) when placing it (x-y-z positions) and (rx-ry-rz rotations) - PickupAnimDict = 'anim@heists@money_grab@briefcase', -- The animation dictionary for picking up the prop - PickupAnimName = 'exit', -- The animation name for picking up the prop - PickupAnimTime = 1600, -- The duration of the pickup animation in milliseconds - }, - ['prop_megaphone_01'] = { - CanPlace = false, - CarryAnimDict = 'amb@world_human_mobile_film_shocking@female@base', - CarryAnimName = 'base', - CarryAnimFlag = 51, - CarryAttachBonePed = 28422, - CarryPosition = { x = 0.02, y = 0.00, z = -0.00, rx = -0.50, ry = 0.00, rz = 79.00 }, - }, - ['m23_2_prop_m32_lgstretcher_01a'] = { - CanPlace = true, - CanPickUp = true, - ShowTransparentProp = true, - PropPlaceLocation = vector3(0.5, 0.0, -0.95), - PropPlaceHeading = 0.0, - RequiredJobsToPickupOrRemove = { 'ambulance' }, - CarryAnimDict = 'move_weapon@jerrycan@generic', - CarryAnimName = 'idle', - CarryAnimFlag = 51, - CarryAttachBonePed = 6286, - CarryPosition = { x = -0.13, y = 0.11, z = -0.06, rx = 13.75, ry = -6.00, rz = -8.50 }, - PlaceAnimDict = 'missheist_agency2aig_13', - PlaceAnimName = 'pickup_briefcase', - PlaceAnimFlag = 1, - PlaceAnimTime = 1500, - PlaceAttachBonePed = 6286, - PlacePosition = { x = 0.0, y = 0.0, z = 0.0, rx = 0.0, ry = 0.0, rz = 0.0 }, - PickupAnimDict = 'missheist_agency2aig_13', - PickupAnimName = 'pickup_briefcase', - PickupAnimTime = 1600, - }, - ['xm_prop_x17_bag_med_01a'] = { - CanPlace = true, - CanPickUp = true, - ShowTransparentProp = false, - PropPlaceLocation = vector3(0.6, 0.0, -0.95), - PropPlaceHeading = 90.0, - RequiredJobsToPickupOrRemove = { 'ambulance' }, - CarryAnimDict = 'move_weapon@jerrycan@generic', - CarryAnimName = 'idle', - CarryAnimFlag = 51, - CarryAttachBonePed = 57005, - CarryPosition = { x = 0.40, y = -0.08, z = -0.05, rx = 41.50, ry = -43.25, rz = -107.75 }, - PlaceAnimDict = 'anim@heists@money_grab@briefcase', - PlaceAnimName = 'put_down_case', - PlaceAnimFlag = 1, - PlaceAnimTime = 1500, - PlaceAttachBonePed = 57005, - PlacePosition = { x = 0.36, y = 0.10, z = -0.10, rx = 19.00, ry = -81.75, rz = 45.00 }, - PickupAnimDict = 'anim@heists@money_grab@briefcase', - PickupAnimName = 'exit', - PickupAnimTime = 1600, - }, - ['xm_prop_smug_crate_s_medical'] = { - CanPlace = true, - CanPickUp = true, - ShowTransparentProp = false, - PropPlaceLocation = vector3(0.6, 0.0, -0.95), - PropPlaceHeading = 90.0, - RequiredJobsToPickupOrRemove = { 'ambulance' }, - CarryAnimDict = 'move_weapon@jerrycan@generic', - CarryAnimName = 'idle', - CarryAnimFlag = 51, - CarryAttachBonePed = 57005, - CarryPosition = { x = 0.27, y = -0.04, z = -0.04, rx = -83.75, ry = -171.25, rz = 278.50 }, - PlaceAnimDict = 'anim@heists@money_grab@briefcase', - PlaceAnimName = 'put_down_case', - PlaceAnimFlag = 1, - PlaceAnimTime = 1500, - PlaceAttachBonePed = 57005, - PlacePosition = { x = 0.26, y = -0.05, z = -0.15, rx = -42.00, ry = -19.00, rz = 77.50 }, - PickupAnimDict = 'anim@heists@money_grab@briefcase', - PickupAnimName = 'exit', - PickupAnimTime = 1600, - }, -} - --- If you want to adjust the default camera position when viewing the trunk, you can adjust x-y-z positions and x-y-z rotations below. -Config.DefaultCameraOffset = { - x = 0.0, -- The default camera position x offset - y = -0.2, -- The default camera position y offset - z = -0.1, -- The default camera position z offset - rx = 0.0, -- The default camera rotation x offset (degrees) - ry = 0.0, -- The default camera rotation y offset (degrees) - rz = 0.0, -- The default camera rotation z offset (degrees) -} - --- If for some reason the camera position is not correct for a specific vehicle, you can adjust it here with an additional offset (x-y-z positions) and (rx-ry-rz rotations) -Config.AdditionalCameraOffsets = { - -- [`warrener`] = { x = 0.0, y = 0.0, z = 0.5, rx = -10.0, ry = 0.0, rz = 0.0}, -- This is an example which increases the camera height by 0.5 and rotates it down by 10 degrees - [`lguard`] = { x = 0.0, y = -0.5, z = -0.75, rx = 20.0, ry = 0.0, rz = 0.0 }, -} - --- If you want to change notification text, you can do it here. -Config.Locales = { - ['missing_required_job'] = 'You do not have the required job to use this item.', - ['prop_cannot_be_placed'] = 'This object cannot be placed on the ground.', -} - --- Enables two debug commands, read the information below if you want to use these -Config.Debug = false - --- !!! CREATING TRUNKS !!! --- In debug mode, you can use the commands "/toggle_trunk" and "/trunk_prop ". --- /toggle_trunk opens or closes the trunk of the vehicle you are currently DRIVING. --- /trunk_prop [propName] [RelativeToBone] spawns a prop in the trunk of the vehicle at the RelativeToBone position (if not defined it uses "bumper_r" by default). --- You can spawn multiple props in the trunk, and switch between them like you would do normally in a trunk (A/D by default, unless changed in Config.Keys.MoveSelection). ---- --- The selected prop can be moved around, after which the position and rotation can be copied to your clipboard by pressing ENTER (by default, unless changed in Config.Keys.ConfirmSelection). --- This makes configuration of a trunk a lot easier, as you can use the copied position and rotation in the Config.Trunks table to easily configure the prop positions. --- You can move this prop using the following keys: --- NUMPAD-RIGHT (6) = Positive translation of prop over X-axis --- NUMPAD-RIGHT (6) + L-SHIFT = Positive Rotation of prop over X-axis --- NUMPAD-LEFT (4) = Negative translation of prop over X-axis --- NUMPAD-LEFT (4) + L-SHIFT = Negative Rotation of prop over X-axis --- NUMPAD-UP (8) = Positive translation of prop over Y-axis --- NUMPAD-UP (8) + L-SHIFT = Positive Rotation of prop over Y-axis --- NUMPAD-CENTER (5) = Negative translation of prop over Y-axis --- NUMPAD-CENTER (5) + L-SHIFT = Negative Rotation of prop over Y-axis --- NUMPAD-TOP-LEFT (7) = Positive translation of prop over Z-axis --- NUMPAD-TOP-LEFT (7) + L-SHIFT = Positive Rotation of prop over Z-axis --- NUMPAD-TOP-RIGHT (9) = Negative translation of prop over Z-axis --- NUMPAD-TOP-RIGHT (9) + L-SHIFT = Negative Rotation of prop over Z-axis --- Use Config.Keys.MoveSelection (default A/D) to change between spawned props --- Use Config.Keys.ConfirmSelection (default ENTER) to copy the position and rotation of the selected prop --- Use Config.Keys.ExitTrunk (default BACKSPACE) to despawn the currently selected prop --- USE /toggle_trunk again to despawn all the props in the trunk and close the trunk. - --- !!! SETTING UP PROP ANIMATIONS !!! --- You can also use the command "/carry_prop " --- This spawns the propName attached to the pedBoneIndex, whilst playing the animation defined by animDict, animName and animFlag. --- You can then use the same keys as described above (NUMPAD) to move the prop around and copy the position and rotation to your clipboard using ENTER (unless changed in Config.Keys.ConfirmSelection). --- This can be usefull to define the position of the prop when carrying it, as well as the animation to play when carrying it in Config.WalkWithProp. diff --git a/resources/[jobs]/[police]/gs_advancedtrunk/fxmanifest.lua b/resources/[jobs]/[police]/gs_advancedtrunk/fxmanifest.lua deleted file mode 100644 index 4c136dd99..000000000 --- a/resources/[jobs]/[police]/gs_advancedtrunk/fxmanifest.lua +++ /dev/null @@ -1,40 +0,0 @@ -fx_version 'cerulean' -games { 'gta5' } - -author 'Eviate' -description 'Advanced Trunk' -version '1.0.0' - -lua54 'yes' - -ui_page 'clipboard/index.html' - -files { - 'clipboard/index.html', - 'clipboard/copy.js', -} - -shared_scripts { - 'config.lua', -} - -client_scripts { - 'bridge/cl_bridge.lua', - 'client/cl_*.lua', -} - -server_scripts { - 'server/sv_*.lua', - 'bridge/sv_bridge.lua', -} - -escrow_ignore { - 'clipboard/index.html', - 'clipboard/copy.js', - 'bridge/cl_bridge.lua', - 'bridge/sv_bridge.lua', - 'config.lua', - 'sv_config.lua', -} - -dependency '/assetpacks' \ No newline at end of file diff --git a/resources/[jobs]/[police]/gs_advancedtrunk/server/sv_config.lua b/resources/[jobs]/[police]/gs_advancedtrunk/server/sv_config.lua deleted file mode 100644 index ee0d5a66e..000000000 Binary files a/resources/[jobs]/[police]/gs_advancedtrunk/server/sv_config.lua and /dev/null differ diff --git a/resources/[jobs]/[police]/gs_advancedtrunk/server/sv_main.lua b/resources/[jobs]/[police]/gs_advancedtrunk/server/sv_main.lua deleted file mode 100644 index aec120f9c..000000000 Binary files a/resources/[jobs]/[police]/gs_advancedtrunk/server/sv_main.lua and /dev/null differ diff --git a/resources/[jobs]/[police]/gs_deployablelight/.fxap b/resources/[jobs]/[police]/gs_deployablelight/.fxap deleted file mode 100644 index 8bfcd9f44..000000000 Binary files a/resources/[jobs]/[police]/gs_deployablelight/.fxap and /dev/null differ diff --git a/resources/[jobs]/[police]/gs_deployablelight/bridge/cl_bridge.lua b/resources/[jobs]/[police]/gs_deployablelight/bridge/cl_bridge.lua deleted file mode 100644 index 29ea2b9e2..000000000 --- a/resources/[jobs]/[police]/gs_deployablelight/bridge/cl_bridge.lua +++ /dev/null @@ -1,24 +0,0 @@ -Functions = {} - --- Any additional checks before a player places a light can be addded here -Functions.CanPlayerDeployLight = function(vehicle) - return true -end - --- Any additional checks before a vehicle gets a light can be addded here -Functions.CanVehicleDeployLight = function(vehicle) - return true -end - -Functions.OnPlayerDeployLight = function(vehicle) - -- Do something when a player deploys a light -end - -Functions.OnPlayerRemoveLight = function(vehicle) - -- Do something when a player removes a light -end - -Functions.ShouldLightOnVehicleBeBroken = function(vehicle) - local engineHealth = GetVehicleEngineHealth(vehicle) - return (engineHealth < 100) -end diff --git a/resources/[jobs]/[police]/gs_deployablelight/bridge/sv_bridge.lua b/resources/[jobs]/[police]/gs_deployablelight/bridge/sv_bridge.lua deleted file mode 100644 index e4ba2d2a2..000000000 --- a/resources/[jobs]/[police]/gs_deployablelight/bridge/sv_bridge.lua +++ /dev/null @@ -1,80 +0,0 @@ -ESX = nil -QBCore = nil - -if (GetResourceState('es_extended') == 'started') then - ESX = exports['es_extended']:getSharedObject() -elseif (GetResourceState('qb-core') == 'started') then - QBCore = exports['qb-core']:GetCoreObject() -end - -Functions = {} - -Functions.OnServerDeployLight = function(playerId, vehicle) - -- Do something when a player deploys a light -end - -Functions.OnServerRemoveLight = function(playerId, vehicle) - -- Do something when a player removes a light -end - --- Removes the item from the player inventory, ensure function returns true on succes -Functions.RemoveLightItem = function(playerId) - if (not Config.RequiredItem.Enabled) then - return true - end - - local itemName = Config.RequiredItem.Name - if ESX then - local xPlayer = ESX.GetPlayerFromId(playerId) - if xPlayer.getInventoryItem(itemName).count < 1 then - return false - end - xPlayer.removeInventoryItem(itemName, 1) - elseif QBCore then - local Player = QBCore.Functions.GetPlayer(playerId) - if not Player.Functions.GetItemByName(itemName) then - return false - end - Player.Functions.RemoveItem(itemName, 1) - end - return true -end - --- Adds the item back to the player inventory -Functions.AddLightItem = function(playerId) - if (not Config.RequiredItem.Enabled) then - return - end - - local itemName = Config.RequiredItem.Name - if ESX then - local xPlayer = ESX.GetPlayerFromId(playerId) - xPlayer.addInventoryItem(itemName, 1) - elseif QBCore then - local Player = QBCore.Functions.GetPlayer(playerId) - Player.Functions.AddItem(itemName, 1) - end -end - --- Create the usable light item (only triggered if enabled in the configuration) -Functions.RegisterItem = function(itemName, onItemUse) - if (GetResourceState('ox_inventory') == 'started') then - exports(itemName, function(event, item, inventory, slot, data) - local source = inventory.id - if (event == 'usingItem') then - onItemUse(source) - return false - end - end) - elseif (ESX) then - ESX.RegisterUsableItem(itemName, function(source) - onItemUse(source) - end) - elseif (QBCore) then - QBCore.Functions.CreateUseableItem(itemName, function(source) - onItemUse(source) - end) - else - print('gs_deployablelight: [ERROR] No inventory framework detected') - end -end diff --git a/resources/[jobs]/[police]/gs_deployablelight/client/cl_main.lua b/resources/[jobs]/[police]/gs_deployablelight/client/cl_main.lua deleted file mode 100644 index 0d15ca131..000000000 Binary files a/resources/[jobs]/[police]/gs_deployablelight/client/cl_main.lua and /dev/null differ diff --git a/resources/[jobs]/[police]/gs_deployablelight/config.lua b/resources/[jobs]/[police]/gs_deployablelight/config.lua deleted file mode 100644 index 8c3d30ca3..000000000 --- a/resources/[jobs]/[police]/gs_deployablelight/config.lua +++ /dev/null @@ -1,117 +0,0 @@ -Config = {} - --- If set to true, only the light closest to the player will fully display. Any additional lights from vehicles further away will be optimized to reduce performance impact --- In general, you can leave this off as the script is already optimized well, but if you expect 10+ vehicles in a compact area to be using the light simultaneously you could consider turning this on for a slightly better (ms) run-time -Config.OptimizeMode = false - --- The speed multiplier for the light rotation, larger value means faster rotation -Config.LightRotationSpeedMultiplier = 1.15 - --- The required item to deploy a light, this can only be used if you have an inventory system to handle items -Config.RequiredItem = { - Enabled = true, - Name = 'deployable_light' -} - --- Enable the command to toggle light on a vehicle (command = \light), you can use this if you do not have an inventory system to handle items -Config.EnableLightCommand = true - --- The key which you can use to remove a light from the vehicle -Config.RemoveLightKey = 36 -- L-CTRL - --- If you also want an optional siren to be usable with the deployable light, set Enabled to true -Config.Siren = { - Enabled = true, - Key = 21, -- L-SHIFT - CustomSirens = false, -- If you want to use custom sirens, set this to the AudioBank name (in most cases set this to: "DLC_WMSIRENS\\SIRENPACK_ONE"), if you are not using custom sirens leave this at false -} - --- The blacklist for classes and models which cannot use the light -Config.Blacklist = { - ['classes'] = { 8, 13, 14, 15, 16, 21, 22 }, - ['models'] = { `adder` } -} - --- The settings corresponding to the light effect -Config.LightSettings = { - ['red'] = { - LightPropHash = `hei_prop_wall_alarm_red`, -- Prop of the light - RGB = vector3(255, 0, 0), -- RGB color of the light - Distance = 12.0, -- The maximum distance the light can reach - Brightness = 5.0, -- The brightness of the light - Roundness = 2.0, -- "smoothness" of the circle edge - Radius = 60.0, -- The radius size of the light - Falloff = 3.0, -- The falloff size of the light's edge - BlinkTime = 150, -- The time between each blink (only used if LightBehaviour is set to 'blinking' in Config.VehicleData) - }, - ['blue'] = { - LightPropHash = `hei_prop_wall_alarm_blue`, - RGB = vector3(0, 0, 255), - Distance = 12.0, - Brightness = 9.0, - Roundness = 0.0, - Radius = 60.0, - Falloff = 3.0, - BlinkTime = 150, - }, - ['orange'] = { - LightPropHash = `hei_prop_wall_alarm_orange`, - RGB = vector3(242, 87, 10), - Distance = 12.0, - Brightness = 5.0, - Roundness = 2.0, - Radius = 60.0, - Falloff = 3.0, - BlinkTime = 150, - } -} - --- The defined animations applied when attaching/detaching the light -Config.Animation = { - ['default'] = { - Dict = 'veh@drivebystd_ds_grenades', - Name = 'throw_180r', - AnimTime = 500, - AttachBoneId = 18905, -- Left hand - HandPosition = vector3(0.1, 0.0, 0.1), - HandRotation = vector3(90.0, 0.0, 0.0), - }, - ['front_window'] = { - Dict = 'veh@van@ds@base', - Name = 'change_station', - AnimTime = 1500, - AttachBoneId = 57005, -- Right hand - HandPosition = vector3(0.1, 0.0, -0.05), - HandRotation = vector3(180.0, 0.0, 0.0), - }, - ['quad'] = { - Dict = 'veh@bike@quad@front@base', - Name = 'change_station', - AnimTime = 1500, - AttachBoneId = 57005, -- Right hand - HandPosition = vector3(0.1, 0.05, 0.0), - HandRotation = vector3(-90.0, 0.0, 0.0), - }, -} - --- The attachment information for the light, default is always used unless specified otherwise. --- Position: Defines the light-prop coordinates w.r.t. the center of the vehicle. Leave at vector3(0.0, 0.0, 0.0) and the script will automatically try to estimate a good position. --- Rotation: Defines the light-prop rotation. --- Animation: The animation to play when attaching/detaching the light. --- LightSetting: The light setting to use for the light. --- LightBehaviour: Can be set to either 'rotating' or 'blinking' to change the light behaviour. If undefined, the LightBehaviour defined in 'default' will be used. --- SirenName: The siren name that can be used when the light is enabled, only works if Config.Siren.Enabled is set to true. If SirenName is not defined, the siren cannot be used for that vehicle. --- AudioRef: The audio reference for the custom siren (you can ignore this if you are not using custom sirens), make sure to set Config.Siren.CustomSirens to true when using custom sirens. -Config.VehicleData = { - ['default'] = { Position = vector3(0.0, 0.0, 0.0), Rotation = vector3(-95.0, -5.0, 0.0), Animation = 'default', LightSetting = 'blue', LightBehaviour = 'blinking', SirenName = 'VEHICLES_HORNS_SIREN_1' }, - [`baller`] = { Position = vector3(0.0, 0.0, 0.0), Rotation = vector3(-90.0, -5.0, 0.0), Animation = 'default', LightSetting = 'blue', LightBehaviour = 'blinking', SirenName = 'VEHICLES_HORNS_SIREN_1' }, - [`blazer2`] = { Position = vector3(0.0, 0.15, 0.4), Rotation = vector3(-90.0, -0.0, 0.0), Animation = 'quad', LightSetting = 'red', LightBehaviour = 'blinking', SirenName = 'VEHICLES_HORNS_SIREN_2' }, - [`burrito4`] = { Position = vector3(0.0, 0.0, 0.0), Rotation = vector3(-95.0, -5.0, 0.0), Animation = 'default', LightSetting = 'orange' }, - [`zorrusso`] = { Position = vector3(0.3, 0.9, 0.29), Rotation = vector3(-90.0, 0.0, 0.0), Animation = 'front_window', LightSetting = 'blue' }, - [`jugular`] = { Position = vector3(0.0, 0.0, 0.0), Rotation = vector3(-90.0, -5.0, 0.0), Animation = 'default', LightSetting = 'blue', LightBehaviour = 'blinking', SirenName = 'VEHICLES_HORNS_SIREN_2' }, - [`gbargento7f`] = { Position = vector3(0.0, -0.1, 0.0), Rotation = vector3(-90.0, -5.0, 0.0), Animation = 'default', LightSetting = 'blue', LightBehaviour = 'blinking', SirenName = 'VEHICLES_HORNS_SIREN_2' }, - -- You can add more unique vehicle settings here if you wish, the key should be the vehicle model hash - - -- If you are using CUSTOM SIRENS, this is an example on how to setup the siren correctly: - -- [`baller2`] = { Position = vector3(0.0, 0.0, 0.0), Rotation = vector3(-90.0, -5.0, 0.0), Animation = 'default', LightSetting = 'blue', SirenName = 'siren_alpha', AudioRef = 'DLC_WMSIRENS_SOUNDSET' }, -- The AudioRef will be 'DLC_WMSIRENS_SOUNDSET' in most cases -} diff --git a/resources/[jobs]/[police]/gs_deployablelight/fxmanifest.lua b/resources/[jobs]/[police]/gs_deployablelight/fxmanifest.lua deleted file mode 100644 index 2e87c193e..000000000 --- a/resources/[jobs]/[police]/gs_deployablelight/fxmanifest.lua +++ /dev/null @@ -1,38 +0,0 @@ -fx_version 'cerulean' -games { 'gta5' } - -author 'Eviate' -description 'Deployable Emergency Vehicle Light Script' -version '1.1.1' - -lua54 'yes' - -shared_scripts { - 'config.lua', -} - -client_scripts { - 'bridge/cl_bridge.lua', - 'client/cl_*.lua', -} - -server_scripts { - 'server/sv_*.lua', - 'bridge/sv_bridge.lua', -} - -escrow_ignore { - 'bridge/cl_bridge.lua', - 'bridge/sv_bridge.lua', - 'config.lua', - 'stream/*', - 'item/*', -} - -files { - 'stream/hei_prop_wall_alarm.ytyp' -} - -data_file 'DLC_ITYP_REQUEST' 'stream/hei_prop_wall_alarm.ytyp' - -dependency '/assetpacks' \ No newline at end of file diff --git a/resources/[jobs]/[police]/gs_deployablelight/item/deployable_light.png b/resources/[jobs]/[police]/gs_deployablelight/item/deployable_light.png deleted file mode 100644 index 74fc0e641..000000000 Binary files a/resources/[jobs]/[police]/gs_deployablelight/item/deployable_light.png and /dev/null differ diff --git a/resources/[jobs]/[police]/gs_deployablelight/item/readme.md b/resources/[jobs]/[police]/gs_deployablelight/item/readme.md deleted file mode 100644 index a133c861c..000000000 --- a/resources/[jobs]/[police]/gs_deployablelight/item/readme.md +++ /dev/null @@ -1,13 +0,0 @@ -If you have an inventory system (esx-inventory, qb-inventory or ox-inventory) you can add the item in the corresponding item.lua list. - -For ox-inventory for instance, you add the following to ox-inventory/data/items.lua: -``` - ['deployable_light'] = { - label = 'Deployable Light', - weight = 250, - consume = 0, - server = { - export = 'gs_deployablelight.deployable_light', - } - }, -``` \ No newline at end of file diff --git a/resources/[jobs]/[police]/gs_deployablelight/server/sv_main.lua b/resources/[jobs]/[police]/gs_deployablelight/server/sv_main.lua deleted file mode 100644 index 4b352eb7b..000000000 Binary files a/resources/[jobs]/[police]/gs_deployablelight/server/sv_main.lua and /dev/null differ diff --git a/resources/[jobs]/[police]/gs_deployablelight/stream/hei_prop_wall_alarm.ytyp b/resources/[jobs]/[police]/gs_deployablelight/stream/hei_prop_wall_alarm.ytyp deleted file mode 100644 index 0cef1becf..000000000 --- a/resources/[jobs]/[police]/gs_deployablelight/stream/hei_prop_wall_alarm.ytyp +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - hei_prop_wall_alarm_red - hei_prop_wall_alarm_red - - - prop_wall_alarm - ASSET_TYPE_DRAWABLE - hei_prop_wall_alarm_red - - - - - - - - - - - - hei_prop_wall_alarm_blue - hei_prop_wall_alarm_blue - - - prop_wall_alarm - ASSET_TYPE_DRAWABLE - hei_prop_wall_alarm_blue - - - - - - - - - - - - hei_prop_wall_alarm_orange - hei_prop_wall_alarm_orange - - - prop_wall_alarm - ASSET_TYPE_DRAWABLE - hei_prop_wall_alarm_orange - - - - hei_lev_des_mp_dlc - - - diff --git a/resources/[jobs]/[police]/gs_deployablelight/stream/hei_prop_wall_alarm_blue.ydr b/resources/[jobs]/[police]/gs_deployablelight/stream/hei_prop_wall_alarm_blue.ydr deleted file mode 100644 index 7b1f556aa..000000000 Binary files a/resources/[jobs]/[police]/gs_deployablelight/stream/hei_prop_wall_alarm_blue.ydr and /dev/null differ diff --git a/resources/[jobs]/[police]/gs_deployablelight/stream/hei_prop_wall_alarm_blue.ytd b/resources/[jobs]/[police]/gs_deployablelight/stream/hei_prop_wall_alarm_blue.ytd deleted file mode 100644 index e41fe45f5..000000000 Binary files a/resources/[jobs]/[police]/gs_deployablelight/stream/hei_prop_wall_alarm_blue.ytd and /dev/null differ diff --git a/resources/[jobs]/[police]/gs_deployablelight/stream/hei_prop_wall_alarm_orange.ydr b/resources/[jobs]/[police]/gs_deployablelight/stream/hei_prop_wall_alarm_orange.ydr deleted file mode 100644 index 7b1f556aa..000000000 Binary files a/resources/[jobs]/[police]/gs_deployablelight/stream/hei_prop_wall_alarm_orange.ydr and /dev/null differ diff --git a/resources/[jobs]/[police]/gs_deployablelight/stream/hei_prop_wall_alarm_orange.ytd b/resources/[jobs]/[police]/gs_deployablelight/stream/hei_prop_wall_alarm_orange.ytd deleted file mode 100644 index 06c5757d0..000000000 Binary files a/resources/[jobs]/[police]/gs_deployablelight/stream/hei_prop_wall_alarm_orange.ytd and /dev/null differ diff --git a/resources/[jobs]/[police]/gs_deployablelight/stream/hei_prop_wall_alarm_red.ydr b/resources/[jobs]/[police]/gs_deployablelight/stream/hei_prop_wall_alarm_red.ydr deleted file mode 100644 index 7b1f556aa..000000000 Binary files a/resources/[jobs]/[police]/gs_deployablelight/stream/hei_prop_wall_alarm_red.ydr and /dev/null differ diff --git a/resources/[jobs]/[police]/gs_deployablelight/stream/hei_prop_wall_alarm_red.ytd b/resources/[jobs]/[police]/gs_deployablelight/stream/hei_prop_wall_alarm_red.ytd deleted file mode 100644 index 999dec428..000000000 Binary files a/resources/[jobs]/[police]/gs_deployablelight/stream/hei_prop_wall_alarm_red.ytd and /dev/null differ diff --git a/resources/[jobs]/[police]/helicam/.fxap b/resources/[jobs]/[police]/helicam/.fxap deleted file mode 100644 index a301abe2a..000000000 Binary files a/resources/[jobs]/[police]/helicam/.fxap and /dev/null differ diff --git a/resources/[jobs]/[police]/helicam/client.lua b/resources/[jobs]/[police]/helicam/client.lua deleted file mode 100644 index a7b36a673..000000000 --- a/resources/[jobs]/[police]/helicam/client.lua +++ /dev/null @@ -1,2029 +0,0 @@ --- Variables -- -local inHeliCam = false -local helicopter = {} -local movementInput = false -local isMarkersThreadActive = false -local lastRappelKeyPress = 0 -local pauseMenu = false -local visionState = 0 -local currentFov = 0.0 -local fov = Config.Camera.Zoom.Max -local tabletObj = nil -local cameraAction = false -local instScaleform = nil -local submix = false -local postalsActive = Config.ShowPostalCodes -local spotlights = {} -local Units = {} -- Unit conversions, gets dynamically created. -local markers = {} -local postals = {} -local displayPostals = {} -local markerBlips = {} -local blipStateBagHandlers = {} --- 16 = INPUT_SELECT_NEXT_WEAPON, 17 = INPUT_SELECT_PREV_WEAPON, 75 = INPUT_VEH_EXIT, 80 = INPUT_VEH_CIN_CAM, --- 81 = INPUT_VEH_NEXT_RADIO, 82 = INPUT_VEH_PREV_RADIO, 85 = INPUT_VEH_RADIO_WHEEL, 99 = INPUT_VEH_SELECT_NEXT_WEAPON -local controlActions = { - 16, 17, 75, 80, 81, 82, 85, 99 -} -local sounds = { - enter = -1, - exit = -1, - turn = -1, - zoom = -1, - bleep = -1, - scanLoop = -1, - scanSuccess = -1, - scanFailure = -1, - rappel = -1, - thermal = -1, - spotlight = -1 -} -local targetBlip = { - display = false, - handler = nil -} -local cache = { - helicopter = {}, - target = {}, - camera = {} -} -local spotlight = { - active = false, - isThreadActive = false, - cameraLockThread = false, - brightness = Config.Spotlight.DefaultBrightness, - adjustingBrightness = false, - radius = Config.Spotlight.DefaultRadius, - adjustingRadius = false -} -local cameraLock = { - active = false, - attempting = false, - type = nil, - prevType = nil, - entity = nil, - coords = nil, - timeout = 0, - progress = 0 -} -local camera = { - cam = nil, - pitch = 0, - heading = 0, - bearing = 0 -} - - --- Utils -- -local function DisplayNotification(msg) - BeginTextCommandThefeedPost("STRING") - AddTextComponentSubstringPlayerName(msg) - EndTextCommandThefeedPostTicker(false, false) - - -- Comment out above and add custom notification below: - --exports.mythic_notify:SendAlert('error', msg) -end - -local function DoesHelicopterHaveCamera(model, vehicle) - if Config.Helicopters[model] then - return true - elseif Config.CanUseAnyHelicopter then - local class = GetVehicleClass(vehicle) - if class == 15 or class == 16 then - return true - end - end - - return false -end - -local function GetHeliCameraOffset(model) - return (Config.Helicopters[model] and Config.Helicopters[model].offset) or Config.Helicopters.default.offset -end - -local function CanPlayerUseCameraFromCurrentSeat(playerPed, heli, model) - local policy = Config.PassengerOnly - if Config.Helicopters[model] and Config.Helicopters[model].passengerOnly ~= nil then - policy = Config.Helicopters[model].passengerOnly - end - - if policy then - -- Checks if we are the pilot of the helicopter - if GetPedInVehicleSeat(heli, -1) == playerPed then - return false, 'IsPilot' - end - -- If only rear passangers, then check if we are in the front passanger seat - if policy == 2 and GetPedInVehicleSeat(heli, 0) == playerPed then - return false, 'NotInRear' - end - end - - return true -end - -local function SetHelicopterStateBag(bagName, value) - -- TODO: move this to LocalPlayer state like spotlight? - if NetworkGetEntityOwner(helicopter.entity) == PlayerId() then - Entity(helicopter.entity).state:set(bagName, value, true) - else - TriggerServerEvent('helicam:setStateBag', helicopter.netId, bagName, value) - end -end - -local function SynchroniseSpotlight(data) - LocalPlayer.state:set('heliCamSpotlightData', data, true) -end - -local function GetCartesianCoords(coord) - local degrees = math.floor(coord) - local min = (coord - degrees) * 60 - local minutes = math.floor(min) - - local sec = (min - minutes) * 60 - local secfloor = math.floor(sec) - local seconds = string.format("%02d", secfloor)..string.format("%.2f", sec - secfloor):sub(2) - - local cartesian = string.format("%02d", degrees).."° "..string.format("%02d", minutes).."' "..seconds..'"' - return cartesian -end - -local function GetHeadingBetweenCoords(from, to) - local dx = to.x - from.x - local dy = to.y - from.y - - local heading = GetHeadingFromVector_2d(dx, dy) - return heading -end - -local function RotationToHeading(rotation) - local heading = rotation - if heading < 0 then - heading = heading*-1 - heading = heading + math.abs(heading - 180.0)*2 - end - - heading = (heading - 360) *-1 - - return heading -end - -local function RotAnglesToVec(rot) - local z = math.rad(rot.z) - local x = math.rad(rot.x) - local num = math.abs(math.cos(x)) - return vector3(-math.sin(z)*num, math.cos(z)*num, math.sin(x)) -end - -local function IsTableEmpty(table) - for _ in pairs(table) do return false end - return true -end - -local function ShouldLockOntoCenter(entityType) - if entityType == 1 and Config.LockOntoCenter.Peds then - return true - elseif entityType == 2 and Config.LockOntoCenter.Vehicles then - return true - end - - return false -end - -local function EnableSubmix() - SetAudioSubmixEffectRadioFx(0, 0) - SetAudioSubmixEffectParamInt(0, 0, `default`, 1) - SetAudioSubmixEffectParamFloat(0, 0, `freq_low`, 625.0) - SetAudioSubmixEffectParamFloat(0, 0, `freq_hi`, 8000.0) - SetAudioSubmixEffectParamFloat(0, 0, `fudge`, 0.5) - SetAudioSubmixEffectParamFloat(0, 0, `rm_mix`, 50.0) - submix = true -end - -local function DisableSubmix() - SetAudioSubmixEffectRadioFx(0, 0) - SetAudioSubmixEffectParamInt(0, 0, `enabled`, 0) - submix = false -end - -local function DrawText3D(coords, text) - --Style the text - SetTextColour(255, 255, 255, 255) - SetTextScale(0.0, 0.35) - SetTextFont(4) - SetTextOutline() - - -- Diplay the text - BeginTextCommandDisplayText("STRING") - AddTextComponentSubstringPlayerName(text) - SetDrawOrigin(coords.x, coords.y, coords.z, 0) - EndTextCommandDisplayText(0.0, 0.0) - ClearDrawOrigin() - DrawRect(coords.x, coords.y, 1.0, 1.0, 230, 230, 230, 255) -end - -local function GetOffsetFromCoordsInWorldCoords(position, rotation, offset) - local rotX, rotY, rotZ = math.rad(rotation.x), math.rad(rotation.y), math.rad(rotation.z) - local matrix = {} - - matrix[1] = {} - matrix[1][1] = math.cos(rotZ) * math.cos(rotY) - math.sin(rotZ) * math.sin(rotX) * math.sin(rotY) - matrix[1][2] = math.cos(rotY) * math.sin(rotZ) + math.cos(rotZ) * math.sin(rotX) * math.sin(rotY) - matrix[1][3] = -math.cos(rotX) * math.sin(rotY) - matrix[1][4] = 1 - - matrix[2] = {} - matrix[2][1] = -math.cos(rotX) * math.sin(rotZ) - matrix[2][2] = math.cos(rotZ) * math.cos(rotX) - matrix[2][3] = math.sin(rotX) - matrix[2][4] = 1 - - matrix[3] = {} - matrix[3][1] = math.cos(rotZ) * math.sin(rotY) + math.cos(rotY) * math.sin(rotZ) * math.sin(rotX) - matrix[3][2] = math.sin(rotZ) * math.sin(rotY) - math.cos(rotZ) * math.cos(rotY) * math.sin(rotX) - matrix[3][3] = math.cos(rotX) * math.cos(rotY) - matrix[3][4] = 1 - - matrix[4] = {} - matrix[4][1], matrix[4][2], matrix[4][3] = position.x, position.y, position.z - matrix[4][4] = 1 - - local x = offset.x * matrix[1][1] + offset.y * matrix[2][1] + offset.z * matrix[3][1] + matrix[4][1] - local y = offset.x * matrix[1][2] + offset.y * matrix[2][2] + offset.z * matrix[3][2] + matrix[4][2] - local z = offset.x * matrix[1][3] + offset.y * matrix[2][3] + offset.z * matrix[3][3] + matrix[4][3] - - return vector3(x, y, z) -end - --- General Functions -- -local function CanPlayerUseCamera(playerPed) - -- Check for jobs - local whitelisted, jobMessage = JobCheck() - if not whitelisted then - return false, jobMessage - end - - -- If we aren't in any vehicle or we can't use this heli - if not DoesHelicopterHaveCamera(helicopter.model, helicopter.entity) then - if IsPedInAnyPlane(playerPed) then - return false, 'NoCameraPlane' - else - return false, 'NoCameraHeli' - end - end - - -- Check seat - local canUseFromCurrentSeat, seatMessage = CanPlayerUseCameraFromCurrentSeat(playerPed, helicopter.entity, helicopter.model) - if not canUseFromCurrentSeat then - return false, seatMessage - end - - -- Check if the camera for this helicopter already is in use - local heliEntity = Entity(helicopter.entity) - if heliEntity and heliEntity.state.heliCamInUse then - return false, 'CameraInUse' - end - - -- Check if someone already use camera functions such as spotlight and camera lock - if spotlights[helicopter.netId] then - return false, 'SpotlightInUse' - end - - return true, nil -end - -local function Raycast(startCoords, destination, entity, flag) - local rayHandle = StartShapeTestLosProbe(startCoords.x, startCoords.y, startCoords.z, destination.x, destination.y, destination.z, flag or 4294967295, entity, 4) -- 4294967295 = TraceFlags_IntersectEverything - - while true do - local result, hit, endCoords, surfaceNormal, entityHit = GetShapeTestResult(rayHandle) - if result ~= 1 then - return hit, endCoords, surfaceNormal, entityHit - end - - Wait(0) - end -end - -local function RaycastFromHeliCam(flag) - local camCoords = GetCamCoord(camera.cam) - local camRotation = camera.rotation or GetCamRot(camera.cam, 2) - local destination = GetOffsetFromCoordsInWorldCoords(camCoords, camRotation, vector3(0.0, Config.TargetMaxReach, 0.0)) - local hit, endCoords, _surfaceNormal, entityHit = Raycast(camCoords, destination, helicopter.entity, flag) - - return (hit == 1 and true) or false, endCoords, entityHit -end - -local function LoadPostalFile(resource, file) - local resourceState = GetResourceState(resource) - if resourceState ~= "started" then - print(string.format("^1ERROR: Postal resource %s was not started! It MUST be started before helicam for the postals to work! (Resource state: %s)^7", resource, resourceState)) - Config.ShowPostalCodes = false - else - local jsonFile = LoadResourceFile(resource, file) - if jsonFile == nil then - print(string.format("^1ERROR: The script was not able to load postals file %s from postals resource %s! Make sure that the file is loaded in the postals resource.^7", file, resource)) - else - postals = json.decode(jsonFile) - end - end -end - -local function SetCameraLabel() - local label = nil - if Config.ForceCameraLabel then - label = Config.ForceCameraLabel - else - local livery = GetVehicleLivery(helicopter.entity) - local heliConfig = Config.Helicopters[helicopter.model] - if heliConfig and heliConfig.labels then - if heliConfig.labels[livery] then - label = heliConfig.labels[livery] - else - label = heliConfig.labels[0] - end - else - label = Config.Helicopters.default.labels[0] - end - end - SendNUIMessage({ action = 'setCameraLabel', label = label }) -end - -local function CreateHelicopterCamera(heli, offset, rotation, camFov, ease, easeTime) - local cam = CreateCam("DEFAULT_SCRIPTED_CAMERA", true) - AttachCamToEntity(cam, heli, offset.x, offset.y, offset.z, true) - SetCamRot(cam, 0.0, 0.0, rotation, 2) - SetCamFov(cam, camFov) - RenderScriptCams(true, ease, easeTime, false, false) - return cam -end - -local function GetHelicopterTimecycle(model) - local heliConfig = Config.Helicopters[model] - if heliConfig and heliConfig.timecycle ~= nil then - return heliConfig.timecycle, heliConfig.timecycleStrength or Config.DefaultCameraTimecycleStrength - end - - return Config.DefaultCameraTimecycle, Config.DefaultCameraTimecycleStrength -end - -local function DeleteTablet() - local playerPed = PlayerPedId() - ClearPedSecondaryTask(playerPed) - Wait(100) - DetachEntity(tabletObj, true, false) - DeleteEntity(tabletObj) - tabletObj = nil -end - -local function CreateTablet() - local tablet = Config.Tablet - - RequestAnimDict(tablet.anim.dict) - while not HasAnimDictLoaded(tablet.anim.dict) do - Wait(0) - end - - local playerPed = PlayerPedId() - local boneIndex = GetPedBoneIndex(playerPed, tablet.bone) - - tabletObj = CreateObject(tablet.model, 0.0, 0.0, 0.0, true, true, false) - AttachEntityToEntity(tabletObj, playerPed, boneIndex, tablet.offset.x, tablet.offset.y, tablet.offset.z, tablet.rotation.x, tablet.rotation.y, tablet.rotation.z, false, true, false, true, 1, true) - - TaskPlayAnim(playerPed, tablet.anim.dict, tablet.anim.name, 2.0, 2.0, -1, 49, 1.0, false, false, false) - - CreateThread(function() - while inHeliCam do - if not IsEntityPlayingAnim(playerPed, tablet.anim.dict, tablet.anim.name, 3) then - TaskPlayAnim(playerPed, tablet.anim.dict, tablet.anim.name, 2.0, 2.0, -1, 49, 1.0, false, false, false) - end - Wait(500) - end - end) -end - -local function GetStreetAndAreaNames(streetHash, coords) - local street = GetStreetNameFromHashKey(streetHash) - local area = GetLabelText(GetNameOfZone(coords.x, coords.y, coords.z)) - return street, area -end - -local function SetZoomBarLevel() - local range = Config.Camera.Zoom.Max - Config.Camera.Zoom.Min - local percentage = (fov - Config.Camera.Zoom.Min) / range * 100 - percentage = (percentage - 100) *-1 -- Flip the values around - - SendNUIMessage({action = 'setZoomBarLevel', percentage = percentage}) -end - -local function HandleZoomInput() - if spotlight.adjustingBrightness or spotlight.adjustingRadius then return end - - if GetDisabledControlNormal(0, 40) ~= 0.0 then -- Zoom in - fov = math.max(fov - Config.Camera.Zoom.Speed, Config.Camera.Zoom.Min) - SetZoomBarLevel() - elseif GetDisabledControlNormal(0, 41) ~= 0.0 then -- Zoom out - fov = math.min(fov + Config.Camera.Zoom.Speed, Config.Camera.Zoom.Max) - SetZoomBarLevel() - end - - currentFov = GetCamFov(camera.cam) - if math.abs(fov - currentFov) < 0.1 then - fov = currentFov - else - SetCamFov(camera.cam, currentFov + (fov - currentFov) * 0.05) - end -end - -local function HandleMovementInput() - if cameraLock.active then - return - end - - local axisX = GetDisabledControlNormal(0, 220) - local axisY = GetDisabledControlNormal(0, 221) - - if axisX ~= 0.0 or axisY ~= 0.0 then - local zoomValue = (1.0/(Config.Camera.Zoom.Max-Config.Camera.Zoom.Min))*(fov-Config.Camera.Zoom.Min) - local rotation = camera.rotation - - local movementSpeed = (IsUsingKeyboard(1) and Config.Camera.MovementSpeed.Keyboard) or Config.Camera.MovementSpeed.Controller - local newX = math.max(math.min(Config.Camera.RotationLimits.Up, rotation.x + axisY*-1.0*(movementSpeed)*(zoomValue+0.1)), Config.Camera.RotationLimits.Down) - local newZ = rotation.z + axisX*-1.0*(movementSpeed)*(zoomValue+0.1) - - SetCamRot(camera.cam, newX, 0.0, newZ, 2) - movementInput = true - elseif movementInput then - movementInput = false - end -end - - --- Sound -- -local function LoadSounds() - RequestAmbientAudioBank("POLICE_CHOPPER_CAM", false) - Wait(100) - - for key, _soundId in pairs(sounds) do - sounds[key] = GetSoundId() - end -end - -local function UnloadSounds() - ReleaseAmbientAudioBank() - for key, soundId in pairs(sounds) do - if not HasSoundFinished(soundId) then - StopSound(soundId) - end - ReleaseSoundId(soundId) - sounds[key] = -1 - end -end - -local function EmitSound(soundId, soundName, audioRef, stopIfActive) - if HasSoundFinished(soundId) then - PlaySoundFrontend(soundId, soundName, audioRef or 0, true) - elseif stopIfActive then - StopSound(soundId) - PlaySoundFrontend(soundId, soundName, audioRef or 0, true) - end -end - -local function SoundThread() - CreateThread(function() - while inHeliCam do - if movementInput and not pauseMenu then - EmitSound(sounds.turn, "COP_HELI_CAM_TURN") - elseif not HasSoundFinished(sounds.turn) then - StopSound(sounds.turn) - end - - local fovDifference = math.abs(currentFov - fov) - if fovDifference > 5.0 and not pauseMenu then - EmitSound(sounds.zoom, "COP_HELI_CAM_ZOOM") - else - if not HasSoundFinished(sounds.zoom) then - StopSound(sounds.zoom) - end - end - - Wait(100) - end - end) -end - - --- Vision -- -local function DoesAnyHeliHaveVisionOverwrite() - for _hash, data in pairs(Config.Helicopters) do - if data.nightvision or data.thermalvision then - return true - end - end - - return false -end - -local function CanHelicopterUseCameraVision(model, type) - local configAllowed = (type == "nightvision" and Config.AllowNightVision) or Config.AllowThermal - if (configAllowed and (Config.Helicopters[model] and Config.Helicopters[model][type] ~= false)) or (Config.Helicopters[model] and Config.Helicopters[model][type]) then - return true - end - - return false -end - -local function DisableVision() - SendNUIMessage({action = 'setVisionState', state = "HDEO"}) - SetSeethrough(false) - SetNightvision(false) - visionState = 0 -end - -local function EnableThermal() - -- Reset the seethrough values - SeethroughReset() - - -- Big thanks goes to BrD for making the black & white thermal posible! - if Config.ThermalOptions.CustomColours then - -- Some of these are relative to eachother - SetVisualSettingFloat("seeThrough.ColorVisibleHot.red", Config.ThermalOptions.Colours.VisibleHot.R) - SetVisualSettingFloat("seeThrough.ColorVisibleHot.green", Config.ThermalOptions.Colours.VisibleHot.G) - SetVisualSettingFloat("seeThrough.ColorVisibleHot.blue", Config.ThermalOptions.Colours.VisibleHot.B) - - SetVisualSettingFloat("seeThrough.ColorVisibleWarm.red", Config.ThermalOptions.Colours.VisibleWarm.R) - SetVisualSettingFloat("seeThrough.ColorVisibleWarm.green", Config.ThermalOptions.Colours.VisibleWarm.G) - SetVisualSettingFloat("seeThrough.ColorVisibleWarm.blue", Config.ThermalOptions.Colours.VisibleWarm.B) - - SetVisualSettingFloat("seeThrough.ColorVisibleBase.red", Config.ThermalOptions.Colours.VisibleBase.R) - SetVisualSettingFloat("seeThrough.ColorVisibleBase.green", Config.ThermalOptions.Colours.VisibleBase.G) - SetVisualSettingFloat("seeThrough.ColorVisibleBase.blue", Config.ThermalOptions.Colours.VisibleBase.B) - - -- Colour of the far of fade as well as the sky - SetVisualSettingFloat("seeThrough.ColorFar.red", Config.ThermalOptions.Colours.Far.R) - SetVisualSettingFloat("seeThrough.ColorFar.green", Config.ThermalOptions.Colours.Far.G) - SetVisualSettingFloat("seeThrough.ColorFar.blue", Config.ThermalOptions.Colours.Far.B) - - -- Colour of the ground - SetVisualSettingFloat("seeThrough.ColorNear.red", Config.ThermalOptions.Colours.Near.R) - SetVisualSettingFloat("seeThrough.ColorNear.green", Config.ThermalOptions.Colours.Near.G) - SetVisualSettingFloat("seeThrough.ColorNear.blue", Config.ThermalOptions.Colours.Near.B) - end - - -- Max amount of thickness we can see trough (not in m or ft, unsure how it's calculated by the game.) - SeethroughSetMaxThickness(Config.ThermalOptions.MaxThickness) - - -- Set the amount of noise - SeethroughSetNoiseAmountMin(Config.ThermalOptions.MinNoise) - SeethroughSetNoiseAmountMax(Config.ThermalOptions.MaxNoise) - - -- Set how far we can see - SeethroughSetFadeStartDistance(Config.ThermalOptions.FadeStart) - SeethroughSetFadeEndDistance(Config.ThermalOptions.FadeEnd) - - -- Enable the seetrough effect (thermal vision) - SetSeethrough(true) -end - -local function CycleVision() - if visionState == 0 then - visionState = 1 - if CanHelicopterUseCameraVision(helicopter.model, "nightvision") then - local hour = GetClockHours() - if Config.AllowNightVisionDuringDay or (hour > 20 or hour < 6) then - EmitSound(sounds.thermal, "THERMAL_VISION_GOGGLES_ON_MASTER", 0, true) - SendNUIMessage({action = 'setVisionState', state = "HDNV"}) - SetNightvision(true) - return - end - end - end - - if visionState == 1 and CanHelicopterUseCameraVision(helicopter.model, "thermalvision") then - SendNUIMessage({action = 'setVisionState', state = "HDIR"}) - SetNightvision(false) - EnableThermal() - visionState = 2 - return - end - - DisableVision() -end - - --- Camera Lock -- -local function LockCamera(coords, entity) - cameraLock.active = true - movementInput = false - local entityType = GetEntityType(entity) - if entity and entityType ~= 0 then - local offset = vector3(0.0, 0.0, 0.0) - if not ShouldLockOntoCenter(entityType) then - offset = GetOffsetFromEntityGivenWorldCoords(entity, coords.x, coords.y, coords.z) - end - PointCamAtEntity(camera.cam, entity, offset.x, offset.y, offset.z, true) - cameraLock.prevType = cameraLock.type - cameraLock.type = "entity" - cameraLock.entity = entity - cameraLock.coords = nil - else - -- We have to re-create the camera due to bug with the PointCamAtCoord/PointCamAtEntity functions regarding offsets. - if cameraLock.prevType == "entity" then - local offset = GetHeliCameraOffset(helicopter.model) - local rotation = GetEntityRotation(helicopter.entity, 5).z - local cam = CreateHelicopterCamera(helicopter.entity, offset, rotation, GetCamFov(camera.cam), false, 0) - DestroyCam(camera.cam, true) - camera.cam = cam - end - - PointCamAtCoord(camera.cam, coords.x, coords.y, coords.z) - cameraLock.prevType = cameraLock.type - cameraLock.type = "coords" - cameraLock.entity = nil - cameraLock.coords = coords - end - - local lockType = nil - if cameraLock.type == "coords" then - lockType = "GROUND" - elseif entityType == 2 then - lockType = "VEHICLE" - elseif entityType == 1 then - if GetPedType(cameraLock.entity) == 28 then - lockType = "ANIMAL" - else - lockType = "PERSON" - end - else - lockType = "UNKNOWN" - end - SendNUIMessage({ action = 'setCameraLockState', state = true, type = lockType }) -end - -local function AttemptLockScanning(targetEntity) - local count = 1 - - cameraLock.attempting = true - SendNUIMessage({ action = 'startLockScanning' }) - - while true do - Wait(200) - local hit, hitCoords, hitEntity = RaycastFromHeliCam() - if hit and hitEntity == targetEntity then - count += 1 - else - count -= 1 - end - - if not inHeliCam then - return false - end - - if Config.PlaySounds then - EmitSound(sounds.scanLoop, "COP_HELI_CAM_SCAN_PED_LOOP") - end - - SendNUIMessage({ action = 'updateLockScanning', value = count }) - - if count >= 11 then - if Config.PlaySounds then - if not HasSoundFinished(sounds.scanLoop) then - StopSound(sounds.scanLoop) - end - PlaySoundFrontend(sounds.scanSuccess, "COP_HELI_CAM_SCAN_PED_SUCCESS", 0, true) - end - return true, hitCoords, hitEntity - end - - if count <= -1 or not cameraLock.attempting then - if Config.PlaySounds then - if not HasSoundFinished(sounds.scanLoop) then - StopSound(sounds.scanLoop) - end - PlaySoundFrontend(sounds.scanFailure, "COP_HELI_CAM_SCAN_PED_FAILURE", 0, true) - end - return false - end - end -end - -local function AttemptCameraLock() - local hit, hitCoords, hitEntity = RaycastFromHeliCam() - if hit then - if GetEntityType(hitEntity) ~= 0 then - if Config.InstantCameraLock then - LockCamera(hitCoords, hitEntity) - else - local success, coords, entity = AttemptLockScanning(hitEntity) - if success then - LockCamera(coords, entity) - end - cameraLock.attempting = false - SendNUIMessage({ action = 'lockScanningFinished' }) - end - elseif Config.AllowCameraLockOnGround then - LockCamera(hitCoords, hitEntity) - end - end -end - -local function StopCameraLock() - if camera.cam and cameraLock.active then - StopCamPointing(camera.cam) - end - SendNUIMessage({ action = 'setCameraLockState', state = false, type = "NONE" }) - - -- Reset variables - cameraLock.active = false - cameraLock.prevType = cameraLock.type - cameraLock.type = nil - cameraLock.entity = nil - cameraLock.coords = nil - cameraLock.timeout = 0 - cameraLock.progress = 0 -end - -local function CheckCameraLock(hit, hitCoords, hitEntity) - if cameraLock.active then - local timeout = false - if not hit then - timeout = true - elseif cameraLock.type == "coords" then - local distToTarget = #(hitCoords-cameraLock.coords) - if distToTarget > 1.0 then - timeout = true - end - elseif cameraLock.type == "entity" then - if hitEntity ~= cameraLock.entity and not HasEntityClearLosToEntity(helicopter.entity, cameraLock.entity, 4294967295) then - timeout = true - end - end - - if timeout then - cameraLock.timeout += 1 - if Config.PlaySounds then - EmitSound(sounds.bleep, "COP_HELI_CAM_BLEEP_TOO_FAR") - end - - if cameraLock.timeout >= Config.CameraLockBreakTicks then - StopCameraLock() - end - elseif cameraLock.timeout > 0 then - cameraLock.timeout -= 1 - end - end -end - - --- Rappel -- -local function AttemptRappel(wasKeyPress) - if not helicopter.entity then - return - end - - local heliConfig = Config.Helicopters[helicopter.model] - if not DoesVehicleAllowRappel(helicopter.entity) or (heliConfig and heliConfig.disableRappelling) then - DisplayNotification(Config.Localisation.Notification.CannotRappelFromHeli) - return - end - - local playerPed = PlayerPedId() - local isInCorrectSeat = GetPedInVehicleSeat(helicopter.entity, 1) == playerPed or GetPedInVehicleSeat(helicopter.entity, 2) == playerPed - if not isInCorrectSeat then - DisplayNotification(Config.Localisation.Notification.CannotRappelFromSeat) - return - end - - local coords = GetEntityCoords(helicopter.entity) - local foundHeight, groundZ = GetGroundZFor_3dCoord(coords.x, coords.y, coords.z, false) - if not foundHeight or coords.z - groundZ > Config.MaxRappellingHight then - DisplayNotification(Config.Localisation.Notification.ToHighToRappel) - return - end - - if wasKeyPress and (lastRappelKeyPress == 0 or (lastRappelKeyPress + Config.RappellingTimeout < GetGameTimer())) then - lastRappelKeyPress = GetGameTimer() - DisplayNotification(Config.Localisation.Notification.ConfirmRappel) - else - lastRappelKeyPress = 0 - EmitSound(sounds.rappel, "SELECT", "HUD_FRONTEND_DEFAULT_SOUNDSET") - DisplayNotification(Config.Localisation.Notification.Rappelling) - - TaskRappelFromHeli(playerPed, 1) - end -end - - --- Instructions -- -local function AddInInstructionsControl(scaleform, index, control, text) - BeginScaleformMovieMethod(scaleform, "SET_DATA_SLOT") - ScaleformMovieMethodAddParamInt(index) - ScaleformMovieMethodAddParamPlayerNameString(control) - BeginTextCommandScaleformString("STRING") - AddTextComponentSubstringPlayerName(text) - EndTextCommandScaleformString() - EndScaleformMovieMethod() -end - -local function SetupInstructionsScaleform() - instScaleform = RequestScaleformMovie("INSTRUCTIONAL_BUTTONS") - while not HasScaleformMovieLoaded(instScaleform) do - Wait(10) - end - - BeginScaleformMovieMethod(instScaleform, "CLEAR_ALL") - EndScaleformMovieMethod() - - BeginScaleformMovieMethod(instScaleform, "SET_CLEAR_SPACE") - ScaleformMovieMethodAddParamInt(200) - EndScaleformMovieMethod() - - -- Add Controls - for index, button in pairs(Config.InstructionButtons) do - AddInInstructionsControl(instScaleform, index, button.control, button.label) - end - - -- Background colour - BeginScaleformMovieMethod(instScaleform, "SET_BACKGROUND_COLOUR") - ScaleformMovieMethodAddParamInt(0) -- Red - ScaleformMovieMethodAddParamInt(0) -- Green - ScaleformMovieMethodAddParamInt(0) -- Blue - ScaleformMovieMethodAddParamInt(80) -- Alpha - EndScaleformMovieMethod() - - BeginScaleformMovieMethod(instScaleform, "SET_BACKGROUND") - EndScaleformMovieMethod() - - BeginScaleformMovieMethod(instScaleform, "DRAW_INSTRUCTIONAL_BUTTONS") - EndScaleformMovieMethod() -end - -local function InstructionsThread() - CreateThread(function() - while inHeliCam do - DrawScaleformMovieFullscreen(instScaleform, 255, 255, 255, 255, 0) - Wait(0) - end - end) -end - - --- Spotlight -- -local function DoesAnyHeliHaveSpotlightOverwrite() - for _hash, data in pairs(Config.Helicopters) do - if data.spotlight then - return true - end - end - - return false -end - -local function CanHelicopterUseSpotlight(model) - if (Config.AllowSpotlight and (Config.Helicopters[model] and Config.Helicopters[model].spotlight ~= false)) or (Config.Helicopters[model] and Config.Helicopters[model].spotlight) then - return true - end - - return false -end - -local function AdjustSpolightBrightness() - CreateThread(function() - while spotlight.adjustingBrightness do - local newBrightness = spotlight.brightness - - if GetDisabledControlNormal(0, 40) ~= 0.0 then -- Scroll up - newBrightness = math.min(newBrightness + Config.Spotlight.BrightnessIncrements, Config.Spotlight.MaxBrightness) - elseif GetDisabledControlNormal(0, 41) ~= 0.0 then -- Scroll down - newBrightness = math.max(newBrightness - Config.Spotlight.BrightnessIncrements, Config.Spotlight.MinBrightness) - end - - spotlight.brightness = newBrightness - Wait(0) - end - end) -end - -local function AdjustSpolightRadius() - CreateThread(function() - while spotlight.adjustingRadius do - local newRadius = spotlight.radius - - if GetDisabledControlNormal(0, 40) ~= 0.0 then -- Scroll up - newRadius = math.min(newRadius + Config.Spotlight.RadiusIncrements, Config.Spotlight.MaxRadius) - elseif GetDisabledControlNormal(0, 41) ~= 0.0 then -- Scroll down - newRadius = math.max(newRadius - Config.Spotlight.RadiusIncrements, Config.Spotlight.MinRadius) - end - - spotlight.radius = newRadius - Wait(0) - end - end) -end - -local function SpotlightThread() - local direction = nil - local position = nil - local netId = helicopter.netId - - -- Reset spotlight brightness/radius - spotlight.brightness = Config.Spotlight.DefaultBrightness - spotlight.radius = Config.Spotlight.DefaultRadius - - CreateThread(function() - while spotlight.active do - local rotation = camera.rotation or GetCamRot(camera.cam, 2) - direction = RotAnglesToVec(rotation) - local camCoords = GetCamCoord(camera.cam) - position = camCoords + direction - - DrawSpotLightWithShadow(position.x, position.y, position.z, direction.x, direction.y, direction.z, Config.Spotlight.Colour.R, Config.Spotlight.Colour.G, Config.Spotlight.Colour.B, Config.Spotlight.MaxDistance, spotlight.brightness, Config.Spotlight.Roundness, spotlight.radius, Config.Spotlight.Falloff, 0) - Wait(0) - end - end) - - CreateThread(function() - while spotlight.active do - SynchroniseSpotlight({ position = position, direction = direction, brightness = spotlight.brightness, radius = spotlight.radius, helicopter = netId }) - Wait(25) - end - SynchroniseSpotlight({ position = false, helicopter = netId }) - end) -end - -local function SpotlightCameraLockCheck() - CreateThread(function() - spotlight.cameraLockThread = true - while spotlight.active and not inHeliCam do - local hit, hitCoords, hitEntity = RaycastFromHeliCam() - CheckCameraLock(hit, hitCoords, hitEntity) - Wait(250) - end - spotlight.cameraLockThread = false - end) -end - -local function ToggleSpotlight() - if not inHeliCam or pauseMenu then - return - end - - -- Check if our helicopter can use a spotlight - if not CanHelicopterUseSpotlight(helicopter.model) then - DisplayNotification(Config.Localisation.Notification.NoSpotlight) - return - end - - -- Emit toggle sound - EmitSound(sounds.spotlight, "NAV_LEFT_RIGHT", "HUD_FRONTEND_DEFAULT_SOUNDSET") - - spotlight.active = not spotlight.active - if spotlight.active then - if not Config.MaxAmountOfSpotlights then - SpotlightThread() - return - end - - if GlobalState.heliSpotlightsActive >= Config.MaxAmountOfSpotlights then - spotlight.active = false - DisplayNotification(Config.Localisation.Notification.SpotlightGlobalLimit) - return - end - - TriggerServerEvent('helicam:toggleSpotlight', true) - SpotlightThread() - elseif Config.MaxAmountOfSpotlights then - TriggerServerEvent('helicam:toggleSpotlight', false) - end -end - --- Spotlights that are not controled by us -local function ForeignSpotlightThread() - CreateThread(function() - spotlight.isThreadActive = true - while not IsTableEmpty(spotlights) do - for _netId, data in pairs(spotlights) do - DrawSpotLightWithShadow(data.position.x, data.position.y, data.position.z, data.direction.x, data.direction.y, data.direction.z, Config.Spotlight.Colour.R, Config.Spotlight.Colour.G, Config.Spotlight.Colour.B, Config.Spotlight.MaxDistance, data.brightness+0.0, Config.Spotlight.Roundness, data.radius+0.0, Config.Spotlight.Falloff, 0) - end - Wait(0) - end - spotlight.isThreadActive = false - end) -end - -AddStateBagChangeHandler('heliCamSpotlightData', nil, function(bagName, key, data, _unused, replicated) - -- Ignore this if we are the camera operator - if not data or (data.helicopter == helicopter.netId and camera.cam) then - return - end - - -- Turn off spotlight - if not data.position then - spotlights[data.helicopter] = nil - return - end - - spotlights[data.helicopter] = data - - if not spotlight.isThreadActive then - ForeignSpotlightThread() - end -end) - - --- Blips -- -local function ToggleMarker() - local markerIndex = nil - local hit, hitCoords = RaycastFromHeliCam() - if not hit then - return - end - - local adjustedCoords = vector3(hitCoords.x, hitCoords.y, hitCoords.z + 0.25) - for index, coords in pairs(markers) do - local dist = #(coords - adjustedCoords) - if dist < Config.Marker.Circle.Scale + 0.5 then - markerIndex = index - break - end - end - - if markerIndex then - -- Remove Marker from table - table.remove(markers, markerIndex) - else - -- If already max markers, remove the marker we created the longest ago - if #markers >= Config.Marker.MaxAmount then - table.remove(markers, 1) - end - - -- Add marker - markers[#markers+1] = adjustedCoords - end - - SetHelicopterStateBag("heliCamMarkers", markers) -end - -local function CreateMarkerBlip(coords, number) - local blip = AddBlipForCoord(coords.x, coords.y, coords.z) - - SetBlipSprite(blip, Config.Marker.Blip.Sprite) - SetBlipScale(blip, Config.Marker.Blip.Scale) - SetBlipColour(blip, Config.Marker.Blip.Colour) - - if Config.Marker.Blip.Number then - ShowNumberOnBlip(blip, number) - end - - -- Set blip name - BeginTextCommandSetBlipName("STRING") - AddTextComponentSubstringPlayerName(Config.Localisation.Blip.Marker) - EndTextCommandSetBlipName(blip) - - return blip -end - -local function UpdateMarkerBlips() - if markers == nil then - return - end - - if #markers < #markerBlips then - for index, data in pairs(markerBlips) do - if index > #markers then - RemoveBlip(data.handler) - markerBlips[index] = nil - end - end - end - - for index, coords in pairs(markers) do - if not markerBlips[index] then - markerBlips[index] = {} - markerBlips[index].handler = CreateMarkerBlip(coords, index) - markerBlips[index].coords = coords - elseif markerBlips[index].coords ~= coords then - SetBlipCoords(markerBlips[index].handler, coords.x, coords.y, coords.z) - ShowNumberOnBlip(markerBlips[index].handler, index) - markerBlips[index].coords = coords - end - end -end - -local function MarkersThread() - CreateThread(function() - isMarkersThreadActive = true - - while true do - if markers == nil or #markers == 0 then - break - end - - local heliCoords = cache.helicopter.coords or GetEntityCoords(helicopter.entity) - - for index, coords in pairs(markers) do - if #(heliCoords - coords) < Config.Marker.MaxDrawDistance then - DrawMarker(Config.Marker.Circle.Type, coords.x, coords.y, coords.z, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Config.Marker.Circle.Scale, Config.Marker.Circle.Scale, Config.Marker.Circle.Scale, Config.Marker.Circle.Colour.R, Config.Marker.Circle.Colour.G, Config.Marker.Circle.Colour.B, Config.Marker.Circle.Colour.A, false, true, 2, false, nil, nil, false) - if Config.Marker.Number.Display then - DrawMarker(index+10, coords.x, coords.y, coords.z, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Config.Marker.Number.Scale, Config.Marker.Number.Scale, Config.Marker.Number.Scale, Config.Marker.Number.Colour.R, Config.Marker.Number.Colour.G, Config.Marker.Number.Colour.B, Config.Marker.Number.Colour.A, false, true, 2, false, nil, nil, false) - end - end - end - Wait(0) - end - - isMarkersThreadActive = false - end) -end - -local function HandleTargetBlip(display) - if display then - local coords = display - if DoesBlipExist(targetBlip.handler) then - SetBlipCoords(targetBlip.handler, coords.x, coords.y, coords.z) - else - -- Create the blip - targetBlip.handler = AddBlipForCoord(coords.x, coords.y, coords.z) - SetBlipSprite(targetBlip.handler, Config.TargetBlip.Sprite) - SetBlipColour(targetBlip.handler, Config.TargetBlip.Colour) - BeginTextCommandSetBlipName("STRING") - AddTextComponentSubstringPlayerName(Config.Localisation.Blip.Target) - EndTextCommandSetBlipName(targetBlip.handler) - end - - if not targetBlip.display then - SetBlipDisplay(targetBlip.handler, 2) - targetBlip.display = true - end - elseif display == false then - if targetBlip.display then - SetBlipDisplay(targetBlip.handler, 0) - targetBlip.display = false - end - else - RemoveBlip(targetBlip.handler) - targetBlip.handler = nil - targetBlip.display = false - end -end - -local function FetchAndApplyBlipStateBags(heliEntity) - local heli = Entity(heliEntity) - if heli then - if heli.state.heliCamTargetBlip then - HandleTargetBlip(heli.state.heliCamTargetBlip) - end - - if heli.state.heliCamMarkers then - markers = heli.state.heliCamMarkers - UpdateMarkerBlips() - MarkersThread() - end - end -end - -local function RegisterBlipStateBags() - if Config.TargetBlip.Display then - blipStateBagHandlers.heliCamTargetBlip = AddStateBagChangeHandler('heliCamTargetBlip', nil, function(bagName, key, value, _unused, replicated) - local entity = GetEntityFromStateBagName(bagName) - local vehicle = helicopter.entity or GetVehiclePedIsIn(PlayerPedId(), false) - if entity == vehicle then - HandleTargetBlip(value) - end - end) - end - - if Config.AllowMarkers then - blipStateBagHandlers.heliCamMarkers = AddStateBagChangeHandler('heliCamMarkers', nil, function(bagName, key, value, _unused, replicated) - local entity = GetEntityFromStateBagName(bagName) - local vehicle = helicopter.entity or GetVehiclePedIsIn(PlayerPedId(), false) - if entity == vehicle then - markers = value - UpdateMarkerBlips() - if not isMarkersThreadActive then - MarkersThread() - end - end - end) - end -end - -local function UnregisterBlipStateBags() - for _key, cookie in pairs(blipStateBagHandlers) do - RemoveStateBagChangeHandler(cookie) - end - blipStateBagHandlers = {} -end - --- Threads & Main Functions -- -local function MinimapHeadingThread() - CreateThread(function() - while inHeliCam do - SetGameplayCamRelativeHeading(camera.heading * -1) - Wait(0) - end - end) -end - -local function ExitHeliCamera() - inHeliCam = false - cameraAction = true - camera.rotation = nil - - -- Set camera avalible for others to use - TriggerServerEvent('helicam:leaveCamera', helicopter.netId) - - -- Trigger event for other scripts to use - TriggerEvent('helicam:leftCamera', helicopter.netId) - - -- Close NUI - SendNUIMessage({ action = 'close' }) - - -- Disable night-/therma-vision if enabled - if visionState ~= 0 then - DisableVision() - end - - -- Remove tablet object - if tabletObj then - DeleteTablet() - end - - if Config.InstructionButtons then - SetScaleformMovieAsNoLongerNeeded(instScaleform) - end - - if not submix and Config.NoSubmixInCamera then - EnableSubmix() - end - - local timecycleName, _timecycleStrength = GetHelicopterTimecycle(helicopter.model) - if timecycleName then - ClearTimecycleModifier() - end - - -- Reset gameplay camera, stop rendering and remove helicopter camera - SetGameplayCamRelativeHeading(0) - RenderScriptCams(false, Config.CameraTransition, Config.CameraTransitionTime, false, false) - if Config.CameraTransition then - Wait(Config.CameraTransitionTime) - end - - if not spotlight.active then - StopCameraLock() - DestroyCam(camera.cam, false) - camera.cam = nil - elseif not spotlight.cameraLockThread then - SpotlightCameraLockCheck() - end - - -- Unload sounds - if Config.PlaySounds then - UnloadSounds() - - -- Exit sound - EmitSound(sounds.exit, "BACK", "HUD_FRONTEND_DEFAULT_SOUNDSET") - end - - -- Toggle radar on again - if Config.HideMinimap then - DisplayRadar(true) - end - - -- Reset varaibles - cameraAction = false -end - -local function OnLeftHelicopter() - markers = {} - HandleTargetBlip(nil) - UpdateMarkerBlips() - UnregisterBlipStateBags() - - if inHeliCam then - ExitHeliCamera() - end - - -- Reset camera variables - StopCameraLock() - - -- Destroy camera - DestroyCam(camera.cam, false) - camera.cam = nil - - -- Removes audio submix if it was enabled - if submix then - DisableSubmix() - end - - -- Remove spotlight - if spotlight.active then - spotlight.active = false - end - - helicopter = {} -end - -local function InHelicopterThread() - CreateThread(function() - local heli = GetVehiclePedIsIn(PlayerPedId(), false) - while heli == helicopter.entity do - Wait(250) - heli = GetVehiclePedIsIn(PlayerPedId(), false) - end - - OnLeftHelicopter() - end) -end - -local function OnEnteredVehicle(vehicle) - local model = GetEntityModel(vehicle) - local hasCamera = DoesHelicopterHaveCamera(model, vehicle) - if hasCamera then - CreateThread(function() - if helicopter.entity then - while helicopter.entity ~= nil and helicopter.entity ~= 0 do - Wait(0) - end - Wait(100) - end - - helicopter.entity = vehicle - helicopter.netId = VehToNet(vehicle) - helicopter.model = model - - RegisterBlipStateBags() - FetchAndApplyBlipStateBags(vehicle) - InHelicopterThread() - end) - end - - if Config.UseSubmix then - EnableSubmix() - if not hasCamera then - CreateThread(function() - local playerPed = PlayerPedId() - while IsPedInAnyHeli(playerPed) or IsPedInAnyPlane(playerPed) do - Wait(250) - end - - -- Removes audio submix if it was enabled - if submix then - DisableSubmix() - end - end) - end - end -end - -local function CollectAndSendData() - local info = {} - local data = {} - data.target = {} - data.helicopter = {} - - data.helicopter.speed = GetEntitySpeed(helicopter.entity) - data.helicopter.coords = GetEntityCoords(helicopter.entity) - data.helicopter.heading = GetEntityHeading(helicopter.entity) - data.target.numberplate = false - - if Config.TimeFormat == 1 then - local hour = GetClockHours() - local minute = GetClockMinutes() - - info.time = ("%.2d"):format((hour == 0) and 12 or hour) .. ":" .. ("%.2d"):format(minute) - end - - local setData = {} - if data.helicopter.speed ~= cache.helicopter.speed then - setData['hi-speed'] = string.format("%.0f", data.helicopter.speed * Units.Speed.Conversion) - cache.helicopter.speed = data.helicopter.speed - end - if data.helicopter.coords ~= cache.helicopter.coords then - setData['hi-altitude'] = string.format("%.0f", data.helicopter.coords.z * Units.Altitude.Conversion) - cache.helicopter.coords = data.helicopter.coords - end - if data.helicopter.heading ~= cache.helicopter.heading then - setData['hi-heading'] = string.format("%.0f", data.helicopter.heading) - cache.helicopter.heading = data.helicopter.heading - end - if camera.pitch ~= cache.camera.pitch then - setData['camera-pitch'] = string.format("%.0f", (camera.pitch - 90) * -1).."°" - cache.camera.pitch = camera.pitch - end - if camera.heading ~= cache.camera.heading then - setData['camera-heading'] = string.format("%.0f", camera.heading).."°" - cache.camera.heading = camera.heading - end - if camera.bearing ~= cache.camera.bearing then - setData['bearing-text'] = string.format("%.0f", camera.bearing).."°T" - cache.camera.bearing = camera.bearing - end - - local hit, hitCoords, hitEntity = RaycastFromHeliCam() - if cameraLock.active then - CheckCameraLock(hit, hitCoords, hitEntity) - hitEntity = cameraLock.entity - end - - if hit then - data.target.elevation = string.format("%.0f", hitCoords.z * Units.TargetElevation.Conversion) - if data.target.elevation ~= cache.target.elevation then - setData['ta-elevation'] = data.target.elevation - cache.target.elevation = data.target.elevation - end - - if (hitEntity and GetEntityType(hitEntity) ~= 0) or cameraLock.active then - data.target.heading = GetEntityHeading(hitEntity) - data.target.speed = string.format("%.0f", GetEntitySpeed(hitEntity) * Units.TargetSpeed.Conversion) - - if IsEntityAVehicle(hitEntity) and ((Config.OnlyShowPlateIfLocked and cameraLock.active) or not Config.OnlyShowPlateIfLocked) then - local success, plate = GetVehicleNumberPlate(hitEntity, GetEntityRotation(hitEntity), camera.rotation or GetCamRot(camera.cam, 2)) - if success then - data.target.numberplate = plate - end - end - - data.target.heading = string.format("%.0f", data.target.heading) - elseif movementInput and cache.target.position ~= nil then - data.target.speed = string.format("%.0f", #(cache.target.position - hitCoords) * Units.TargetSpeed.Conversion) - data.target.heading = string.format("%.0f", GetHeadingBetweenCoords(cache.target.position, hitCoords)) - end - - if hitCoords ~= cache.target.position then - SetHelicopterStateBag('heliCamTargetBlip', hitCoords) - cache.target.position = hitCoords - end - if data.target.speed ~= cache.target.speed then - cache.target.speed = data.target.speed - if data.target.speed == nil then data.target.speed = "---" end - setData['ta-speed'] = data.target.speed - end - if data.target.heading ~= cache.target.heading then - cache.target.heading = data.target.heading - if data.target.heading == nil then data.target.heading = "---" end - setData['ta-heading'] = data.target.heading - end - - data.target.distance = #(hitCoords - data.helicopter.coords) - if data.target.distance ~= cache.target.distance then - local decimals = (Units.TargetDistance.Type == "MI" and "%.2f") or "%.0f" - setData['ta-distance'] = string.format(decimals, data.target.distance * Units.TargetDistance.Conversion) - cache.target.distance = data.target.distance - end - else - if cache.target.speed ~= "---" then - setData['ta-speed'] = "---" - cache.target.speed = "---" - end - if cache.target.heading ~= "---" then - setData['ta-heading'] = "---" - cache.target.heading = "---" - end - if cache.target.elevation ~= "---" then - setData['ta-elevation'] = "---" - cache.target.elevation = "---" - end - if cache.target.distance ~= "---" then - setData['ta-distance'] = "---" - cache.target.distance = "---" - end - - local heli = Entity(helicopter.entity) - if not heli or (heli and heli.state.heliCamTargetBlip) then - SetHelicopterStateBag('heliCamTargetBlip', false) - end - end - - -- Send number plate if it's different from last time we send it to the NUI - if cache.target.numberplate ~= (data.target.numberplate or false) then - info.numberplate = data.target.numberplate - cache.target.numberplate = data.target.numberplate - end - - if Config.ShowLatitudeLongitude then - local latitude = GetCartesianCoords(data.helicopter.coords.x) - local longitude = GetCartesianCoords(data.helicopter.coords.y) - if data.helicopter.latitude ~= latitude then - setData['hi-latitude'] = latitude - cache.helicopter.latitude = latitude - end - if data.helicopter.longitude ~= longitude then - setData['hi-longitude'] = longitude - cache.helicopter.longitude = longitude - end - - if hit then - local targetLatitude = GetCartesianCoords(hitCoords.x) - local targetLongitude = GetCartesianCoords(hitCoords.y) - if data.helicopter.latitude ~= targetLatitude then - setData['ta-latitude'] = targetLatitude - cache.target.latitude = targetLatitude - end - if data.helicopter.longitude ~= targetLongitude then - setData['ta-longitude'] = targetLongitude - cache.target.longitude = targetLongitude - end - else - if data.helicopter.latitude ~= "---" then - setData['ta-latitude'] = "---" - cache.target.latitude = "---" - end - if data.helicopter.longitude ~= "---" then - setData['ta-longitude'] = "---" - cache.target.longitude = "---" - end - end - else - -- Street name and area - local streetHash, _crossingHash = GetStreetNameAtCoord(data.helicopter.coords.x, data.helicopter.coords.y, data.helicopter.coords.z) - if streetHash ~= cache.helicopter.street then - local street, area = GetStreetAndAreaNames(streetHash, data.helicopter.coords) - setData['hi-street'] = street.." - "..area - cache.helicopter.street = streetHash - end - - if hit then - local targetStreetHash, _targetCrossingHash = GetStreetNameAtCoord(hitCoords.x, hitCoords.y, hitCoords.z) - if targetStreetHash ~= cache.target.street then - local targetStreet, targetArea = GetStreetAndAreaNames(targetStreetHash, hitCoords) - setData['ta-street'] = targetStreet.." - "..targetArea - cache.target.street = targetStreetHash - end - elseif cache.target.street ~= "---" then - setData['ta-street'] = "---" - cache.target.street = "---" - end - end - - if not IsTableEmpty(info) or not IsTableEmpty(setData) then - SendNUIMessage({ - action = 'updateData', - info = info, - set = setData - }) - end -end - -local function UpdateUIHeadingPitchAndBearing() - local rotation = GetCamRot(camera.cam, 2) - local bearing = string.format("%.0f", RotationToHeading(rotation.z)) - local pitch = (rotation.x * -1) + 90.0 - local heading = (rotation.z * -1) + GetEntityHeading(helicopter.entity) - if heading > 360 then - heading = heading - 360 - end - - if math.abs(camera.pitch - pitch) > 0.1 or math.abs(camera.heading - heading) > 0.1 then - SendNUIMessage({ - action = 'updateDataFrame', - pitch = pitch, - heading = heading, - bearing = bearing - }) - - camera.pitch = pitch - camera.heading = heading - camera.bearing = bearing - end - - camera.rotation = rotation -end - -local function PrimaryThread() - UpdateUIHeadingPitchAndBearing() - - CreateThread(function() - while inHeliCam do - if not pauseMenu then - -- Camera Heading, Pitch and Bearing - UpdateUIHeadingPitchAndBearing() - - -- Handle inputs - HandleZoomInput() - HandleMovementInput() - - -- Disable game inputs - for _index, control in pairs(controlActions) do - DisableControlAction(0, control, true) - end - else - Wait(100) - end - - Wait(0) - end - end) -end - -local function DisplayPostalLoop() - CreateThread(function() - while inHeliCam and postalsActive do - for _index, data in pairs(displayPostals) do - DrawText3D(data.coords, data.code) - end - Wait(0) - end - - displayPostals = {} - end) -end - -local function PostalLoop() - CreateThread(function() - while inHeliCam and postalsActive do - local coords = cache.target.position and cache.target.position.xy or cache.helicopter.coords.xy - local inDistance = {} - - for _index, data in pairs(postals) do - local postalCoords = data.coords and data.coords.xy or vector2(data.x, data.y) - local dist = #(coords - postalCoords) - if dist < 500.0 then - if data.coords then - inDistance[#inDistance+1] = { coords = data.coords, code = data.code, dist = dist } - else - local success, groundZ = GetGroundZFor_3dCoord(data.x, data.y, cache.helicopter.coords.z, false) - if success then - data.coords = vector3(data.x, data.y, groundZ) -- Cache's the z coord - data.x = nil - data.y = nil - inDistance[#inDistance+1] = { coords = data.coords, code = data.code, dist = dist } - end - end - end - end - - table.sort(inDistance, function(p1, p2) return p1.dist < p2.dist end) - - displayPostals = {} - for i = 1, 50 do - displayPostals[i] = inDistance[i] - end - - Wait(500) - end - end) - - DisplayPostalLoop() -end - -local function SecondaryThread() - CollectAndSendData() - SendNUIMessage({ action = 'open' }) - - CreateThread(function() - while true do - if not inHeliCam then - return - end - - if IsEntityDead(PlayerPedId()) then - ExitHeliCamera() - return - end - - if IsPauseMenuActive() then - if not pauseMenu then - pauseMenu = true - SendNUIMessage({ action = 'close' }) - end - else - CollectAndSendData() - - -- Sets camera depth of field - local dist = type(cache.target.distance) == "number" and cache.target.distance or 500.0 - SetCamDofFocusDistanceBias(camera.cam, dist) - - if pauseMenu then - pauseMenu = false - SendNUIMessage({ action = 'open' }) - end - end - - Wait(250) - end - end) -end - -local function UseHeliCamera() - if helicopter.model == nil or helicopter.entity == nil then - print("^1ERROR: helicopter model or entity was nil, this is fatal and will cause issues!^7") - end - - cameraAction = true - inHeliCam = true - SetCameraLabel() - - if Config.PlaySounds then - LoadSounds() -- Loads the sounds used when in the camera - - if Config.PlayCameraMovementSounds then - SoundThread() -- Handles sounds, runs every 100ms - end - - -- Enter sound - EmitSound(sounds.enter, "SELECT", "HUD_FRONTEND_DEFAULT_SOUNDSET") - end - - if not camera.cam then - fov = Config.Camera.Zoom.Max - local offset = GetHeliCameraOffset(helicopter.model) - local rotation = GetEntityRotation(helicopter.entity, 5).z - camera.cam = CreateHelicopterCamera(helicopter.entity, offset, rotation, 50.0, Config.CameraTransition, Config.CameraTransitionTime) - if Config.CameraTransition then - Wait(Config.CameraTransitionTime) - end - else - RenderScriptCams(true, Config.CameraTransition, Config.CameraTransitionTime, false, false) - end - - local timecycleName, timecycleStrength = GetHelicopterTimecycle(helicopter.model) - if timecycleName then - SetTimecycleModifier(timecycleName) - SetTimecycleModifierStrength(timecycleStrength) - end - - -- Trigger event for other scripts to use - TriggerEvent('helicam:enteredCamera', helicopter.netId) - - -- Reset the zoom bar - SetZoomBarLevel() - - if Config.ShowInstructions then - SetupInstructionsScaleform() - InstructionsThread() - end - - if Config.HideMinimap then - DisplayRadar(false) - else - MinimapHeadingThread() - end - - if Config.UseSubmix and Config.NoSubmixInCamera then - DisableSubmix() - end - - PrimaryThread() -- Handles controls and other stuff thats needs to be run every frame - SecondaryThread() -- Handles "everything else", runs once every 250ms to save resources - - if Config.ShowPostalCodes then - PostalLoop() - end - - if Config.UseAnimProp then - CreateTablet() - end - cameraAction = false -end - - --- Events -- -RegisterNetEvent('helicam:enterCamera') -AddEventHandler('helicam:enterCamera', function(state) - if state then - UseHeliCamera() - else - DisplayNotification(Config.Localisation.Notification.CameraInUse) - end -end) - -AddEventHandler('gameEventTriggered', function(event, args) - if event == "CEventNetworkPlayerEnteredVehicle" then - if args[1] == PlayerId() then - OnEnteredVehicle(args[2]) - end - end -end) - - --- Commands & Key Mapping -- -RegisterKeyMapping('helicam', Config.Localisation.KeyMapping.ToggleCam, Config.Keybinds.ToggleCam.Type, Config.Keybinds.ToggleCam.Key) -RegisterCommand('helicam', function() - if cameraAction or pauseMenu then - return - end - - if not inHeliCam then - local playerPed = PlayerPedId() - if IsPedInAnyHeli(playerPed) or IsPedInAnyPlane(playerPed) then - local canUseCamera, message = CanPlayerUseCamera(playerPed) - if canUseCamera then - TriggerServerEvent('helicam:enterCamera', helicopter.netId) - elseif message then - DisplayNotification(Config.Localisation.Notification[message]) - end - end - else - ExitHeliCamera() - end -end, false) - -if Config.AllowCameraLock then - RegisterKeyMapping('+helicam_lock', Config.Localisation.KeyMapping.AttemptLock, Config.Keybinds.AttemptLock.Type, Config.Keybinds.AttemptLock.Key) - RegisterCommand('+helicam_lock', function() - if not inHeliCam or pauseMenu then - return - end - - if not cameraLock.active then - AttemptCameraLock() - else - StopCameraLock() - end - end, false) - - RegisterCommand('-helicam_lock', function() - cameraLock.attempting = false - end, false) -end - -if Config.AllowNightVision or Config.AllowThermal or DoesAnyHeliHaveVisionOverwrite() then - RegisterKeyMapping('helicam_cycle_vision', Config.Localisation.KeyMapping.CycleVision, Config.Keybinds.CycleVision.Type, Config.Keybinds.CycleVision.Key) - RegisterCommand('helicam_cycle_vision', function() - if inHeliCam and not pauseMenu then - CycleVision() - end - end, false) -end - -if Config.AllowMarkers then - RegisterKeyMapping('helicam_toggle_marker', Config.Localisation.KeyMapping.ToggleMarker, Config.Keybinds.ToggleMarker.Type, Config.Keybinds.ToggleMarker.Key) - RegisterCommand('helicam_toggle_marker', function() - if inHeliCam and not pauseMenu then - ToggleMarker() - end - end, false) -end - -if Config.AllowRappelling then - RegisterKeyMapping('+rappel', Config.Localisation.KeyMapping.Rappel, Config.Keybinds.Rappel.Type, Config.Keybinds.Rappel.Key) - RegisterCommand('rappel', function() - AttemptRappel(false) - end, false) - RegisterCommand('+rappel', function() - AttemptRappel(true) - end, false) - RegisterCommand('-rappel', function() - -- This is just a place holder to prevent "unknown command" messages in chat - end, false) -end - -if Config.AllowSpotlight or DoesAnyHeliHaveSpotlightOverwrite() then - -- Toggle spotlight - RegisterKeyMapping('helispotlight', Config.Localisation.KeyMapping.Spotlight, Config.Keybinds.Spotlight.Type, Config.Keybinds.Spotlight.Key) - RegisterCommand('helispotlight', function() - ToggleSpotlight() - end, false) - - -- Adjusting spoltight brightness - RegisterKeyMapping('+adjust_heli_spotlight_brightness', Config.Localisation.KeyMapping.SpotlightBrightness, Config.Keybinds.SpotlightBrightness.Type, Config.Keybinds.SpotlightBrightness.Key) - RegisterCommand('+adjust_heli_spotlight_brightness', function() - if inHeliCam and spotlight.active and not pauseMenu then - if spotlight.adjustingBrightness then return end - spotlight.adjustingBrightness = true - AdjustSpolightBrightness() - end - end, false) - - RegisterCommand('-adjust_heli_spotlight_brightness', function() - spotlight.adjustingBrightness = false - end, false) - - -- Adjusting spoltight size/radius - RegisterKeyMapping('+adjust_heli_spotlight_radius', Config.Localisation.KeyMapping.SpotlightRadius, Config.Keybinds.SpotlightRadius.Type, Config.Keybinds.SpotlightRadius.Key) - RegisterCommand('+adjust_heli_spotlight_radius', function() - if inHeliCam and spotlight.active and not pauseMenu then - if spotlight.adjustingRadius then return end - spotlight.adjustingRadius = true - AdjustSpolightRadius() - end - end, false) - - RegisterCommand('-adjust_heli_spotlight_radius', function() - spotlight.adjustingRadius = false - end, false) -end - -if Config.ShowPostalCodes then - RegisterKeyMapping('helipostals', Config.Localisation.KeyMapping.Postals, Config.Keybinds.Postals.Type, Config.Keybinds.Postals.Key) - RegisterCommand('helipostals', function() - if inHeliCam then - postalsActive = not postalsActive - if postalsActive then - PostalLoop() - end - end - end, false) -end - - --- Init -- -CreateThread(function() - local conversions = { - -- Speed - KTS = 1.943844, -- Knots per hour - MPH = 2.236936, -- Miles per hour - KMH = 3.6, -- Kilometers per hour - MPS = 1.0, -- Meters per second - FPS = 3.280840, -- Feet per second - - -- Distance - FT = 3.2808399, -- Feet - M = 1.0, -- Meters - MI = 0.00062137 -- Miles - } - - for index, unit in pairs(Config.Units) do - Units[index] = { - Type = unit or 'M', - Conversion = conversions[unit] or conversions['M'] - } - end - - if Config.DisablePoliceScanner then - SetAudioFlag('PoliceScannerDisabled', true) - end - - if Config.DisableFlightMusic then - SetAudioFlag("DisableFlightMusic", true) - end - - if Config.AddChatSuggestions then - TriggerEvent('chat:addSuggestion', '/helicam', Config.Localisation.ChatSuggestions.ToggleCamera) - TriggerEvent('chat:addSuggestion', '/rappel', Config.Localisation.ChatSuggestions.Rappel) - end - - if Config.ShowPostalCodes then - LoadPostalFile(Config.PostalResource, Config.PostalFile) - end - - if type(Config.DefaultCameraTimecycleStrength) ~= "number" then - print(string.format("^1ERROR: Config.DefaultCameraTimecycleStrength is invalid, it needs to be a number! Current type: %s, current value: %s.^7", type(Config.DefaultCameraTimecycleStrength), Config.CameraTimecycleStrength)) - Config.DefaultCameraTimecycleStrength = 0.5 - end - - Wait(2500) - - SendNUIMessage({ - action = 'setConfigData', - set = { - ['hi-speed-unit'] = Config.Units.Speed, - ['hi-altitude-unit'] = Config.Units.Altitude, - ['ta-speed-unit'] = Config.Units.TargetSpeed, - ['ta-elevation-unit'] = Config.Units.TargetElevation, - ['ta-distance-unit'] = Config.Units.TargetDistance - }, - showLatitudeLongitude = Config.ShowLatitudeLongitude, - showLicensePlate = Config.ShowLicensePlate, - timeFormat = Config.TimeFormat, - dateFormat = Config.DateFormat, - hideMinimap = Config.HideMinimap, - showInstructions = Config.ShowInstructions, - zoomBarOffset = Config.ZoomBarOffset - }) -end) - - --- Exports -- -local function InHelicam() - return inHeliCam -end -exports('InHelicam', InHelicam) - - --- Debugging Fix (if you restart the script while in a helicopter) -local currentResourceName = GetCurrentResourceName() -AddEventHandler('onResourceStart', function(resourceName) - if currentResourceName ~= resourceName then - return - end - - local vehicle = GetVehiclePedIsIn(PlayerPedId(), false) - if vehicle ~= 0 then - OnEnteredVehicle(vehicle) - end -end) - -AddEventHandler('onResourceStop', function(resourceName) - if currentResourceName ~= resourceName then - return - end - - if DoesEntityExist(tabletObj) then - ClearPedSecondaryTask(PlayerPedId()) - DetachEntity(tabletObj, true, false) - DeleteEntity(tabletObj) - tabletObj = nil - end - - if inHeliCam then - local heli = Entity(helicopter.entity) - if heli and heli.state.heliCamInUse then - SetHelicopterStateBag('heliCamInUse', false) - end - end - - if submix then - DisableSubmix() - end -end) diff --git a/resources/[jobs]/[police]/helicam/config.lua b/resources/[jobs]/[police]/helicam/config.lua deleted file mode 100644 index 5a0b8b6cd..000000000 --- a/resources/[jobs]/[police]/helicam/config.lua +++ /dev/null @@ -1,359 +0,0 @@ -Config = {} - -Config.TimeFormat = 0 -- 0 = ZULU (UTC), 1 = In Game Time, 2 = OS TIME (Local Time) -Config.DateFormat = 1 -- 0 = MM/DD/YY, 1 = DD/MM/YY, 2 = YY/MM/DD, 3 = DD-Mon-YYYY - -Config.PlaySounds = true -Config.PlayCameraMovementSounds = true -- If true, sounds will be played when you move the helicopter camera -Config.DisablePoliceScanner = true -- If true, disables the police radio/scanner/dispatch sounds. -Config.DisableFlightMusic = true -- If true, the ambiant flight music will be disabled. - -Config.CameraTransition = false -- If true, the camera will ease when you enter/exit the camera -Config.CameraTransitionTime = 1000 -- The time the transition/ease will take. - -Config.DefaultCameraTimecycle = false -- "modiferName" or false. If set to a modifer name (string) then all helicopters will have this timecycle effect unless spesifed under the model inside the Config.Helicopters table ("CAMERA_BW", "CAMERA_secuirity", "secret_camera" or any valid timecycle: https://wiki.rage.mp/index.php?title=Timecycle_Modifiers) -Config.DefaultCameraTimecycleStrength = 0.5 -- number, 0.0 to 1.0. - -Config.ShowLatitudeLongitude = false -- If set to true, it shows latitude/longitude, otherwise it shows the street and area -Config.TargetMaxReach = 424.0 -- The longest distance we can target an entity (424 is the regular culling dist for a player, you won't ever be able to practically reach this long anyway) - -Config.ForceCameraLabel = false -- false or "Label" -Config.CanUseAnyHelicopter = false -- If true, any helicopter can be used, if false, only helicopters in the Config.Helicopters table are allowed. - -Config.AllowCameraLock = true -- If true, the camera can lock onto the ground/targets -Config.InstantCameraLock = false -- If true, the camera will immediately lock on to the target instead of requiering a grace period -Config.AllowCameraLockOnGround = true -- If true, the camera can lock onto the ground/buildings etc. -Config.CameraLockBreakTicks = 3 -- The maximum amount of ticks the camera can lose visual of the point/person/vehicle before it breaks. --- If true, when locking onto an entity it will lock to the center of it, if false the camera locks onto the part of the entity you were aiming at right before locking. -Config.LockOntoCenter = { - Peds = true, -- It has a tendency to not work perfectly when this is false. - Vehicles = false -} - -Config.ShowLicensePlate = true -- (LPL) -Config.CheckLicensePlateAngle = true -- If true, it checks the angle between the helicopter camera and the plate. This reasults in player beeing unable to get a license plate read when the camera can't clearly see the plate. -Config.OnlyShowPlateIfLocked = false -- If true, the plate will only be showed if we have a lock on the vehicle. - -Config.WhitelistedJobs = false -- If false, the script doesn't check for jobs. If you want to check for jobs add a table where the job is the key, and the value is the job level like so: Config.WhitelistedJobs = { ['police'] = 2, ['ambulance'] = 5 } -Config.ShowMessageIfWrongJob = true -- If true, it will display an error message of you attempt to enter the camer without the right job, if false no message, just won't allow you to enter - --- false = Anyone can use the camera (including the pilot), 1 = Any passanger (not pilot) can use the camera, 2 = Only rear passangers can use the camera -Config.PassengerOnly = false - -Config.ShowPostalCodes = false -- Shows postals while in the camera (This is a little resource heavy) -Config.PostalResource = "nearest-postal" -- The resource the postal file is located in (resource must be loaded before helicam, and the files must be formated like nearest-postal) -Config.PostalFile = "new-postals.json" -- MUST be a JSON file! (Note: The file must be loaded inside the fxmanifest of Config.PostalResource for the helicam script to be able to read it) - --- Adds a audio sumbix while in a helicopter/plane (noise suppression) (NOTE: Get's applied to all helicopters/planes, not just the ones with a camera) -Config.UseSubmix = false -Config.NoSubmixInCamera = false -- Only applys if Config.UseSubmix is set to true, if true, this will stop the submix when you are using the camera - --- If true, players will be able to rappel from helicopters that support it. -Config.AllowRappelling = true -Config.RappellingTimeout = 1000 -- The time in ms that you have to press the rappel button again (so people don't accidentally rappel) -Config.MaxRappellingHight = 35.0 -- At any higher then 35.0 players might fall off the rope as the game has a hardcoded cap around 30.0 - 40.0 meters. - --- If the script should add chat suggestions for some of the chat commands. -Config.AddChatSuggestions = true - --- Spotlight -Config.AllowSpotlight = true -Config.MaxAmountOfSpotlights = false -- false or number, set's the maximum amount of spotlights that are allowed on the server at any given time (global limit) -Config.Spotlight = { - Colour = { R = 255, G = 255, B = 255 }, -- The RGB colour values of the spotlight, you can for example make it slightly more blue like so: { R = 220, G = 220, B = 255 } - MaxDistance = 600.0, -- The maximum distance the spotlight will glow - DefaultBrightness = 5.0, -- The defult brightness of the spotlight - MinBrightness = 0.5, -- The minimum brightness of the spotlight - MaxBrightness = 15.0, -- The maximum brightness of the spotlight - BrightnessIncrements = 0.75, -- How much to change the brightness of the spotlight when adjusting it - Roundness = 2.0, -- The "roundness" of the spotlight - DefaultRadius = 10.0, -- The defult radius/size of the spotlight - MinRadius = 5.0, -- The minimum radius of the spotlight - MaxRadius = 15.0, -- The maximum radius of the spotlight - RadiusIncrements = 0.75, -- How much to change the radius of the spotlight when adjusting it - Falloff = 200.0, -- -} - -Config.HideMinimap = false -Config.ZoomBarOffset = 20 -- The offset in % from the bottom of the screen the zoom bar will be when the minimap is enabled. (If you have something on the top of your minimap then setting it to 25 usally works well) -Config.TargetBlip = { - Display = true, - Sprite = 390, - Colour = 40 -} - -Config.AllowNightVision = true -Config.AllowNightVisionDuringDay = false -- If the night vision can be enabeld during the day or not. -Config.AllowThermal = true -Config.ThermalOptions = { - MaxThickness = 1.0, -- 1.0 = Default GTA, can't see trough much at all. 20.0 = Able to see trough most thin walls, however won't be able to see trough the ground or multiple/thick walls. - MinNoise = 0.0, -- The minimum amount of background noise - MaxNoise = 0.1, -- The maximum amount of background noise - FadeStart = 5000.0, -- How far away (meters) before the "background" fade starts - FadeEnd = 6000.0, -- How far away (meters) before the "background" fade becomes solid - CustomColours = true, -- If we should use custom colours for the thermal camera (so it becomes black & white for example). (Colours are set below under Config.ThermalOptions.Colours) - Colours = { - VisibleHot = { R = 0.80, G = 0.80, B = 0.80 }, - VisibleWarm = { R = 0.80, G = 0.80, B = 0.80 }, - VisibleBase = { R = 0.80, G = 0.80, B = 0.80 }, - Far = { R = 0.20, G = 0.20, B = 0.20 }, - Near = { R = 0.15, G = 0.15, B = 0.15 } - } -} - -Config.AllowMarkers = true -Config.Marker = { - MaxAmount = 9, -- Above 9 the number markers should be disabled. - MaxDrawDistance = 1000.0, -- The furthest distance a marker will be drawn at. - Circle = { - Type = 23, - Scale = 8.0, - Colour = { R = 230, G = 50, B = 50, A = 200 } -- { R = 110, G = 160, B = 230, A = 200 } - }, - Number = { - Display = true, -- Set this to false if you want the max amount of markers the be above 9 - Scale = 6.0, - Colour = { R = 230, G = 50, B = 50, A = 200 } - }, - Blip = { - Display = true, -- Whether to display marker blips - Number = true, -- Whether to display the number on the blip or not (99 is cap.) - Sprite = 57, - Scale = 0.75, - Colour = 1, -- Red - } -} - -Config.UseAnimProp = true -- If true, players will have a tablet in their hands while using the camera -Config.Tablet = { - model = -1585232418, -- prop_cs_tablet - anim = { - dict = "amb@world_human_seat_wall_tablet@female@base", - name = "base" - }, - bone = 57005, -- SKEL_R_Hand - offset = vector3(0.17, 0.10, -0.13), - rotation = vector3(20.0, 180.0, 180.0) -} - -Config.ShowInstructions = false -- If true, instructions will be showns while you are in the camera --- Used this website to get the controls (~INPUT_5D25DCCD~ for example): http://tools.povers.fr/hashgenerator/ --- 0 = On the right, 3+ = on the left. -Config.InstructionButtons = { - -- [0] = { control = "~INPUT_5D25DCCD~", label = "Adjust Spotlight Brightness (scroll +)" }, - -- [1] = { control = "~INPUT_F8C9FB3A~", label = "Adjust Spotlight Radius (scroll +)" }, - -- [2] = { control = "~INPUT_DB481F5~", label = "Lock Camera" }, -- This doesn't work for some reason... - [0] = { control = "~INPUT_662F7BF5~", label = "Add/Remove Marker" }, - [1] = { control = "~INPUT_DB471A88~", label = "Cycle Vision" }, - [2] = { control = "~INPUT_51D50495~", label = "Spotlight" }, - [3] = { control = "~INPUT_5D25DCCD~", label = "Exit Camera" } -} - --- Speed Units: --- KTS = Knots (nautical miles per hour) --- MPH = Miles per hour --- KMH = Kilometers per hour --- MPS = Meters per second --- FPS = Feet per second - --- Distance Units: --- FT = Feet --- M = Meters --- MI = Miles -Config.Units = { - Speed = "KTS", -- The speed of the helicopter (unit type: speed) - Altitude = "FT", -- The altitude of the helicopter (unit type: distance) - TargetSpeed = "MPH", -- The speed of the target the camera is looking at (unit type: speed) - TargetElevation = "FT", -- The elevation of where the camera is aming (unit type: distance) - TargetDistance = "M" -- The distance from the helicopter to the target (unit type: distance) -} - -Config.Camera = { - MovementSpeed = { - Keyboard = 3.0, - Controller = 1.0 - }, - Zoom = { - Max = 50.0, - Min = 5.0, - Speed = 5.0 - }, - RotationLimits = { - Up = 25.0, - Down = -89.5 - } -} - --- Docs: https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/ -- https://docs.fivem.net/docs/game-references/input-mapper-parameter-ids/keyboard/ -Config.Keybinds = { - ToggleCam = { - Type = "KEYBOARD", - Key = "E" - }, - AttemptLock = { - Type = "KEYBOARD", - Key = "SPACE" - }, - CycleVision = { - Type = "MOUSE_BUTTON", - Key = "MOUSE_RIGHT" - }, - ToggleMarker = { - Type = "MOUSE_BUTTON", - Key = "MOUSE_MIDDLE" - }, - Rappel = { - Type = "KEYBOARD", - Key = "X" - }, - Spotlight = { - Type = "KEYBOARD", - Key = "G" - }, - SpotlightBrightness = { - Type = "KEYBOARD", - Key = "LMENU" - }, - SpotlightRadius = { - Type = "KEYBOARD", - Key = "LCONTROL" - }, - Postals = { - Type = "KEYBOARD", - Key = "" - } -} - -Config.Localisation = { - -- Notifications - Notification = { - JobNotWhitelisted = "You don't have the required job!", - JobGrade = "Your job grade is to low!", - NoCameraHeli = "This helicopter doesn't have a camera!", - NoCameraPlane = "This plane doesn't have a camera!", - IsPilot = "You can't use the camera while you are the pilot!", - NotInRear = "You need to be in the rear of the helicopter to use the camera!", - CameraInUse = "Someone else is already using the camera!", - SpotlightInUse = "Someone else is already using the camera spotlight!", - NoSpotlight = "This helicopter does not have a spotlight!", - SpotlightGlobalLimit = "The global spotlight limit has been reached!", - CannotRappelFromHeli = "This helicopter does not support rappelling!", - CannotRappelFromSeat = "You cannot rappel from this seat!", - ToHighToRappel = "The helicopter is to far up to rappel!", - ConfirmRappel = "Are you sure you want to rappel? (Press again to confirm)", - Rappelling = "Rappelling!" - }, - -- Blip Names - Blip = { - Target = "Helicam Target", - Marker = "Helicam Marker" - }, - -- Keybinding Descriptions - KeyMapping = { - ToggleCam = "Helicam - Toggle Camera", - AttemptLock = "Helicam - Attempt Lock", - CycleVision = "Helicam - Cycle Vision", - ToggleMarker = "Helicam - Add/Remove Markers", - Rappel = "Helicam - Rappel From Helicopter", - Spotlight = "Helicam - Toggle Spotlight", - SpotlightBrightness = "Helicam - (+ scroll) Adjust Spotlight Brightness", - SpotlightRadius = "Helicam - (+ scroll) Adjust Spotlight Radius", - Postals = "Helicam - Toggle Postals" - }, - ChatSuggestions = { - ToggleCamera = "Enter/Exit the helicopter camera", - Rappel = "Rappel from the helicopter" - } -} - --- Nightvision/Thermal/Spotlight/PassengerOnly etc. can be manually enabled/disabled (overwriten) for each model by adding one or more of following varabels under the model. --- nightvision = true / false --- thermalvision = true / false --- spotlight = true / false --- passengerOnly = false / 1 / 2 (see Config.PassengerOnly) --- disableRappelling = true / false --- timecycle = "modiferName" / false --- timecycleStrength = 0.0 to 1.0 -Config.Helicopters = { - -- Default (if there is any missing data it will draw it's options from here) - default = { - offset = vector3(0.0, 0.0, -1.0), - -- nightvision = true, -- These are only needed/used if Config.AllowNightVision or Config.AllowThermal is set to false - -- thermalvision = true, -- You can add these to each and every model, adding these and setting them to false disables the vision even if Config.AllowThermal etc. is set to true - -- spotlight = true, -- Allows yo overwrite Config.AllowSpotlight on a helicopter to helicopter basis. - -- passengerOnly = false, -- Set's who can use the camera based on the seat they are in. (see Config.PassengerOnly) - -- disableRappelling = false, -- Disables rappelling for the helicopter model, will only make a diffrence when set to true. The helicopter also needs the "FLAG_ALLOWS_RAPPEL" flag too allow you to rappel out of it. - -- timecycle = "CAMERA_BW", -- The timecycle modifer name (can be set to false if you want to disable it) - -- timecycleStrength = 0.5, -- The strength of the timecycle, defaults to Config.DefaultCameraTimecycleStrength if not included. - labels = { - [0] = "FLIR SYSTEMS" - } - }, - -- Police Maverick (polmav) - [353883353] = { - offset = vector3(0.0, 2.65, -1.0), - labels = { -- Liveries - [0] = "LOS SANTOS POLICE DEPARTMENT", -- 0 is default - [1] = "AIR AMBULANCE" - } - }, - -- Maverick (maverick) - [-1660661558] = { - offset = vector3(0.0, 3.45, -0.65) - }, - -- Buzzard Attack Chopper (buzzard) - [788747387] = { - offset = vector3(0.0, 2.15, -0.35) - }, - -- Buzzard (buzzard2) - [745926877] = { - offset = vector3(0.0, 2.15, -0.35) - }, - -- Frogger (frogger) - [744705981] = { - offset = vector3(0.0, 3.0, -0.35) - }, - -- TPI/FIB Frogger (frogger2) - [1949211328] = { - offset = vector3(0.0, 3.0, -0.35), - labels = { -- Liveries - [0] = "FEDERAL INVESTIGATION BUREAU", - [1] = "TREVOR PHILIPS ENTERPRISES" - } - }, - -- Annihilator/Patriotism and Immigration Authority (annihilator) - [837858166] = { - offset = vector3(-0.5, 4.0, -0.35), - labels = { -- Liveries - [0] = "NATIONAL OFFICE OF SECURITY ENFORCMENT" - } - }, - -- Valkyrie (valkyrie) - [-1600252419] = { - offset = vector3(0.0, 4.0, -1.15), - labels = { -- Liveries - [0] = "UNITED STATES ARMY" - } - }, - -- Avenger (avenger) - [-2118308144] = { - offset = vector3(0.0, 9.45, -2.45), - labels = { -- Liveries - [0] = "UNITED STATES MARINES" - } - }, - - -- Example of custom helicopter: - -- Emergency Maverick AS350 (eheli) - -- [`eheli`] = { - -- offset = vector3(0.0, 3.0, -1.15), - -- labels = { -- Liveries - -- [0] = "LOS SANTOS POLICE DEPARTMENT", - -- [1] = "SAN ANDREAS HIGHWAY PATROL", - -- [2] = "BLAIN COUNTY SHERIFF OFFICE", - -- [3] = "SAN ANDREAS FIRE DEPARTMENT" - -- } - -- }, - -- You can also do GetHashKey("eheli") instead of `eheli` - -- Here is a guide if you need more help: https://madsl.gitbook.io/docs/resources/helicopter-camera/adding-custom-helicopters -} diff --git a/resources/[jobs]/[police]/helicam/framework/esx.lua b/resources/[jobs]/[police]/helicam/framework/esx.lua deleted file mode 100644 index 57c59ff45..000000000 --- a/resources/[jobs]/[police]/helicam/framework/esx.lua +++ /dev/null @@ -1,20 +0,0 @@ -if GetResourceState('es_extended') ~= 'started' then return end - -ESX = exports.es_extended:getSharedObject() - -function JobCheck() - if Config.WhitelistedJobs == false then - return true, nil - end - - local PlayerData = ESX.GetPlayerData() - if Config.WhitelistedJobs[PlayerData.job.name] then - if PlayerData.job.grade >= Config.WhitelistedJobs[PlayerData.job.name] then - return true, nil - else - return false, (Config.ShowMessageIfWrongJob and 'JobGrade') or nil - end - else - return false, (Config.ShowMessageIfWrongJob and 'JobNotWhitelisted') or nil - end -end diff --git a/resources/[jobs]/[police]/helicam/framework/qb.lua b/resources/[jobs]/[police]/helicam/framework/qb.lua deleted file mode 100644 index 5040a8472..000000000 --- a/resources/[jobs]/[police]/helicam/framework/qb.lua +++ /dev/null @@ -1,20 +0,0 @@ -if GetResourceState('qb-core') ~= 'started' then return end - -QBCore = exports['qb-core']:GetCoreObject() - -function JobCheck() - if Config.WhitelistedJobs == false then - return true, nil - end - - local PlayerData = QBCore.Functions.GetPlayerData() - if Config.WhitelistedJobs[PlayerData.job.name] then - if PlayerData.job.grade.level >= Config.WhitelistedJobs[PlayerData.job.name] then - return true, nil - else - return false, (Config.ShowMessageIfWrongJob and 'JobGrade') or nil - end - else - return false, (Config.ShowMessageIfWrongJob and 'JobNotWhitelisted') or nil - end -end diff --git a/resources/[jobs]/[police]/helicam/framework/standalone.lua b/resources/[jobs]/[police]/helicam/framework/standalone.lua deleted file mode 100644 index 30d7a2298..000000000 --- a/resources/[jobs]/[police]/helicam/framework/standalone.lua +++ /dev/null @@ -1,9 +0,0 @@ -if GetResourceState('es_extended') == 'started' or GetResourceState('qb-core') == 'started' then return end - -function JobCheck() - if Config.WhitelistedJobs ~= false then - print(GetCurrentResourceName().."/frameworks/standalone.lua: Jobs check failed, none of the supported frameworks are running, please set Config.WhitelistedJobs to false or make code adjustments.") - end - - return true, nil -end diff --git a/resources/[jobs]/[police]/helicam/fxmanifest.lua b/resources/[jobs]/[police]/helicam/fxmanifest.lua deleted file mode 100644 index 413051783..000000000 --- a/resources/[jobs]/[police]/helicam/fxmanifest.lua +++ /dev/null @@ -1,44 +0,0 @@ -fx_version 'cerulean' -game 'gta5' -lua54 'yes' - -author 'Mads' -description 'Helicam' -version '1.0.9' - -client_scripts { - 'config.lua', - 'numberplates.lua', - 'framework/standalone.lua', - 'framework/esx.lua', - 'framework/qb.lua', - 'client.lua' -} - -server_script 'server.lua' - -escrow_ignore { - 'config.lua', - 'numberplates.lua', - 'framework/standalone.lua', - 'framework/esx.lua', - 'framework/qb.lua', - 'client.lua', - 'server.lua' -} - -ui_page('html/index.html') - -files { - 'html/index.html', - 'html/script.js', - 'html/style.css', - 'html/images/*.svg' -} - -dependencies { - '/server:5181', - '/gameBuild:2060' -- Needed due to usage of game events. -} - -dependency '/assetpacks' \ No newline at end of file diff --git a/resources/[jobs]/[police]/helicam/html/images/arrow.svg b/resources/[jobs]/[police]/helicam/html/images/arrow.svg deleted file mode 100644 index d266c8b61..000000000 --- a/resources/[jobs]/[police]/helicam/html/images/arrow.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/resources/[jobs]/[police]/helicam/html/images/bearing-directions.svg b/resources/[jobs]/[police]/helicam/html/images/bearing-directions.svg deleted file mode 100644 index d73a806f6..000000000 --- a/resources/[jobs]/[police]/helicam/html/images/bearing-directions.svg +++ /dev/null @@ -1,13 +0,0 @@ - - N - N - NW - NW - NE - NE - E - SE - S - SW - W - \ No newline at end of file diff --git a/resources/[jobs]/[police]/helicam/html/images/bearing.svg b/resources/[jobs]/[police]/helicam/html/images/bearing.svg deleted file mode 100644 index e6714bfbf..000000000 --- a/resources/[jobs]/[police]/helicam/html/images/bearing.svg +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/resources/[jobs]/[police]/helicam/html/images/camera-heading.svg b/resources/[jobs]/[police]/helicam/html/images/camera-heading.svg deleted file mode 100644 index 12327c187..000000000 --- a/resources/[jobs]/[police]/helicam/html/images/camera-heading.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/resources/[jobs]/[police]/helicam/html/images/camera-pitch.svg b/resources/[jobs]/[police]/helicam/html/images/camera-pitch.svg deleted file mode 100644 index 1eb8b49f4..000000000 --- a/resources/[jobs]/[police]/helicam/html/images/camera-pitch.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/resources/[jobs]/[police]/helicam/html/images/line.svg b/resources/[jobs]/[police]/helicam/html/images/line.svg deleted file mode 100644 index 537bc4ca7..000000000 --- a/resources/[jobs]/[police]/helicam/html/images/line.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - \ No newline at end of file diff --git a/resources/[jobs]/[police]/helicam/html/images/satellite-icon.svg b/resources/[jobs]/[police]/helicam/html/images/satellite-icon.svg deleted file mode 100644 index 5d451044c..000000000 --- a/resources/[jobs]/[police]/helicam/html/images/satellite-icon.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - diff --git a/resources/[jobs]/[police]/helicam/html/images/target-cross-inner.svg b/resources/[jobs]/[police]/helicam/html/images/target-cross-inner.svg deleted file mode 100644 index 751ab7f02..000000000 --- a/resources/[jobs]/[police]/helicam/html/images/target-cross-inner.svg +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/resources/[jobs]/[police]/helicam/html/images/target-cross.svg b/resources/[jobs]/[police]/helicam/html/images/target-cross.svg deleted file mode 100644 index 8dfb19dbf..000000000 --- a/resources/[jobs]/[police]/helicam/html/images/target-cross.svg +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/resources/[jobs]/[police]/helicam/html/images/zoom-bar.svg b/resources/[jobs]/[police]/helicam/html/images/zoom-bar.svg deleted file mode 100644 index 0017ab997..000000000 --- a/resources/[jobs]/[police]/helicam/html/images/zoom-bar.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/resources/[jobs]/[police]/helicam/html/index.html b/resources/[jobs]/[police]/helicam/html/index.html deleted file mode 100644 index 7c3ddbb3f..000000000 --- a/resources/[jobs]/[police]/helicam/html/index.html +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - Helicam by Mads - - - - - -
-
-
-
-

FLIR SYSTEMS

-
-

None

-
-

.

-
-
-

SPD

0

-

ALT

0

-
-
-

KTS

-

FT

-
-
-
-
-

.

-
-
-

HDG

0

-
-
-

°T

-
-
-
-
- -
-

Made By Mads

-

None

- -
-

.

-
-
-

SPD

0

-

ELV

0

-
-
-

MPH

-

FT

-
-
-
-
-

.

-
-
-

HDG

0

-

SLT

0

-
-
-

°T

-

M

-
-

LPL

---

-
-
-
-
- -
-
-

0°T

-
-
- -
-
- - - -
-
- -
-

21/08/22

-

00:00:00 Z

-
- -
- - X - - -
- -
-

Scanning...

-
-
-
-
- -
-
-

HDEO

-

LOCK

NONE

-
-

W

- - - - -

N

-
- -
-

-
- camera pitch - -
-
- camera heading - -
-

-
- - -
- - diff --git a/resources/[jobs]/[police]/helicam/html/script.js b/resources/[jobs]/[police]/helicam/html/script.js deleted file mode 100644 index 2885a3beb..000000000 --- a/resources/[jobs]/[police]/helicam/html/script.js +++ /dev/null @@ -1,203 +0,0 @@ -window.onload = (e) => { - window.addEventListener('message', onMessageRecieved); -}; - -let config = { - timeFormat: 0, - dateFormat: 0 -}; -let lastZoomBarLength = 243; // (243px, default for 1920:1080) -const months = { - 1: 'JAN', 2: 'FEB', 3: 'MAR', 4: 'APR', 5: 'MAY', 6: 'JUN', 7: 'JUL', 8: 'AUG', 9: 'SEP', 10: 'OCT', 11: 'NOV', 12: 'DEC' -}; - -function FormatDate(day, month, year) { - let date; - switch(config.dateFormat) { - case 0: - date = month+"/"+day+"/"+year.slice(-2); // 0 = MM/DD/YY - break; - case 1: - date = day+"/"+month+"/"+year.slice(-2); // 1 = DD/MM/YY - break; - case 2: - date = year.slice(-2)+"/"+month+"/"+day; // 2 = YY/MM/DD - break; - case 3: - date = day+"-"+months[month]+"-"+year; // 2 = DD-Mon-YYYY - break; - default: - console.log("Error: date format was invalid!"); - } - - $("#date").text(date); -}; - -function UpdateZuluTime() { - const date = new Date(); - const hours = date.getUTCHours().toLocaleString('en-US', { minimumIntegerDigits: 2, useGrouping: false }); - const minutes = date.getUTCMinutes().toLocaleString('en-US', { minimumIntegerDigits: 2, useGrouping: false }); - const seconds = date.getUTCSeconds().toLocaleString('en-US', { minimumIntegerDigits: 2, useGrouping: false }); - const time = hours+":"+minutes+":"+seconds+" Z"; - $("#time").text(time); - - const day = date.getUTCDate().toLocaleString('en-US', { minimumIntegerDigits: 2, useGrouping: false }); - let month = date.getUTCMonth()+1; month = month.toLocaleString('en-US', { minimumIntegerDigits: 2, useGrouping: false }); - const year = date.getUTCFullYear().toLocaleString('en-US', { minimumIntegerDigits: 2, useGrouping: false }); - - FormatDate(day, month, year); -}; - -function UpdateOSTime() { - const date = new Date(); - let hours = date.getHours().toLocaleString('en-US', { minimumIntegerDigits: 2, useGrouping: false }); - let minutes = date.getMinutes().toLocaleString('en-US', { minimumIntegerDigits: 2, useGrouping: false }); - let seconds = date.getSeconds().toLocaleString('en-US', { minimumIntegerDigits: 2, useGrouping: false }); - - let time = hours+":"+minutes+":"+seconds - $("#time").text(time); -}; - -function UpdateOSDate() { - const date = new Date(); - const day = date.getDate().toLocaleString('en-US', { minimumIntegerDigits: 2, useGrouping: false }); - let month = date.getMonth()+1; month = month.toLocaleString('en-US', { minimumIntegerDigits: 2, useGrouping: false }); - const year = date.getFullYear().toLocaleString('en-US', { minimumIntegerDigits: 2, useGrouping: false }); - - FormatDate(day, month, year); -}; - -function onMessageRecieved(event) { - let data = event.data; - - if (data != undefined) { - switch(data.action) { - case 'updateData': - $.each(data.set, function(id, value) { - $("#"+id).text(value); - }); - - // Show/hide/change license plate - if (data.info.numberplate == false) { - $("#numberplate-wrapper").hide(); - } else if (data.info.numberplate != undefined) { - $("#ta-numberplate").text(data.info.numberplate); - if (!$("#numberplate-wrapper").is(":visible")) { - $("#numberplate-wrapper").show(); - }; - }; - - // Handle time and date - if (data.info.time) { - UpdateOSDate(); - $("#time").text(data.info.time); - } else { - if (config.timeFormat == 0) { - UpdateZuluTime(); - } else { - UpdateOSTime(); - UpdateOSDate(); - }; - }; - break; - case 'updateDataFrame': - // Camera Pitch - $('#pitch-line').css('transform', 'rotate(' + data.pitch + 'deg)'); - - // Camera Relative Heading - $('#heading-line').css('transform', 'rotate(' + data.heading + 'deg)'); - - // Bearing - $('#bearing-img').attr('src', 'images/bearing.svg#svgView(viewBox(' + (data.bearing - 89) + ', 0, 180, 8))'); - $('#bearing-directions').attr('src', 'images/bearing-directions.svg#svgView(viewBox(' + (data.bearing - 90) + ', 0, 180, 10))'); - break; - case 'setVisionState': - $("#vision-state").text(data.state); // Sets text in bottom left corner - break; - case 'setZoomBarLevel': - let barLength = $("#zoom-bar").width() || lastZoomBarLength; - let barPercent = barLength / 100; - if (barLength != lastZoomBarLength) { - lastZoomBarLength = barLength; - }; - - barLength = barLength - barPercent * 17.5 // Reduce the bar length by 17.5% to compensate for overflow - let pixels = barLength / 100 * data.percentage + barPercent * 5; - $("#zoom-arrow").css("margin-left", pixels + "px"); - break; - case 'open': - $("#wrapper").show(); - break; - case 'close': - $("#wrapper").hide(); - break; - case 'startLockScanning': - $("#lock-bar-container").show(); - $("#lock-bar-progress").stop().css({"width": 0}).animate({ - width: 11 +'%' - }, { - duration: parseInt(200), - }); - break; - case 'updateLockScanning': - const end = data.value * 10 + 1 - $("#lock-bar-progress").stop().animate({ - width: end+'%' - }, { - duration: parseInt(200), - easing : "linear" - }); - break; - case 'lockScanningFinished': - $("#lock-bar-container").hide(); - break; - case 'setCameraLockState': - if (data.state == true) { - $("#lock-state").addClass("lock-state-active"); - } else { - $("#lock-state").removeClass("lock-state-active"); - }; - $("#lock-type").text(data.type); - break; - case 'setCameraLabel': - $("#camera-label").text(data.label); - break; - case 'setConfigData': - $.each(data.set, function(id, value) { - $("#"+id).text(value); - }); - - if (data.showLatitudeLongitude == true) { - $("#hi-latitude").show(); - $("#hi-longitude").show(); - $("#ta-latitude").show(); - $("#ta-longitude").show(); - } else { - $(".street").css('display', 'inline-block'); - }; - - if (data.showLicensePlate == false) { - $("#numberplate-wrapper").hide(); - }; - - if (data.hideMinimap == false) { - $("#camera-info").css("bottom", data.zoomBarOffset+"%"); - }; - - if (data.showInstructions == true) { - $("#relative-info").css("bottom", "6%"); - if (data.hideMinimap == true) { - $("#camera-info").css("bottom", "6%"); - }; - }; - - config.timeFormat = data.timeFormat; - config.dateFormat = data.dateFormat; - break; - default: - console.log("Error: spesifed action was not found!", data.action); - } - } else { - console.log("Error: data was not defined!"); - }; -}; diff --git a/resources/[jobs]/[police]/helicam/html/style.css b/resources/[jobs]/[police]/helicam/html/style.css deleted file mode 100644 index 320cbc65b..000000000 --- a/resources/[jobs]/[police]/helicam/html/style.css +++ /dev/null @@ -1,364 +0,0 @@ -/* General */ - -#wrapper { - display: none; -} - -.text { - padding-top: 0.05vh; - padding-left: 0.5vh; - margin: 0; - color: rgb(255, 255, 255); /* rgb(50, 170, 35) <-- Green-ish */ - font-family: 'Consolas', Helvetica, monospace; - text-shadow: 2px 0 2px hsla(0, 0%, 0%, 0.3), -2px 0 1px hsla(0, 0%, 0%, 0.3), 0 2px 1px hsla(0, 0%, 0%, 0.3), 0 -2px 1px hsla(0, 0%, 0%, 0.3), 1px 1px 1px hsla(0, 0%, 0%, 0.3), -1px -1px 1px hsla(0, 0%, 0%, 0.3), 1px -1px 1px hsla(0, 0%, 0%, 0.3), -1px 1px 1px hsla(0, 0%, 0%, 0.3), -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black; - font-size: 2.35vh; /* font-size: 1.55rem; */ - font-weight: bold; -} - -.no-left-padding { - padding-left: 0; -} - -.float-right { - float: right; -} - -.relative { - position: relative; -} - -.inline { - display: inline-block; -} - -.street { - display: none; - width: 100%; -} - -.street-text { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -/* -This is were you set the colour for the svg images (bearing, crosshair etc.) -Use this to "translate" the colour; https://codepen.io/sosuke/pen/Pjoqqp -The "Green-ish" mentioned with the text would for example be like this: invert(51%) sepia(9%) saturate(4544%) hue-rotate(68deg) brightness(102%) contrast(85%) drop-shadow(-1px -1px 0px #00000096) drop-shadow(1px -1px 0px #00000096) drop-shadow(1px 1px 0px #00000096) drop-shadow(-1px 1px 0px #00000096); -Note: if you are going to change the colour, remember to also change it inside the bearing-directions.svg aswell (fill="white" -> fill="#32AA23" for "green-ish") -*/ -.svg { - filter: invert(100%) sepia(100%) saturate(0%) hue-rotate(51deg) brightness(106%) contrast(101%) drop-shadow(-1px -1px 0px #00000096) drop-shadow(1px -1px 0px #00000096) drop-shadow(1px 1px 0px #00000096) drop-shadow(-1px 1px 0px #00000096); -} - -/* Helicopter Info (top left) */ -#helicopter-info { - display: inline-block; - margin-top: 2vh; - margin-left: 1vw; - margin-right: 0; - width: 35vw; - padding: 0; -} - -#satellite-wrapper { - width: 4vh; -} - -#satellite-icon { - margin-bottom: -0.35vh; - width: 100%; -} - -#camera-label { - margin-left: 0; -} - -.info-data { - display: inline-block; - vertical-align: top; -} - -#hi-container-left { - display: inline-block; -} - -#hi-latitude { - display: none; -} - -#hi-sub-ll { - min-width: 8vw; - width: calc(100% - 3.15vw); -} - -#hi-sub-lr { - float: right; - margin: 0; - margin-left: 0.15vw; - width: 3vw; -} - -#hi-container-right { - display: inline-block; -} - -#hi-longitude { - display: none; -} - -#hi-sub-rl { - min-width: 8vw; - width: calc(100% - 2.25vw); -} - -#hi-sub-rr { - float: right; - margin: 0; - margin-left: 0.15vw; - width: 2vw; -} - - -/* Target Info (top right) */ -#target-info { - float: right; - margin-top: 2vh; - margin-left: 0; - margin-right: 1vw; - max-width: 35vw; - height: 25vh; - padding: 0; -} - -#mads-label { - color: rgba(255, 255, 255, 0); - opacity: 0.0; -} - -#ta-street-wrapper { - float: right; - text-align: right; -} - -#ta-container-wrapper { - float: right; -} - -#ta-container-left { - float: left; - margin-right: 1vw; -} - -#ta-latitude { - display: none; -} - -#ta-sub-ll { - min-width: 8vw; - width: calc(100% - 3.15vw); -} - -#ta-sub-lr { - float: right; - margin: 0; - margin-left: 0.15vw; - width: 3vw; -} - -#ta-container-right { - float: right; -} - -#ta-longitude { - display: none; -} - -#ta-sub-rl { - min-width: 8vw; - width: calc(100% - 2.5vw); -} - -#ta-sub-rr { - float: right; - margin: 0; - margin-left: 0.25vw; - width: 2.25vw; -} - - -/* bearing */ -#bearing-container { - width: 24.5vw; - position: absolute; - top: 2%; - left: 50%; - transform: translateX(-50%); -} - -#bearing-img { - width: 30vh; -} - -#bearing-directions { - margin-top: 0.25vh; - width: 30vh; -} - -.bearing { - display: inline-block; - text-align: center; - width: 100%; -} - -#bearing-arrow-container { - width: 2vh; - display: block; - margin-left: auto; - margin-right: auto; -} - -#bearing-arrow { - width: 100%; - height: auto; -} - -#bearing-letters { - margin: 0; -} - -#timedate-container { - margin-top: 4vh; - margin-left: 1vw; - width: 12vw; - height: 6vh; -} - -.centered { - position: absolute; - left: 50%; - top: 50%; - transform: translate(-50%, -50%); -} - -#cross-wrapper { - position: relative; -} - -#target-cross { - height: 13vh; -} - -#target-cross-inner { - height: 3vh; -} - -#lock-bar-container { - display: none; - position: absolute; - left: 50%; - top: 60%; - transform: translate(-50%, -50%); - overflow: hidden; - text-align: center; -} - -#lock-bar-text { - margin-bottom: 0.5vh; -} - -#lock-bar-wrapper { - background-color: rgba(0, 0, 0, 0.15); - width: 15vw; - height: 0.85vh; - border-radius: 0.25vh; - border: 2px solid hsla(0, 0%, 0%, 0.4); -} - -#lock-bar-progress { - background-color: rgba(255, 255, 255, 0.95); - z-index: 2; - height: 100%; - width: 0%; -} - -#relative-info { - position: absolute; - left: 50%; - bottom: 2%; - transform: translate(-50%, 0%); -} - -#camera-pitch, #camera-heading { - width: 2vw; -} - -.camera-img { - position: relative; - z-index: 44; - width: 12.4vh; -} - -.camera-line { - position: absolute; - margin-left: -6.65vh;; - margin-top: 1.4vh; - height: 4.8vh; - width: 0.8vh; - transform: rotate(90deg); - transform-origin: bottom; -} - -#camera-info { - position: absolute; - bottom: 2%; - left: 0; - margin-left: 1vw; -} - -#camera-info-stack { - margin-bottom: 2vh; -} - -#lock-state { - margin-right: 0.8vh; -} - -.lock-state-active { - color: rgb(200, 0, 0); -} - -#zoom-arrow { - position: absolute; - width: 2vh; - z-index: 2; - margin-top: 0.3vh; - margin-left: 1vh; -} - -#zoom-bar { - height: 2.25vh; -} - - -/* #north-infobox { - margin-top: 6vh; - margin-left: 2vh; - width: 10vw; - height: 12vh; - background-color: rgba(78, 36, 36, 0.288); -} - -#compass-arrow{ - transform-origin : center left; - background:#000; - width: 5vw; - height: 2vh; - - position: absolute; -} */ - - - - diff --git a/resources/[jobs]/[police]/helicam/numberplates.lua b/resources/[jobs]/[police]/helicam/numberplates.lua deleted file mode 100644 index a019100a4..000000000 --- a/resources/[jobs]/[police]/helicam/numberplates.lua +++ /dev/null @@ -1,3532 +0,0 @@ --- Yes, I went trough every single GTA 5 vehicle, please send help. -local vehicleNumberPlates = { - ['default'] = { - front = { static = true }, - rear = { static = true } - }, - - -- Commercials -- - -- Benson (benson) - [2053223216] = { - front = { onBumper = true }, - rear = false - }, - -- Biff (biff) - [850991848] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Apocalypse Cerberus (cerberus) - [-801550069] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Future Shock (cerberus2) - [679453769] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Nightmare (cerberus3) - [1909700336] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Hauler (hauler) - [1518533038] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Hauler Custom (hauler2) - [387748548] = { - front = false, - rear = { static = true } - }, - -- Mule (mule) - [904750859] = { - front = { static = true }, - rear = { static = true } - }, - -- Mule, Ramp door variant (mule2) - [-1050465301] = { - front = { static = true }, - rear = { static = true } - }, - -- Mule, Heist variant (mule3) - [-2052737935] = { - front = false, - rear = { static = true } - }, - -- Mule Custom (mule4) - [1945374990] = { - front = false, - rear = { static = true } - }, - -- Packer (packer) - [569305213] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Phantom (phantom) - [-2137348917] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Phantom Wedge (phantom2) - [-1649536104] = { - front = false, - rear = { static = true } - }, - -- Phantom Custom (phantom3) - [177270108] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Pounder (pounder) - [2112052861] = { - front = { onBumper = true }, - rear = false - }, - -- Pounder Custom (pounder2) - [1653666139] = { - front = { onBumper = true }, - rear = false - }, - -- Stockade (stockade) - [1747439474] = { - front = false, - rear = { static = true } - }, - -- Stockade, Bobcat Security/Snow variant (stockade3) - [-214455498] = { - front = false, - rear = false - }, - -- Terrorbyte (terbyte) - [-1988428699] = { - front = { static = true }, - rear = { static = true } - }, - - -- Compacts -- - -- Asbo (asbo) - [1118611807] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Blista (blista) - [-344943009] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Blista Compact (blista2) - [1039032026] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Go Go Monkey Blista (blista3) - [-591651781] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Brioso - [1549126457] = { - front = false, - rear = { onTrunk = true } - }, - -- Brioso2 - [1429622905] = { - front = false, - rear = { onHood = true } - }, - -- Brioso 300 Widebody (brioso3) - [15214558] = { - front = { onBumper = true }, - rear = { onHood = true } - }, - -- Club (club) - [-2098954619] = { - front = false, - rear = { static = true } - }, - -- Dilettante - [-1130810103] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Dilettante2 - [1682114128] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Issi (issi2) - [-1177863319] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Issi Classic (issi3) - [931280609] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Apocalypse Issi (issi4) - [628003514] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Future Shock Issi (issi5) - [1537277726] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Nightmare Issi (issi6) - [1239571361] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Issi Sport (issi7) - [1854776567] = { - front = false, - rear = { onTrunk = true } - }, - -- Blista Kanjo (kanjo) - [409049982] = { - front = false, - rear = { onTrunk = true } - }, - -- Panto - [-431692672] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Prairie - [-1450650718] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Rhapsody - [841808271] = { - front = false, - rear = { onBumper = true } - }, - -- Weevil - [1644055914] = { - front = { onBumper = true }, - rear = { onHood = true } - }, - - -- Coupes -- - -- CogCabrio - [330661258] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Exemplar - [-5153954] = { - front = false, - rear = { onBumper = true } - }, - -- F620, - [-591610296] = { - front = false, - rear = { onTrunk = true } - }, - -- Felon - [-391594584] = { - front = false, - rear = { onTrunk = true } - }, - -- Felon2 - [-89291282] = { - front = false, - rear = { onTrunk = true } - }, - -- Jackal - [-624529134] = { - front = false, - rear = { onBumper = true } - }, - -- Kanjo SJ (kanjosj) - [-64075878] = { - front = false, - rear = { onTrunk = true } - }, - -- Oracle XS (oracle) - [1348744438] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Oracle (oracle2) - [-511601230] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Postlude (postlude) - [-294678663] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Previon - [1416471345] = { - front = false, - rear = { onBumper = true } - }, - -- Sentinel - [1349725314] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Sentinel2 - [873639469] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Sentinel Classic (sentinel3) - [1104234922] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Sentinel Classic Widebody (sentinel4) - [-1356880839] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Windsor - [1581459400] = { - front = false, - rear = { onBumper = true } - }, - -- Windsor2 - [-1930048799] = { - front = false, - rear = { onBumper = true } - }, - -- Zion - [-1122289213] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Zion2 - [-1193103848] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - - -- Emergency -- - -- Ambulance (ambulance) - [1171614426] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- FIB Buffalo (fbi) - [1127131465] = { - front = false, - rear = { onTrunk = true } - }, - -- FIB Granger (fbi2) - [-1647941228] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- FireTruck (firetruk) - [1938952078] = { - front = { static = true }, - rear = { static = true } - }, - -- Prison Bus (pbus) - [-2007026063] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Police Cruiser (police) - [2046537925] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Police Buffalo (police2) - [-1627000575] = { - front = false, - rear = { onTrunk = true } - }, - -- Police Cruiser (police3) - [1912215274] = { - front = false, - rear = { onTrunk = true } - }, - -- Unmarked Cruiser (police4) - [-1973172295] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Police Rancher (policeold1) - [-1536924937] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Police Roadcruiser (policeold2) - [-1779120616] = { - front = false, - rear = { static = true } - }, - -- Police Transporter (policet) - [456714581] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Police Bike (policeb) - [-34623805] = { - front = false, - rear = { static = true } - }, - -- Police Maverick (polmav) - [353883353] = { - front = false, - rear = false - }, - -- Park Ranger (pranger) - [741586030] = { - front = false, - rear = { onBumper = true } - }, - -- Police Predator (predator) - [-488123221] = { - front = false, - rear = false - }, - -- Police Riot (riot) - [-1205689942] = { - front = false, - rear = false - }, - -- RCV (riot2) - [-693015116] = { - front = false, - rear = { static = true } - }, - -- Sheriff Cruiser (sheriff) - [-1683328900] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Sheriff SUV (sheriff2) - [1922257928] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - - -- Industrial -- - -- Bulldozer - [1886712733] = { - front = false, - rear = false - }, - -- Cutter - [-1006919392] = { - front = false, - rear = false - }, - -- Dump - [-2130482718] = { - front = false, - rear = false - }, - -- Flatbed - [1353720154] = { - front = { onBumper = true }, - rear = false - }, - -- Guardian - [-2107990196] = { - front = false, - rear = { onBumper = true } - }, - -- Handler - [444583674] = { - front = false, - rear = false - }, - -- Mixer - [-784816453] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Mixer2 - [475220373] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Rubble - [-1705304628] = { - front = { onBumper = true }, - rear = false - }, - -- TipTruck - [48339065] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- TipTruck2 - [-947761570] = { - front = { onBumper = true }, - rear = { static = true } - }, - - -- Military -- - -- Anti-Aircraft Trailer (trailersmall2) - [-1881846085] = { - front = false, - rear = false - }, - -- APC (apc) - [562680400] = { - front = false, - rear = false - }, - -- Barracks (barracks) - [-823509173] = { - front = false, - rear = false - }, - -- Barracks Semi (barracks2) - [1074326203] = { - front = false, - rear = false - }, - -- Barrage (barrage) - [-212993243] = { - front = false, - rear = { static = true } - }, - -- Half-track (halftrack) - [-32236122] = { - front = false, - rear = false - }, - -- Chernobog (chernobog) - [-692292317] = { - front = { static = true }, - rear = { static = true } - }, - -- Crusader (crusader) - [321739290] = { - front = false, - rear = false - }, - -- Invade and Persuade Tank (minitank) - [-1254331310] = { - front = false, - rear = false - }, - -- Rhino Tank (rhino) - [782665360] = { - front = false, - rear = false - }, - -- Apocalypse Scarab (scarab) - [-1146969353] = { - front = false, - rear = false - }, - -- Future Shock Scarab (scarab2) - [1542143200] = { - front = false, - rear = false - }, - -- Nightmare Scarab (scarab3) - [-579747861] = { - front = false, - rear = false - }, - -- Thruster (thruster) - [1489874736] = { - front = false, - rear = false - }, - -- TM-02 Khanjali (khanjali) - [-1435527158] = { - front = false, - rear = false - }, - -- Vetir (vetir) - [2014313426] = { - front = false, - rear = false - }, - - -- Motorcycles -- - -- Akuma - [1672195559] = { - front = false, - rear = false - }, - -- Avarus - [-2115793025] = { - front = false, - rear = { static = true } - }, - -- Bagger - [-2140431165] = { - front = false, - rear = { static = true } - }, - -- Bati 801 (bati) - [-114291515] = { - front = false, - rear = { static = true } - }, - -- Bati 801RR (bati2) - [-891462355] = { - front = false, - rear = { static = true } - }, - -- BF400 - [86520421] = { - front = false, - rear = false - }, - -- CarbonRS - [11251904] = { - front = false, - rear = { static = true } - }, - -- Chimera - [6774487] = { - front = false, - rear = { static = true } - }, - -- Cliffhanger - [390201602] = { - front = false, - rear = false - }, - -- Daemon (daemon) - [2006142190] = { - front = false, - rear = { static = true } - }, - -- Daemon (daemon2) - [-1404136503] = { - front = false, - rear = { static = true } - }, - -- Apocalypse Deathbike (deathbike) - [-27326686] = { - front = false, - rear = false - }, - -- Future Shock Deathbike (deathbike2) - [-1812949672] = { - front = false, - rear = false - }, - -- Nightmare Deathbike (deathbike3) - [-1374500452] = { - front = false, - rear = false - }, - -- Defiler - [822018448] = { - front = false, - rear = { static = true } - }, - -- Double - [-1670998136] = { - front = false, - rear = false - }, - -- Enduro - [1753414259] = { - front = false, - rear = false - }, - -- Esskey - [2035069708] = { - front = false, - rear = { static = true } - }, - -- Faggio - [-1842748181] = { - front = false, - rear = { static = true } - }, - -- Faggio2 - [55628203] = { - front = false, - rear = { static = true } - }, - -- Faggio3 - [-1289178744] = { - front = false, - rear = { static = true } - }, - -- Fcr2 - [-757735410] = { - front = false, - rear = false - }, - -- Fcr - [627535535] = { - front = false, - rear = { static = true } - }, - -- Gargoyle - [741090084] = { - front = false, - rear = false - }, - -- Hakuchou2 - [-255678177] = { - front = false, - rear = false - }, - -- Hakuchou - [1265391242] = { - front = false, - rear = { static = true } - }, - -- Hexer - [301427732] = { - front = false, - rear = { static = true } - }, - -- Innovation - [-159126838] = { - front = false, - rear = false - }, - -- Lectro - [640818791] = { - front = false, - rear = { static = true } - }, - -- Manchez - [-1523428744] = { - front = false, - rear = false - }, - -- Manchez2 - [1086534307] = { - front = false, - rear = false - }, - -- Manchez Scout C (manchez3) - [1384502824] = { - front = false, - rear = false - }, - -- Nemesis - [-634879114] = { - front = false, - rear = { static = true } - }, - -- Nightblade - [-1606187161] = { - front = false, - rear = { static = true } - }, - -- Oppressor (oppressor) - [884483972] = { - front = false, - rear = false - }, - -- Oppressor Mk II (oppressor2) - [2069146067] = { - front = false, - rear = false - }, - -- PCJ - [-909201658] = { - front = false, - rear = { static = true } - }, - -- Powersurge (powersurge) - [-1386336041] = { - front = false, - rear = { static = true } - }, - -- Ratbike - [1873600305] = { - front = false, - rear = false - }, - -- Rampant Rocket (rrocket) - [916547552] = { - front = false, - rear = { static = true } - }, - -- Reever (reever) - [1993851908] = { - front = false, - rear = { static = true } - }, - -- Ruffian - [-893578776] = { - front = false, - rear = { static = true } - }, - -- Sanchez2 - [-1453280962] = { - front = false, - rear = false - }, - -- Sanchez - [788045382] = { - front = false, - rear = false - }, - -- Sanctus - [1491277511] = { - front = false, - rear = { static = true } - }, - -- Shinobi (shinobi) - [1353120668] = { - front = false, - rear = { static = true } - }, - -- Shotaro - [-405626514] = { - front = false, - rear = false - }, - -- Sovereign - [743478836] = { - front = false, - rear = { static = true } - }, - -- Stryder (stryder) - [301304410] = { - front = false, - rear = { static = true } - }, - -- Thrust - [1836027715] = { - front = false, - rear = { static = true } - }, - -- Vader - [-140902153] = { - front = false, - rear = false - }, - -- Vindicator - [-1353081087] = { - front = false, - rear = { static = true } - }, - -- Vortex - [-609625092] = { - front = false, - rear = { static = true } - }, - -- Wolfsbane - [-618617997] = { - front = false, - rear = false - }, - -- Zombiea - [-1009268949] = { - front = false, - rear = false - }, - -- Zombieb - [-570033273] = { - front = false, - rear = false - }, - - -- Muscle -- - -- Blade - [-1205801634] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Broadway (broadway) - [-1933242328] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Buccaneer - [-682211828] = { - front = false, - rear = { onBumper = true } - }, - -- Buccaneer2 - [-1013450936] = { - front = false, - rear = { onBumper = true } - }, - -- Buffalo STX (buffalo4) - [-619930876] = { - front = false, - rear = { onBumper = true } - }, - -- Chino - [349605904] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Chino2 - [-1361687965] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Clique (clique) - [-1566607184] = { - front = false, - rear = { onTrunk = true } - }, - -- Deviant (deviant) - [1279262537] = { - front = false, - rear = { static = true } - }, - -- Dominator - [80636076] = { - front = false, - rear = { static = true } - }, - -- Dominator2 - [-915704871] = { - front = false, - rear = { static = true } - }, - -- Dominator GTX (dominator3) - [-986944621] = { - front = false, - rear = { static = true } - }, - -- Apocalypse Dominator (dominator4) - [-688189648] = { - front = false, - rear = false - }, - -- Future Shock Dominator (dominator5) - [-1375060657] = { - front = false, - rear = false - }, - -- Nightmare Dominator (dominator6) - [-1293924613] = { - front = false, - rear = false - }, - -- Dominator ASP (dominator7) - [426742808] = { - front = false, - rear = { onTrunk = true } - }, - -- Dominator GTT (dominator8) - [736672010] = { - front = false, - rear = { onBumper = true } - }, - -- Dukes - [723973206] = { - front = false, - rear = { onBumper = true } - }, - -- Dukes2 - [-326143852] = { - front = false, - rear = { onBumper = true } - }, - -- Beater Dukes(dukes3) - [2134119907] = { - front = false, - rear = { onBumper = true } - }, - -- Ellie (ellie) - [-1267543371] = { - front = false, - rear = { static = true } - }, - -- Eudora (eudora) - [-1249788006] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Faction - [-2119578145] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Faction2 - [-1790546981] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Faction3 - [-2039755226] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Gauntlet - [-1800170043] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Gauntlet2 - [349315417] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Gauntlet3 - [722226637] = { - front = false, - rear = { static = true } - }, - -- Gauntlet4 - [1934384720] = { - front = false, - rear = { onBumper = true } - }, - -- Gauntlet Classic Custom (gauntlet5) - [-2122646867] = { - front = false, - rear = { static = true } - }, - -- Greenwood (greenwood) - [40817712] = { - front = false, - rear = { onBumper = true } - }, - -- Hermes (hermes) - [15219735] = { - front = false, - rear = { onBumper = true } - }, - -- Hotknife - [37348240] = { - front = false, - rear = { static = true } - }, - -- Hustler (hustler) - [600450546] = { - front = false, - rear = { onBumper = true } - }, - -- Impaler (impaler) - [-2096690334] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Apocalypse Impaler (impaler2) - [1009171724] = { - front = false, - rear = { onBumper = true } - }, - -- Future Shock Impaler (impaler3) - [-1924800695] = { - front = { static = true }, - rear = { onBumper = true } - }, - -- Nightmare Impaler (impaler4) - [-1744505657] = { - front = false, - rear = { onBumper = true } - }, - -- Apocalypse Imperator (imperator) - [444994115] = { - front = false, - rear = { onBumper = true } - }, - -- Future Shock Imperator (imperator2) - [1637620610] = { - front = false, - rear = { onBumper = true } - }, - -- Nightmare Imperator (imperator3) - [-755532233] = { - front = false, - rear = { onBumper = true } - }, - -- Lurcher - [2068293287] = { - front = false, - rear = { onBumper = true } - }, - -- Moonbeam - [525509695] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Moonbeam2 - [1896491931] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Nightshade - [-1943285540] = { - front = false, - rear = { onBumper = true } - }, - -- Phoenix - [-2095439403] = { - front = false, - rear = { static = true } - }, - -- Picador - [1507916787] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Rat-Loader (ratloader) - [-667151410] = { - front = { static = true }, - rear = { onExtra = 1 } - }, - -- Rat-Truck (ratloader2) - [-589178377] = { - front = false, - rear = { static = true } - }, - -- Peyote Gasser (peyote2) - [-1804415708] = { - front = false, - rear = { onBumper = true } - }, - -- Ruiner - [-227741703] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Ruiner2 - [941494461] = { - front = false, - rear = { onBumper = true } - }, - -- Wrecked Ruiner (ruiner3) - [777714999] = { - front = false, - rear = false - }, - -- Ruiner ZZ-8 (ruiner4) - [1706945532] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- SabreGT - [-1685021548] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- SabreGT2 - [223258115] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- SlamVan - [729783779] = { - front = false, - rear = { onBumper = true } - }, - -- SlamVan2 - [833469436] = { - front = false, - rear = { onBumper = true } - }, - -- SlamVan3 - [1119641113] = { - front = false, - rear = { static = true } - }, - -- Apocalypse Slamvan (slamvan4) - [-2061049099] = { - front = false, - rear = false - }, - -- Apocalypse Future Shock (slamvan5) - [373261600] = { - front = false, - rear = false - }, - -- Nightmare Slamvan (slamvan6) - [1742022738] = { - front = false, - rear = false - }, - -- Stalion - [1923400478] = { - front = false, - rear = { onBumper = true } - }, - -- Stalion2 - [-401643538] = { - front = false, - rear = { onBumper = true } - }, - -- Tahoma Coupe (tahoma) - [-461850249] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Tampa - [972671128] = { - front = { static = true }, - rear = { onBumper = true } - }, - -- Tampa3 - [-1210451983] = { - front = { static = true }, - rear = { onBumper = true } - }, - -- Tulip (tulip) - [1456744817] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Vamos (vamos) - [-49115651] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Vigero - [-825837129] = { - front = { static = true }, - rear = false - }, - -- Vigero ZX (vigero2) - [-1758379524] = { - front = false, - rear = { onBumper = true } - }, - -- Virgo - [-498054846] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Virgo2 - [-899509638] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Virgo3 - [16646064] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Voodoo - [2006667053] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Voodoo2 - [523724515] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Weevil Custom (weevil2) - [-994371320] = { - front = false, - rear = { onHood = true } - }, - -- Yosemite (yosemite) - [1871995513] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Drift Yosemite (yosemite2) - [1693751655] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Yosemite Rancher (yosemite3) - [67753863] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - - -- Off-Road -- - -- BfInjection - [1126868326] = { - front = false, - rear = { static = true } - }, - -- Bifta - [-349601129] = { - front = { static = true }, - rear = { static = true } - }, - -- Blazer - [-2128233223] = { - front = false, - rear = { static = true } - }, - -- Blazer2 - [-48031959] = { - front = false, - rear = false - }, - -- Blazer3 - [-1269889662] = { - front = false, - rear = false - }, - -- Blazer4 - [-440768424] = { - front = false, - rear = { static = true } - }, - -- Blazer5 - [-1590337689] = { - front = false, - rear = { static = true } - }, - -- Bodhi2 - [-1435919434] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Boor (boor) - [996383885] = { - front = false, - rear = { onBumper = true } - }, - -- Brawler - [-1479664699] = { - front = false, - rear = { onTrunk = true } - }, - -- Apocalypse Bruiser (bruiser) - [668439077] = { - front = false, - rear = false - }, - -- Future Shock Bruiser (bruiser2) - [-1694081890] = { - front = false, - rear = false - }, - -- Nightmare Bruiser (bruiser3) - [-2042350822] = { - front = false, - rear = false - }, - -- Apocalypse Brutus (brutus) - [2139203625] = { - front = false, - rear = { static = true } - }, - -- Future Shock Brutus (brutus2) - [-1890996696] = { - front = false, - rear = { static = true } - }, - -- Nightmare Brutus (brutus3) - [2038858402] = { - front = false, - rear = { static = true } - }, - -- Caracara (caracara) - [1254014755] = { - front = false, - rear = { static = true } - }, - -- Caracara 4x4 (caracara2) - [-1349095620] = { - front = false, - rear = { onBumper = true } - }, - -- Duneloader (dLoader) - [1770332643] = { - front = { static = true }, - rear = { static = true } - }, - -- Draugur (draugur) - [-768236378] = { - front = false, - rear = false - }, - -- Dune - [-1661854193] = { - front = false, - rear = false - }, - -- Dune2 - [534258863] = { - front = false, - rear = false - }, - -- Dune FAV (dune3) - [1897744184] = { - front = false, - rear = false - }, - -- Dune4 - [-827162039] = { - front = false, - rear = false - }, - -- Dune5 - [-312295511] = { - front = false, - rear = false - }, - -- Everon (everon) - [-1756021720] = { - front = false, - rear = { onBumper = true } - }, - -- Hellion (hellion) - [-362150785] = { - front = false, - rear = { onTrunk = true } - }, - -- Freecrawler (freecrawler) - [-54332285] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Insurgent Pick-Up (insurgent) - [-1860900134] = { - front = false, - rear = { static = true } - }, - -- Insurgent (insurgent2) - [2071877360] = { - front = false, - rear = { static = true } - }, - -- Insurgent Pick-Up Custom (insurgent3) - [-1924433270] = { - front = false, - rear = { static = true } - }, - -- Kalahari - [92612664] = { - front = { static = true }, - rear = { onTrunk = true } - }, - -- Kamacho (kamacho) - [-121446169] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Lguard - [469291905] = { - front = false, - rear = { onBumper = true } - }, - -- Marshall - [1233534620] = { - front = { static = true }, - rear = { static = true } - }, - -- Menacer (menacer) - [2044532910] = { - front = false, - rear = { static = true } - }, - -- Mesa - [914654722] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Mesa2 - [-748008636] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Mesa3 - [-2064372143] = { - front = false, - rear = { static = true } - }, - -- Liberator (monster) - [-845961253] = { - front = false, - rear = false - }, - -- Apocalypse Sasquatch (monster3) - [1721676810] = { - front = false, - rear = false - }, - -- Future Shock Sasquatch (monster4) - [840387324] = { - front = false, - rear = false - }, - -- Nightmare Sasquatch (monster5) - [-715746948] = { - front = false, - rear = false - }, - -- Nightshark - [433954513] = { - front = false, - rear = { static = true } - }, - -- Outlaw (outlaw) - [408825843] = { - front = false, - rear = { static = true } - }, - -- RancherXL - [1645267888] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- RancherXL2 - [1933662059] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- RC Bandito (rcbandito) - [-286046740] = { - front = false, - rear = false - }, - -- Rebel - [-1207771834] = { - front = { onBumper = true }, - rear = false - }, - -- Rebel2 - [-2045594037] = { - front = { onBumper = true }, - rear = false - }, - -- Riata (riata) - [-1532697517] = { - front = { static = true }, - rear = { static = true } - }, - -- Sandking - [-1189015600] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Sandking2 - [989381445] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Squaddie (squaddie) - [-102335483] = { - front = false, - rear = { onBumper = true } - }, - -- Technical - [-2096818938] = { - front = { onBumper = true }, - rear = false - }, - -- Technical2 - [1180875963] = { - front = { onBumper = true }, - rear = false - }, - -- Technical3 - [1356124575] = { - front = { onBumper = true }, - rear = false - }, - -- TrophyTruck - [101905590] = { - front = false, - rear = false - }, - -- TrophyTruck2 - [-663299102] = { - front = false, - rear = false - }, - -- Vagrant (vagrant) - [740289177] = { - front = false, - rear = { static = true } - }, - -- Verus - [298565713] = { - front = false, - rear = { static = true } - }, - -- Winky - [-210308634] = { - front = false, - rear = { static = true } - }, - -- Zhaba (zhaba) - [1284356689] = { - front = false, - rear = { static = true } - }, - - -- SUV's -- - -- Astron (astron) - [629969764] = { - front = false, - rear = { onTrunk = true } - }, - -- BJXL - [850565707] = { - front = false, - rear = { onTrunk = true } - }, - -- Baller (baller) - [-808831384] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Baller (Second Generation) (baller2) - [142944341] = { - front = false, - rear = { onTrunk = true } - }, - -- Baller LE (baller3) - [1878062887] = { - front = false, - rear = { onTrunk = true } - }, - -- Baller LE LWB (baller4) - [634118882] = { - front = false, - rear = { onTrunk = true } - }, - -- Baller LE (Armored) (baller5) - [470404958] = { - front = false, - rear = { onTrunk = true } - }, - -- Baller LE LWB (Armored) (baller6) - [666166960] = { - front = false, - rear = { onTrunk = true } - }, - -- Baller ST (baller7) - [359875117] = { - front = false, - rear = { onTrunk = true } - }, - -- Cavalcade - [2006918058] = { - front = false, - rear = { onBumper = true } - }, - -- Cavalcade2 - [-789894171] = { - front = false, - rear = { onTrunk = true } - }, - -- Contender - [683047626] = { - front = false, - rear = { onBumper = true } - }, - -- Dubsta - [1177543287] = { - front = false, - rear = { onTrunk = true } - }, - -- Dubsta2 - [-394074634] = { - front = false, - rear = { onTrunk = true } - }, - -- Dubsta3 - [-1237253773] = { - front = false, - rear = { onTrunk = true } - }, - -- FQ2 - [-1137532101] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Granger - [-1775728740] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Granger 3600LX (granger2) - [-261346873] = { - front = false, - rear = { onTrunk = true } - }, - -- Gresley - [-1543762099] = { - front = false, - rear = { onTrunk = true } - }, - -- Habanero - [884422927] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Huntley - [486987393] = { - front = { static = true }, - rear = { onTrunk = true } - }, - -- Issi Rally (issi8) - [1550581940] = { - front = false, - rear = { onTrunk = true } - }, - -- I-Wagen (iwagen) - [662793086] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Jubilee (jubilee) - [461465043] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Landstalker - [1269098716] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Landstalker XL (landstalker2) - [-838099166] = { - front = false, - rear = { onTrunk = true } - }, - -- Novak (novak) - [-1829436850] = { - front = false, - rear = { onTrunk = true } - }, - -- Patriot - [-808457413] = { - front = { static = true }, - rear = { onTrunk = true } - }, - -- Patriot Stretch (patriot2) - [-420911112] = { - front = { static = true }, - rear = { onTrunk = true } - }, - -- Patriot Mil-Spec (patriot3) - [-670086588] = { - front = false, - rear = { onBumper = true } - }, - -- Radi - [-1651067813] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Rebla (rebla) - [83136452] = { - front = false, - rear = { onTrunk = true } - }, - -- Rocoto - [2136773105] = { - front = false, - rear = { onTrunk = true } - }, - -- Seminole - [1221512915] = { - front = false, - rear = { onTrunk = true } - }, - -- Seminole Frontier (seminole2) - [-1810806490] = { - front = false, - rear = { onTrunk = true } - }, - -- Serrano - [1337041428] = { - front = false, - rear = { onTrunk = true } - }, - -- Toros (toros) - [-1168952148] = { - front = false, - rear = { static = true } - }, - -- XLS - [1203490606] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- XLS2 - [-432008408] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - - -- Sedans -- - -- Asea - [-1809822327] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Asea2 - [-1807623979] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Asterope - [-1903012613] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Cog55 - [906642318] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Cog552 - [704435172] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Cognoscenti - [-2030171296] = { - front = false, - rear = { onTrunk = true } - }, - -- Cognoscenti2 - [-604842630] = { - front = false, - rear = { onTrunk = true } - }, - -- Cinquemila (cinquemila) - [-1527436269] = { - front = false, - rear = { onTrunk = true } - }, - -- Deity (deity) - [1532171089] = { - front = false, - rear = { onBumper = true } - }, - -- Emperor - [-685276541] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Emperor2 - [-1883002148] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Emperor3 - [-1241712818] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Fugitive - [1909141499] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Glendale - [75131841] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Glendale Custom (glendale2) - [-913589546] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Ingot - [-1289722222] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Intruder - [886934177] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Limo2 - [-114627507] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Premier - [-1883869285] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Primo - [-1150599089] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Primo2 - [-2040426790] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Regina - [-14495224] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Rhinehart (rhinehart) - [-1855505138] = { - front = false, - rear = { onTrunk = true } - }, - -- Romero - [627094268] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Superd - [1123216662] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Stafford (stafford) - [321186144] = { - front = false, - rear = { onTrunk = true } - }, - -- Stanier - [-1477580979] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Stratum - [1723137093] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Stretch - [-1961627517] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Surge - [-1894894188] = { - front = false, - rear = { static = true } - }, - -- Tailgater - [-1008861746] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Tailgater2 - [-1244461404] = { - front = { static = true }, - rear = { onTrunk = true } - }, - -- Warrener - [1373123368] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Warrener2 - [579912970] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Washington - [1777363799] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - - -- Service -- - -- Airbus - [1283517198] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Brickade - [-305727417] = { - front = false, - rear = false - }, - -- Brickade 6x6 (brickade2) - [-1576586413] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Bus - [-713569950] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Coach - [-2072933068] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Festival Bus (pbus2) - [345756458] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Rallytruck - [-2103821244] = { - front = { onBumper = true }, - rear = false - }, - -- RentalBus - [-1098802077] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Taxi (taxi) - [-956048545] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Tourbus - [1941029835] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Trash - [1917016601] = { - front = false, - rear = { static = true } - }, - -- Trash2 - [-1255698084] = { - front = false, - rear = { static = true } - }, - - -- Sports -- - -- Alpha - [767087018] = { - front = false, - rear = { onTrunk = true } - }, - -- Ardent - [159274291] = { - front = { static = true }, - rear = { static = true } - }, - -- Banshee - [-1041692462] = { - front = false, - rear = { static = true } - }, - -- Banshee2 - [633712403] = { - front = false, - rear = { static = true } - }, - -- BestiaGTS - [1274868363] = { - front = false, - rear = { onTrunk = true } - }, - -- Buffalo - [-304802106] = { - front = false, - rear = { onTrunk = true } - }, - -- Buffalo2 - [736902334] = { - front = false, - rear = { onBumper = true } - }, - -- Buffalo3 - [237764926] = { - front = false, - rear = { onBumper = true } - }, - -- Calico - [-1193912403] = { - front = { static = true }, - rear = { static = true } - }, - -- Carbonizzare - [2072687711] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Comet2 - [-1045541610] = { - front = false, - rear = { onBumper = true } - }, - -- Comet3 - [-2022483795] = { - front = false, - rear = { onBumper = true } - }, - -- Comet Safari (comet4) - [1561920505] = { - front = false, - rear = { onBumper = true } - }, - -- Comet SR (comet5) - [661493923] = { - front = false, - rear = { onBumper = true } - }, - -- Comet6 - [-1726022652] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Comet S2 Cabrio (comet7) - [1141395928] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Coquette - [108773431] = { - front = false, - rear = { onBumper = true } - }, - -- Coquette D10 (coquette4) - [-1728685474] = { - front = false, - rear = { static = true } - }, - -- Cypher - [1755697647] = { - front = false, - rear = { onTrunk = true } - }, - -- 8F Drafter (drafter) - [686471183] = { - front = false, - rear = { onTrunk = true } - }, - -- Elegy - [196747873] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Elegy2 - [-566387422] = { - front = false, - rear = { onBumper = true } - }, - -- Hotring Everon (everon2) - [-131348178] = { - front = false, - rear = false - }, - -- Euros - [2038480341] = { - front = false, - rear = { onBumper = true } - }, - -- Feltzer2 - [-1995326987] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Feltzer3 - [-1566741232] = { - front = false, - rear = { onTrunk = true } - }, - -- Flash GT (flashgt) - [-1259134696] = { - front = false, - rear = { static = true } - }, - -- Furoregt - [-1089039904] = { - front = false, - rear = { onBumper = true } - }, - -- Fusilade - [499169875] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Futo - [2016857647] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Futo2 - [-1507230520] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Hotring Sabre (hotring) - [1115909093] = { - front = false, - rear = false - }, - -- GB200 (gb200) - [1909189272] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Growler - [1304459735] = { - front = false, - rear = { onBumper = true } - }, - -- Imorgon (imorgon) - [-1132721664] = { - front = false, - rear = { static = true } - }, - -- Infernus2 - [-1405937764] = { - front = false, - rear = { static = true } - }, - -- Itali GTO (italigto) - [-331467772] = { - front = false, - rear = { static = true } - }, - -- Italirsx - [-1149725334] = { - front = false, - rear = { static = true } - }, - -- Jester - [-1297672541] = { - front = false, - rear = { static = true } - }, - -- Jester2 - [-1106353882] = { - front = false, - rear = { static = true } - }, - -- Jester Classic (jester3) - [-214906006] = { - front = false, - rear = { static = true } - }, - -- Jester4 - [-1582061455] = { - front = false, - rear = { static = true } - }, - -- Jugular (jugular) - [-208911803] = { - front = false, - rear = { onTrunk = true } - }, - -- Khamelion - [544021352] = { - front = false, - rear = { static = true } - }, - -- Komoda (komoda) - [-834353991] = { - front = false, - rear = { onTrunk = true } - }, - -- Kuruma - [-1372848492] = { - front = false, - rear = { onTrunk = true } - }, - -- Kuruma2 - [410882957] = { - front = false, - rear = { onTrunk = true } - }, - -- Locust (locust) - [-941272559] = { - front = false, - rear = { static = true } - }, - -- Lynx - [482197771] = { - front = false, - rear = { onBumper = true } - }, - -- Massacro - [-142942670] = { - front = false, - rear = { onBumper = true } - }, - -- Massacro2 - [-631760477] = { - front = false, - rear = { onBumper = true } - }, - -- Neon (neon) - [-1848994066] = { - front = false, - rear = { static = true } - }, - -- Ninef - [1032823388] = { - front = false, - rear = { static = true } - }, - -- Ninef2 - [-1461482751] = { - front = false, - rear = { static = true } - }, - -- Omnis - [-777172681] = { - front = false, - rear = { static = true } - }, - -- Omnis e-GT (omnisegt) - [-505223465] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Panthere (panthere) - [2100457220] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Paragon R (paragon) - [-447711397] = { - front = false, - rear = { onBumper = true } - }, - -- Paragon R (Armored) (paragon2) - [1416466158] = { - front = false, - rear = { onBumper = true } - }, - -- Pariah (pariah) - [867799010] = { - front = false, - rear = { static = true } - }, - -- Penumbra - [-377465520] = { - front = { static = true }, - rear = { onTrunk = true } - }, - -- Penumbra FF (penumbra2) - [-631322662] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- 300R (r300) - [1076201208] = { - front = false, - rear = { static = true } - }, - -- Raiden (raiden) - [-1529242755] = { - front = false, - rear = { onBumper = true } - }, - -- RapidGT - [-1934452204] = { - front = false, - rear = { onBumper = true } - }, - -- RapidGT2 - [1737773231] = { - front = false, - rear = { onBumper = true } - }, - -- RapidGT3 - [2049897956] = { - front = false, - rear = { static = true } - }, - -- Raptor - [-674927303] = { - front = false, - rear = { static = true } - }, - -- Remus - [1377217886] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Revolter (revolter) - [-410205223] = { - front = { static = true }, - rear = { static = true } - }, - -- RT3000 - [-452604007] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Ruston - [719660200] = { - front = false, - rear = { onBumper = true } - }, - -- SM722 (sm722) - [775514032] = { - front = false, - rear = { onTrunk = true } - }, - -- Schafter2 - [-1255452397] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Schafter3 - [-1485523546] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Schafter4 - [1489967196] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Schafter5 - [-888242983] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Schafter6 - [1922255844] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Schlagen GT (schlagen) - [-507495760] = { - front = false, - rear = { static = true } - }, - -- Schwarzer - [-746882698] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Seven70 - [-1757836725] = { - front = false, - rear = { onBumper = true } - }, - -- Specter - [1886268224] = { - front = false, - rear = { static = true } - }, - -- Specter2 - [1074745671] = { - front = false, - rear = { static = true } - }, - -- Streiter (streiter) - [1741861769] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Sugoi (sugoi) - [987469656] = { - front = false, - rear = { onTrunk = true } - }, - -- Sultan - [970598228] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Sultan Classic (sultan2) - [872704284] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Sultan3 - [-291021213] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Surano - [384071873] = { - front = false, - rear = { onTrunk = true } - }, - -- Tampa2 - [-1071380347] = { - front = false, - rear = { onBumper = true } - }, - -- 10F (tenf) - [-893984159] = { - front = false, - rear = { onBumper = true } - }, - -- 10F Widebody (tenf2) - [274946574] = { - front = false, - rear = { onBumper = true } - }, - -- Tropos - [1887331236] = { - front = false, - rear = { static = true } - }, - -- Vectre - [-1540373595] = { - front = false, - rear = { onTrunk = true } - }, - -- Verlierer2 - [1102544804] = { - front = false, - rear = { static = true } - }, - -- Veto - [-857356038] = { - front = false, - rear = false - }, - -- Veto2 - [-1492917079] = { - front = false, - rear = false - }, - -- V-STR (vstr) - [1456336509] = { - front = false, - rear = { onTrunk = true } - }, - -- ZR350 - [-39359943] = { - front = false, - rear = { onBumper = true } - }, - -- Apocalypse ZR380 (zr380) - [540101442] = { - front = false, - rear = { static = true } - }, - -- Future Shock ZR380 (zr3802) - [-1106120762] = { - front = false, - rear = { static = true } - }, - -- Nightmare ZR380 (zr3803) - [-1478704292] = { - front = false, - rear = { static = true } - }, - - -- Sports Classics -- - -- BType - [117401876] = { - front = false, - rear = { onBumper = true } - }, - -- BType2 - [-831834716] = { - front = false, - rear = false - }, - -- BType3 - [-602287871] = { - front = false, - rear = { onBumper = true } - }, - -- Casco - [941800958] = { - front = false, - rear = { static = true } - }, - -- Cheburek (cheburek) - [-988501280] = { - front = false, - rear = { static = true } - }, - -- Cheetah2 - [223240013] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Coquette2 - [1011753235] = { - front = false, - rear = { static = true } - }, - -- Coquette3 - [784565758] = { - front = false, - rear = { static = true } - }, - -- Deluxo (deluxo) - [1483171323] = { - front = false, - rear = { static = true } - }, - -- Dynasty (dynasty) - [310284501] = { - front = false, - rear = { onTrunk = true } - }, - -- Fagaloa (fagaloa) - [1617472902] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- GT500 (gt500) - [-1791613625] = { - front = false, - rear = { onTrunk = true } - }, - -- JB700 - [1051415893] = { - front = false, - rear = { onTrunk = true } - }, - -- JB 700W (jb7002) - [394110044] = { - front = false, - rear = { onTrunk = true } - }, - -- Mamba - [-1660945322] = { - front = false, - rear = { onTrunk = true } - }, - -- Michelli GT (michelli) - [1046206681] = { - front = false, - rear = { static = true } - }, - -- Manana - [-2124201592] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Manana Custom (manana2) - [1717532765] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Monroe - [-433375717] = { - front = false, - rear = { static = true } - }, - -- Nebula (nebula) - [-882629065] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Peyote - [1830407356] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Peyote Custom (peyote3) - [1107404867] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Pigalle - [1078682497] = { - front = { static = true }, - rear = { static = true } - }, - -- Retinue (retinue) - [1841130506] = { - front = false, - rear = { static = true } - }, - -- Retinue Mk II (retinue2) - [2031587082] = { - front = false, - rear = { static = true } - }, - -- Savestra (savestra) - [903794909] = { - front = false, - rear = { static = true } - }, - -- Stromberg (stromberg) - [886810209] = { - front = false, - rear = { static = true } - }, - -- Stinger - [1545842587] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- StingerGT - [-2098947590] = { - front = false, - rear = { onHood = true } - }, - -- Swinger (swinger) - [500482303] = { - front = false, - rear = { static = true } - }, - -- Toreador - [1455990255] = { - front = false, - rear = { static = true } - }, - -- Torero - [1504306544] = { - front = false, - rear = { static = true } - }, - -- Tornado - [464687292] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Tornado2 - [1531094468] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Tornado3 - [1762279763] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Tornado4 - [-2033222435] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Tornado5 - [-1797613329] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Tornado6 - [-1558399629] = { - front = false, - rear = { onTrunk = true } - }, - -- Viseris (viseris) - [-391595372] = { - front = false, - rear = { static = true } - }, - -- 190z (z190) - [838982985] = { - front = false, - rear = { static = true } - }, - -- Zion Classic (zion3) - [1862507111] = { - front = { onBumper = true }, - rear = { static = true } - }, - - -- Super -- - -- Adder - [-1216765807] = { - front = false, - rear = { static = true } - }, - -- Autarch (autarch) - [-313185164] = { - front = false, - rear = { static = true } - }, - -- Bullet - [-1696146015] = { - front = false, - rear = { static = true } - }, - -- Champion (champion) - [-915234475] = { - front = false, - rear = { static = true } - }, - -- Cheetah - [-1311154784] = { - front = false, - rear = { static = true } - }, - -- Corsita (corsita) - [-754687673] = { - front = false, - rear = { static = true } - }, - -- Cyclone - [1392481335] = { - front = false, - rear = { static = true } - }, - -- Deveste Eight (deveste) - [1591739866] = { - front = false, - rear = false - }, - -- Emerus (emerus) - [1323778901] = { - front = false, - rear = { static = true } - }, - -- EntityXF - [-1291952903] = { - front = false, - rear = { static = true } - }, - -- Entity XXR (entity2) - [-2120700196] = { - front = false, - rear = { static = true } - }, - -- Entity MT (entity3) - [1748565021] = { - front = false, - rear = { static = true } - }, - -- FMJ - [1426219628] = { - front = false, - rear = { static = true } - }, - -- Furia (furia) - [960812448] = { - front = false, - rear = { static = true } - }, - -- GP1 - [1234311532] = { - front = false, - rear = { static = true } - }, - -- Ignus (ignus) - [-1444114309] = { - front = false, - rear = { static = true } - }, - -- Infernus - [418536135] = { - front = false, - rear = { onBumper = true } - }, - -- Italigtb - [-2048333973] = { - front = false, - rear = { static = true } - }, - -- Italigtb2 - [-482719877] = { - front = false, - rear = { static = true } - }, - -- Krieger (krieger) - [-664141241] = { - front = false, - rear = { static = true } - }, - -- RE7B (le7b) - [-1232836011] = { - front = false, - rear = false - }, - -- LM87 (lm87) - [-10917683] = { - front = false, - rear = { static = true } - }, - -- Neo (neo) - [-1620126302] = { - front = false, - rear = { static = true } - }, - -- Nero - [1034187331] = { - front = false, - rear = { static = true } - }, - -- Nero2 - [1093792632] = { - front = false, - rear = { static = true } - }, - -- Osiris - [1987142870] = { - front = false, - rear = { static = true } - }, - -- Penetrator - [-1758137366] = { - front = false, - rear = { static = true } - }, - -- Pfister811 - [-1829802492] = { - front = false, - rear = { static = true } - }, - -- Prototipo - [2123327359] = { - front = false, - rear = { static = true } - }, - -- Reaper - [234062309] = { - front = false, - rear = { static = true } - }, - -- S80RR (s80) - [-324618589] = { - front = false, - rear = false - }, - -- SC1 (sc1) - [1352136073] = { - front = false, - rear = { static = true } - }, - -- Scramjet (scramjet) - [-638562243] = { - front = false, - rear = false - }, - -- Sheava - [819197656] = { - front = false, - rear = { static = true } - }, - -- SultanRS - [-295689028] = { - front = false, - rear = { onTrunk = true } - }, - -- T20 - [1663218586] = { - front = false, - rear = { static = true } - }, - -- Taipan (taipan) - [-1134706562] = { - front = false, - rear = { static = true } - }, - -- Tempesta - [272929391] = { - front = false, - rear = { static = true } - }, - -- Tezeract (tezeract) - [1031562256] = { - front = false, - rear = { static = true } - }, - -- Thrax (thrax) - [1044193113] = { - front = false, - rear = { static = true } - }, - -- Tigon (tigon) - [-1358197432] = { - front = false, - rear = { onHood = true } - }, - -- Torero XO (torero2) - [-165394758] = { - front = false, - rear = { onBumper = true } - }, - -- Turismo2 - [-982130927] = { - front = false, - rear = { static = true } - }, - -- Turismor - [408192225] = { - front = false, - rear = { static = true } - }, - -- Tyrant (tyrant) - [-376434238] = { - front = false, - rear = { static = true } - }, - -- Tyrus - [2067820283] = { - front = false, - rear = { static = true } - }, - -- Vacca - [338562499] = { - front = false, - rear = { static = true } - }, - -- Vagner - [1939284556] = { - front = false, - rear = { static = true } - }, - -- Vigilante - [-1242608589] = { - front = false, - rear = false - }, - -- Visione - [-998177792] = { - front = false, - rear = { static = true } - }, - -- Virtue (virtue) - [669204833] = { - front = false, - rear = { static = true } - }, - -- Voltic - [-1622444098] = { - front = false, - rear = { static = true } - }, - -- Voltic2 - [989294410] = { - front = false, - rear = { static = true } - }, - -- Zentorno - [-1403128555] = { - front = false, - rear = { static = true } - }, - -- XA21 - [917809321] = { - front = false, - rear = { static = true } - }, - -- Zeno (zeno) - [655665811] = { - front = false, - rear = { static = true } - }, - -- ZType - [75889561] = { - front = false, - rear = { static = true } - }, - -- Zorrusso (zorrusso) - [-682108547] = { - front = false, - rear = { onBumper = true } - }, - - -- Trailer -- - -- ArmyTanker - [-1207431159] = { - front = false, - rear = false - }, - -- Army Trailer (armytrailer) - [-1476447243] = { - front = false, - rear = false - }, - -- Army Trailer (armytrailer2) - [-1637149482] = { - front = false, - rear = false - }, - -- BaleTrailer - [-399841706] = { - front = false, - rear = false - }, - -- BoatTrailer - [524108981] = { - front = false, - rear = false - }, - -- CableCar - [-960289747] = { - front = false, - rear = false - }, - -- DockTrailer - [-2140210194] = { - front = false, - rear = false - }, - -- Freight Trailer (freighttrailer) - [-777275802] = { - front = false, - rear = false - }, - -- GrainTrailer - [1019737494] = { - front = false, - rear = false - }, - -- PropTrailer - [356391690] = { - front = false, - rear = false - }, - -- RakeTrailer - [390902130] = { - front = false, - rear = false - }, - -- TR2 - [2078290630] = { - front = false, - rear = false - }, - -- TR3 - [1784254509] = { - front = false, - rear = false - }, - -- TR4 - [2091594960] = { - front = false, - rear = false - }, - -- TRFlat - [-1352468814] = { - front = false, - rear = false - }, - -- TVTrailer - [-1770643266] = { - front = false, - rear = false - }, - -- Tanker - [-730904777] = { - front = false, - rear = false - }, - -- Tanker2 - [1956216962] = { - front = false, - rear = false - }, - -- TrailerLogs - [2016027501] = { - front = false, - rear = false - }, - -- TrailerSmall - [712162987] = { - front = false, - rear = false - }, - -- Trailers - [-877478386] = { - front = false, - rear = false - }, - -- Trailers2 - [-1579533167] = { - front = false, - rear = false - }, - -- Trailers3 - [-2058878099] = { - front = false, - rear = false - }, - - -- Utility -- - -- Airtug - [1560980623] = { - front = false, - rear = false - }, - -- Caddy - [1147287684] = { - front = false, - rear = false - }, - -- Caddy2 - [-537896628] = { - front = false, - rear = false - }, - -- Caddy3 - [-769147461] = { - front = false, - rear = false - }, - -- Docktug - [-884690486] = { - front = false, - rear = false - }, - -- Forklift - [1491375716] = { - front = false, - rear = false - }, - -- Mower - [1783355638] = { - front = false, - rear = false - }, - -- Ripley - [-845979911] = { - front = false, - rear = false - }, - -- Sadler - [-599568815] = { - front = false, - rear = { onBumper = true } - }, - -- Sadler2 - [734217681] = { - front = false, - rear = { onBumper = true } - }, - -- Scrap - [-1700801569] = { - front = false, - rear = false - }, - -- Slamtruck - [-1045911276] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- TowTruck - [-1323100960] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- TowTruck2 - [-442313018] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Tractor - [1641462412] = { - front = false, - rear = false - }, - -- Tractor2 - [-2076478498] = { - front = false, - rear = false - }, - -- Tractor3 - [1445631933] = { - front = false, - rear = false - }, - -- Mobile Operations Center (trailerlarge) - [1502869817] = { - front = false, - rear = { static = true } - }, - -- TrailerS4 - [-1100548694] = { - front = false, - rear = false - }, - -- UtilliTruck - [516990260] = { - front = false, - rear = { static = true } - }, - -- UtilliTruck2 - [887537515] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- UtilliTruck3 - [2132890591] = { - front = { onBumper = true }, - rear = { static = true } - }, - - -- Vans -- - -- Bison - [-16948145] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Bison2 - [2072156101] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Bison3 - [1739845664] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- BobcatXL - [1069929536] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Boxville - [-1987130134] = { - front = false, - rear = { static = true } - }, - -- Boxville2 - [-233098306] = { - front = false, - rear = { static = true } - }, - -- Boxville3 - [121658888] = { - front = false, - rear = { static = true } - }, - -- Boxville4 - [444171386] = { - front = false, - rear = { static = true } - }, - -- Boxville5 - [682434785] = { - front = false, - rear = { static = true } - }, - -- Burrito - [-1346687836] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Burrito2 - [-907477130] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Burrito3 - [-1743316013] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Burrito4 - [893081117] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Burrito5 - [1132262048] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Camper - [1876516712] = { - front = { onBumper = true }, - rear = false - }, - -- GBurrito - [-1745203402] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- GBurrito2 - [296357396] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Journey - [-120287622] = { - front = false, - rear = { onBumper = true } - }, - -- Journey II (journey2) - [-1627077503] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Minivan - [-310465116] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Minivan2 - [-1126264336] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Paradise - [1488164764] = { - front = { onBumper = true }, - rear = { onDoor = 3 } - }, - -- Pony - [-119658072] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Pony2 - [943752001] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Rumpo - [1162065741] = { - front = false, - rear = { onDoor = 3 } - }, - -- Rumpo2 - [-1776615689] = { - front = false, - rear = { onDoor = 3 } - }, - -- Rumpo3 - [1475773103] = { - front = false, - rear = { onTrunk = true } - }, - -- Speedo - [-810318068] = { - front = { onBumper = true }, - rear = { onDoor = 3 } - }, - -- Speedo2 - [728614474] = { - front = { onBumper = true }, - rear = { onDoor = 3 } - }, - -- Speedo Custom (speedo4) - [219613597] = { - front = { onBumper = true }, - rear = { onDoor = 3 } - }, - -- Surfer (surfer) - [699456151] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Rusty Surfer (surfer2) - [-1311240698] = { - front = false, - rear = false - }, - -- Surfer Custom (surfer3) - [-1035489563] = { - front = { onBumper = true }, - rear = { static = true } - }, - -- Taco - [1951180813] = { - front = false, - rear = { static = true } - }, - -- Youga - [65402552] = { - front = { onBumper = true }, - rear = { onBumper = true } - }, - -- Youga2 - [1026149675] = { - front = { onBumper = true }, - rear = { onTrunk = true } - }, - -- Youga Classic 4x4 (youga3) - [1802742206] = { - front = { onBumper = true }, - rear = { door = 3 } - }, - -- Youga Custom (youga4) - [1486521356] = { - front = false, - rear = { onTrunk = true } - } -} - -local noPlateClasses = { - -- Cycles, Boats, Helicopters, Planes, Trains, Open Wheel - [13] = true, [14] = true, [15] = true, [16] = true, [21] = true, [22] = true -} - -local doorBones = { - [0] = 'door_dside_f', - [1] = 'door_dside_r', - [2] = 'door_pside_f', - [3] = 'door_pside_r', -} - -local noModelCache = {} - -local function IsBoneAttachedToVehicle(vehicle, bone) - local boneIndex = GetEntityBoneIndexByName(vehicle, bone) - if boneIndex ~= -1 then - local rotation = GetEntityBoneRotation(vehicle, boneIndex) - if math.abs(rotation.x + rotation.y + rotation.z) > 0.01 then - return true - end - end - return false -end - -local function IsPlateVisible(vehicle, plate, type, vehicleRotation, cameraRotation) - if not plate then - return false - end - - if plate.onBumper then - local bumperBone = nil - if type == 'rear' then - bumperBone = "bumper_r" - else - bumperBone = "bumper_f" - end - - local isBumperAttached = IsBoneAttachedToVehicle(vehicle, bumperBone) - if not isBumperAttached then - return false - end - elseif plate.onTrunk then - local isTrunkAttached = IsBoneAttachedToVehicle(vehicle, "boot") - if not isTrunkAttached then - return false - end - elseif plate.onHood then - local isHoodAttached = IsBoneAttachedToVehicle(vehicle, "bonnet") - if not isHoodAttached then - return false - end - elseif plate.onDoor then - local doorBone = doorBones[plate.onDoor] - local isDoorAttached = IsBoneAttachedToVehicle(vehicle, doorBone) - if not isDoorAttached then - return false - end - elseif plate.onExtra then - local isExtraEnabled = IsVehicleExtraTurnedOn(vehicle, plate.onExtra) - if not isExtraEnabled then - return false - end - end - - -- Checks Angle - if Config.CheckLicensePlateAngle then - local vehicleRotZ = vehicleRotation.z - if type == 'rear' then - vehicleRotZ = vehicleRotZ + 180.0 - end - - local zDifference = math.abs(vehicleRotZ - cameraRotation.z) - if zDifference < 110.0 or zDifference > 250.0 then - return false - end - - local xDifference = math.abs(vehicleRotation.x - cameraRotation.x) - if xDifference > 60.0 then - return false - end - end - - return true -end - -function GetVehicleNumberPlate(vehicle, vehicleRotation, cameraRotation) - local class = GetVehicleClass(vehicle) - if noPlateClasses[class] then - return false, nil - end - - local model = GetEntityModel(vehicle) - local plate = vehicleNumberPlates[model] - if not plate then - plate = vehicleNumberPlates['default'] - if not noModelCache[model] then - noModelCache[model] = true - print("^3No plate data was found for vehicle model: "..model..", please add it to the numberplates.lua file.^0") - end - end - - if IsPlateVisible(vehicle, plate.front, 'front', vehicleRotation, cameraRotation) or IsPlateVisible(vehicle, plate.rear, 'rear', vehicleRotation, cameraRotation) then - return true, GetVehicleNumberPlateText(vehicle) - end - - return false, nil -end diff --git a/resources/[jobs]/[police]/helicam/server.lua b/resources/[jobs]/[police]/helicam/server.lua deleted file mode 100644 index fa0e0db38..000000000 --- a/resources/[jobs]/[police]/helicam/server.lua +++ /dev/null @@ -1,53 +0,0 @@ -local helicopters = {} -GlobalState.heliSpotlightsActive = 0 - -RegisterServerEvent('helicam:enterCamera') -AddEventHandler('helicam:enterCamera', function(heliNetId) - local helicopter = Entity(NetworkGetEntityFromNetworkId(heliNetId)) - if helicopter and not helicopter.state.heliCamInUse then - helicopter.state.heliCamInUse = true - helicopter.state.heliCamTargetBlip = false - helicopter.state.heliCamSpotlightData = nil - if not helicopter.state.heliCamMarkers then - helicopter.state.heliCamMarkers = {} - end - helicopters[source] = heliNetId - TriggerClientEvent('helicam:enterCamera', source, true) - else - TriggerClientEvent('helicam:enterCamera', source, false) - end -end) - -RegisterServerEvent('helicam:leaveCamera') -AddEventHandler('helicam:leaveCamera', function(heliNetId) - local helicopter = Entity(NetworkGetEntityFromNetworkId(heliNetId)) - helicopter.state.heliCamInUse = false - helicopter.state.heliCamTargetBlip = nil - if source ~= nil and source ~= "" then - helicopters[source] = nil - end -end) - -RegisterServerEvent('helicam:setStateBag') -AddEventHandler('helicam:setStateBag', function(heliNetId, bagName, value) - local helicopter = Entity(NetworkGetEntityFromNetworkId(heliNetId)) - helicopter.state[bagName] = value -end) - -RegisterServerEvent('helicam:toggleSpotlight') -AddEventHandler('helicam:toggleSpotlight', function(state) - if state then - GlobalState.heliSpotlightsActive += 1 - else - GlobalState.heliSpotlightsActive -= 1 - end -end) - --- If a player crashes/leaves while in the camera -AddEventHandler('playerDropped', function(reason) - if helicopters[source] then - TriggerEvent('helicam:leaveCamera', helicopters[source]) - Player(source).state.heliCamSpotlightData = { position = false, helicopter = helicopters[source] } - helicopters[source] = nil - end -end) diff --git a/resources/[jobs]/[police]/kael-mugshot/.fxap b/resources/[jobs]/[police]/kael-mugshot/.fxap deleted file mode 100644 index 571e152b7..000000000 Binary files a/resources/[jobs]/[police]/kael-mugshot/.fxap and /dev/null differ diff --git a/resources/[jobs]/[police]/kael-mugshot/README.md b/resources/[jobs]/[police]/kael-mugshot/README.md deleted file mode 100644 index 68fd7f3e4..000000000 --- a/resources/[jobs]/[police]/kael-mugshot/README.md +++ /dev/null @@ -1,44 +0,0 @@ -![Mugshot_03-01](https://github.com/abdullasadi/kael-mugshot/assets/17822126/e2ae4def-bb37-4d95-9e5a-c6b8aeb470fb) - - -### FiveM Mugshot Script Made By Kael Scripts - -## Preview -- [Youtube](https://youtu.be/WO4yoevtVZI) -- -## Feature -- 0.0 Resmon -- Easy Configuration -- Job System -- Discord Massage - -## Supported Script -- [qb-core](https://github.com/qbcore-framework/qb-core) -- [qb-target](https://github.com/qbcore-framework/qb-target) -- [qb-input](https://github.com/qbcore-framework/qb-input) - -## INSTALL - -Drag and Drop - -## Dependencies -- [qb-core](https://github.com/qbcore-framework/qb-core) - -## More From Kael Scripts -- [Illegal Cargo Delivery](https://kael.tebex.io/package/5642002) -- [Pearls Job](https://kael.tebex.io/package/5672502) -- [Fivem Crypto Mining](https://kael.tebex.io/package/5547351) -- [Billing](https://kael.tebex.io/package/5624426) -- [Mechanic Run](https://kael.tebex.io/package/5684105) -- [Fivem Organ Run](https://kael.tebex.io/package/5677195) -- [Bean Machine Job](https://kael.tebex.io/package/5667470) -- [Japanese Job](https://kael.tebex.io/package/5617380) -- [Duplicate Anti](https://kael.tebex.io/package/5534122) -- [Advanced Item Rob](https://kael.tebex.io/package/5549462) -- [Street Begging](https://forum.cfx.re/t/fivem-street-begging-made-by-kael-scripts/5096244/7) -- [Oxy Run](https://forum.cfx.re/t/fivem-oxy-run-by-kael-script/5101946) -- [Free Ghost Attack](https://forum.cfx.re/t/fivem-ghost-attack-by-kael-scripts/5100620) -- [GPS Tracker](https://forum.cfx.re/t/fivem-gps-tracker-by-kael-scripts/5098948) -- [Job Garage](https://forum.cfx.re/t/fivem-job-garage-by-kael-scripts/5105236) -- [Advance HotDog](https://forum.cfx.re/t/fivem-advanced-hotdog-by-kael-scripts/5106703) -- [Trevor Mission](https://forum.cfx.re/t/fivem-trevor-mission-by-kael-scripts/5111679) diff --git a/resources/[jobs]/[police]/kael-mugshot/client/client.lua b/resources/[jobs]/[police]/kael-mugshot/client/client.lua deleted file mode 100644 index 6c2135bf9..000000000 --- a/resources/[jobs]/[police]/kael-mugshot/client/client.lua +++ /dev/null @@ -1,161 +0,0 @@ -local QBCore = exports[Config.Core]:GetCoreObject() - -CreateThread(function() - exports[Config.Target]:AddBoxZone('Mugshottarget', vector3(Config.TargetLoc.x, Config.TargetLoc.y, Config.TargetLoc.z), 0.1, 0.3, { - name = "PoliceMugshot", - heading = 0, - debugPoly = Config.Debug, - minZ = 22.97, - maxZ = 26.97, - }, { - options = { - { - event = "kael-mugshot:Client:mugshotinput", - icon = "fas fa-clipboard-list", - label = "Take Shot", - job = Config.PoliceJobName, - }, - }, - distance = 1.5 - }) -end) - -RegisterNetEvent("kael-mugshot:Client:mugshotinput", function() - local picture = exports['qb-input']:ShowInput({ - header = "Mugshot Input", - submitText = "Take Mugshot", - inputs = { - { - text = "Citizen ID (#)", - name = "citizenid", - type = "text", - isRequired = true, - }, - }, - }) - TriggerServerEvent("kael-mugshot:server:takemugshot", picture.citizenid) -end) - -RegisterNetEvent("kael-mugshot:client:takemugshot", function(officer) - local InProgress = true - local PlayerPed = PlayerPedId() - local SuspectCoods = GetEntityCoords(PlayerPed) - local PlayerData = QBCore.Functions.GetPlayerData() - local CitizenId = PlayerData.citizenid - local Name = PlayerData.charinfo.firstname.. " ".. PlayerData.charinfo.lastname - local DOB = PlayerData.charinfo.birthdate - local ScaleformBoard = LoadScale("mugshot_board_01") - local RenderHandle = CreateRenderModel("ID_Text", "prop_police_id_text") - CreateThread(function() - while RenderHandle do - HideHudAndRadarThisFrame() - SetTextRenderId(RenderHandle) - Set_2dLayer(4) - SetScriptGfxDrawBehindPausemenu(1) - DrawScaleformMovie(ScaleformBoard, 0.405, 0.37, 0.81, 0.74, 255, 255, 255, 255, 0) - SetScriptGfxDrawBehindPausemenu(0) - SetTextRenderId(GetDefaultScriptRendertargetRenderId()) - SetScriptGfxDrawBehindPausemenu(1) - SetScriptGfxDrawBehindPausemenu(0) - Wait(0) - end - end) - Wait(250) - BeginScaleformMovieMethod(ScaleformBoard, 'SET_BOARD') - PushScaleformMovieMethodParameterString(Config.BoardHeader) - PushScaleformMovieMethodParameterString(Name) - PushScaleformMovieMethodParameterString(CitizenId) - PushScaleformMovieMethodParameterString(DOB) - PushScaleformMovieFunctionParameterInt(0) - PushScaleformMovieFunctionParameterInt(math.random(000, 999)) - PushScaleformMovieFunctionParameterInt(116) - EndScaleformMovieMethod() - local MugCam = CreateCam("DEFAULT_SCRIPTED_CAMERA", 1) - SetCamCoord(MugCam, Config.CameraPos.pos) - SetCamRot(MugCam, Config.CameraPos.rotation, 2) - RenderScriptCams(1, 0, 0, 1, 1) - Wait(250) - CreateThread(function() - FreezeEntityPosition(PlayerPed, true) - SetPauseMenuActive(false) - while InProgress do - DisableAllControlActions(0) - EnableControlAction(0, 249, true) - EnableControlAction(0, 46, true) - Wait(0) - end - end) - SetEntityCoords(PlayerPed, Config.MugShotCoords) - SetEntityHeading(PlayerPed, Config.MugShotHeading) - LoadModel("prop_police_id_board") - LoadModel("prop_police_id_text") - local Board = CreateObject("prop_police_id_board", SuspectCoods, true, true, false) - local BoardOverlay = CreateObject("prop_police_id_text", SuspectCoods, true, true, false) - AttachEntityToEntity(BoardOverlay, Board, -1, 4103, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true) - SetModelAsNoLongerNeeded("prop_police_id_board") - SetModelAsNoLongerNeeded("prop_police_id_text") - SetCurrentPedWeapon(PlayerPed, "weapon_unarmed", 1) - ClearPedWetness(PlayerPed) - ClearPedBloodDamage(PlayerPed) - AttachEntityToEntity(Board, PlayerPed, GetPedBoneIndex(PlayerPed, 28422), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0, 0, 0, 0, 2, 1) - LoadAnimDict("mp_character_creation@lineup@male_a") - TaskPlayAnim(PlayerPed, "mp_character_creation@lineup@male_a", "loop_raised", 8.0, 8.0, -1, 49, 0, false, false, false) - Wait(1000) - QBCore.Functions.TriggerCallback('kael-mugshot:server:GetWebhook', function(Hook) - if Hook then - exports['screenshot-basic']:requestScreenshotUpload(tostring(Hook), 'files[]', {encoding = 'jpg'}, function(data) - local Response = json.decode(data) - local imageURL = Response.attachments[1].url - TriggerServerEvent('kael-mugshot:server:MugLog', officer, imageURL) - end) - end - end) - Wait(5000) - DestroyCam(MugCam, 0) - RenderScriptCams(0, 0, 1, 1, 1) - SetFocusEntity(PlayerPed) - ClearPedTasksImmediately(PlayerPed) - FreezeEntityPosition(PlayerPed, false) - DeleteObject(Board) - DeleteObject(BoardOverlay) - RenderHandle = nil - InProgress = false -end) - -function LoadModel(model) - RequestModel(GetHashKey(model)) - while not HasModelLoaded(GetHashKey(model)) do - Wait(0) - end -end - -function LoadAnimDict(dict) - while (not HasAnimDictLoaded(dict)) do - RequestAnimDict(dict) - Wait(0) - end -end - -function LoadScale(scalef) - local handle = RequestScaleformMovie(scalef) - while not HasScaleformMovieLoaded(handle) do - Wait(0) - end - return handle -end - -function CreateRenderModel(name, model) - local handle = 0 - if not IsNamedRendertargetRegistered(name) then - RegisterNamedRendertarget(name, 0) - end - if not IsNamedRendertargetLinked(model) then - LinkNamedRendertarget(model) - end - if IsNamedRendertargetRegistered(name) then - handle = GetNamedRendertargetRenderId(name) - end - return handle -end - - diff --git a/resources/[jobs]/[police]/kael-mugshot/config.lua b/resources/[jobs]/[police]/kael-mugshot/config.lua deleted file mode 100644 index 72fac9e5a..000000000 --- a/resources/[jobs]/[police]/kael-mugshot/config.lua +++ /dev/null @@ -1,19 +0,0 @@ -Config = { - Debug = true, - Core ="qb-core", - Target = "qb-target" -} - -Config.PoliceJobName = "police" -Config.BoardHeader = "LSPD" -Config.TargetLoc = vector3(479.3853, -1009.7788, 25.9387) -Config.MugShotCoords = vector3(479.3771, -1008.6523, 25.9387) -Config.MugShotHeading = 183.55 -Config.CameraPos = { - pos = vector3(479.3853, -1009.7788, 25.9387), - rotation = vector3(0.0, 0.0, 358.04), -} - -Config.LogTitle = "Kael Mugshot" -Config.LogName = "Kael Mugshot" -Config.LogIcon = "https://cdn.discordapp.com/attachments/1026588960207667321/1114942675951562844/border-01-tebex.png" \ No newline at end of file diff --git a/resources/[jobs]/[police]/kael-mugshot/fxmanifest.lua b/resources/[jobs]/[police]/kael-mugshot/fxmanifest.lua deleted file mode 100644 index 40c948170..000000000 --- a/resources/[jobs]/[police]/kael-mugshot/fxmanifest.lua +++ /dev/null @@ -1,24 +0,0 @@ -fx_version 'cerulean' -game 'gta5' -lua54 'yes' - -description 'A Mugshot Script For Police Job Made By Kael Team' -version '1.0.0' -author 'Kael-Scripts' - -shared_script 'config.lua' - -client_scripts { - 'client/**.lua' -} - -server_scripts { - 'server/**.lua' -} - -escrow_ignore { - 'server/**.lua', - 'client/**.lua', - 'config.lua', -} -dependency '/assetpacks' \ No newline at end of file diff --git a/resources/[jobs]/[police]/kael-mugshot/server/server.lua b/resources/[jobs]/[police]/kael-mugshot/server/server.lua deleted file mode 100644 index be5945c24..000000000 --- a/resources/[jobs]/[police]/kael-mugshot/server/server.lua +++ /dev/null @@ -1,53 +0,0 @@ -local QBCore = exports[Config.Core]:GetCoreObject() -local ScreenShotHook = "https://discord.com/api/webhooks/1369752342366257435/UWjCny4K7aFCXRkrHI-2POcCtBULQX0Ckk6NtxrCRLbMmE1gVuzU2Ub3SVu05dxCe3yB" -local MugShotHook = "https://discord.com/api/webhooks/1369752342366257435/UWjCny4K7aFCXRkrHI-2POcCtBULQX0Ckk6NtxrCRLbMmE1gVuzU2Ub3SVu05dxCe3yB" - -QBCore.Functions.CreateCallback("kael-mugshot:server:GetWebhook", function(source, cb) - cb(ScreenShotHook) -end) - -RegisterNetEvent("kael-mugshot:server:takemugshot", function(targetid) - local TargetId = tonumber(targetid) - local Target = QBCore.Functions.GetPlayer(TargetId) - if Target then - if TargetId ~= source then - TriggerClientEvent("kael-mugshot:client:takemugshot", TargetId, source) - else - TriggerClientEvent('QBCore:Notify', source, "You Can't Take Mugshot Your Self", 'error') - end - else - TriggerClientEvent('QBCore:Notify', source, "Citizen Id Invalid!", 'error') - end -end) - -RegisterNetEvent("kael-mugshot:server:MugLog", function(officer, MugShot) - local Suspect = QBCore.Functions.GetPlayer(source) - local Police = QBCore.Functions.GetPlayer(officer) - local suspectName = Suspect.PlayerData.charinfo.firstname .. ' ' .. Suspect.PlayerData.charinfo.lastname - local suspectCitizenID = Suspect.PlayerData.citizenid - local suspectDOB = Suspect.PlayerData.charinfo.birthdate - local policeName = Police.PlayerData.charinfo.firstname .. ' ' .. Police.PlayerData.charinfo.lastname - local embedData = { - { - ['title'] = Config.LogTitle, - ['color'] = 16761035, - ['footer'] = { - ['text'] = os.date( "!%a %b %d, %H:%M", os.time() + 6 * 60 * 60 ), - }, - ['fields'] = { - {['name'] = "Suspect:", ['value'] = "```" .. suspectName .. "```", ['inline'] = false}, - {['name'] = "Date Of Birth:", ['value'] = "```" .. suspectDOB .. "```", ['inline'] = false}, - {['name'] = "Citizen ID:", ['value'] = "```" .. suspectCitizenID .. "```", ['inline'] = false}, - {['name'] = "Officer:", ['value'] = "```" .. policeName .. "```", ['inline'] = false}, - }, - ['image'] = { - ['url'] = MugShot, - }, - ['author'] = { - ['name'] = Config.LogName, - ['icon_url'] = Config.LogIcon, - }, - } - } - PerformHttpRequest(MugShotHook, function() end, 'POST', json.encode({ username = Config.LogName, embeds = embedData}), { ['Content-Type'] = 'application/json' }) -end) \ No newline at end of file