1
0
Fork 0
forked from Simnation/Main
This commit is contained in:
Nordi98 2025-07-09 15:49:32 +02:00
parent d7e2f9da39
commit b3dfd74c87
61 changed files with 11 additions and 8565 deletions

View file

@ -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

View file

@ -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)

View file

@ -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);
}
});

View file

@ -1 +0,0 @@
<script src="copy.js" type="text/javascript"></script>

View file

@ -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 <propName> <RelativeToBone>".
-- /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 <propName> <pedBoneIndex> <animDict> <animName> <animFlag>"
-- 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.

View file

@ -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'

View file

@ -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

View file

@ -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

View file

@ -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
}

View file

@ -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'

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View file

@ -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',
}
},
```

View file

@ -1,63 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<CMapTypes>
<extensions/>
<archetypes>
<Item type="CBaseArchetypeDef">
<lodDist value="120.00000000"/>
<flags value="537001984"/>
<specialAttribute value="0"/>
<bbMin x="-0.11138500" y="-0.12405200" z="-0.08092700"/>
<bbMax x="0.11138500" y="0.00000000" z="0.08092700"/>
<bsCentre x="0.00000000" y="-0.06202600" z="0.00000000"/>
<bsRadius value="0.15100670"/>
<hdTextureDist value="5.00000000"/>
<name>hei_prop_wall_alarm_red</name>
<textureDictionary>hei_prop_wall_alarm_red</textureDictionary>
<clipDictionary/>
<drawableDictionary/>
<physicsDictionary>prop_wall_alarm</physicsDictionary>
<assetType>ASSET_TYPE_DRAWABLE</assetType>
<assetName>hei_prop_wall_alarm_red</assetName>
<extensions/>
</Item>
<Item type="CBaseArchetypeDef">
<lodDist value="120.00000000"/>
<flags value="537001984"/>
<specialAttribute value="0"/>
<bbMin x="-0.11138500" y="-0.12405200" z="-0.08092700"/>
<bbMax x="0.11138500" y="0.00000000" z="0.08092700"/>
<bsCentre x="0.00000000" y="-0.06202600" z="0.00000000"/>
<bsRadius value="0.15100670"/>
<hdTextureDist value="5.00000000"/>
<name>hei_prop_wall_alarm_blue</name>
<textureDictionary>hei_prop_wall_alarm_blue</textureDictionary>
<clipDictionary/>
<drawableDictionary/>
<physicsDictionary>prop_wall_alarm</physicsDictionary>
<assetType>ASSET_TYPE_DRAWABLE</assetType>
<assetName>hei_prop_wall_alarm_blue</assetName>
<extensions/>
</Item>
<Item type="CBaseArchetypeDef">
<lodDist value="120.00000000"/>
<flags value="537001984"/>
<specialAttribute value="0"/>
<bbMin x="-0.11138500" y="-0.12405200" z="-0.08092700"/>
<bbMax x="0.11138500" y="0.00000000" z="0.08092700"/>
<bsCentre x="0.00000000" y="-0.06202600" z="0.00000000"/>
<bsRadius value="0.15100670"/>
<hdTextureDist value="5.00000000"/>
<name>hei_prop_wall_alarm_orange</name>
<textureDictionary>hei_prop_wall_alarm_orange</textureDictionary>
<clipDictionary/>
<drawableDictionary/>
<physicsDictionary>prop_wall_alarm</physicsDictionary>
<assetType>ASSET_TYPE_DRAWABLE</assetType>
<assetName>hei_prop_wall_alarm_orange</assetName>
<extensions/>
</Item>
</archetypes>
<name>hei_lev_des_mp_dlc</name>
<dependencies/>
<compositeEntityTypes/>
</CMapTypes>

File diff suppressed because it is too large Load diff

View file

@ -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
}

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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'

View file

@ -1,3 +0,0 @@
<svg height="100" width="180" xmlns="http://www.w3.org/2000/svg">
<polygon points="0 0, 180 0, 90 100"/>
</svg>

Before

Width:  |  Height:  |  Size: 117 B

View file

@ -1,13 +0,0 @@
<svg width="320" height="20" xmlns="http://www.w3.org/2000/svg">
<text x="0" y="9" fill="white" style="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: 0.85em; font-weight: bold;" text-anchor="middle">N</text>
<text x="360" y="9" fill="white" style="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: 0.85em; font-weight: bold;" text-anchor="middle">N</text>
<text x="315" y="9" fill="white" style="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: 0.85em; font-weight: bold;" text-anchor="middle">NW</text>
<text x="-45" y="9" fill="white" style="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: 0.85em; font-weight: bold;" text-anchor="middle">NW</text>
<text x="45" y="9" fill="white" style="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: 0.85em; font-weight: bold;" text-anchor="middle">NE</text>
<text x="405" y="9" fill="white" style="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: 0.85em; font-weight: bold;" text-anchor="middle">NE</text>
<text x="90" y="9" fill="white" style="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: 0.85em; font-weight: bold;" text-anchor="middle">E</text>
<text x="135" y="9" fill="white" style="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: 0.85em; font-weight: bold;" text-anchor="middle">SE</text>
<text x="180" y="9" fill="white" style="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: 0.85em; font-weight: bold;" text-anchor="middle">S</text>
<text x="225" y="9" fill="white" style="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: 0.85em; font-weight: bold;" text-anchor="middle">SW</text>
<text x="270" y="9" fill="white" style="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: 0.85em; font-weight: bold;" text-anchor="middle">W</text>
</svg>

Before

Width:  |  Height:  |  Size: 5.4 KiB

View file

@ -1,63 +0,0 @@
<svg class="svg" width="320" height="20" xmlns="http://www.w3.org/2000/svg">
<rect width="2" height="6" x="-90"/>
<rect width="2" height="4" x="-81"/>
<rect width="2" height="4" x="-72"/>
<rect width="2" height="4" x="-63"/>
<rect width="2" height="4" x="-54"/>
<rect width="2" height="6" x="-45"/>
<rect width="2" height="4" x="-36"/>
<rect width="2" height="4" x="-27"/>
<rect width="2" height="4" x="-18"/>
<rect width="2" height="4" x="-9"/>
<rect width="2" height="6" x="0"/>
<rect width="2" height="4" x="9"/>
<rect width="2" height="4" x="18"/>
<rect width="2" height="4" x="27"/>
<rect width="2" height="4" x="36"/>
<rect width="2" height="6" x="45"/>
<rect width="2" height="4" x="54"/>
<rect width="2" height="4" x="63"/>
<rect width="2" height="4" x="72"/>
<rect width="2" height="4" x="81"/>
<rect width="2" height="6" x="90"/>
<rect width="2" height="4" x="99"/>
<rect width="2" height="4" x="108"/>
<rect width="2" height="4" x="117"/>
<rect width="2" height="4" x="126"/>
<rect width="2" height="6" x="135"/>
<rect width="2" height="4" x="144"/>
<rect width="2" height="4" x="153"/>
<rect width="2" height="4" x="162"/>
<rect width="2" height="4" x="171"/>
<rect width="2" height="6" x="180"/>
<rect width="2" height="4" x="189"/>
<rect width="2" height="4" x="198"/>
<rect width="2" height="4" x="207"/>
<rect width="2" height="4" x="216"/>
<rect width="2" height="6" x="225"/>
<rect width="2" height="4" x="234"/>
<rect width="2" height="4" x="243"/>
<rect width="2" height="4" x="252"/>
<rect width="2" height="4" x="261"/>
<rect width="2" height="6" x="270"/>
<rect width="2" height="4" x="279"/>
<rect width="2" height="4" x="288"/>
<rect width="2" height="4" x="297"/>
<rect width="2" height="4" x="306"/>
<rect width="2" height="6" x="315"/>
<rect width="2" height="4" x="324"/>
<rect width="2" height="4" x="333"/>
<rect width="2" height="4" x="342"/>
<rect width="2" height="4" x="351"/>
<rect width="2" height="6" x="360"/>
<rect width="2" height="4" x="369"/>
<rect width="2" height="4" x="378"/>
<rect width="2" height="4" x="387"/>
<rect width="2" height="4" x="396"/>
<rect width="2" height="6" x="405"/>
<rect width="2" height="4" x="414"/>
<rect width="2" height="4" x="423"/>
<rect width="2" height="4" x="432"/>
<rect width="2" height="4" x="441"/>
<rect width="2" height="6" x="450"/>
</svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

View file

@ -1,7 +0,0 @@
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
<circle cx="50" cy="50" r="40" fill="none" stroke="#000" stroke-width="3.5"/>
<line x1="50" y1="3" x2="50" y2="17" fill="none" stroke="#000" stroke-width="3.5"/>
<line x1="97" y1="50" x2="90" y2="50" fill="none" stroke="#000" stroke-width="3.5"/>
<line x1="10" y1="50" x2="3" y2="50" fill="none" stroke="#000" stroke-width="3.5"/>
<line x1="50" y1="90" x2="50" y2="97" fill="none" stroke="#000" stroke-width="3.5"/>
</svg>

Before

Width:  |  Height:  |  Size: 514 B

View file

@ -1,7 +0,0 @@
<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg">
<path d="M 50 10 A 40 40 0 1 1 10 50" fill="none" stroke="#000" stroke-width="3.5"/>
<line x1="50" y1="3" x2="50" y2="12" fill="none" stroke="#000" stroke-width="3.5"/>
<line x1="97" y1="50" x2="83" y2="50" fill="none" stroke="#000" stroke-width="3.5"/>
<line x1="50" y1="97" x2="50" y2="90" fill="none" stroke="#000" stroke-width="3.5"/>
<line x1="12" y1="50" x2="2" y2="50" fill="none" stroke="#000" stroke-width="3.5"/>
</svg>

Before

Width:  |  Height:  |  Size: 521 B

View file

@ -1,3 +0,0 @@
<svg width="10" height="100" xmlns="http://www.w3.org/2000/svg">
<line x1="5" y1="100" x2="5" y2="0" fill="none" stroke="#000" stroke-width="5"/>
</svg>

Before

Width:  |  Height:  |  Size: 158 B

View file

@ -1,11 +0,0 @@
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" width="180" height="100" viewBox="0 0 180 100"
preserveAspectRatio="xMidYMid meet">
<g transform="translate(0.0, 100.0) scale(0.05, -0.05)" fill="#000000" stroke="none">
<path d="M1501 1831 c-227 -227 -229 -231 -224 -316 4 -70 -4 -94 -46 -134 l-52 -49 -105 104 c-131 129 -118 131 -280 -32 -161 -162 -159 -147 -30 -278 l104 -105 -49 -52 c-40 -42 -64 -50 -134 -46 -85 5 -89 3 -316 -224 -268 -267 -260 -240 -113 -385 146 -144 116 -153 383 115 227 227 229 231 224 316 -4 70 4 94 46 134 l52 49 105 -104 c131 -129 118 -131 280 32 161 162 159 147 30 278 l-104 105 49 52 c40 42 64 50 134 46 85 -5 89 -3 316 224 268 267 259 237 115 383 -145 147 -118 155 -385 -113z"/>
<path d="M2780 940 l0 -520 90 0 90 0 0 520 0 520 -90 0 -90 0 0 -520z"/>
<path d="M2380 810 l0 -390 90 0 90 0 0 390 0 390 -90 0 -90 0 0 -390z"/>
<path d="M1980 650 l0 -230 90 0 90 0 0 230 0 230 -90 0 -90 0 0 -230z"/>
<path d="M1580 470 c0 -46 7 -50 90 -50 83 0 90 4 90 50 0 46 -7 50 -90 50 -83 0 -90 -4 -90 -50z"/>
<path d="M3180 440 c0 -11 41 -20 90 -20 50 0 90 9 90 20 0 11 -40 20 -90 20 -49 0 -90 -9 -90 -20z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -1,5 +0,0 @@
<svg width="20" height="20" xmlns="http://www.w3.org/2000/svg">
<line x1="1" y1="1" x2="18" y2="18" fill="none" stroke="#000" stroke-width="2.5"/>
<line x1="1" y1="18" x2="18" y2="1" fill="none" stroke="#000" stroke-width="2.5"/>
</svg>

Before

Width:  |  Height:  |  Size: 251 B

View file

@ -1,8 +0,0 @@
<svg width="200" height="100" xmlns="http://www.w3.org/2000/svg">
<line x1="2" y1="44" x2="2" y2="56" fill="none" stroke="#000" stroke-width="2.75"/>
<line x1="197" y1="44" x2="197" y2="56" fill="none" stroke="#000" stroke-width="2.75"/>
<line x1="100" y1="4" x2="100" y2="31" fill="none" stroke="#000" stroke-width="2.75"/>
<line x1="118" y1="50" x2="145" y2="50" fill="none" stroke="#000" stroke-width="2.75"/>
<line x1="100" y1="68" x2="100" y2="95" fill="none" stroke="#000" stroke-width="2.75"/>
<line x1="55" y1="50" x2="82" y2="50" fill="none" stroke="#000" stroke-width="2.75"/>
</svg>

Before

Width:  |  Height:  |  Size: 624 B

View file

@ -1,7 +0,0 @@
<svg width="150" height="15" xmlns="http://www.w3.org/2000/svg">
<line x1="5" y1="12" x2="147" y2="12" fill="none" stroke="#000" stroke-width="2"/>
<line x1="6" y1="12" x2="6" y2="2" fill="none" stroke="#000" stroke-width="2"/>
<line x1="115" y1="12" x2="115" y2="2" fill="none" stroke="#000" stroke-width="2"/>
<line x1="130" y1="12" x2="130" y2="2" fill="none" stroke="#000" stroke-width="2"/>
<line x1="146" y1="12" x2="146" y2="2" fill="none" stroke="#000" stroke-width="2"/>
</svg>

Before

Width:  |  Height:  |  Size: 498 B

View file

@ -1,144 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Helicam by Mads</title>
<link rel="stylesheet" href="style.css"/>
<script src="nui://game/ui/jquery.js" type="text/javascript"></script>
<script src="./script.js" type="text/javascript"></script>
</head>
<body>
<div id="wrapper">
<div id="helicopter-info">
<div>
<div id="satellite-wrapper" class="inline"><img id="satellite-icon" class="svg" src="images/satellite-icon.svg"></div>
<p class="text inline" id="camera-label">FLIR SYSTEMS</p>
</div>
<div class="street"><p class="text street-text no-left-padding" id="hi-street">None</p></div>
<div id="hi-container-left">
<p class="text inline" id="hi-latitude">.</p>
<div class="relative">
<div id="hi-sub-ll" class="info-data">
<div><p class="text inline no-left-padding">SPD</p><p class="text inline float-right" id="hi-speed">0</p></div>
<p class="text inline no-left-padding">ALT</p><p class="text inline float-right" id="hi-altitude">0</p>
</div>
<div id="hi-sub-lr" class="info-data">
<p class="text" id="hi-speed-unit">KTS</p>
<p class="text" id="hi-altitude-unit">FT</p>
</div>
</div>
</div>
<div id="hi-container-right">
<p class="text inline" id="hi-longitude">.</p>
<div class="relative">
<div id="hi-sub-rl" class="info-data">
<p class="text inline">HDG</p><p class="text inline float-right" id="hi-heading">0</p>
</div>
<div id="hi-sub-rr" class="info-data">
<p class="text inline">°T</p>
</div>
</div>
</div>
</div>
<div id="target-info">
<div><p class="text inline" id="mads-label">Made By Mads</p></div>
<div class="street" id="ta-street-wrapper"><p class="text street-text" id="ta-street">None</p></div>
<span id="ta-container-wrapper">
<div id="ta-container-left">
<p class="text inline" id="ta-latitude">.</p>
<div>
<div id="ta-sub-ll" class="info-data">
<div><p class="text inline">SPD</p><p class="text inline float-right" id="ta-speed">0</p></div>
<p class="text inline">ELV</p><p class="text inline float-right" id="ta-elevation">0</p>
</div>
<div id="ta-sub-lr" class="info-data">
<p class="text" id="ta-speed-unit">MPH</p>
<p class="text" id="ta-elevation-unit">FT</p>
</div>
</div>
</div>
<div id="ta-container-right">
<p class="text inline" id="ta-longitude">.</p>
<div>
<div id="ta-sub-rl" class="info-data">
<div><p class="text inline">HDG</p><p class="text inline float-right" id="ta-heading">0</p></div>
<p class="text inline">SLT</p><p class="text inline float-right" id="ta-distance">0</p>
</div>
<div id="ta-sub-rr" class="info-data">
<p class="text inline">°T</p>
<p id="ta-distance-unit" class="text inline">M</p>
</div>
<div id="numberplate-wrapper"><p class="text inline">LPL</p><p class="text inline float-right" id="ta-numberplate">---</p></div>
</div>
</div>
</span>
</div>
<div id="bearing-container">
<div class="bearing">
<p class="text inline" id="bearing-text">0°T</p>
</div>
<div id="bearing-arrow-container" class="bearing">
<img id="bearing-arrow" class="inline svg" src="images/arrow.svg">
</div>
<div class="bearing">
<!-- Modifed version of this: https://github.com/thelindat/compass/blob/master/html/index.html -->
<img id="bearing-img" class="svg" src="images/bearing.svg">
<img id="bearing-directions" src="images/bearing-directions.svg">
</div>
</div>
<div id="timedate-container">
<div><p class="text inline" id="date">21/08/22</p></div>
<div><p class="text inline" id="time">00:00:00 Z</p></div>
</div>
<div class="centered">
<span id="cross-wrapper">
<img id="target-cross" class="svg centered" src="images/target-cross.svg" alt="X">
<!-- <img id="target-cross-inner" class="svg centered" src="images/target-cross-inner.svg" alt="X"> --> <!-- To messy for my taste -->
</span>
</div>
<div id="lock-bar-container">
<p id="lock-bar-text" class="text">Scanning...</p>
<div id="lock-bar-wrapper">
<div id="lock-bar-progress"></div>
</div>
</div>
<div id="camera-info">
<div id="camera-info-stack">
<p id="vision-state" class="text">HDEO</p>
<p id="lock-state" class="text inline">LOCK</p><p id="lock-type" class="text inline">NONE</p>
</div>
<p class="text inline">W</p>
<span>
<img id="zoom-arrow" class="svg" src="images/arrow.svg">
<img id="zoom-bar" class="svg" src="images/zoom-bar.svg">
</span>
<p class="text inline">N</p>
</div>
<div id="relative-info">
<p class="text inline" id="camera-pitch"></p>
<div class="inline">
<img class="camera-img svg" src="images/camera-pitch.svg" alt="camera pitch">
<img id="pitch-line" class="camera-line svg" src="images/line.svg">
</div>
<div class="inline">
<img class="camera-img svg" src="images/camera-heading.svg" alt="camera heading">
<img id="heading-line" class="camera-line svg" src="images/line.svg">
</div>
<p id="camera-heading" class="text inline"></p>
</div>
<!-- <div id="north-infobox">
<div id="compass-arrow"></div>
</div> -->
</div>
</body>
</html>

View file

@ -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!");
};
};

View file

@ -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;
} */

File diff suppressed because it is too large Load diff

View file

@ -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)

View file

@ -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)

View file

@ -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

View file

@ -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"

View file

@ -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'

View file

@ -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)