ed
BIN
resources/[carscripts]/kq_towing2/.fxap
Normal file
|
@ -0,0 +1,34 @@
|
|||
# KQ_TOWING2 INSTALLATION GUIDE
|
||||
|
||||
This guide will provide step-by-step instructions on how to install and set up the KQ_TOWING2 script for FiveM.
|
||||
|
||||
## Step 1:
|
||||
After downloading the script, unzip the folder and place it in the `resources` directory on your FiveM server.
|
||||
|
||||
## Step 2:
|
||||
Add the script to your `server.cfg` file. Make sure that it's added **after** the framework of choice if using any.
|
||||
|
||||
## Step 3:
|
||||
Open the `config.lua` file in the script folder and make sure that the correct framework is enabled. (If using ESX or QBCore)
|
||||
|
||||
## Framework specific setup
|
||||
|
||||
### ESX
|
||||
- Import the SQL file located inside the `/esx` folder to your database to add the items or change the item names in the config to match existing items.
|
||||
|
||||
### QBCore
|
||||
- Add the items located in the `/qb` folder to your qb-core shared.lua file `qb-core/shared/items.lua` or `qb-core/shared.lua` or change the item names in the config to match existing items.
|
||||
|
||||
### QBOX / OX_INVENTORY (When not using ESX or QBCore)
|
||||
- Add the items located in the `/ox` folder to your ox_inventory items list, and make sure that `kq_towing2` starts BEFORE ox_inventory
|
||||
|
||||
### Extra
|
||||
- If using an anti-cheat make sure to whitelist a prop: `prop_roadpole_01a`. This prop is required for the rope to work properly
|
||||
|
||||
## Done
|
||||
Enjoy the script
|
||||
|
||||
|
||||
- https://kuzquality.com/
|
||||
- https://discord.gg/fZsyam7Rvz
|
||||
- https://www.youtube.com/@KuzQuality
|
|
@ -0,0 +1,2 @@
|
|||
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('kq_tow_rope', 'Towing rope', 2, 0, 1);
|
||||
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('kq_winch', 'Car winch', 4, 0, 1);
|
After Width: | Height: | Size: 58 KiB |
After Width: | Height: | Size: 72 KiB |
|
@ -0,0 +1,22 @@
|
|||
|
||||
["kq_tow_rope"] = {
|
||||
label = "Towing rope",
|
||||
weight = 2000,
|
||||
stack = true,
|
||||
close = true,
|
||||
consume = 0,
|
||||
server = {
|
||||
export = 'kq_towing2.UseTowRope',
|
||||
},
|
||||
},
|
||||
|
||||
["kq_winch"] = {
|
||||
label = "Car winch",
|
||||
weight = 4000,
|
||||
stack = true,
|
||||
close = true,
|
||||
consume = 0,
|
||||
server = {
|
||||
export = 'kq_towing2.UseWinch',
|
||||
},
|
||||
},
|
|
@ -0,0 +1,3 @@
|
|||
|
||||
["kq_tow_rope"] = {["name"] = "kq_tow_rope", ["label"] = "Towing rope", ["weight"] = 2000, ["type"] = "item", ["image"] = "kq_tow_rope.png", ["unique"] = false, ["useable"] = true, ["shouldClose"] = true, ["combinable"] = nil, ["description"] = "Rope used for towing vehicles"},
|
||||
["kq_winch"] = {["name"] = "kq_winch", ["label"] = "Car winch", ["weight"] = 4000, ["type"] = "item", ["image"] = "kq_winch.png", ["unique"] = false, ["useable"] = true, ["shouldClose"] = true, ["combinable"] = nil, ["description"] = "Car winch made to winch heavy vehicles"},
|
BIN
resources/[carscripts]/kq_towing2/client/cache.lua
Normal file
BIN
resources/[carscripts]/kq_towing2/client/client.lua
Normal file
131
resources/[carscripts]/kq_towing2/client/editable/editable.lua
Normal file
|
@ -0,0 +1,131 @@
|
|||
-- This function is responsible for drawing all the 3d texts ('Press [E] to take off the wheel' e.g)
|
||||
function Draw3DText(coords, textInput, scaleX)
|
||||
scaleX = scaleX * Config.textScale
|
||||
local px, py, pz = table.unpack(GetGameplayCamCoords())
|
||||
local dist = GetDistanceBetweenCoords(px, py, pz, coords, true)
|
||||
local scale = (1 / dist) * 20
|
||||
local fov = (1 / GetGameplayCamFov()) * 100
|
||||
scale = scale * fov
|
||||
|
||||
SetTextScale(scaleX * scale, scaleX * scale)
|
||||
SetTextFont(Config.textFont or 4)
|
||||
SetTextProportional(1)
|
||||
SetTextDropshadow(1, 1, 1, 1, 255)
|
||||
SetTextEdge(2, 0, 0, 0, 150)
|
||||
SetTextDropShadow()
|
||||
SetTextOutline()
|
||||
SetTextEntry("STRING")
|
||||
SetTextCentre(1)
|
||||
AddTextComponentString(textInput)
|
||||
SetDrawOrigin(coords, 0)
|
||||
DrawText(0.0, 0.0)
|
||||
ClearDrawOrigin()
|
||||
end
|
||||
|
||||
function KeybindTip(message)
|
||||
SetTextComponentFormat("STRING")
|
||||
AddTextComponentString(message)
|
||||
EndTextCommandDisplayHelp(0, 0, 0, 200)
|
||||
end
|
||||
|
||||
function IsPlayerUnreachable()
|
||||
local playerPed = PlayerPedId()
|
||||
return IsPedInAnyVehicle(playerPed) or IsPedRagdoll(playerPed) or IsEntityDead(playerPed)
|
||||
end
|
||||
|
||||
function RemoveHandWeapons()
|
||||
SetCurrentPedWeapon(PlayerPedId(), -1569615261, true)
|
||||
end
|
||||
|
||||
function DisableInputs()
|
||||
-- https://docs.fivem.net/docs/game-references/controls/#controls
|
||||
local inputs = {14, 15, 16, 17, 23, 24, 25, 44, 45, 140, 141, 142, 143, 261, 262, 263, 264}
|
||||
|
||||
for k, input in pairs(inputs) do
|
||||
DisableControlAction(0, input, true)
|
||||
end
|
||||
end
|
||||
|
||||
function IsVehicleLocked(entity)
|
||||
if not IsEntityAVehicle(entity) then
|
||||
return false
|
||||
end
|
||||
|
||||
local lockStatus = GetVehicleDoorLockStatus(entity)
|
||||
return lockStatus == 2 or lockStatus == 3 or lockStatus == 4 or lockStatus == 10
|
||||
end
|
||||
|
||||
function PlayAnim(dict, anim, flag, duration)
|
||||
Citizen.CreateThread(function()
|
||||
RequestAnimDict(dict)
|
||||
local timeout = 0
|
||||
while not HasAnimDictLoaded(dict) do
|
||||
Citizen.Wait(50)
|
||||
timeout = timeout + 1
|
||||
if timeout > 100 then
|
||||
return
|
||||
end
|
||||
end
|
||||
TaskPlayAnim(PlayerPedId(), dict, anim, 1.5, 1.0, duration or -1, flag or 1, 0, false, false, false)
|
||||
RemoveAnimDict(dict)
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
function ShowTooltip(message)
|
||||
SetTextComponentFormat("STRING")
|
||||
AddTextComponentString(message)
|
||||
EndTextCommandDisplayHelp(0, 0, 1, -1)
|
||||
end
|
||||
|
||||
|
||||
CURRENT_KEYBIND_TIP = nil
|
||||
|
||||
function SetKeybindTip(message)
|
||||
if CURRENT_KEYBIND_TIP == message then
|
||||
return
|
||||
end
|
||||
CURRENT_KEYBIND_TIP = message
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
while CURRENT_KEYBIND_TIP == message do
|
||||
local sleep = 100
|
||||
if CURRENT_KEYBIND_TIP then
|
||||
sleep = 1
|
||||
ShowKeybindTip(CURRENT_KEYBIND_TIP)
|
||||
end
|
||||
Citizen.Wait(sleep)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
function ResetKeybindTip()
|
||||
if CURRENT_KEYBIND_TIP ~= nil then
|
||||
CURRENT_KEYBIND_TIP = nil
|
||||
end
|
||||
end
|
||||
|
||||
function ShowKeybindTip(message)
|
||||
SetTextComponentFormat("STRING")
|
||||
AddTextComponentString(message)
|
||||
|
||||
EndTextCommandDisplayHelp(0, 0, 0, -1)
|
||||
end
|
||||
|
||||
RegisterNetEvent('kq_towing:client:notify')
|
||||
AddEventHandler('kq_towing:client:notify', function(message)
|
||||
Notify(message)
|
||||
end)
|
||||
|
||||
function Notify(message)
|
||||
SetTextComponentFormat("STRING")
|
||||
AddTextComponentString(message)
|
||||
EndTextCommandDisplayHelp(0, 0, 0, 2000)
|
||||
end
|
||||
|
||||
-- Call this event to cancel the placement of a rope
|
||||
RegisterNetEvent('kq_towing:client:cancelPlacement')
|
||||
AddEventHandler('kq_towing:client:cancelPlacement', function()
|
||||
PLACING_ROPE = false
|
||||
end)
|
||||
|
BIN
resources/[carscripts]/kq_towing2/client/functions.lua
Normal file
BIN
resources/[carscripts]/kq_towing2/client/inputs.lua
Normal file
BIN
resources/[carscripts]/kq_towing2/client/raycast.lua
Normal file
BIN
resources/[carscripts]/kq_towing2/client/removing.lua
Normal file
BIN
resources/[carscripts]/kq_towing2/client/ropes.lua
Normal file
BIN
resources/[carscripts]/kq_towing2/client/towing.lua
Normal file
BIN
resources/[carscripts]/kq_towing2/client/winch.lua
Normal file
176
resources/[carscripts]/kq_towing2/config.lua
Normal file
|
@ -0,0 +1,176 @@
|
|||
Config = {}
|
||||
|
||||
Config.debug = false
|
||||
|
||||
-------------------------------------------------
|
||||
--- FRAMEWORK SETTINGS
|
||||
-------------------------------------------------
|
||||
Config.esxSettings = {
|
||||
enabled = false,
|
||||
-- Whether or not to use the new ESX export method
|
||||
useNewESXExport = true,
|
||||
|
||||
-- Enable this if you're using a very old version of ESX
|
||||
oldEsx = false,
|
||||
}
|
||||
|
||||
Config.qbSettings = {
|
||||
enabled = false,
|
||||
-- Whether or not to use the new QBCore export method
|
||||
useNewQBExport = true,
|
||||
}
|
||||
|
||||
-- Only enable when NOT using ESX or QBCore
|
||||
Config.oxInventory = {
|
||||
enabled = false,
|
||||
}
|
||||
|
||||
-- Item config
|
||||
Config.items = {
|
||||
towingRope = 'kq_tow_rope',
|
||||
winch = 'kq_winch',
|
||||
}
|
||||
|
||||
-- Commands used to trigger rope placements
|
||||
Config.commands = {
|
||||
towing = {
|
||||
enabled = true,
|
||||
command = 'towrope',
|
||||
},
|
||||
winch = {
|
||||
enabled = true,
|
||||
command = 'winch',
|
||||
}
|
||||
}
|
||||
|
||||
-- Max speed (in MPH) of vehicles which are towing or being towed (set to -1 to disable speed limiting)
|
||||
Config.maxTowingSpeed = 50
|
||||
|
||||
-- Time between each rope refreshing
|
||||
-- Time in seconds
|
||||
Config.ropeRefreshTime = 10
|
||||
|
||||
-- Makes towing a vehicle with no player in the back easier. The car will steer and brake automatically when towed
|
||||
Config.toweeAutopilot = true
|
||||
|
||||
-- If script is used in standalone mode. Make sure to disable all the job whitelists!
|
||||
-- Job whitelist
|
||||
Config.jobWhitelist = {
|
||||
towing = {
|
||||
enabled = false,
|
||||
jobs = {
|
||||
'mechanic',
|
||||
'police',
|
||||
'marshal',
|
||||
|
||||
|
||||
},
|
||||
},
|
||||
winch = {
|
||||
enabled = false,
|
||||
jobs = {
|
||||
'mechanic',
|
||||
'police',
|
||||
'marshal',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
-- Whether to disallow attaching ropes to vehicles which are locked
|
||||
Config.disallowLockedVehicles = false
|
||||
|
||||
-- The MAXIMUM length of a tow rope
|
||||
Config.ropeLength = 10.0
|
||||
|
||||
-- The MAXIMUM length of a winch
|
||||
Config.winchLength = 16.0
|
||||
|
||||
|
||||
-- Props which will be visible in players hands upon usage of the rope/winch item (or command)
|
||||
Config.ropeProps = {
|
||||
towing = {
|
||||
prop = 'prop_rope_family_3',
|
||||
bone = 4089,
|
||||
offset = vector3(0.26, -0.11, 0.0),
|
||||
rotation = vector3(0.0, -7.0, 200.0),
|
||||
},
|
||||
winch = {
|
||||
prop = 'prop_stag_do_rope',
|
||||
bone = 4089,
|
||||
offset = vector3(0.24, -0.11, 0.0),
|
||||
rotation = vector3(0.0, -7.0, 200.0),
|
||||
}
|
||||
}
|
||||
|
||||
-- '3d-text', 'top-left', 'help-text'
|
||||
Config.inputType = '3d-text'
|
||||
|
||||
-- Scale of the 3d text
|
||||
Config.textScale = 1
|
||||
|
||||
-- Font used for the 3d text
|
||||
Config.textFont = 4
|
||||
|
||||
-- Scale used for the 3d text
|
||||
Config.textScale = 1.0
|
||||
|
||||
-- https://docs.fivem.net/docs/game-references/controls/
|
||||
-- Use the input index for the "input" value
|
||||
Config.keybinds = {
|
||||
confirm = {
|
||||
label = 'E',
|
||||
name = 'INPUT_PICKUP',
|
||||
input = 38,
|
||||
},
|
||||
winch = {
|
||||
label = 'Left Shift',
|
||||
name = 'INPUT_SPRINT',
|
||||
input = 21,
|
||||
},
|
||||
remove = {
|
||||
label = 'E',
|
||||
name = 'INPUT_PICKUP',
|
||||
input = 38,
|
||||
duration = 3000,
|
||||
},
|
||||
cancel = {
|
||||
label = 'X',
|
||||
name = 'INPUT_VEH_DUCK',
|
||||
input = 73,
|
||||
},
|
||||
}
|
||||
|
||||
-- Classes of which vehicles may not be towed or tow another vehicle
|
||||
Config.blacklistedClasses = {
|
||||
8, -- Motorcycles
|
||||
13, -- Cycles
|
||||
14, -- Boats
|
||||
15, -- Helicopters
|
||||
16, -- Planes
|
||||
21, -- Trains
|
||||
}
|
||||
|
||||
--[[ All vehicle classes
|
||||
0: Compacts
|
||||
1: Sedans
|
||||
2: SUVs
|
||||
3: Coupes
|
||||
4: Muscle
|
||||
5: Sports Classics
|
||||
6: Sports
|
||||
7: Super
|
||||
8: Motorcycles
|
||||
9: Off-road
|
||||
10: Industrial
|
||||
11: Utility
|
||||
12: Vans
|
||||
13: Cycles
|
||||
14: Boats
|
||||
15: Helicopters
|
||||
16: Planes
|
||||
17: Service
|
||||
18: Emergency
|
||||
19: Military
|
||||
20: Commercial
|
||||
21: Trains
|
||||
]]
|
52
resources/[carscripts]/kq_towing2/fxmanifest.lua
Normal file
|
@ -0,0 +1,52 @@
|
|||
fx_version 'cerulean'
|
||||
games { 'gta5' }
|
||||
lua54 'yes'
|
||||
|
||||
author 'KuzQuality | Kuzkay'
|
||||
description 'Towing & winching made by KuzQuality'
|
||||
version '2.3.2'
|
||||
|
||||
|
||||
--
|
||||
-- Server
|
||||
--
|
||||
|
||||
server_scripts {
|
||||
'locale.lua',
|
||||
'mixed/constants.lua',
|
||||
'config.lua',
|
||||
'server/server.lua',
|
||||
'server/editable/esx.lua',
|
||||
'server/editable/qb.lua',
|
||||
'server/editable/ox.lua',
|
||||
'server/editable/editable.lua',
|
||||
}
|
||||
|
||||
--
|
||||
-- Client
|
||||
--
|
||||
|
||||
client_scripts {
|
||||
'config.lua',
|
||||
'locale.lua',
|
||||
'mixed/constants.lua',
|
||||
'client/editable/editable.lua',
|
||||
'client/cache.lua',
|
||||
'client/inputs.lua',
|
||||
'client/removing.lua',
|
||||
'client/functions.lua',
|
||||
'client/raycast.lua',
|
||||
'client/client.lua',
|
||||
'client/ropes.lua',
|
||||
'client/winch.lua',
|
||||
'client/towing.lua',
|
||||
}
|
||||
|
||||
escrow_ignore {
|
||||
'config.lua',
|
||||
'locale.lua',
|
||||
'client/editable/*.lua',
|
||||
'server/editable/*.lua',
|
||||
}
|
||||
|
||||
dependency '/assetpacks'
|
24
resources/[carscripts]/kq_towing2/locale.lua
Normal file
|
@ -0,0 +1,24 @@
|
|||
-- Only edit the value on the right. Leave the value between the square brackets as is. <!>
|
||||
|
||||
Locale = {
|
||||
['~w~Press ~g~[~w~{INPUT}~g~]~w~ to attach the rope'] = '~w~Press ~g~[~w~{INPUT}~g~]~w~ to attach the rope',
|
||||
['~w~Press ~{INPUT}~ to attach the rope'] = '~w~Press ~{INPUT}~ to attach the rope',
|
||||
|
||||
['~w~Press ~g~[~w~{INPUT}~g~]~w~ to tie the rope'] = '~w~Press ~g~[~w~{INPUT}~g~]~w~ to tie the rope',
|
||||
['~w~Press ~{INPUT}~ to tie the rope'] = '~w~Press ~{INPUT}~ to tie the rope',
|
||||
|
||||
['Press ~{INPUT}~ to cancel'] = 'Press ~{INPUT}~ to cancel',
|
||||
|
||||
['~r~Too far'] = '~r~Too far',
|
||||
['~y~You can not tie the rope to the ground'] = '~y~You can not tie the rope to the ground',
|
||||
['~r~This vehicle can not be towed'] = '~r~This vehicle can not be towed',
|
||||
|
||||
['~w~Hold ~r~[~w~{INPUT}~r~]~w~ to detach the rope'] = '~w~Hold ~r~[~w~{INPUT}~r~]~w~ to detach the rope',
|
||||
['~w~Hold ~{INPUT}~ to detach the rope'] = '~w~Hold ~{INPUT}~ to detach the rope',
|
||||
|
||||
['~w~Hold ~{INPUT}~ to winch'] = '~w~Hold ~{INPUT}~ to winch',
|
||||
['~w~Release ~{INPUT}~ to stop winching'] = '~w~Release ~{INPUT}~ to stop winching',
|
||||
|
||||
['~r~You may not use this item'] = '~r~You may not use this item',
|
||||
|
||||
}
|
BIN
resources/[carscripts]/kq_towing2/mixed/constants.lua
Normal file
|
@ -0,0 +1,22 @@
|
|||
|
||||
if Config.commands.towing.enabled then
|
||||
RegisterCommand(Config.commands.towing.command, function(source)
|
||||
if Config.jobWhitelist.towing.enabled then
|
||||
if not IsPlayerJobWhitelisted(source, Config.jobWhitelist.towing.jobs) then
|
||||
return TriggerClientEvent('kq_towing:client:notify', source, L('~r~You may not use this item'))
|
||||
end
|
||||
end
|
||||
TriggerClientEvent('kq_towing:client:startRope', source, false, false)
|
||||
end)
|
||||
end
|
||||
|
||||
if Config.commands.winch.enabled then
|
||||
RegisterCommand(Config.commands.winch.command, function(source)
|
||||
if Config.jobWhitelist.winch.enabled then
|
||||
if not IsPlayerJobWhitelisted(source, Config.jobWhitelist.winch.jobs) then
|
||||
return TriggerClientEvent('kq_towing:client:notify', source, L('~r~You may not use this item'))
|
||||
end
|
||||
end
|
||||
TriggerClientEvent('kq_towing:client:startRope', source, true, false)
|
||||
end)
|
||||
end
|
85
resources/[carscripts]/kq_towing2/server/editable/esx.lua
Normal file
|
@ -0,0 +1,85 @@
|
|||
if Config.esxSettings.enabled then
|
||||
ESX = nil
|
||||
|
||||
if Config.esxSettings.useNewESXExport then
|
||||
ESX = exports['es_extended']:getSharedObject()
|
||||
else
|
||||
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
|
||||
end
|
||||
|
||||
ESX.RegisterUsableItem(Config.items.towingRope, function(source)
|
||||
if Config.jobWhitelist.towing.enabled then
|
||||
if not IsPlayerJobWhitelisted(source, Config.jobWhitelist.towing.jobs) then
|
||||
return TriggerClientEvent('kq_towing:client:notify', source, L('~r~You may not use this item'))
|
||||
end
|
||||
end
|
||||
TriggerClientEvent('kq_towing:client:startRope', source, false, true)
|
||||
end)
|
||||
|
||||
ESX.RegisterUsableItem(Config.items.winch, function(source)
|
||||
if Config.jobWhitelist.winch.enabled then
|
||||
if not IsPlayerJobWhitelisted(source, Config.jobWhitelist.winch.jobs) then
|
||||
return TriggerClientEvent('kq_towing:client:notify', source, L('~r~You may not use this item'))
|
||||
end
|
||||
end
|
||||
TriggerClientEvent('kq_towing:client:startRope', source, true, true)
|
||||
end)
|
||||
|
||||
function IsPlayerJobWhitelisted(player, jobs)
|
||||
local xPlayer = ESX.GetPlayerFromId(player)
|
||||
if not xPlayer then
|
||||
return false
|
||||
end
|
||||
local job = xPlayer.getJob()
|
||||
|
||||
return Contains(jobs, job.name)
|
||||
end
|
||||
|
||||
function GetPlayerItemData(player, item)
|
||||
local xPlayer = ESX.GetPlayerFromId(player)
|
||||
|
||||
return xPlayer.getInventoryItem(item)
|
||||
end
|
||||
|
||||
function GetPlayerItemCount(player, item)
|
||||
local data = GetPlayerItemData(player, item)
|
||||
if not data then
|
||||
return 0
|
||||
end
|
||||
return data.count or data.amount or 0
|
||||
end
|
||||
|
||||
function RemovePlayerItem(player, item, amount)
|
||||
if GetPlayerItemCount(player, item) < amount then
|
||||
return false
|
||||
end
|
||||
|
||||
local xPlayer = ESX.GetPlayerFromId(player)
|
||||
xPlayer.removeInventoryItem(item, amount or 1)
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function AddPlayerItem(player, item, amount)
|
||||
local xPlayer = ESX.GetPlayerFromId(tonumber(player))
|
||||
|
||||
-- Support for old esx which didn't use weight for inventory size but rather item limit per item type
|
||||
if Config.esxSettings.oldEsx then
|
||||
local esxItem = xPlayer.getInventoryItem(item)
|
||||
|
||||
if esxItem.limit == -1 or (esxItem.count + amount) <= esxItem.limit then
|
||||
xPlayer.addInventoryItem(item, amount or 1)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
else
|
||||
if xPlayer.canCarryItem(item, amount or 1) then
|
||||
xPlayer.addInventoryItem(item, amount or 1)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
35
resources/[carscripts]/kq_towing2/server/editable/ox.lua
Normal file
|
@ -0,0 +1,35 @@
|
|||
if Config.oxInventory.enabled then
|
||||
|
||||
-- Usable items
|
||||
-- Export used for ox_inventory
|
||||
exports('UseTowRope', function(event, item, inventory)
|
||||
if event == 'usingItem' then
|
||||
local player = inventory.id
|
||||
TriggerClientEvent('kq_towing:client:startRope', player, false, true)
|
||||
return true
|
||||
end
|
||||
end)
|
||||
|
||||
exports('UseWinch', function(event, item, inventory)
|
||||
if event == 'usingItem' then
|
||||
local player = inventory.id
|
||||
TriggerClientEvent('kq_towing:client:startRope', player, true, true)
|
||||
return true
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
function IsPlayerJobWhitelisted(player, jobs)
|
||||
return true
|
||||
end
|
||||
|
||||
function AddPlayerItem(player, item, amount, meta)
|
||||
local success, response = exports['ox_inventory']:AddItem(player, item, amount or 1, meta)
|
||||
return success
|
||||
end
|
||||
|
||||
function RemovePlayerItem(player, item, amount)
|
||||
local success, response = exports['ox_inventory']:RemoveItem(player, item, amount or 1)
|
||||
return success
|
||||
end
|
||||
end
|
46
resources/[carscripts]/kq_towing2/server/editable/qb.lua
Normal file
|
@ -0,0 +1,46 @@
|
|||
if Config.qbSettings.enabled then
|
||||
|
||||
if Config.qbSettings.useNewQBExport then
|
||||
QBCore = exports['qb-core']:GetCoreObject()
|
||||
end
|
||||
|
||||
QBCore.Functions.CreateUseableItem(Config.items.towingRope, function(source)
|
||||
if Config.jobWhitelist.towing.enabled then
|
||||
if not IsPlayerJobWhitelisted(source, Config.jobWhitelist.towing.jobs) then
|
||||
return TriggerClientEvent('kq_towing:client:notify', source, L('~r~You may not use this item'))
|
||||
end
|
||||
end
|
||||
TriggerClientEvent('kq_towing:client:startRope', source, false, true)
|
||||
end)
|
||||
|
||||
QBCore.Functions.CreateUseableItem(Config.items.winch, function(source)
|
||||
if Config.jobWhitelist.winch.enabled then
|
||||
if not IsPlayerJobWhitelisted(source, Config.jobWhitelist.winch.jobs) then
|
||||
return TriggerClientEvent('kq_towing:client:notify', source, L('~r~You may not use this item'))
|
||||
end
|
||||
end
|
||||
TriggerClientEvent('kq_towing:client:startRope', source, true, true)
|
||||
end)
|
||||
|
||||
|
||||
function IsPlayerJobWhitelisted(player, jobs)
|
||||
local xPlayer = QBCore.Functions.GetPlayer(player)
|
||||
if not xPlayer then
|
||||
return false
|
||||
end
|
||||
|
||||
local job = xPlayer.PlayerData.job
|
||||
|
||||
return Contains(jobs, job.name)
|
||||
end
|
||||
|
||||
function RemovePlayerItem(player, item, amount)
|
||||
local xPlayer = QBCore.Functions.GetPlayer(tonumber(player))
|
||||
return xPlayer.Functions.RemoveItem(item, amount or 1)
|
||||
end
|
||||
|
||||
function AddPlayerItem(player, item, amount)
|
||||
local xPlayer = QBCore.Functions.GetPlayer(tonumber(player))
|
||||
return xPlayer.Functions.AddItem(item, amount or 1)
|
||||
end
|
||||
end
|
BIN
resources/[carscripts]/kq_towing2/server/server.lua
Normal file
|
@ -1,15 +0,0 @@
|
|||
Thank you for purchasing rtx_vehiclemenu we're grateful for your support. If you'd ever have a question and / or need our help, please reach out to us by sending an email or go ahead and create a ticket on our discord: https://discord.gg/P6KdaDpgAk
|
||||
|
||||
|
||||
Install instructions:
|
||||
1. Put rtx_vehiclemenu folder to your resources
|
||||
2. Open config.lua file
|
||||
3. Configure your config.lua to your preferences
|
||||
4. Put rtx_vehiclemenu to the server.cfg
|
||||
|
||||
License agreement / Terms of Service
|
||||
1. Any purchase is non-refundable.
|
||||
2. Each product is to be used on a singular server, with the exception of a test server.
|
||||
3. Any form of redistribution of our content is considered copyright infringement.
|
||||
4. If any of these rules are broken, legal actions can be taken.
|
||||
© 2024 RTX Development, all rights reserved.
|
|
@ -1,112 +0,0 @@
|
|||
Config = {}
|
||||
|
||||
Config.Language = "German"
|
||||
|
||||
Config.VehicleMenuResetSettingsCommand = "vehiclemenureset" -- command for reset vehicle menu settings
|
||||
|
||||
Config.VehicleMenuOpenViaBind = true -- this will enable vehicle menu show via bind
|
||||
|
||||
Config.VehicleMenuOpenViaBindKey = "O" -- vehicle menu show key, only work if you enable Config.VehicleMenuOpenViaBind
|
||||
|
||||
Config.VehicleMenuOpenViaCommand = true -- this will enable vehicle menu show via commad
|
||||
|
||||
Config.VehicleMenuOpenViaCommandName = "vehiclemenu" -- vehicle menu show command, only work if you enable Config.VehicleMenuOpenViaCommand
|
||||
|
||||
Config.VehicleMenuOpenViaEvent = false -- this will enable vehicle menu show via event for show vehicle menu TriggerEvent("rtx_vehiclemenu:ShowVehicleMenu", true) for hide vehicle menu TriggerEvent("rtx_vehiclemenu:ShowVehicleMenu", false)
|
||||
|
||||
Config.VehicleMenuOpenViaEventName = "rtx_vehiclemenu:ShowVehicleMenu" -- vehicle menu show event, only work if you enable Config.VehicleMenuOpenViaEvent
|
||||
|
||||
Config.VehicleMenuForEveryVehicle = true -- if you enable this, vehicle menu will work on every vehicles, if its disabled, it will work only in vehicle menu which is writed in Config.VehicleMenuVehicles.
|
||||
|
||||
Config.VehicleMenuVehicleBlacklist = false -- if you enable this, vehicle menu will work not for vehicles which is in blacklisted config, you need put vehicles in Config.VehicleMenuBlacklistedVehicles.
|
||||
|
||||
Config.VehicleMenuForOnlySpecifiedTypeOfVehicle = false --- if you enable this, vehicle menu will work only for specified vehicle (Vehicle Class) you need enable class in Config.VehicleMenuVehiclesClasses
|
||||
|
||||
Config.VehicleMenuEnableVehicleDriveWhenPlayerIsInMenu = true -- enable this if you want to be able to still drive the vehicle while you are in the menu
|
||||
|
||||
Config.VehicleMenuEnableVehicleDriveWhenPlayerIsInMenuDisableCamera = true --turn this on if you want to disable camera movement when the player has the menu open
|
||||
|
||||
Config.DefaultVehicleMenuSettings = {color = "#ff66ff", scale = 1.0, position = {top = 50, left = 70}} --scale for default settings min is 0.5, max is 1.5
|
||||
|
||||
Config.VehicleMenuWaterDuration = 5000 -- duration of vehicle water
|
||||
|
||||
Config.VehicleMenuDisableExtrasMenu = false -- enable this feature if you don't want the player to be able to switch extras
|
||||
|
||||
Config.VehicleMenuDisableSeatsChangeMenu = false -- enable this feature if you don't want the player to be able to switch seats
|
||||
|
||||
Config.VehicleMenuVehicles = {
|
||||
{
|
||||
vehiclename = "bullet", -- vehicle name
|
||||
},
|
||||
{
|
||||
vehiclename = "infernus", -- vehicle name
|
||||
},
|
||||
}
|
||||
|
||||
Config.VehicleMenuBlacklistedVehicles = {
|
||||
{
|
||||
vehiclename = "rhino", -- vehicle name
|
||||
},
|
||||
{
|
||||
vehiclename = "thruster", -- vehicle name
|
||||
},
|
||||
}
|
||||
|
||||
Config.VehicleMenuVehiclesClasses = {
|
||||
[0] = true,
|
||||
[1] = true,
|
||||
[2] = true,
|
||||
[3] = true,
|
||||
[4] = true,
|
||||
[5] = true,
|
||||
[6] = true,
|
||||
[7] = true,
|
||||
[8] = true,
|
||||
[9] = true,
|
||||
[10] = true,
|
||||
[11] = true,
|
||||
[12] = true,
|
||||
[13] = false,
|
||||
[14] = false,
|
||||
[15] = false,
|
||||
[16] = false,
|
||||
[17] = true,
|
||||
[18] = true,
|
||||
[19] = true,
|
||||
[20] = true,
|
||||
[21] = true,
|
||||
[22] = true,
|
||||
}
|
||||
|
||||
function Notify(text)
|
||||
exports["rtx_notify"]:Notify("Vehicle", text, 5000, "info") -- if you get error in this line its because you dont use our notify system buy it here https://rtx.tebex.io/package/5402098 or you can use some other notify system just replace this notify line with your notify system
|
||||
--exports["mythic_notify"]:SendAlert("inform", text, 5000)
|
||||
end
|
||||
|
||||
function VehicleBindAction(vehicle)
|
||||
-- here you can insert your own action what happens when the player presses the bind button in the vehicle menu. (for close menu use CloseVehicleMenu function)
|
||||
CloseVehicleMenu()
|
||||
TriggerEvent("rtx_radio:ShowRadio", true)
|
||||
end
|
||||
|
||||
function VehicleLockAction(vehicle)
|
||||
-- here you can insert your own vehicle lock function if you use your own lock system.
|
||||
if GetVehicleDoorLockStatus(vehicle) == 1 then
|
||||
SetVehicleDoorsLocked(vehicle, 2)
|
||||
Notify(Language[Config.Language]["vehiclelocked"])
|
||||
else
|
||||
SetVehicleDoorsLocked(vehicle, 1)
|
||||
Notify(Language[Config.Language]["vehicleunlocked"])
|
||||
end
|
||||
end
|
||||
|
||||
function VehicleEngineAction(vehicle)
|
||||
-- here you can insert your own vehicle engine function.
|
||||
if GetIsVehicleEngineRunning(vehicle) then
|
||||
SetVehicleEngineOn(vehicle, false, true, true)
|
||||
Notify(Language[Config.Language]["engineonoff"])
|
||||
else
|
||||
SetVehicleEngineOn(vehicle, true, true, true)
|
||||
Notify(Language[Config.Language]["engineon"])
|
||||
end
|
||||
end
|
|
@ -1,38 +0,0 @@
|
|||
fx_version 'cerulean'
|
||||
|
||||
game 'gta5'
|
||||
|
||||
description 'RTX VEHICLE MENU'
|
||||
|
||||
version '10.0'
|
||||
|
||||
server_scripts {
|
||||
'config.lua',
|
||||
'language/main.lua',
|
||||
'server/main.lua'
|
||||
}
|
||||
|
||||
client_scripts {
|
||||
'config.lua',
|
||||
'language/main.lua',
|
||||
'client/main.lua'
|
||||
}
|
||||
|
||||
files {
|
||||
'html/ui.html',
|
||||
'html/styles.css',
|
||||
'html/scripts.js',
|
||||
'html/BebasNeueBold.ttf',
|
||||
'html/img/*.svg'
|
||||
}
|
||||
|
||||
ui_page 'html/ui.html'
|
||||
|
||||
|
||||
lua54 'yes'
|
||||
|
||||
escrow_ignore {
|
||||
'config.lua',
|
||||
'language/main.lua'
|
||||
}
|
||||
dependency '/assetpacks'
|
|
@ -1,9 +0,0 @@
|
|||
/*
|
||||
* jQuery throttle / debounce - v1.1 - 3/7/2010
|
||||
* http://benalman.com/projects/jquery-throttle-debounce-plugin/
|
||||
*
|
||||
* Copyright (c) 2010 "Cowboy" Ben Alman
|
||||
* Dual licensed under the MIT and GPL licenses.
|
||||
* http://benalman.com/about/license/
|
||||
*/
|
||||
(function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this);
|
|
@ -1 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><svg id="Vrstva_2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 27.92 27.93"><defs><style>.cls-1{fill:#1d1d1b;}</style></defs><g id="Vrstva_1-2"><polygon class="cls-1" points="27.92 4.73 18.69 13.96 27.92 23.2 27.92 27.93 23.19 27.93 13.96 18.69 4.73 27.93 0 27.93 0 23.22 9.24 13.96 0 4.71 0 0 4.73 0 13.96 9.24 23.19 0 27.92 0 27.92 4.73"/></g></svg>
|
Before Width: | Height: | Size: 393 B |
|
@ -1,28 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="Vrstva_2" data-name="Vrstva 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 381.16 381.17">
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1 {
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
}
|
||||
|
||||
.cls-1, .cls-2 {
|
||||
fill: none;
|
||||
stroke: #fff;
|
||||
stroke-width: 25px;
|
||||
}
|
||||
|
||||
.cls-2 {
|
||||
stroke-miterlimit: 10;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<g id="Vrstva_1-2" data-name="Vrstva 1">
|
||||
<g>
|
||||
<path class="cls-2" d="m368.66,44.05v293.04c0,17.45-14.14,31.59-31.59,31.59H44.09c-17.45,0-31.59-14.14-31.59-31.59v-169.04c0-8.37,3.33-16.4,9.24-22.32L145.72,21.74c5.92-5.92,13.95-9.24,22.32-9.24h169.07c17.42,0,31.55,14.12,31.55,31.55Z"/>
|
||||
<path class="cls-2" d="m66.5,191.38v-.95c0-8.38,3.33-16.41,9.25-22.34l92.33-92.33c5.92-5.92,13.96-9.25,22.34-9.25h92.65c17.45,0,31.59,14.14,31.59,31.59v93.29c0,17.45-14.14,31.59-31.59,31.59H98.09c-17.45,0-31.59-14.14-31.59-31.59Z"/>
|
||||
<path class="cls-1" d="m250.63,311.1l17.3-17.3c5.92-5.92,13.96-9.25,22.34-9.25l.07-.07h24.33"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 1.1 KiB |
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="Vrstva_2" data-name="Vrstva 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 381.17 294.88">
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1 {
|
||||
fill: none;
|
||||
stroke: #fff;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
stroke-width: 25px;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<g id="Vrstva_1-2" data-name="Vrstva 1">
|
||||
<g>
|
||||
<path class="cls-1" d="m186.08,12.5v269.88h-38.64c-74.53,0-134.94-60.41-134.94-134.94S72.91,12.5,147.44,12.5h38.64Z"/>
|
||||
<line class="cls-1" x1="236.71" y1="56.29" x2="368.67" y2="96.04"/>
|
||||
<line class="cls-1" x1="236.71" y1="147.44" x2="368.67" y2="187.19"/>
|
||||
<line class="cls-1" x1="236.71" y1="238.59" x2="368.67" y2="278.34"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 767 B |
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="Vrstva_2" data-name="Vrstva 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 381.17 294.88">
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1 {
|
||||
fill: none;
|
||||
stroke: #fff;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
stroke-width: 25px;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<g id="Vrstva_1-2" data-name="Vrstva 1">
|
||||
<g>
|
||||
<path class="cls-1" d="m186.08,12.5v269.88h-38.64c-74.53,0-134.94-60.41-134.94-134.94S72.91,12.5,147.44,12.5h38.64Z"/>
|
||||
<line class="cls-1" x1="236.71" y1="56.29" x2="368.67" y2="56.29"/>
|
||||
<line class="cls-1" x1="236.71" y1="147.44" x2="368.67" y2="147.44"/>
|
||||
<line class="cls-1" x1="236.71" y1="238.59" x2="368.67" y2="238.59"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 767 B |
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="Vrstva_2" data-name="Vrstva 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 293.39 392.65">
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1 {
|
||||
fill: none;
|
||||
stroke: #fff;
|
||||
stroke-miterlimit: 10;
|
||||
stroke-width: 25px;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<g id="Vrstva_1-2" data-name="Vrstva 1">
|
||||
<g>
|
||||
<circle class="cls-1" cx="237.02" cy="56.36" r="43.86"/>
|
||||
<path class="cls-1" d="m280.41,190.54l-23.61,158.31c-2.68,17.99-18.13,31.3-36.31,31.3H54.78c-23.19,0-42.05-18.68-42.28-41.86h0c-.23-23.51,18.76-42.7,42.28-42.7h83.59c17.1,0,31.93-11.8,35.78-28.46l21.37-92.68c4.52-19.62,21.99-33.52,42.13-33.52h0c26.42,0,46.66,23.48,42.76,49.61Z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 734 B |
|
@ -1 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?><svg id="Vrstva_2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32.28 34.24"><defs><style>.cls-1{fill:#1d1d1b;}</style></defs><g id="Vrstva_1-2"><path class="cls-1" d="m32.19,11.14c.21.58.03,1.23-.43,1.65l-2.9,2.64c.07.56.11,1.12.11,1.7s-.04,1.14-.11,1.7l2.9,2.64c.46.41.64,1.06.43,1.65-.29.8-.65,1.56-1.06,2.29l-.31.54c-.44.74-.94,1.43-1.48,2.09-.39.48-1.05.64-1.64.45l-3.73-1.18c-.9.69-1.89,1.26-2.94,1.7l-.84,3.82c-.13.61-.6,1.09-1.22,1.19-.92.15-1.87.23-2.84.23s-1.92-.08-2.84-.23c-.62-.1-1.08-.58-1.22-1.19l-.84-3.82c-1.06-.43-2.05-1.01-2.94-1.7l-3.72,1.19c-.59.19-1.24.02-1.64-.45-.54-.66-1.04-1.35-1.48-2.09l-.31-.54c-.41-.74-.76-1.5-1.06-2.29-.21-.58-.03-1.23.43-1.65l2.9-2.64c-.07-.56-.11-1.13-.11-1.71s.04-1.14.11-1.7l-2.9-2.64c-.46-.41-.64-1.06-.43-1.65.29-.8.65-1.56,1.06-2.29l.31-.54c.44-.74.94-1.43,1.48-2.09.39-.48,1.05-.64,1.64-.45l3.73,1.18c.9-.69,1.89-1.26,2.94-1.7l.84-3.82c.13-.61.6-1.09,1.22-1.19.92-.16,1.87-.24,2.84-.24s1.92.08,2.84.23c.62.1,1.08.58,1.22,1.19l.84,3.82c1.06.43,2.05,1.01,2.94,1.7l3.73-1.18c.59-.19,1.24-.02,1.64.45.54.66,1.04,1.35,1.48,2.09l.31.54c.41.74.76,1.5,1.06,2.29h0Zm-16.05,11.33c2.96,0,5.35-2.4,5.35-5.35s-2.4-5.35-5.35-5.35-5.35,2.4-5.35,5.35,2.4,5.35,5.35,5.35Z"/></g></svg>
|
Before Width: | Height: | Size: 1.2 KiB |
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="Vrstva_2" data-name="Vrstva 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 356.17 336.25">
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1 {
|
||||
fill: #fff;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<g id="Vrstva_1-2" data-name="Vrstva 1">
|
||||
<g>
|
||||
<path class="cls-1" d="m178.89,336.25c-6.48,0-11.73-5.25-11.73-11.73v-14.08c0-6.48,5.25-11.73,11.73-11.73s11.73,5.25,11.73,11.73v14.08c0,6.48-5.25,11.73-11.73,11.73Zm0-56.32c-6.48,0-11.73-5.25-11.73-11.73v-14.08c0-6.48,5.25-11.73,11.73-11.73s11.73,5.25,11.73,11.73v14.08c0,6.48-5.25,11.73-11.73,11.73Zm0-56.32c-6.48,0-11.73-5.25-11.73-11.73v-14.08c0-6.48,5.25-11.73,11.73-11.73s11.73,5.25,11.73,11.73v14.08c0,6.48-5.25,11.73-11.73,11.73Zm-18.56-109.63c-4.25,0-8.35-2.31-10.43-6.35-2-3.86-4.18-7.68-6.49-11.36-3.45-5.49-1.8-12.73,3.69-16.18,5.49-3.45,12.73-1.8,16.18,3.69,2.66,4.23,5.17,8.63,7.47,13.07,2.98,5.76.72,12.84-5.03,15.81-1.72.89-3.57,1.31-5.38,1.31Zm-33.71-44.77c-2.9,0-5.8-1.07-8.07-3.21-3.15-2.98-6.47-5.88-9.87-8.59-5.06-4.05-5.89-11.43-1.84-16.49,4.05-5.06,11.43-5.89,16.49-1.84,3.91,3.13,7.73,6.45,11.36,9.89,4.7,4.46,4.91,11.88.45,16.59-2.31,2.44-5.41,3.66-8.52,3.66Zm-46.57-31.19c-1.6,0-3.23-.33-4.79-1.03-3.96-1.78-8.05-3.41-12.16-4.84-6.12-2.14-9.34-8.83-7.2-14.95,2.14-6.12,8.83-9.34,14.95-7.2,4.73,1.65,9.44,3.53,14,5.58,5.91,2.65,8.56,9.59,5.9,15.51-1.95,4.35-6.23,6.93-10.71,6.93Zm-54.25-13.97c-.33,0-.66-.01-.99-.04-4.32-.36-8.72-.54-13.08-.54C5.25,23.47,0,18.21,0,11.73S5.25,0,11.73,0c5.01,0,10.06.21,15.03.62,6.46.54,11.26,6.21,10.72,12.67-.51,6.13-5.64,10.76-11.68,10.76Z"/>
|
||||
<path class="cls-1" d="m195.84,113.98c-1.81,0-3.66-.42-5.38-1.31-5.76-2.98-8.01-10.06-5.03-15.81,2.3-4.44,4.81-8.84,7.47-13.07,3.45-5.49,10.69-7.14,16.18-3.69,5.49,3.45,7.14,10.69,3.69,16.18-2.31,3.68-4.5,7.5-6.49,11.36-2.09,4.03-6.18,6.35-10.43,6.35Zm33.71-44.77c-3.11,0-6.21-1.23-8.52-3.66-4.46-4.7-4.25-12.13.45-16.59,3.63-3.44,7.45-6.76,11.36-9.89,5.06-4.05,12.44-3.22,16.49,1.84,4.05,5.06,3.22,12.44-1.84,16.49-3.4,2.72-6.72,5.61-9.87,8.59-2.27,2.15-5.17,3.21-8.07,3.21Zm46.57-31.19c-4.48,0-8.76-2.58-10.71-6.93-2.65-5.91,0-12.86,5.9-15.51,4.57-2.05,9.28-3.92,14-5.58,6.11-2.14,12.81,1.08,14.95,7.2,2.14,6.12-1.08,12.81-7.2,14.95-4.1,1.44-8.19,3.07-12.16,4.84-1.56.7-3.19,1.03-4.79,1.03Zm54.25-13.97c-6.04,0-11.17-4.63-11.68-10.76-.54-6.46,4.26-12.13,10.72-12.67,4.97-.41,10.02-.62,15.03-.62,6.48,0,11.73,5.25,11.73,11.73s-5.25,11.73-11.73,11.73c-4.36,0-8.76.18-13.08.54-.33.03-.66.04-.99.04Z"/>
|
||||
<path class="cls-1" d="m178.89,279.93c-6.48,0-11.73-5.25-11.73-11.73v-14.08c0-6.48,5.25-11.73,11.73-11.73s11.73,5.25,11.73,11.73v14.08c0,6.48-5.25,11.73-11.73,11.73Z"/>
|
||||
<path class="cls-1" d="m178.89,223.61c-6.48,0-11.73-5.25-11.73-11.73v-14.08c0-6.48,5.25-11.73,11.73-11.73s11.73,5.25,11.73,11.73v14.08c0,6.48-5.25,11.73-11.73,11.73Z"/>
|
||||
<path class="cls-1" d="m178.89,167.3c-6.48,0-11.73-5.25-11.73-11.73v-14.08c0-6.48,5.25-11.73,11.73-11.73s11.73,5.25,11.73,11.73v14.08c0,6.48-5.25,11.73-11.73,11.73Z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 3 KiB |
|
@ -1,19 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg id="Vrstva_2" data-name="Vrstva 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 381.17 275.66">
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1 {
|
||||
fill: none;
|
||||
stroke: #fff;
|
||||
stroke-miterlimit: 10;
|
||||
stroke-width: 25px;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<g id="Vrstva_1-2" data-name="Vrstva 1">
|
||||
<g>
|
||||
<path class="cls-1" d="m368.67,68.01v139.64c0,30.66-23.54,55.51-52.59,55.51H65.09c-29.04,0-52.59-24.85-52.59-55.51v-46.83c0-14.72,5.54-28.84,15.4-39.25L115.83,28.76c9.86-10.41,23.24-16.26,37.18-16.26h163.07c29.04,0,52.59,24.85,52.59,55.51Z"/>
|
||||
<path class="cls-1" d="m368.67,100.88h-215.66c-13.94,0-27.32,5.85-37.18,16.26L14.78,223.81c6.55,22.77,26.59,39.35,50.32,39.35h250.99c29.04,0,52.59-24.86,52.59-55.51v-106.77Z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 816 B |
|
@ -1,466 +0,0 @@
|
|||
var vehiclemenuresourcename = "rtx_vehiclemenu";
|
||||
|
||||
var ineditmenu = "false";
|
||||
|
||||
$(function () {
|
||||
var currentscale = 1.0;
|
||||
if (localStorage.default == "false") {
|
||||
} else {
|
||||
localStorage.scale = 1.0;
|
||||
localStorage.color = "#ff66ff";
|
||||
}
|
||||
|
||||
let defaultValues = {vehiclemenutop: "50", vehiclemenuleft: "70", scale: "1.0", color: "#ff66ff",};
|
||||
|
||||
var scaleslider = document.getElementById("scalesliderdata");
|
||||
|
||||
function closeMain() {
|
||||
$("body").css("display", "none");
|
||||
}
|
||||
|
||||
function openMain() {
|
||||
$("body").css("display", "block");
|
||||
}
|
||||
|
||||
$(".vehiclemenusettingsbuttonexit").click(function(){
|
||||
if ($(".vehiclemenu-container").data('draggable')) {
|
||||
ChangeVehicleMenu();
|
||||
$(".vehiclemenu-container").draggable("destroy");
|
||||
}
|
||||
ineditmenu = "false";
|
||||
$("#vehiclemenusettingsshow").hide();
|
||||
$.post('https://'+vehiclemenuresourcename+'/quit', JSON.stringify({}));
|
||||
});
|
||||
|
||||
function draggableElements() {
|
||||
$(".vehiclemenu-container").draggable({
|
||||
scroll: false,
|
||||
axis: "x, y",
|
||||
cursor: "move"
|
||||
});
|
||||
$(".vehiclemenu-container").css("transform", "scale(" + localStorage.scale + ")");
|
||||
};
|
||||
|
||||
function currentsliderdata() {
|
||||
if (localStorage.default === "true") {
|
||||
if (defaultValues.scale == 0.5) {
|
||||
return 5;
|
||||
} else if (defaultValues.scale == 0.6) {
|
||||
return 6;
|
||||
} else if (defaultValues.scale == 0.7) {
|
||||
return 7;
|
||||
} else if (defaultValues.scale == 0.8) {
|
||||
return 8;
|
||||
} else if (defaultValues.scale == 0.9) {
|
||||
return 9;
|
||||
} else if (defaultValues.scale == 1.0) {
|
||||
return 10;
|
||||
} else if (defaultValues.scale == 1.0) {
|
||||
return 10;
|
||||
} else if (defaultValues.scale == 1.1) {
|
||||
return 11;
|
||||
} else if (defaultValues.scale == 1.2) {
|
||||
return 12;
|
||||
} else if (defaultValues.scale == 1.3) {
|
||||
return 13;
|
||||
} else if (defaultValues.scale == 1.4) {
|
||||
return 14;
|
||||
} else if (defaultValues.scale == 1.5) {
|
||||
return 15;
|
||||
}
|
||||
} else {
|
||||
if (localStorage.scale == 0.5) {
|
||||
return 5;
|
||||
} else if (localStorage.scale == 0.6) {
|
||||
return 6;
|
||||
} else if (localStorage.scale == 0.7) {
|
||||
return 7;
|
||||
} else if (localStorage.scale == 0.8) {
|
||||
return 8;
|
||||
} else if (localStorage.scale == 0.9) {
|
||||
return 9;
|
||||
} else if (localStorage.scale == 1.0) {
|
||||
return 10;
|
||||
} else if (localStorage.scale == 1.0) {
|
||||
return 10;
|
||||
} else if (localStorage.scale == 1.1) {
|
||||
return 11;
|
||||
} else if (localStorage.scale == 1.2) {
|
||||
return 12;
|
||||
} else if (localStorage.scale == 1.3) {
|
||||
return 13;
|
||||
} else if (localStorage.scale == 1.4) {
|
||||
return 14;
|
||||
} else if (localStorage.scale == 1.5) {
|
||||
return 15;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function ChangeVehicleMenu() {
|
||||
if (localStorage.default === "true") {
|
||||
let root = document.documentElement;
|
||||
var vehiclemenutop = defaultValues.vehiclemenutop + "%";
|
||||
var vehiclemenuleft = defaultValues.vehiclemenuleft + '%';
|
||||
$('.vehiclemenu-container').css({
|
||||
position:'absolute',
|
||||
top:vehiclemenutop,
|
||||
left:vehiclemenuleft
|
||||
});
|
||||
localStorage.scale = defaultValues.scale;
|
||||
localStorage.color = defaultValues.color;
|
||||
scaleslider.value = currentsliderdata();
|
||||
currentscale = defaultValues.scale;
|
||||
root.style.setProperty('--color', defaultValues.color);
|
||||
$("#color-picker").spectrum("set", defaultValues.color);
|
||||
$(".vehiclemenu-container").css("transform", "scale(" + defaultValues.scale + ")");
|
||||
} else {
|
||||
let root = document.documentElement;
|
||||
var vehiclemenutop = localStorage.vehiclemenutop + 'px';
|
||||
var vehiclemenuleft = localStorage.vehiclemenuleft + 'px';
|
||||
var scaledata = localStorage.scale;
|
||||
var color = localStorage.color;
|
||||
$('.vehiclemenu-container').css({
|
||||
position:'absolute',
|
||||
top:vehiclemenutop,
|
||||
left:vehiclemenuleft
|
||||
});
|
||||
$("#color-picker").spectrum("set", localStorage.color);
|
||||
scaleslider.value = currentsliderdata();
|
||||
root.style.setProperty('--color', color);
|
||||
$(".vehiclemenu-container").css("transform", "scale(" + scaledata + ")");
|
||||
}
|
||||
};
|
||||
|
||||
function ResetVehicleMenuToDefault() {
|
||||
let root = document.documentElement;
|
||||
var vehiclemenutop = defaultValues.vehiclemenutop + "%";
|
||||
var vehiclemenuleft = defaultValues.vehiclemenuleft + '%';
|
||||
$('.vehiclemenu-container').css({
|
||||
position:'absolute',
|
||||
top:vehiclemenutop,
|
||||
left:vehiclemenuleft
|
||||
});
|
||||
localStorage.scale = defaultValues.scale;
|
||||
localStorage.color = defaultValues.color;
|
||||
scaleslider.value = currentsliderdata();
|
||||
currentscale = defaultValues.scale;
|
||||
root.style.setProperty('--color', defaultValues.color);
|
||||
$("#color-picker").spectrum("set", defaultValues.color);
|
||||
$(".vehiclemenu-container").css("transform", "scale(" + defaultValues.scale + ")");
|
||||
};
|
||||
|
||||
window.addEventListener('message', function (event) {
|
||||
|
||||
var item = event.data;
|
||||
|
||||
if (item.message == "vehiclemenushow") {
|
||||
openMain();
|
||||
document.getElementsByClassName("vehiclemenusettingsbuttonvehiclename1text")[0].innerHTML = item.vehiclenametext1data;
|
||||
document.getElementsByClassName("vehiclemenusettingsbuttonvehiclename2text")[0].innerHTML= item.vehiclenametext2data;
|
||||
document.getElementsByClassName("vehiclemenusettingsbuttonvehicleplatetext")[0].innerHTML = item.vehicleplatedata;
|
||||
$('.vehiclemenufuelmaincontainerdata').css("height", item.vehiclefueldata+"%")
|
||||
$("#vehiclemenusettingsshow").hide();
|
||||
$("#vehiclemenusettingswindowshow").hide();
|
||||
$("#vehiclemenusettingsseatshow").hide();
|
||||
$("#vehiclemenusettingsextrasshow").hide();
|
||||
$("#vehiclemenusettingsdoorshow").show();
|
||||
$("#vehiclemenushow").show();
|
||||
}
|
||||
|
||||
if (item.message == "addseat"){
|
||||
$( ".vehiclemenusettingsseatlist" ).append('<div class="vehicleseat" seatid="' + item.vehicleseatid + '">' +
|
||||
'<div class="vehicleseattext">' + item.vehicleseattext + '</div>' +
|
||||
'</div>');
|
||||
}
|
||||
|
||||
if (item.message == "addextra"){
|
||||
$( ".vehiclemenusettingsextraslist" ).append('<div class="vehicleextras" extraid="' + item.vehicleextraid + '">' +
|
||||
'<div class="vehicleextrastext">' + item.vehicleextratext + '</div>' +
|
||||
'</div>');
|
||||
}
|
||||
|
||||
if (item.message == "vehiclemenusettingsloadfirst") {
|
||||
vehiclemenuresourcename = item.vehiclemenuresourcenamedata;
|
||||
defaultValues.vehiclemenutop = item.vehiclemenupositiontopdata;
|
||||
defaultValues.vehiclemenuleft = item.vehiclemenupositionleftdata;
|
||||
defaultValues.scale = item.vehiclemenuscaledata;
|
||||
defaultValues.color = item.vehiclemenucolordata;
|
||||
if (localStorage.default == "false") {
|
||||
} else {
|
||||
localStorage.default = "true";
|
||||
}
|
||||
ChangeVehicleMenu();
|
||||
}
|
||||
|
||||
if (item.message == "vehiclemenusettingsload") {
|
||||
vehiclemenuresourcename = item.vehiclemenuresourcenamedata;
|
||||
defaultValues.vehiclemenutop = item.vehiclemenupositiontopdata;
|
||||
defaultValues.vehiclemenuleft = item.vehiclemenupositionleftdata;
|
||||
defaultValues.scale = item.vehiclemenuscaledata;
|
||||
defaultValues.color = item.vehiclemenucolordata;
|
||||
if (localStorage.default == "false") {
|
||||
} else {
|
||||
localStorage.default = "true";
|
||||
if (ineditmenu == "false") {
|
||||
ResetVehicleMenuToDefault();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (item.message == "vehiclemenureset") {
|
||||
localStorage.default = "true";
|
||||
ChangeVehicleMenu();
|
||||
}
|
||||
|
||||
if (item.message == "hide") {
|
||||
closeMain();
|
||||
}
|
||||
|
||||
document.onkeyup = function (data) {
|
||||
if (open) {
|
||||
if (data.which == 27) {
|
||||
if ($(".vehiclemenu-container").data('draggable')) {
|
||||
ChangeVehicleMenu();
|
||||
$(".vehiclemenu-container").draggable("destroy");
|
||||
}
|
||||
ineditmenu = "false";
|
||||
$("#vehiclemenusettingsshow").hide();
|
||||
$.post('https://'+vehiclemenuresourcename+'/quit', JSON.stringify({}));
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
$(".vehiclemenusettingsbuttonwarning").click(function () {
|
||||
$.post('https://'+vehiclemenuresourcename+'/vehiclewarning', JSON.stringify({}));
|
||||
});
|
||||
|
||||
$(".vehiclemenusettingsbuttonlight").click(function () {
|
||||
$.post('https://'+vehiclemenuresourcename+'/vehiclelightinterior', JSON.stringify({}));
|
||||
});
|
||||
|
||||
$(".vehiclemenusettingsbuttonlighth").click(function () {
|
||||
$.post('https://'+vehiclemenuresourcename+'/vehiclelight', JSON.stringify({}));
|
||||
});
|
||||
|
||||
$(".vehiclemenusettingsbuttonengine").click(function () {
|
||||
$.post('https://'+vehiclemenuresourcename+'/vehicleengine', JSON.stringify({}));
|
||||
});
|
||||
|
||||
$(".vehiclemenusettingsbuttonbind").click(function () {
|
||||
$.post('https://'+vehiclemenuresourcename+'/vehiclebind', JSON.stringify({}));
|
||||
});
|
||||
|
||||
$(".vehiclemenusettingsbuttonlock").click(function () {
|
||||
$.post('https://'+vehiclemenuresourcename+'/vehiclelock', JSON.stringify({}));
|
||||
});
|
||||
|
||||
$(".vehiclemenusettingsbuttonwater").click(function () {
|
||||
$.post('https://'+vehiclemenuresourcename+'/vehiclewater', JSON.stringify({}));
|
||||
});
|
||||
|
||||
$(".vehiclemenusettingsbuttonselect1").click(function () {
|
||||
$("#vehiclemenusettingswindowshow").hide();
|
||||
$("#vehiclemenusettingsseatshow").hide();
|
||||
$("#vehiclemenusettingsextrasshow").hide();
|
||||
$("#vehiclemenusettingsdoorshow").show();
|
||||
});
|
||||
|
||||
$(".vehiclemenusettingsbuttonselect2").click(function () {
|
||||
$("#vehiclemenusettingsdoorshow").hide();
|
||||
$("#vehiclemenusettingsseatshow").hide();
|
||||
$("#vehiclemenusettingsextrasshow").hide();
|
||||
$("#vehiclemenusettingswindowshow").show();
|
||||
});
|
||||
|
||||
$(".vehiclemenusettingsbuttonselect3").click(function () {
|
||||
$( ".vehiclemenusettingsseatlist" ).empty()
|
||||
$("#vehiclemenusettingsdoorshow").hide();
|
||||
$("#vehiclemenusettingswindowshow").hide();
|
||||
$("#vehiclemenusettingsextrasshow").hide();
|
||||
$("#vehiclemenusettingsseatshow").show();
|
||||
$.post('https://'+vehiclemenuresourcename+'/vehicleseats', JSON.stringify({}));
|
||||
});
|
||||
|
||||
$(".vehiclemenusettingsbuttonselect4").click(function () {
|
||||
$( ".vehiclemenusettingsextraslist" ).empty()
|
||||
$("#vehiclemenusettingsdoorshow").hide();
|
||||
$("#vehiclemenusettingswindowshow").hide();
|
||||
$("#vehiclemenusettingsseatshow").hide();
|
||||
$("#vehiclemenusettingsextrasshow").show();
|
||||
$.post('https://'+vehiclemenuresourcename+'/vehicleextras', JSON.stringify({}));
|
||||
});
|
||||
|
||||
$(".vehiclemenusettingsdoormain1").click(function () {
|
||||
$.post('https://'+vehiclemenuresourcename+'/changedoor', JSON.stringify({
|
||||
dooriddata: 4,
|
||||
}));
|
||||
});
|
||||
|
||||
$(".vehiclemenusettingsdoormain2").click(function () {
|
||||
$.post('https://'+vehiclemenuresourcename+'/changedoor', JSON.stringify({
|
||||
dooriddata: 5,
|
||||
}));
|
||||
});
|
||||
|
||||
$(".vehiclemenusettingsdoormain3").click(function () {
|
||||
$.post('https://'+vehiclemenuresourcename+'/changedoor', JSON.stringify({
|
||||
dooriddata: 0,
|
||||
}));
|
||||
});
|
||||
|
||||
$(".vehiclemenusettingsdoormain4").click(function () {
|
||||
$.post('https://'+vehiclemenuresourcename+'/changedoor', JSON.stringify({
|
||||
dooriddata: 1,
|
||||
}));
|
||||
});
|
||||
|
||||
$(".vehiclemenusettingsdoormain5").click(function () {
|
||||
$.post('https://'+vehiclemenuresourcename+'/changedoor', JSON.stringify({
|
||||
dooriddata: 2,
|
||||
}));
|
||||
});
|
||||
|
||||
$(".vehiclemenusettingsdoormain6").click(function () {
|
||||
$.post('https://'+vehiclemenuresourcename+'/changedoor', JSON.stringify({
|
||||
dooriddata: 3,
|
||||
}));
|
||||
});
|
||||
|
||||
$(".vehiclemenusettingswindowmain1").click(function () {
|
||||
$.post('https://'+vehiclemenuresourcename+'/changewindow', JSON.stringify({
|
||||
windowiddata: 0,
|
||||
}));
|
||||
});
|
||||
|
||||
$(".vehiclemenusettingswindowmain2").click(function () {
|
||||
$.post('https://'+vehiclemenuresourcename+'/changewindow', JSON.stringify({
|
||||
windowiddata: 1,
|
||||
}));
|
||||
});
|
||||
|
||||
$(".vehiclemenusettingswindowmain3").click(function () {
|
||||
$.post('https://'+vehiclemenuresourcename+'/changewindow', JSON.stringify({
|
||||
windowiddata: 2,
|
||||
}));
|
||||
});
|
||||
|
||||
$(".vehiclemenusettingswindowmain4").click(function () {
|
||||
$.post('https://'+vehiclemenuresourcename+'/changewindow', JSON.stringify({
|
||||
windowiddata: 3,
|
||||
}));
|
||||
});
|
||||
|
||||
$(".vehiclemenusettingsseatlist").on("click", ".vehicleseat", function() {
|
||||
var $vehicleseathandler = $(this);
|
||||
var $vehicleseatiddata = $vehicleseathandler.attr('seatid')
|
||||
$.post('https://'+vehiclemenuresourcename+'/changeseat', JSON.stringify({
|
||||
vehicleseatiddata: $vehicleseatiddata,
|
||||
}));
|
||||
});
|
||||
|
||||
$(".vehiclemenusettingsextraslist").on("click", ".vehicleextras", function() {
|
||||
var $vehicleextrahandler = $(this);
|
||||
var $vehicleextraiddata = $vehicleextrahandler.attr('extraid')
|
||||
$.post('https://'+vehiclemenuresourcename+'/changeextra', JSON.stringify({
|
||||
vehicleextraiddata: $vehicleextraiddata,
|
||||
}));
|
||||
});
|
||||
|
||||
$(".closevehiclemenusettings").click(function(){
|
||||
ChangeVehicleMenu();
|
||||
ineditmenu = "false";
|
||||
$(".vehiclemenu-container").draggable("destroy");
|
||||
$("#vehiclemenusettingsshow").hide();
|
||||
});
|
||||
|
||||
$(".vehiclemenusettingsbuttonsettings").click(function(){
|
||||
draggableElements();
|
||||
ineditmenu = "true";
|
||||
$("#vehiclemenusettingsshow").show();
|
||||
});
|
||||
|
||||
$(".buttonvehiclemenusettingsreset").click(function(){
|
||||
localStorage.default = "true";
|
||||
ChangeVehicleMenu();
|
||||
});
|
||||
|
||||
$(".buttonvehiclemenusettingssave").click(function(){
|
||||
$(".vehiclemenu-container").draggable("disable")
|
||||
localStorage.default = "false";
|
||||
var vehiclemenupos = $(".vehiclemenu-container").position();
|
||||
localStorage.vehiclemenutop = vehiclemenupos.top;
|
||||
localStorage.vehiclemenuleft = vehiclemenupos.left;
|
||||
localStorage.scale = currentscale;
|
||||
localStorage.color = $("#color-picker").spectrum("get");
|
||||
ChangeVehicleMenu();
|
||||
$(".vehiclemenu-container").draggable("destroy");
|
||||
ineditmenu = "false";
|
||||
$("#vehiclemenusettingsshow").hide();
|
||||
});
|
||||
|
||||
$(document).ready(function() {
|
||||
$(".sp-container").on({
|
||||
click: function(){
|
||||
let root = document.documentElement;
|
||||
var value = $("#color-picker").val();
|
||||
var hexstring = $("#color-picker").spectrum("get");
|
||||
root.style.setProperty('--color', hexstring);
|
||||
localStorage.color = hexstring;
|
||||
},
|
||||
change: function(){
|
||||
let root = document.documentElement;
|
||||
var value = $("#color-picker").val();
|
||||
root.style.setProperty('--color', hexstring);
|
||||
var hexstring = $("#color-picker").spectrum("get");
|
||||
localStorage.color = hexstring;
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
scaleslider.oninput = function() {
|
||||
if (this.value == 5) {
|
||||
$(".vehiclemenu-container").css("transform", "scale(0.5)");
|
||||
currentscale = 0.5;
|
||||
} else if (this.value == 6) {
|
||||
$(".vehiclemenu-container").css("transform", "scale(0.6)");
|
||||
currentscale = 0.6;
|
||||
} else if (this.value == 7) {
|
||||
$(".vehiclemenu-container").css("transform", "scale(0.7)");
|
||||
currentscale = 0.7;
|
||||
} else if (this.value == 8) {
|
||||
$(".vehiclemenu-container").css("transform", "scale(0.8)");
|
||||
currentscale = 0.8;
|
||||
} else if (this.value == 9) {
|
||||
$(".vehiclemenu-container").css("transform", "scale(0.9)");
|
||||
currentscale = 0.9;
|
||||
} else if (this.value == 10) {
|
||||
$(".vehiclemenu-container").css("transform", "scale(1.0)");
|
||||
currentscale = 1.0;
|
||||
} else if (this.value == 11) {
|
||||
$(".vehiclemenu-container").css("transform", "scale(1.1)");
|
||||
currentscale = 1.1;
|
||||
} else if (this.value == 12) {
|
||||
$(".vehiclemenu-container").css("transform", "scale(1.2)");
|
||||
currentscale = 1.2;
|
||||
} else if (this.value == 13) {
|
||||
$(".vehiclemenu-container").css("transform", "scale(1.3)");
|
||||
currentscale = 1.3;
|
||||
} else if (this.value == 14) {
|
||||
$(".vehiclemenu-container").css("transform", "scale(1.4)");
|
||||
currentscale = 1.4;
|
||||
} else if (this.value == 15) {
|
||||
$(".vehiclemenu-container").css("transform", "scale(1.5)");
|
||||
currentscale = 1.5;
|
||||
}
|
||||
}
|
||||
$('#color-picker').spectrum({
|
||||
preferredFormat: "rgb",
|
||||
showInput: true,
|
||||
showPalette: false,
|
||||
allowEmpty:false,
|
||||
showAlpha: false,
|
||||
showButtons: false
|
||||
});
|
||||
})
|
|
@ -1,141 +0,0 @@
|
|||
<head>
|
||||
<link rel="stylesheet" href="https://kit-pro.fontawesome.com/releases/v6.2.0/css/pro.min.css">
|
||||
<link rel="stylesheet" href="styles.css" type="text/css">
|
||||
<script src="https://code.jquery.com/jquery-3.6.1.min.js"></script>
|
||||
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/spectrum-colorpicker2/dist/spectrum.min.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/spectrum-colorpicker2/dist/spectrum.min.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="full-screen">
|
||||
<div class="vehiclemenu-container" id="vehiclemenushow">
|
||||
<div class="vehiclemenumain">
|
||||
<div class="vehiclemenufuelmain">
|
||||
<div class="vehiclemenufuelicon"><i class="fa-solid fa-gas-pump"></i></div>
|
||||
<div class="vehiclemenufuelmaincontainer">
|
||||
<div class="vehiclemenufuelmaincontainerdata"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vehiclemenusettingsdoor" id="vehiclemenusettingsdoorshow">
|
||||
<div class="vehiclemenusettingsdoormain">
|
||||
<div class="vehiclemenusettingsdoormain1">
|
||||
<div class="vehiclemenusettingsdoormain1text">MOTORHAUBE</div>
|
||||
</div>
|
||||
<div class="vehiclemenusettingsdoormain2">
|
||||
<div class="vehiclemenusettingsdoormain2text">KOFFERAUM</div>
|
||||
</div>
|
||||
<div class="vehiclemenusettingsdoormain3">
|
||||
<div class="vehiclemenusettingsdoormain3text">TÜR 1</div>
|
||||
</div>
|
||||
<div class="vehiclemenusettingsdoormain4">
|
||||
<div class="vehiclemenusettingsdoormain4text">TÜR 2</div>
|
||||
</div>
|
||||
<div class="vehiclemenusettingsdoormain5">
|
||||
<div class="vehiclemenusettingsdoormain5text">TÜR 3</div>
|
||||
</div>
|
||||
<div class="vehiclemenusettingsdoormain6">
|
||||
<div class="vehiclemenusettingsdoormain6text">TÜR 4</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vehiclemenusettingswindow" id="vehiclemenusettingswindowshow">
|
||||
<div class="vehiclemenusettingswindowmain">
|
||||
<div class="vehiclemenusettingswindowmain1">
|
||||
<div class="vehiclemenusettingswindowmain1text">FENSTER 1</div>
|
||||
</div>
|
||||
<div class="vehiclemenusettingswindowmain2">
|
||||
<div class="vehiclemenusettingswindowmain2text">FENSTER 2</div>
|
||||
</div>
|
||||
<div class="vehiclemenusettingswindowmain3">
|
||||
<div class="vehiclemenusettingswindowmain3text">FENSTER 3</div>
|
||||
</div>
|
||||
<div class="vehiclemenusettingswindowmain4">
|
||||
<div class="vehiclemenusettingswindowmain4text">Fenster 4</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vehiclemenusettingsseat" id="vehiclemenusettingsseatshow">
|
||||
<div class="vehiclemenusettingsseatmain">
|
||||
<div class="body vehiclemenusettingsseatlist">
|
||||
<div class="vehicleseat"><div class="vehicleseattext">SITZ 1</div></div><div class="vehicleseat"><div class="vehicleseattext">SITZ 1</div></div><div class="vehicleseat"><div class="vehicleseattext">SITZ 1</div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vehiclemenusettingsextras" id="vehiclemenusettingsextrasshow">
|
||||
<div class="vehiclemenusettingsextrasmain">
|
||||
<div class="body vehiclemenusettingsextraslist">
|
||||
<div class="vehicleextras"><div class="vehicleextrastext">EXTRAS 1</div></div><div class="vehicleextras"><div class="vehicleextrastext">EXTRAS 1</div></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vehiclemenusettingsbuttonwarning">
|
||||
<div class="vehiclemenusettingsbuttonwarningicon"><i class="fa-light fa-solid fa-exclamation"></i></div>
|
||||
</div>
|
||||
<div class="vehiclemenusettingsbuttonlight">
|
||||
<div class="vehiclemenusettingsbuttonlighticon"><i class="fa-light fa-lightbulb"></i></div>
|
||||
</div>
|
||||
<div class="vehiclemenusettingsbuttonlighth">
|
||||
<img class="vehiclemenusettingsbuttonlighthicon" src="img/lights.svg">
|
||||
</div>
|
||||
<div class="vehiclemenusettingsbuttonengine">
|
||||
<div class="vehiclemenusettingsbuttonengineicon"><i class="fa-light fa-power-off"></i></div>
|
||||
</div>
|
||||
<div class="vehiclemenusettingsbuttonbind">
|
||||
<div class="vehiclemenusettingsbuttonbindicon"><i class="fa-light fa-waveform-lines"></i></div>
|
||||
</div>
|
||||
<div class="vehiclemenusettingsbuttonlock">
|
||||
<div class="vehiclemenusettingsbuttonlockicon"><i class="fa-light fa-key"></i></div>
|
||||
</div>
|
||||
<div class="vehiclemenusettingsbuttonwater">
|
||||
<img class="vehiclemenusettingsbuttonwatericon" src="img/water.svg">
|
||||
</div>
|
||||
</div>
|
||||
<div class="vehiclemenusettingsbuttonvehiclename">
|
||||
<div class="vehiclemenusettingsbuttonvehiclename1">
|
||||
<div class="vehiclemenusettingsbuttonvehiclename1text">Lamborghini</div>
|
||||
</div>
|
||||
<div class="vehiclemenusettingsbuttonvehiclename2">
|
||||
<div class="vehiclemenusettingsbuttonvehiclename2text">Aventador</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vehiclemenusettingsbuttonvehicleplate">
|
||||
<div class="vehiclemenusettingsbuttonvehicleplatetext">8T6 2456</div>
|
||||
</div>
|
||||
<div class="vehiclemenusettingsbuttonsettings">
|
||||
<div class="vehiclemenusettingsbuttonsettingsicon"><i class="fa-solid fa-gear"></i></div>
|
||||
</div>
|
||||
<div class="vehiclemenusettingsbuttonexit">
|
||||
<img class="vehiclemenusettingsbuttonexiticon" src="img/close.svg">
|
||||
</div>
|
||||
<div class="vehiclemenusettingsbuttonselect1">
|
||||
<img class="vehiclemenusettingsbuttonselect1icon" src="img/doors.svg">
|
||||
</div>
|
||||
<div class="vehiclemenusettingsbuttonselect2">
|
||||
<img class="vehiclemenusettingsbuttonselect2icon" src="img/windows.svg">
|
||||
</div>
|
||||
<div class="vehiclemenusettingsbuttonselect3">
|
||||
<div class="vehiclemenusettingsbuttonselect3icon"><i class="fa-regular fa-person-seat"></i></div>
|
||||
</div>
|
||||
<div class="vehiclemenusettingsbuttonselect4">
|
||||
<div class="vehiclemenusettingsbuttonselect4icon"><i class="fa-light fa-bars"></i></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vehiclemenusettings-container" id="vehiclemenusettingsshow">
|
||||
<img class="closevehiclemenusettings" src="img/close.svg">
|
||||
<div class="vehiclemenusettingsmaintext">VEHICLE MENU SETTINGS</div>
|
||||
<div class="vehiclemenusettingsmainscaletext">SCALE</div>
|
||||
<div class="scaleslidercontainer">
|
||||
<div class="scaleslideline">
|
||||
</div>
|
||||
<input type="range" min="5" max="15" value="10" class="scaleslider" id="scalesliderdata">
|
||||
</div>
|
||||
<div class="colorchanger">
|
||||
<input class="pickercolor" id="color-picker" value="#ff66ff"/>
|
||||
</div>
|
||||
<div class="buttonvehiclemenusettingsreset">RESET</div>
|
||||
<div class="buttonvehiclemenusettingssave">SAVE</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="scripts.js" type="text/javascript"></script>
|
||||
</body>
|
|
@ -1,19 +0,0 @@
|
|||
Language = {
|
||||
["German"] = {
|
||||
["vehiclelocked"] = "Du hast das Fahrzeug abgeschlossen",
|
||||
["vehicleunlocked"] = "Du hast das Fahrzeug aufgeschlossen",
|
||||
["seatoccupied"] = "Dieser Sitz ist besetzt",
|
||||
["novehicle"] = "Du bist nicht im Fahrzeug",
|
||||
["sprinklersenabled"] = "Du hast die Scheibenwischer des Fahrzeugs eingeschaltet",
|
||||
["alreadyenabled"] = "Die Scheibenwischer sind bereits eingeschaltet",
|
||||
["hazardlightson"] = "Du hast die Warnblinkanlage eingeschaltet",
|
||||
["hazardlightsoff"] = "Du hast die Warnblinkanlage ausgeschaltet",
|
||||
["interiorlightson"] = "Du hast das Innenlicht eingeschaltet",
|
||||
["interiorlightsoff"] = "Du hast das Innenlicht ausgeschaltet",
|
||||
["engineon"] = "Du hast den Motor gestartet",
|
||||
["engineonoff"] = "Du hast den Motor ausgeschaltet",
|
||||
["vehiclemenubind"] = "Fahrzeugmenü",
|
||||
["seat"] = "Sitz",
|
||||
["extra"] = "Extra",
|
||||
},
|
||||
}
|
|
@ -1288,6 +1288,23 @@ CodeStudio.Products = {
|
|||
itemPrice = 50,
|
||||
itemInfo = "",
|
||||
},
|
||||
['kq_tow_rope'] = {
|
||||
itemName = "Abschleppseil",
|
||||
itemStock = 150,
|
||||
itemPrice = 50,
|
||||
itemInfo = "",
|
||||
},
|
||||
['kq_winch'] = {
|
||||
itemName = "Seilwinden Ferndedinung",
|
||||
itemStock = 150,
|
||||
itemPrice = 50,
|
||||
itemInfo = "",
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
['police_weapons'] = {
|
||||
|
@ -2697,9 +2714,27 @@ CodeStudio.Products = {
|
|||
itemInfo = "",
|
||||
},
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
['tools'] = {
|
||||
categoryName = "Items",
|
||||
categoryLogo = "fa-shopping-basket",
|
||||
items = {
|
||||
['kq_tow_rope'] = {
|
||||
itemName = "Abschleppseil",
|
||||
itemStock = 150,
|
||||
itemPrice = 50,
|
||||
itemInfo = "",
|
||||
},
|
||||
['kq_winch'] = {
|
||||
itemName = "Seilwinden Ferndedinung",
|
||||
itemStock = 150,
|
||||
itemPrice = 50,
|
||||
itemInfo = "",
|
||||
},
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
@ -2830,6 +2865,7 @@ CodeStudio.Shops = {
|
|||
[2] = 'kayas',
|
||||
[3] = 'odinsbar',
|
||||
[4] = 'cute',
|
||||
[5] = 'tools',
|
||||
|
||||
|
||||
},
|
||||
|
|
BIN
resources/[inventory]/cs_shops/ui/image/kq_tow_rope.png
Normal file
After Width: | Height: | Size: 58 KiB |
BIN
resources/[inventory]/cs_shops/ui/image/kq_winch.png
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
resources/[inventory]/inventory_images/images/kq_tow_rope.png
Normal file
After Width: | Height: | Size: 58 KiB |
BIN
resources/[inventory]/inventory_images/images/kq_winch.png
Normal file
After Width: | Height: | Size: 1.2 MiB |
|
@ -10379,6 +10379,27 @@ itemsData = {
|
|||
image = 'dynamite.png',
|
||||
name = 'dynamite',
|
||||
},
|
||||
|
||||
kq_tow_rope = {
|
||||
shouldClose = true,
|
||||
type = 'item',
|
||||
description = '',
|
||||
weight = 2000,
|
||||
label = 'Abschleppseil',
|
||||
unique = true,
|
||||
useable = true,
|
||||
image = 'kq_tow_rope.png',
|
||||
name = 'kq_tow_rope',
|
||||
},
|
||||
kq_winch = {
|
||||
shouldClose = true,
|
||||
type = 'item',
|
||||
description = '',
|
||||
weight = 4000,
|
||||
label = 'Seilwinden Steuerung',
|
||||
unique = true,
|
||||
useable = true,
|
||||
image = 'kq_winch.png',
|
||||
name = 'kq_winch',
|
||||
},
|
||||
|
||||
}
|
||||
|
|