inventory fix + esc menu

This commit is contained in:
UIRP.Hetzner 2025-03-17 18:03:20 +00:00
parent b849ee5785
commit a1f0f4d839
155 changed files with 1983 additions and 16423 deletions

View File

@ -74,14 +74,8 @@ txaEvent "serverShuttingDown" "{delay:5000,author:txAdmin,m
ensure "ui_pmenu"
### 2025-03-16 15:09:04.329
txaReportResources
### 2025-03-17 13:21:02.116
txaReportResources
### 2025-03-17 13:28:58.791
quit "host shutting down"
### 2025-03-17 15:18:56.763
txaEvent "serverShuttingDown" "{\"delay\":5000,\"author\":\"androxaaa\",\"message\":\"Server shutting down (admin request).\"}"
### 2025-03-17 15:51:55.750
txaEvent "serverShuttingDown" "{\"delay\":5000,\"author\":\"androxaaa\",\"message\":\"Server restarting (admin request).\"}"
### 2025-03-17 15:55:56.729
setgroup 1 owner
### 2025-03-17 15:55:56.780
@ -90,3 +84,21 @@ txaEvent "consoleCommand" "{\"channel\":\"txAdmin\",\"command\":\"setgroup 1 own
setgroup 1 admin
### 2025-03-17 15:56:09.536
txaEvent "consoleCommand" "{\"channel\":\"txAdmin\",\"command\":\"setgroup 1 admin\",\"author\":\"androxaaa\"}"
### 2025-03-17 16:51:02.220
a
### 2025-03-17 16:51:02.271
txaEvent "consoleCommand" "{\"channel\":\"txAdmin\",\"command\":\"a\",\"author\":\"androxaaa\"}"
### 2025-03-17 16:51:04.893
stop ox_inventory
### 2025-03-17 16:51:04.944
txaEvent "consoleCommand" "{\"channel\":\"txAdmin\",\"command\":\"stop ox_inventory\",\"author\":\"androxaaa\"}"
### 2025-03-17 16:51:07.594
txaReportResources
### 2025-03-17 16:51:30.092
txaEvent "serverShuttingDown" "{\"delay\":5000,\"author\":\"androxaaa\",\"message\":\"Server restarting (admin request).\"}"
### 2025-03-17 16:54:15.382
stop ui_pmenu
### 2025-03-17 16:54:15.433
txaEvent "consoleCommand" "{\"channel\":\"txAdmin\",\"command\":\"stop ui_pmenu\",\"author\":\"androxaaa\"}"
### 2025-03-17 16:55:15.447
txaEvent "serverShuttingDown" "{\"delay\":5000,\"author\":\"androxaaa\",\"message\":\"Server shutting down (admin request).\"}"

View File

@ -530,7 +530,7 @@ local function useSlot(slot, noAnim)
SetCurrentPedWeapon(playerPed, data.hash, false)
if data.hash ~= GetSelectedPedWeapon(playerPed) then
lib.print.info(('%s cannot be used in current context (default game behaviour)'):format(item.name))
lib.print.info(('failed to equip %s (cause unknown)'):format(item.name))
return lib.notify({ type = 'error', description = locale('cannot_use', data.label) })
end
@ -749,7 +749,7 @@ local function registerCommands()
-- No storage or no glovebox
if (checkVehicle == 0 or checkVehicle == 2) or (not Vehicles.glovebox[vehicleClass] and not Vehicles.glovebox.models[vehicleHash]) then return end
local isOpen = client.openInventory('glovebox', { id = 'glove'..GetVehicleNumberPlateText(vehicle), netid = NetworkGetNetworkIdFromEntity(vehicle) })
local isOpen = client.openInventory('glovebox', { netid = NetworkGetNetworkIdFromEntity(vehicle) })
if isOpen then
currentInventory.entity = vehicle
@ -815,7 +815,7 @@ local function registerCommands()
if not shared.target and entityType == 3 then
local model = GetEntityModel(entity)
if Inventory.Dumpsters[model] then
if Inventory.Dumpsters:includes(model) then
return Inventory.OpenDumpster(entity)
end
end
@ -1186,6 +1186,7 @@ RegisterNetEvent('ox_inventory:setPlayerInventory', function(currentDrops, inven
---@class PlayerData
---@field inventory table<number, SlotWithItem?>
---@field weight number
---@field groups table<string, number>
PlayerData = player
PlayerData.id = cache.playerId
PlayerData.source = cache.serverId
@ -1300,7 +1301,7 @@ RegisterNetEvent('ox_inventory:setPlayerInventory', function(currentDrops, inven
end
end
for id, data in pairs(lib.load('data.licenses')) do
for id, data in pairs(lib.load('data.licenses') or {}) do
lib.points.new({
coords = data.coords,
distance = 16,
@ -1400,7 +1401,7 @@ RegisterNetEvent('ox_inventory:setPlayerInventory', function(currentDrops, inven
end
if weaponHash ~= currentWeapon.hash then
lib.print.info(('%s cannot be used in current context (default game behaviour)'):format(currentWeapon.name))
lib.print.info(('%s was forcibly unequipped (caused by game behaviour or another resource)'):format(currentWeapon.name))
currentWeapon = Weapon.Disarm(currentWeapon, true)
end
end

View File

@ -1,5 +1,6 @@
return {
{
name = 'debug_crafting',
items = {
{
name = 'lockpick',

View File

@ -4,7 +4,7 @@ lua54 'yes'
game 'gta5'
name 'ox_inventory'
author 'Overextended'
version '2.42.3'
version '2.44.1'
repository 'https://github.com/overextended/ox_inventory'
description 'Slot-based inventory with item metadata support'

View File

@ -19,6 +19,7 @@ shared = {
playerweight = GetConvarInt('inventory:weight', 30000),
target = GetConvarInt('inventory:target', 0) == 1,
police = json.decode(GetConvar('inventory:police', '["police", "sheriff"]')),
networkdumpsters = GetConvarInt('inventory:networkdumpsters', 0) == 1
}
shared.dropslots = GetConvarInt('inventory:dropslots', shared.playerslots)
@ -174,7 +175,7 @@ end
local success, msg = lib.checkDependency('oxmysql', '2.7.3')
if success then
success, msg = lib.checkDependency('ox_lib', '3.13.0')
success, msg = lib.checkDependency('ox_lib', '3.27.0')
end
if not success then

View File

@ -13,11 +13,14 @@ end)
local ESX
SetTimeout(500, function()
ESX = exports.ui_core:getSharedObject()
lib.checkDependency('ui_core', '1.6.0', true)
if ESX.CreatePickup then
error('ox_inventory requires a ESX Legacy v1.6.0 or above, refer to the documentation.')
end
ESX = exports.ui_core:getSharedObject()
local customInventory = ESX.GetConfig().CustomInventory
if customInventory ~= nil and customInventory ~= "ox" then
error('ui_core has not been configured to enable support for ox_inventory!\nEnsure Config.CustomInventory has been set to "ox" in your ui_core resource config.')
end
server.UseItem = ESX.UseItem
server.GetPlayerFromId = ESX.GetPlayerFromId

View File

@ -51,9 +51,8 @@ end
local success, result = pcall(lib.load, ('modules.bridge.%s.server'):format(shared.framework))
if not success then
lib.print.error(result)
lib = nil
return
error(result, 0)
end
if server.convertInventory then exports('ConvertItems', server.convertInventory) end

View File

@ -94,6 +94,6 @@ local function createCraftingBench(id, data)
end
end
for id, data in pairs(lib.load('data.crafting')) do createCraftingBench(id, data) end
for id, data in pairs(lib.load('data.crafting') or {}) do createCraftingBench(data.name or id, data) end
return CraftingBenches

View File

@ -43,7 +43,7 @@ local function createCraftingBench(id, data)
end
end
for id, data in pairs(lib.load('data.crafting')) do createCraftingBench(id, data) end
for id, data in pairs(lib.load('data.crafting') or {}) do createCraftingBench(data.name or id, data) end
---falls back to player coords if zones and points are both nil
---@param source number
@ -113,12 +113,32 @@ lib.callback.register('ox_inventory:craftItem', function(source, id, index, reci
local craftedItem = Items(recipe.name)
local craftCount = (type(recipe.count) == 'number' and recipe.count) or (table.type(recipe.count) == 'array' and math.random(recipe.count[1], recipe.count[2])) or 1
local newWeight = left.weight + (craftedItem.weight + (recipe.metadata?.weight or 0)) * craftCount
-- Modified weight calculation
local newWeight = left.weight
local items = Inventory.Search(left, 'slots', tbl) or {}
---@todo new iterator or something to accept a map
-- First subtract weight of ingredients that will be removed
for name, needs in pairs(recipe.ingredients) do
if needs > 0 then
local item = Items(name)
if item then
newWeight -= (item.weight * needs)
end
end
end
-- Add weight of crafted item
newWeight += (craftedItem.weight + (recipe.metadata?.weight or 0)) * craftCount
if newWeight > left.maxWeight then return false, 'cannot_carry' end
local items = Inventory.Search(left, 'slots', tbl) or {}
table.wipe(tbl)
for name, needs in pairs(recipe.ingredients) do
if needs == 0 then break end
local slots = items[name] or items
if #slots == 0 then return end
@ -149,13 +169,10 @@ lib.callback.register('ox_inventory:craftItem', function(source, id, index, reci
end
end
elseif needs <= slot.count then
local itemWeight = slot.weight / slot.count
newWeight = (newWeight - slot.weight) + (slot.count - needs) * itemWeight
tbl[slot.slot] = needs
break
else
tbl[slot.slot] = slot.count
newWeight -= slot.weight
needs -= slot.count
end
@ -165,10 +182,6 @@ lib.callback.register('ox_inventory:craftItem', function(source, id, index, reci
end
end
if newWeight > left.maxWeight then
return false, 'cannot_carry'
end
if not TriggerEventHooks('craftItem', {
source = source,
benchId = id,

View File

@ -2,20 +2,49 @@ if not lib then return end
local Inventory = {}
Inventory.Dumpsters = {218085040, 666561306, -58485588, -206690185, 1511880420, 682791951}
Inventory.Dumpsters = lib.array:new(218085040, 666561306, -58485588, -206690185, 1511880420, 682791951)
if shared.networkdumpsters then
-- Make sure dumpsters are frozen to ensure persistent position across clients
SetInterval(function()
local objects = GetGamePool('CObject')
for i = 1, #objects do
local object = objects[i]
local state = Entity(object).state
if state.isDumpster == nil then
local model = GetEntityModel(object)
local isDumpster = Inventory.Dumpsters:includes(model)
state.isDumpster = isDumpster
if isDumpster then
FreezeEntityPosition(object, true)
end
end
end
end, 3000)
end
function Inventory.OpenDumpster(entity)
local netId = NetworkGetEntityIsNetworked(entity) and NetworkGetNetworkIdFromEntity(entity)
if shared.networkdumpsters then
local coords = GetEntityCoords(entity)
client.openInventory('dumpster', coords)
return
end
if not netId then
local coords = GetEntityCoords(entity)
entity = GetClosestObjectOfType(coords.x, coords.y, coords.z, 0.1, GetEntityModel(entity), true, true, true)
netId = entity ~= 0 and NetworkGetNetworkIdFromEntity(entity)
end
local netId = NetworkGetEntityIsNetworked(entity) and NetworkGetNetworkIdFromEntity(entity)
if netId then
client.openInventory('dumpster', 'dumpster'..netId)
end
if not netId then
local coords = GetEntityCoords(entity)
entity = GetClosestObjectOfType(coords.x, coords.y, coords.z, 0.1, GetEntityModel(entity), true, true, true)
netId = entity ~= 0 and NetworkGetNetworkIdFromEntity(entity)
end
if netId then
client.openInventory('dumpster', 'dumpster' .. netId)
end
end
local Utils = require 'modules.utils.client'
@ -25,7 +54,7 @@ local backDoorIds = { 2, 3 }
function Inventory.CanAccessTrunk(entity)
if cache.vehicle or not NetworkGetEntityIsNetworked(entity) then return end
local vehicleHash = GetEntityModel(entity)
local vehicleHash = GetEntityModel(entity)
local vehicleClass = GetVehicleClass(entity)
local checkVehicle = Vehicles.Storage[vehicleHash]
@ -59,13 +88,11 @@ function Inventory.OpenTrunk(entity)
if not door then return end
local plate = GetVehicleNumberPlateText(entity)
local invId = 'trunk'..plate
local coords = GetEntityCoords(entity)
TaskTurnPedToFaceCoord(cache.ped, coords.x, coords.y, coords.z, 0)
if not client.openInventory('trunk', { id = invId, netid = NetworkGetNetworkIdFromEntity(entity), entityid = entity, door = door }) then return end
if not client.openInventory('trunk', { netid = NetworkGetNetworkIdFromEntity(entity), entityid = entity, door = door }) then return end
if type(door) == 'table' then
for i = 1, #door do
@ -77,12 +104,12 @@ function Inventory.OpenTrunk(entity)
end
if shared.target then
exports.ox_target:addModel(Inventory.Dumpsters, {
exports.ox_target:addModel(Inventory.Dumpsters, {
icon = 'fas fa-dumpster',
label = locale('search_dumpster'),
onSelect = function(data) return Inventory.OpenDumpster(data.entity) end,
distance = 2
})
})
exports.ox_target:addGlobalVehicle({
icon = 'fas fa-truck-ramp-box',
@ -93,78 +120,75 @@ if shared.target then
return Inventory.OpenTrunk(data.entity)
end
})
else
local dumpsters = table.create(0, #Inventory.Dumpsters)
for i = 1, #Inventory.Dumpsters do
dumpsters[Inventory.Dumpsters[i]] = true
end
Inventory.Dumpsters = dumpsters
end
---@param search 'slots' | 1 | 'count' | 2
---@param item table | string
---@param metadata? table | string
function Inventory.Search(search, item, metadata)
if not PlayerData.loaded then
if not coroutine.running() then
error('player inventory has not yet loaded.')
end
if not PlayerData.loaded then
if not coroutine.running() then
error('player inventory has not yet loaded.')
end
repeat Wait(100) until PlayerData.loaded
end
repeat Wait(100) until PlayerData.loaded
end
if item then
if search == 'slots' then search = 1 elseif search == 'count' then search = 2 end
if type(item) == 'string' then item = {item} end
if type(metadata) == 'string' then metadata = {type=metadata} end
if item then
if search == 'slots' then search = 1 elseif search == 'count' then search = 2 end
if type(item) == 'string' then item = { item } end
if type(metadata) == 'string' then metadata = { type = metadata } end
local items = #item
local returnData = {}
for i = 1, items do
local item = string.lower(item[i])
if item:sub(0, 7) == 'weapon_' then item = string.upper(item) end
if search == 1 then returnData[item] = {}
elseif search == 2 then returnData[item] = 0 end
for _, v in pairs(PlayerData.inventory) do
if v.name == item then
if not v.metadata then v.metadata = {} end
if not metadata or table.contains(v.metadata, metadata) then
if search == 1 then returnData[item][#returnData[item]+1] = PlayerData.inventory[v.slot]
elseif search == 2 then
returnData[item] += v.count
end
end
end
end
end
if next(returnData) then return items == 1 and returnData[item[1]] or returnData end
end
return false
local items = #item
local returnData = {}
for i = 1, items do
local item = string.lower(item[i])
if item:sub(0, 7) == 'weapon_' then item = string.upper(item) end
if search == 1 then
returnData[item] = {}
elseif search == 2 then
returnData[item] = 0
end
for _, v in pairs(PlayerData.inventory) do
if v.name == item then
if not v.metadata then v.metadata = {} end
if not metadata or table.contains(v.metadata, metadata) then
if search == 1 then
returnData[item][#returnData[item] + 1] = PlayerData.inventory[v.slot]
elseif search == 2 then
returnData[item] += v.count
end
end
end
end
end
if next(returnData) then return items == 1 and returnData[item[1]] or returnData end
end
return false
end
exports('Search', Inventory.Search)
exports('GetPlayerItems', function()
return PlayerData.inventory
return PlayerData.inventory
end)
exports('GetPlayerWeight', function()
return PlayerData.weight
return PlayerData.weight
end)
exports('GetPlayerMaxWeight', function()
return PlayerData.maxWeight
return PlayerData.maxWeight
end)
local Items = require 'modules.items.client'
local function assertMetadata(metadata)
if metadata and type(metadata) ~= 'table' then
metadata = metadata and { type = metadata or nil }
end
if metadata and type(metadata) ~= 'table' then
metadata = metadata and { type = metadata or nil }
end
return metadata
return metadata
end
---@param itemName string
@ -172,19 +196,19 @@ end
---@param strict? boolean Strictly match metadata properties, otherwise use partial matching.
---@return SlotWithItem?
function Inventory.GetSlotWithItem(itemName, metadata, strict)
local inventory = PlayerData.inventory
local item = Items(itemName) --[[@as OxClientItem?]]
local inventory = PlayerData.inventory
local item = Items(itemName) --[[@as OxClientItem?]]
if not inventory or not item then return end
if not inventory or not item then return end
metadata = assertMetadata(metadata)
local tablematch = strict and table.matches or table.contains
metadata = assertMetadata(metadata)
local tablematch = strict and table.matches or table.contains
for _, slotData in pairs(inventory) do
if slotData and slotData.name == item.name and (not metadata or tablematch(slotData.metadata, metadata)) then
return slotData
end
end
for _, slotData in pairs(inventory) do
if slotData and slotData.name == item.name and (not metadata or tablematch(slotData.metadata, metadata)) then
return slotData
end
end
end
exports('GetSlotWithItem', Inventory.GetSlotWithItem)
@ -194,7 +218,7 @@ exports('GetSlotWithItem', Inventory.GetSlotWithItem)
---@param strict? boolean Strictly match metadata properties, otherwise use partial matching.
---@return number?
function Inventory.GetSlotIdWithItem(itemName, metadata, strict)
return Inventory.GetSlotWithItem(itemName, metadata, strict)?.slot
return Inventory.GetSlotWithItem(itemName, metadata, strict)?.slot
end
exports('GetSlotIdWithItem', Inventory.GetSlotIdWithItem)
@ -204,25 +228,25 @@ exports('GetSlotIdWithItem', Inventory.GetSlotIdWithItem)
---@param strict? boolean Strictly match metadata properties, otherwise use partial matching.
---@return SlotWithItem[]?
function Inventory.GetSlotsWithItem(itemName, metadata, strict)
local inventory = PlayerData.inventory
local item = Items(itemName) --[[@as OxClientItem?]]
local inventory = PlayerData.inventory
local item = Items(itemName) --[[@as OxClientItem?]]
if not inventory or not item then return end
if not inventory or not item then return end
metadata = assertMetadata(metadata)
local response = {}
local n = 0
local tablematch = strict and table.matches or table.contains
metadata = assertMetadata(metadata)
local response = {}
local n = 0
local tablematch = strict and table.matches or table.contains
for _, slotData in pairs(inventory) do
if slotData and slotData.name == item.name and (not metadata or tablematch(slotData.metadata, metadata)) then
n += 1
response[n] = slotData
end
end
for _, slotData in pairs(inventory) do
if slotData and slotData.name == item.name and (not metadata or tablematch(slotData.metadata, metadata)) then
n += 1
response[n] = slotData
end
end
return response
return response
end
exports('GetSlotsWithItem', Inventory.GetSlotsWithItem)
@ -232,16 +256,16 @@ exports('GetSlotsWithItem', Inventory.GetSlotsWithItem)
---@param strict? boolean Strictly match metadata properties, otherwise use partial matching.
---@return number[]?
function Inventory.GetSlotIdsWithItem(itemName, metadata, strict)
local items = Inventory.GetSlotsWithItem(itemName, metadata, strict)
local items = Inventory.GetSlotsWithItem(itemName, metadata, strict)
if items then
---@cast items +number[]
for i = 1, #items do
items[i] = items[i].slot
end
if items then
---@cast items +number[]
for i = 1, #items do
items[i] = items[i].slot
end
return items
end
return items
end
end
---@param itemName string
@ -249,61 +273,63 @@ end
---@param strict? boolean Strictly match metadata properties, otherwise use partial matching.
---@return number
function Inventory.GetItemCount(itemName, metadata, strict)
local inventory = PlayerData.inventory
local item = Items(itemName) --[[@as OxClientItem?]]
local inventory = PlayerData.inventory
local item = Items(itemName) --[[@as OxClientItem?]]
if not inventory or not item then return 0 end
if not inventory or not item then return 0 end
if not metadata then
return item.count
end
if not metadata then
return item.count
end
metadata = assertMetadata(metadata)
local count = 0
local tablematch = strict and table.matches or table.contains
metadata = assertMetadata(metadata)
local count = 0
local tablematch = strict and table.matches or table.contains
for _, slotData in pairs(inventory) do
if slotData and slotData.name == item.name and (not metadata or tablematch(slotData.metadata, metadata)) then
count += slotData.count
end
end
for _, slotData in pairs(inventory) do
if slotData and slotData.name == item.name and (not metadata or tablematch(slotData.metadata, metadata)) then
count += slotData.count
end
end
return count
return count
end
exports('GetItemCount', Inventory.GetItemCount)
local function openEvidence()
client.openInventory('policeevidence')
client.openInventory('policeevidence')
end
local markerColour = { 30, 30, 150 }
local textPrompts = {
evidence = {
options = { icon = 'fa-box-archive' },
message = ('**%s** \n%s'):format(locale('open_police_evidence'), locale('interact_prompt', GetControlInstructionalButton(0, 38, true):sub(3)))
message = ('**%s** \n%s'):format(locale('open_police_evidence'),
locale('interact_prompt', GetControlInstructionalButton(0, 38, true):sub(3)))
},
stash = {
options = { icon = 'fa-warehouse' },
message = ('**%s** \n%s'):format(locale('open_stash'), locale('interact_prompt', GetControlInstructionalButton(0, 38, true):sub(3)))
message = ('**%s** \n%s'):format(locale('open_stash'),
locale('interact_prompt', GetControlInstructionalButton(0, 38, true):sub(3)))
}
}
Inventory.Evidence = setmetatable(lib.load('data.evidence'), {
__call = function(self)
for _, evidence in pairs(self) do
if evidence.point then
evidence.point:remove()
__call = function(self)
for _, evidence in pairs(self) do
if evidence.point then
evidence.point:remove()
elseif evidence.zoneId then
exports.ox_target:removeZone(evidence.zoneId)
evidence.zone = nil
end
if client.hasGroup(shared.police) then
if shared.target then
if evidence.target then
if client.hasGroup(shared.police) then
if shared.target then
if evidence.target then
evidence.zoneId = Utils.CreateBoxZone(evidence.target, {
{
icon = evidence.target.icon or 'fas fa-warehouse',
@ -313,38 +339,38 @@ Inventory.Evidence = setmetatable(lib.load('data.evidence'), {
iconColor = evidence.target.iconColor,
}
})
end
else
evidence.target = nil
evidence.point = lib.points.new({
coords = evidence.coords,
distance = 16,
inv = 'policeevidence',
marker = markerColour,
end
else
evidence.target = nil
evidence.point = lib.points.new({
coords = evidence.coords,
distance = 16,
inv = 'policeevidence',
marker = markerColour,
prompt = textPrompts.evidence,
nearby = Utils.nearbyMarker
})
end
end
end
end
nearby = Utils.nearbyMarker
})
end
end
end
end
})
Inventory.Stashes = setmetatable(lib.load('data.stashes'), {
__call = function(self)
for id, stash in pairs(self) do
if stash.jobs then stash.groups = stash.jobs end
__call = function(self)
for id, stash in pairs(self) do
if stash.jobs then stash.groups = stash.jobs end
if stash.point then
stash.point:remove()
if stash.point then
stash.point:remove()
elseif stash.zoneId then
exports.ox_target:removeZone(stash.zoneId)
stash.zoneId = nil
end
if not stash.groups or client.hasGroup(stash.groups) then
if shared.target then
if stash.target then
if not stash.groups or client.hasGroup(stash.groups) then
if shared.target then
if stash.target then
stash.zoneId = Utils.CreateBoxZone(stash.target, {
{
icon = stash.target.icon or 'fas fa-warehouse',
@ -356,22 +382,22 @@ Inventory.Stashes = setmetatable(lib.load('data.stashes'), {
iconColor = stash.target.iconColor,
},
})
end
else
stash.target = nil
stash.point = lib.points.new({
coords = stash.coords,
distance = 16,
inv = 'stash',
invId = stash.name,
marker = markerColour,
end
else
stash.target = nil
stash.point = lib.points.new({
coords = stash.coords,
distance = 16,
inv = 'stash',
invId = stash.name,
marker = markerColour,
prompt = textPrompts.stash,
nearby = Utils.nearbyMarker
})
end
end
end
end
nearby = Utils.nearbyMarker
})
end
end
end
end
})
RegisterNetEvent('ox_inventory:refreshMaxWeight', function(data)
@ -379,27 +405,27 @@ RegisterNetEvent('ox_inventory:refreshMaxWeight', function(data)
PlayerData.maxWeight = data.maxWeight
end
SendNUIMessage({
action = 'refreshSlots',
data = {
weightData = {
inventoryId = data.inventoryId,
maxWeight = data.maxWeight
}
}
})
SendNUIMessage({
action = 'refreshSlots',
data = {
weightData = {
inventoryId = data.inventoryId,
maxWeight = data.maxWeight
}
}
})
end)
RegisterNetEvent('ox_inventory:refreshSlotCount', function(data)
SendNUIMessage({
action = 'refreshSlots',
data = {
slotsData = {
inventoryId = data.inventoryId,
slots = data.slots
}
}
})
SendNUIMessage({
action = 'refreshSlots',
data = {
slotsData = {
inventoryId = data.inventoryId,
slots = data.slots
}
}
})
end)
return Inventory

View File

@ -78,7 +78,7 @@ end
local Vehicles = lib.load('data.vehicles')
local RegisteredStashes = {}
for _, stash in pairs(lib.load('data.stashes')) do
for _, stash in pairs(lib.load('data.stashes') or {}) do
RegisteredStashes[stash.name] = {
name = stash.name,
label = stash.label,
@ -86,7 +86,8 @@ for _, stash in pairs(lib.load('data.stashes')) do
slots = stash.slots,
maxWeight = stash.weight,
groups = stash.groups or stash.jobs,
coords = shared.target and stash.target?.loc or stash.coords
coords = shared.target and stash.target?.loc or stash.coords,
distance = stash.distance or 10
}
end
@ -195,10 +196,8 @@ local function loadInventoryData(data, player, ignoreSecurityChecks)
if not inventory then
inventory = Inventory.Create(stash.name, stash.label or stash.name, 'stash', stash.slots, 0, stash.maxWeight, owner, nil, stash.groups)
if stash.coords then
inventory.coords = stash.coords
end
inventory.coords = stash.coords
inventory.distance = stash.distance
end
end
end
@ -213,6 +212,8 @@ end
setmetatable(Inventory, {
__call = function(self, inv, player, ignoreSecurityChecks)
if Inventory.Lock then return false end
if not inv then
return self
elseif type(inv) == 'table' then
@ -613,30 +614,30 @@ end
function Inventory.Remove(inv)
inv = Inventory(inv) --[[@as OxInventory]]
if inv then
if inv.type == 'drop' then
TriggerClientEvent('ox_inventory:removeDrop', -1, inv.id)
Inventory.Drops[inv.id] = nil
elseif inv.player then
activeIdentifiers[inv.owner] = nil
end
if not inv then return end
for playerId in pairs(inv.openedBy) do
if inv.id ~= playerId then
local target = Inventories[playerId]
if inv.type == 'drop' then
TriggerClientEvent('ox_inventory:removeDrop', -1, inv.id)
Inventory.Drops[inv.id] = nil
elseif inv.player then
activeIdentifiers[inv.owner] = nil
end
if target then
target:closeInventory()
end
for playerId in pairs(inv.openedBy) do
if inv.id ~= playerId then
local target = Inventories[playerId]
if target then
target:closeInventory()
end
end
end
if not inv.datastore and inv.changed then
Inventory.Save(inv)
end
if not inv.datastore and inv.changed then
Inventory.Save(inv)
end
Inventories[inv.id] = nil
end
Inventories[inv.id] = nil
end
exports('RemoveInventory', Inventory.Remove)
@ -1511,7 +1512,7 @@ AddEventHandler('ox_inventory:customDrop', CustomDrop)
exports('CustomDrop', CustomDrop)
exports('CreateDropFromPlayer', function(playerId)
local playerInventory = Inventories[playerId]
local playerInventory = Inventory(playerId)
if not playerInventory or not next(playerInventory.items) then return end
@ -1964,7 +1965,7 @@ lib.callback.register('ox_inventory:swapItems', function(source, data)
end)
function Inventory.Confiscate(source)
local inv = Inventories[source]
local inv = Inventory(source)
if inv?.player then
db.saveStash(inv.owner, inv.owner, json.encode(minimal(inv)))
@ -1980,7 +1981,7 @@ end
exports('ConfiscateInventory', Inventory.Confiscate)
function Inventory.Return(source)
local inv = Inventories[source]
local inv = Inventory(source)
if not inv?.player then return end
@ -2409,8 +2410,8 @@ RegisterServerEvent('ox_inventory:closeInventory', function()
end)
local function giveItem(playerId, slot, target, count)
local fromInventory = Inventories[playerId]
local toInventory = Inventories[target]
local fromInventory = Inventory(playerId)
local toInventory = Inventory(target)
if count <= 0 then count = 1 end
@ -2477,7 +2478,7 @@ lib.callback.register('ox_inventory:giveItem', giveItem)
RegisterServerEvent('ox_inventory:giveItem', function(...) giveItem(source, ...) end)
local function updateWeapon(source, action, value, slot, specialAmmo)
local inventory = Inventories[source]
local inventory = Inventory(source)
if not inventory then return end

View File

@ -51,6 +51,8 @@ local Inventory
CreateThread(function()
Inventory = require 'modules.inventory.server'
if not lib then return end
if shared.framework == 'esx' then
local success, items = pcall(MySQL.query.await, 'SELECT * FROM items')
@ -332,6 +334,8 @@ function Items.UpdateDurability(inv, slot, item, value, ostime)
}, true)
end
---@deprecated
---Use the 'ox_inventory:usedItem' event or the 'usingItem' or 'buyItem' hooks
local function Item(name, cb)
local item = ItemList[name]

View File

@ -73,7 +73,7 @@ local function newItem(data)
ItemList[data.name] = data
end
for type, data in pairs(lib.load('data.weapons')) do
for type, data in pairs(lib.load('data.weapons') or {}) do
for k, v in pairs(data) do
v.name = k
v.close = type == 'Ammo' and true or false
@ -106,7 +106,7 @@ for type, data in pairs(lib.load('data.weapons')) do
end
end
for k, v in pairs(lib.load('data.items')) do
for k, v in pairs(lib.load('data.items') or {}) do
v.name = k
local success, response = pcall(newItem, v)

View File

@ -268,7 +268,7 @@ function db.saveInventories(players, trunks, gloveboxes, stashes, total)
end
end
shared.info(saveStr:format('stashes', affectedRows, total[4], (os.nanotime() - start) / 1e6))
shared.info(saveStr:format(affectedRows, total[4], 'stashes', (os.nanotime() - start) / 1e6))
end
end)
end

View File

@ -4,7 +4,7 @@ local shopTypes = {}
local shops = {}
local createBlip = require 'modules.utils.client'.CreateBlip
for shopType, shopData in pairs(lib.load('data.shops') --[[@as table<string, OxShop>]]) do
for shopType, shopData in pairs(lib.load('data.shops') or {} --[[@as table<string, OxShop>]]) do
local shop = {
name = shopData.name,
groups = shopData.groups or shopData.jobs,

View File

@ -91,7 +91,6 @@ local function createShop(shopType, id)
coords = store
end
---@type OxShop
shop[id] = {
label = shop.name,
id = shopType..' '..id,
@ -108,7 +107,7 @@ local function createShop(shopType, id)
return shop[id]
end
for shopType, shopDetails in pairs(lib.load('data.shops')) do
for shopType, shopDetails in pairs(lib.load('data.shops') or {}) do
registerShopType(shopType, shopDetails)
end

View File

@ -1,5 +1,10 @@
if not lib then return end
require 'modules.bridge.server'
require 'modules.crafting.server'
require 'modules.shops.server'
require 'modules.pefcl.server'
if GetConvar('inventory:versioncheck', 'true') == 'true' then
lib.versionCheck('overextended/ox_inventory')
end
@ -9,11 +14,6 @@ local db = require 'modules.mysql.server'
local Items = require 'modules.items.server'
local Inventory = require 'modules.inventory.server'
require 'modules.crafting.server'
require 'modules.shops.server'
require 'modules.pefcl.server'
require 'modules.bridge.server'
---@param player table
---@param data table?
--- player requires source, identifier, and name
@ -67,14 +67,34 @@ end
exports('setPlayerInventory', server.setPlayerInventory)
AddEventHandler('ox_inventory:setPlayerInventory', server.setPlayerInventory)
---@param playerPed number
---@param coordinates vector3|vector3[]
---@param distance? number
---@return vector3|false
local function getClosestStashCoords(playerPed, coordinates, distance)
local playerCoords = GetEntityCoords(playerPed)
local registeredDumpsters = {}
if not distance then distance = 10 end
---@param coords vector3
---@return string?
local function getDumpsterFromCoords(coords)
local found
for i = 1, #registeredDumpsters do
local distance = #(coords - registeredDumpsters[i])
if distance < 0.1 then
found = i
break
end
end
return found
end
---@param playerPed number
---@param stash OxInventory
---@return vector3?
local function getClosestStashCoords(playerPed, stash)
local playerCoords = GetEntityCoords(playerPed)
local distance = stash.distance or 10
local coordinates = stash.coords
if not coordinates then return end
if type(coordinates) == 'table' then
for i = 1, #coordinates do
@ -85,10 +105,10 @@ local function getClosestStashCoords(playerPed, coordinates, distance)
end
end
return false
return
end
return #(coordinates - playerCoords) < distance and coordinates
return #(coordinates - playerCoords) < distance and coordinates or nil
end
---@param source number
@ -99,9 +119,11 @@ end
local function openInventory(source, invType, data, ignoreSecurityChecks)
if Inventory.Lock then return false end
local left = Inventory(source) --[[@as OxInventory]]
local left = Inventory(source)
local right, closestCoords
if not left then return end
left:closeInventory(true)
Inventory.CloseAll(left, source)
@ -109,6 +131,8 @@ local function openInventory(source, invType, data, ignoreSecurityChecks)
data = nil
end
local playerPed = left.player.ped
if data then
local isDataTable = type(data) == 'table'
@ -117,9 +141,22 @@ local function openInventory(source, invType, data, ignoreSecurityChecks)
if right == false then return false end
elseif isDataTable then
if data.netid then
local entity = NetworkGetEntityFromNetworkId(data.netid)
if not entity then return end
if not ignoreSecurityChecks then
if #(GetEntityCoords(playerPed) - GetEntityCoords(entity)) > 16 then return end
end
if invType == 'glovebox' then
if not ignoreSecurityChecks and GetVehiclePedIsIn(playerPed, false) ~= entity then
return
end
end
if invType == 'trunk' then
local entity = NetworkGetEntityFromNetworkId(data.netid)
local lockStatus = entity > 0 and GetVehicleDoorLockStatus(entity)
local lockStatus = ignoreSecurityChecks and 0 or GetVehicleDoorLockStatus(entity)
-- 0: no lock; 1: unlocked; 8: boot unlocked
if lockStatus > 1 and lockStatus ~= 8 then
@ -127,8 +164,27 @@ local function openInventory(source, invType, data, ignoreSecurityChecks)
end
end
local plate = (invType == 'glovebox' or invType == 'trunk') and GetVehicleNumberPlateText(entity)
if plate then
if server.trimplate then plate = string.strtrim(plate) end
if not data.id then
data.id = (invType == 'glovebox' and 'glove' or 'trunk') .. plate
end
end
data.type = invType
right = Inventory(data)
if right and data.netid ~= right.netid then
local invEntity = NetworkGetEntityFromNetworkId(right.netid)
if not (invEntity > 0 and DoesEntityExist(invEntity)) or (plate and not string.match(GetVehicleNumberPlateText(invEntity) or '', plate)) then
Inventory.Remove(right)
right = Inventory(data)
end
end
elseif invType == 'drop' then
right = Inventory(data.id)
else
@ -139,16 +195,25 @@ local function openInventory(source, invType, data, ignoreSecurityChecks)
right = Inventory(('evidence-%s'):format(data))
end
elseif invType == 'dumpster' then
---@cast data string
right = Inventory(data)
if shared.networkdumpsters then
local dumpsterId = getDumpsterFromCoords(data)
right = dumpsterId and Inventory(('dumpster-%s'):format(dumpsterId))
if not right then
local netid = tonumber(data:sub(9))
if not right then
dumpsterId = #registeredDumpsters + 1
right = Inventory.Create(('dumpster-%s'):format(dumpsterId), locale('dumpster'), invType, 15, 0, 100000, false)
registeredDumpsters[dumpsterId] = data
end
else
---@cast data string
right = Inventory(data)
-- dumpsters do not work with entity lockdown. need to rewrite, but having to do
-- distance checks to some ~7000 dumpsters and freeze the entities isn't ideal
if netid and NetworkGetEntityFromNetworkId(netid) > 0 then
right = Inventory.Create(data, locale('dumpster'), invType, 15, 0, 100000, false)
if not right then
local netid = tonumber(data:sub(9))
if netid and NetworkGetEntityFromNetworkId(netid) > 0 then
right = Inventory.Create(data, locale('dumpster'), invType, 15, 0, 100000, false)
end
end
end
elseif invType == 'container' then
@ -188,7 +253,7 @@ local function openInventory(source, invType, data, ignoreSecurityChecks)
end
if not ignoreSecurityChecks and right.coords then
closestCoords = getClosestStashCoords(left.player.ped, right.coords)
closestCoords = getClosestStashCoords(playerPed, right)
if not closestCoords then return end
end
@ -379,6 +444,13 @@ lib.callback.register('ox_inventory:useItem', function(source, itemName, slot, m
data.consume = consume
if not TriggerEventHooks('usingItem', {
source = source,
inventoryId = inventory and inventory.id,
item = inventory.items[slot],
consume = consume
}) then return false end
---@type boolean
local success = lib.callback.await('ox_inventory:usingItem', source, data, noAnim)

View File

@ -1,17 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet" />
<title>Ox Inventory</title>
<script type="module" crossorigin src="./assets/index-3b687188.js"></script>
<link rel="stylesheet" href="./assets/index-9aba2ab3.css">
</head>
<body>
<div id="root"></div>
</body>
</html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -7,10 +7,11 @@
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap" rel="stylesheet" />
<title>Ox Inventory</title>
<script type="module" crossorigin src="./assets/index-CNvxOJhz.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-tpuOFZRc.css">
<script type="module" crossorigin src="./assets/index-3b687188.js"></script>
<link rel="stylesheet" href="./assets/index-9aba2ab3.css">
</head>
<body>
<div id="root"></div>
</body>
</html>

View File

@ -1,2 +0,0 @@
# Auto detect text files and perform LF normalization
* text=auto

View File

@ -0,0 +1,45 @@
![afterlifehud|690x388](https://forum-cfx-re.akamaized.net/optimized/5X/1/0/e/1/10e139dfdca32d7b7168d183b61d977ef0b064fb_2_690x388.jpeg)
# Afterlife Hud
this hud was mainly inspired by watch dogs style ui and some other games too, its a simple yet a complex hud resource and i am planning on to improving it to alot further so any **Pull Request** will be really apreciated
![framework supported|690x276](https://forum-cfx-re.akamaized.net/optimized/5X/f/8/4/c/f84cae152f9b989a2c5ffe40f01e876db5e3c884_2_690x276.png)
# Features:
> **REACT & MANTINE**
> The hud is written with react and using mantine emotion for styling to ensure the best performance of the resource
> **UNIQUE MINIMAP**
> Unique rectangular minimap style with borders that can be off and location direction ui incorporated into minimap
> **SPEEDOMETER**
> simple yet a good looking speedometer on the side of minimap with seatbelt system
> **PLAYER STATUS**
> A simple icon based player status ui on the right side of the screen
> **SETTINGS**
> Settings menu to customize the hud to your liking and the options are limited now but will be expanded in the future
>
> ![](https://forum-cfx-re.akamaized.net/original/5X/3/7/7/1/3771f5de987fd76b58678443c5d45cb2497b92aa.jpeg)
[Preview](https://youtu.be/nHTXMXuKbVg)
[Download](https://github.com/AfterLifeStudio/Afterlife-Hud)
Need Support
[Discord](https://discord.gg/fG8gtywEZ5)
| | |
|-------------------------------------|----------------------------|
| Code is accessible | Yes |
| Subscription-based | No |
| Lines (approximately) | 2000 |
| Requirements | oxlib & frameworkl |
| Support | Yes |
## Copyright
Copyright © 2024 AfterLifeStudio <https://github.com/AfterLifeStudio>

View File

@ -1,13 +1,13 @@
if not (Framework == 'standalone') then return end
PlayerLoaded = false
AddEventHandler('onResourceStart', function(resourceName)
Wait(1000)
if resourceName ~= GetCurrentResourceName() then return end
local response = LoadHud()
if response then
DisplayHud(GlobalSettings.showhud)
PlayerLoaded = true
end
end)
if not (Framework == 'standalone') then return end
PlayerLoaded = false
AddEventHandler('onResourceStart', function(resourceName)
Wait(1000)
if resourceName ~= GetCurrentResourceName() then return end
local response = LoadHud()
if response then
DisplayHud(GlobalSettings.showhud)
PlayerLoaded = true
end
end)

View File

@ -1,9 +1,11 @@
fx_version 'cerulean'
game 'gta5'
lua54 'yes'
name 'UI-hud'
author 'androxa & marcymeer'
name 'Afterlife_hud'
author 'AfterLifeStudio'
version 'BETA'
repository 'https://github.com/AfterLifeStudio/Afterlife-Hud'
description 'Simple yet a complex hud resource'
dependencies {
'ox_lib',
@ -15,7 +17,8 @@ client_scripts {
'util/client.lua',
'data/*.lua',
'framework/*.lua',
'modules/*.lua'
'modules/*.lua',
'@qbx_core/modules/playerdata.lua'
}
shared_script '@ox_lib/init.lua'

View File

@ -1,47 +1,47 @@
---@return string
local GetPlayerDirection = function (dgr)
if (dgr >= 0.0 and dgr < 22.5) or dgr >= 337.5 then
return 'N'
elseif dgr >= 22.5 and dgr < 67.5 then
return 'NE'
elseif dgr >= 67.5 and dgr < 112.5 then
return 'E'
elseif dgr >= 112.5 and dgr < 157.5 then
return 'SE'
elseif dgr >= 157.5 and dgr < 202.5 then
return 'S'
elseif dgr >= 202.5 and dgr < 247.5 then
return 'SW'
elseif dgr >= 247.5 and dgr < 292.5 then
return 'W'
elseif dgr >= 292.5 and dgr < 337.5 then
return 'NW'
end
end
CreateThread(function()
while true do
local ped = cache.ped
local coords = GetEntityCoords(ped)
local street1,street2 = GetStreetNameAtCoord(coords.x,coords.y,coords.z)
local streetname = GetStreetNameFromHashKey(street2)
if street2 == 0 then
streetname = GetStreetNameFromHashKey(street1)
end
local dgr = GetGameplayCamRot(0).z + 180
local direction = GetPlayerDirection(dgr)
NuiMessage('compass',{
show = GlobalSettings.showminimap,
circlemap = GlobalSettings.circlemap,
streetname = streetname,
direction = direction,
heading = dgr,
width = NuiRes.width,
height = NuiRes.height
})
Wait(50)
end
---@return string
local GetPlayerDirection = function (dgr)
if (dgr >= 0.0 and dgr < 22.5) or dgr >= 337.5 then
return 'N'
elseif dgr >= 22.5 and dgr < 67.5 then
return 'NE'
elseif dgr >= 67.5 and dgr < 112.5 then
return 'E'
elseif dgr >= 112.5 and dgr < 157.5 then
return 'SE'
elseif dgr >= 157.5 and dgr < 202.5 then
return 'S'
elseif dgr >= 202.5 and dgr < 247.5 then
return 'SW'
elseif dgr >= 247.5 and dgr < 292.5 then
return 'W'
elseif dgr >= 292.5 and dgr < 337.5 then
return 'NW'
end
end
CreateThread(function()
while true do
local ped = cache.ped
local coords = GetEntityCoords(ped)
local street1,street2 = GetStreetNameAtCoord(coords.x,coords.y,coords.z)
local streetname = GetStreetNameFromHashKey(street2)
if street2 == 0 then
streetname = GetStreetNameFromHashKey(street1)
end
local dgr = GetGameplayCamRot(0).z + 180
local direction = GetPlayerDirection(dgr)
NuiMessage('compass',{
show = GlobalSettings.showminimap,
circlemap = GlobalSettings.circlemap,
streetname = streetname,
direction = direction,
heading = dgr,
width = NuiRes.width,
height = NuiRes.height
})
Wait(50)
end
end)

View File

@ -1,36 +1,36 @@
local Active = false
local IsPauseMenuActive = IsPauseMenuActive
---@class hidehudcomponents
local hidehudcomponents = {6,7,8,9}
CreateThread(function()
DisplayRadar(false)
for i = 1,#hidehudcomponents do
SetHudComponentSize(hidehudcomponents[i], 0, 0)
end
end)
---@param state boolean;
DisplayHud = function (state)
NuiMessage('visible', state)
DisplayRadar(state)
end
CreateThread(function()
while true do
if GlobalSettings.showhud then
local pausemenuactive = IsPauseMenuActive()
if pausemenuactive and not Active then
NuiMessage('visible', Active)
Active = true
elseif not pausemenuactive and Active then
StreamMinimap()
NuiMessage('visible', Active)
Active = false
end
end
Wait(1000)
end
end)
local Active = false
local IsPauseMenuActive = IsPauseMenuActive
---@class hidehudcomponents
local hidehudcomponents = {6,7,8,9}
CreateThread(function()
DisplayRadar(false)
for i = 1,#hidehudcomponents do
SetHudComponentSize(hidehudcomponents[i], 0, 0)
end
end)
---@param state boolean;
DisplayHud = function (state)
NuiMessage('visible', state)
DisplayRadar(state)
end
CreateThread(function()
while true do
if GlobalSettings.showhud then
local pausemenuactive = IsPauseMenuActive()
if pausemenuactive and not Active then
NuiMessage('visible', Active)
Active = true
elseif not pausemenuactive and Active then
StreamMinimap()
NuiMessage('visible', Active)
Active = false
end
end
Wait(1000)
end
end)

View File

@ -1,85 +1,85 @@
local resolutions = lib.load('data.resolutions')
local GetActualScreenResolution = GetActualScreenResolution
local RequestStreamedTextureDict = RequestStreamedTextureDict
local HasStreamedTextureDictLoaded = HasStreamedTextureDictLoaded
local SetMinimapComponentPosition = SetMinimapComponentPosition
local SetBlipAlpha = SetBlipAlpha
local GetNorthRadarBlip = GetNorthRadarBlip
local SetRadarBigmapEnabled = SetRadarBigmapEnabled
local RequestScaleformMovie = RequestScaleformMovie
local BeginScaleformMovieMethod = BeginScaleformMovieMethod
local EndScaleformMovieMethod = EndScaleformMovieMethod
---@class NuiRes
NuiRes = {
width = 203,
height = 245
}
---@class defaultres
local defaultres = {
sizex = 203,
sizey = 245,
posx = 0.847,
posy = -0.019,
}
---@return table
local function CalculateMinimap()
local screenx, screeny = GetActualScreenResolution()
local res = defaultres
for i = 1, #resolutions do
if resolutions[i].screenx == screenx and resolutions[i].screeny == screeny then
res = resolutions[i]
break;
end
end
return res
end
---@return boolean
StreamMinimap = function()
local dimensions = CalculateMinimap()
local dir = 'L'
local map = GlobalSettings.circlemap and 'circlemap' or 'squaremap'
Wait(1000)
RequestStreamedTextureDict(map, false)
while not HasStreamedTextureDictLoaded(map) do
Wait(100)
end
SetBlipAlpha(GetNorthRadarBlip(), 0)
AddReplaceTexture("platform:/textures/graphics", "radarmasksm", map, "radarmasksm")
SetMinimapClipType(GlobalSettings.circlemap and 1 or 0)
local w, h = 0.111, 0.245
if GlobalSettings.circlemap then
SetMinimapComponentPosition('minimap', dir, 'B', dimensions.posx - 0.003, dimensions.posy, w, h)
SetMinimapComponentPosition('minimap_mask', dir, 'B', dimensions.posx - 0.007, dimensions.posy + 0.03, w, h - 0.05)
SetMinimapComponentPosition('minimap_blur', dir, 'B', dimensions.posx - 0.007, dimensions.posy, w, h)
else
SetMinimapComponentPosition('minimap', dir, 'B', dimensions.posx - 0.03, dimensions.posy, w + 0.06, h + 0.0)
SetMinimapComponentPosition('minimap_mask', dir, 'B', dimensions.posx + 0.008, dimensions.posy, w - 0.0, h + 0.05)
SetMinimapComponentPosition('minimap_blur', dir, 'B', dimensions.posx, dimensions.posy, w, h)
end
SetRadarBigmapEnabled(true, false)
Wait(0)
SetRadarBigmapEnabled(false, false)
NuiRes = {
width = dimensions.sizex + (GlobalSettings.circlemap and 75 or 0),
height = dimensions.sizey
}
return true
end
local resolutions = lib.load('data.resolutions')
local GetActualScreenResolution = GetActualScreenResolution
local RequestStreamedTextureDict = RequestStreamedTextureDict
local HasStreamedTextureDictLoaded = HasStreamedTextureDictLoaded
local SetMinimapComponentPosition = SetMinimapComponentPosition
local SetBlipAlpha = SetBlipAlpha
local GetNorthRadarBlip = GetNorthRadarBlip
local SetRadarBigmapEnabled = SetRadarBigmapEnabled
local RequestScaleformMovie = RequestScaleformMovie
local BeginScaleformMovieMethod = BeginScaleformMovieMethod
local EndScaleformMovieMethod = EndScaleformMovieMethod
---@class NuiRes
NuiRes = {
width = 203,
height = 245
}
---@class defaultres
local defaultres = {
sizex = 203,
sizey = 245,
posx = 0.847,
posy = -0.019,
}
---@return table
local function CalculateMinimap()
local screenx, screeny = GetActualScreenResolution()
local res = defaultres
for i = 1, #resolutions do
if resolutions[i].screenx == screenx and resolutions[i].screeny == screeny then
res = resolutions[i]
break;
end
end
return res
end
---@return boolean
StreamMinimap = function()
local dimensions = CalculateMinimap()
local dir = 'L'
local map = GlobalSettings.circlemap and 'circlemap' or 'squaremap'
Wait(1000)
RequestStreamedTextureDict(map, false)
while not HasStreamedTextureDictLoaded(map) do
Wait(100)
end
SetBlipAlpha(GetNorthRadarBlip(), 0)
AddReplaceTexture("platform:/textures/graphics", "radarmasksm", map, "radarmasksm")
SetMinimapClipType(GlobalSettings.circlemap and 1 or 0)
local w, h = 0.111, 0.245
if GlobalSettings.circlemap then
SetMinimapComponentPosition('minimap', dir, 'B', dimensions.posx - 0.003, dimensions.posy, w, h)
SetMinimapComponentPosition('minimap_mask', dir, 'B', dimensions.posx - 0.007, dimensions.posy + 0.03, w, h - 0.05)
SetMinimapComponentPosition('minimap_blur', dir, 'B', dimensions.posx - 0.007, dimensions.posy, w, h)
else
SetMinimapComponentPosition('minimap', dir, 'B', dimensions.posx - 0.03, dimensions.posy, w + 0.06, h + 0.0)
SetMinimapComponentPosition('minimap_mask', dir, 'B', dimensions.posx + 0.008, dimensions.posy, w - 0.0, h + 0.05)
SetMinimapComponentPosition('minimap_blur', dir, 'B', dimensions.posx, dimensions.posy, w, h)
end
SetRadarBigmapEnabled(true, false)
Wait(0)
SetRadarBigmapEnabled(false, false)
NuiRes = {
width = dimensions.sizex + (GlobalSettings.circlemap and 75 or 0),
height = dimensions.sizey
}
return true
end

View File

@ -1,52 +1,52 @@
---@class Playerstatus
Playerstatus = {
voicemode = 0,
Hunger = 0,
Thirst = 0,
Stress = 100,
}
local GetEntityHealth = GetEntityHealth
local GetPedArmour = GetPedArmour
local IsEntityInWater = IsEntityInWater
local GetPlayerSprintStaminaRemaining = GetPlayerSprintStaminaRemaining
local GetPlayerUnderwaterTimeRemaining = GetPlayerUnderwaterTimeRemaining
CreateThread(function()
while true do
local ped = cache.ped
local playerid = cache.playerId
local health = GetEntityHealth(ped)
local armour = GetPedArmour(ped)
local voice = NetworkIsPlayerTalking(playerid)
local oxygen
if not IsEntityInWater(ped) then
oxygen = 100 - GetPlayerSprintStaminaRemaining(playerid)
end
if IsEntityInWater(ped) then
oxygen = GetPlayerUnderwaterTimeRemaining(playerid) * 10
end
NuiMessage('playerstatus', {
show = GlobalSettings.showplayerstatus,
health = health - 100,
armour = armour,
oxygen = oxygen,
voice = voice,
voicemode = Playerstatus.voicemode,
hunger = Playerstatus.Hunger,
thirst = Playerstatus.Thirst,
})
Wait(1200)
end
end)
---@param mode integer
AddEventHandler('pma-voice:setTalkingMode', function(mode)
Playerstatus.voicemode = mode
end)
---@class Playerstatus
Playerstatus = {
voicemode = 0,
Hunger = 0,
Thirst = 0,
Stress = 100,
}
local GetEntityHealth = GetEntityHealth
local GetPedArmour = GetPedArmour
local IsEntityInWater = IsEntityInWater
local GetPlayerSprintStaminaRemaining = GetPlayerSprintStaminaRemaining
local GetPlayerUnderwaterTimeRemaining = GetPlayerUnderwaterTimeRemaining
CreateThread(function()
while true do
local ped = cache.ped
local playerid = cache.playerId
local health = GetEntityHealth(ped)
local armour = GetPedArmour(ped)
local voice = NetworkIsPlayerTalking(playerid)
local oxygen
if not IsEntityInWater(ped) then
oxygen = 100 - GetPlayerSprintStaminaRemaining(playerid)
end
if IsEntityInWater(ped) then
oxygen = GetPlayerUnderwaterTimeRemaining(playerid) * 10
end
NuiMessage('playerstatus', {
show = GlobalSettings.showplayerstatus,
health = health - 100,
armour = armour,
oxygen = oxygen,
voice = voice,
voicemode = Playerstatus.voicemode,
hunger = Playerstatus.Hunger,
thirst = Playerstatus.Thirst,
})
Wait(1200)
end
end)
---@param mode integer
AddEventHandler('pma-voice:setTalkingMode', function(mode)
Playerstatus.voicemode = mode
end)

View File

@ -1,77 +1,77 @@
local GetResourceKvpString = GetResourceKvpString
local SetResourceKvp = SetResourceKvp
local PlaySoundFromEntity = PlaySoundFromEntity
---@class GlobalSettings
GlobalSettings = {}
---@class Settings
local Settings = {
showhud = true,
cinemtic = false,
circlemap = false,
showspeedometer = true,
showplayerstatus = true,
showminimap = true,
speedunitmph = true,
squaremap = false,
}
---@return boolean
LoadHud = function ()
::Repeat::
local data = GetResourceKvpString('Hud:Data')
if data then
GlobalSettings = json.decode(data)
else
SetResourceKvp('Hud:Data', json.encode(Settings))
goto Repeat
end
local response = StreamMinimap()
return response
end
---@param data table
RegisterNUICallback('settings', function (data, cb)
local value = data.input
GlobalSettings[data.option] = value
SetResourceKvp('Hud:Data', json.encode(GlobalSettings))
if data.option == 'showhud' then
DisplayHud(GlobalSettings[data.option])
elseif data.option == 'circlemap' then
StreamMinimap()
elseif data.option == 'cinemtic' then
--Todo
end
PlaySoundFromEntity(-1, "BACK", cache.ped, "HUD_FRONTEND_DEFAULT_SOUNDSET", 0, 0)
cb{{}}
end)
RegisterNUICallback('exitsettings', function (data, cb)
SetNuiFocus(false, false)
PlaySoundFromEntity(-1, "BACK", cache.ped, "HUD_FRONTEND_DEFAULT_SOUNDSET", 0, 0)
cb{{}}
end)
lib.addKeybind({
name = 'hud:settings',
description = 'Toggle Hud Settings',
defaultKey = 'i',
onPressed = function(self)
PlaySoundFromEntity(-1, "BACK", cache.ped, "HUD_FRONTEND_DEFAULT_SOUNDSET", 0, 0)
NuiMessage('settings',GlobalSettings)
SetNuiFocus(true, true)
end,
})
local GetResourceKvpString = GetResourceKvpString
local SetResourceKvp = SetResourceKvp
local PlaySoundFromEntity = PlaySoundFromEntity
---@class GlobalSettings
GlobalSettings = {}
---@class Settings
local Settings = {
showhud = true,
cinemtic = false,
circlemap = false,
showspeedometer = true,
showplayerstatus = true,
showminimap = true,
speedunitmph = true,
squaremap = false,
}
---@return boolean
LoadHud = function ()
::Repeat::
local data = GetResourceKvpString('Hud:Data')
if data then
GlobalSettings = json.decode(data)
else
SetResourceKvp('Hud:Data', json.encode(Settings))
goto Repeat
end
local response = StreamMinimap()
return response
end
---@param data table
RegisterNUICallback('settings', function (data, cb)
local value = data.input
GlobalSettings[data.option] = value
SetResourceKvp('Hud:Data', json.encode(GlobalSettings))
if data.option == 'showhud' then
DisplayHud(GlobalSettings[data.option])
elseif data.option == 'circlemap' then
StreamMinimap()
elseif data.option == 'cinemtic' then
--Todo
end
PlaySoundFromEntity(-1, "BACK", cache.ped, "HUD_FRONTEND_DEFAULT_SOUNDSET", 0, 0)
cb{{}}
end)
RegisterNUICallback('exitsettings', function (data, cb)
SetNuiFocus(false, false)
PlaySoundFromEntity(-1, "BACK", cache.ped, "HUD_FRONTEND_DEFAULT_SOUNDSET", 0, 0)
cb{{}}
end)
lib.addKeybind({
name = 'hud:settings',
description = 'Toggle Hud Settings',
defaultKey = 'i',
onPressed = function(self)
PlaySoundFromEntity(-1, "BACK", cache.ped, "HUD_FRONTEND_DEFAULT_SOUNDSET", 0, 0)
NuiMessage('settings',GlobalSettings)
SetNuiFocus(true, true)
end,
})

View File

@ -1,73 +1,73 @@
local vehicle,seatbelt = false,false
local GetEntitySpeed = GetEntitySpeed
local GetVehicleFuelLevel = GetVehicleFuelLevel
local GetVehicleClass = GetVehicleClass
local SetFlyThroughWindscreenParams = SetFlyThroughWindscreenParams
CreateThread(function()
while true do
local sleep = 1000
local incar = vehicle and true or false
local showspeedometer = GlobalSettings.showspeedometer == true and incar or false
if incar then
sleep = 50
local speed = math.ceil(GetEntitySpeed(vehicle) * (GlobalSettings.speedunitmph and 2.2 or 3.6))
local fuel = math.ceil(GetVehicleFuelLevel(vehicle))
local data = {
show = showspeedometer,
speed = speed,
fuel = fuel,
seatbelt = not seatbelt,
unit = GlobalSettings.speedunitmph
}
NuiMessage('speedometer', data)
else
NuiMessage('speedometer', {show = showspeedometer})
end
Wait(sleep)
end
end)
---@return boolean
local VehicleTypeCheck = function()
local class = GetVehicleClass(vehicle)
if class == (8 and 13 and 14) then
return false
end
return true
end
local ToggleSeatbelt = function()
if vehicle then
if VehicleTypeCheck(vehicle) then
seatbelt = not seatbelt
if seatbelt then
SetFlyThroughWindscreenParams(1000.0, 1000.0, 0.0, 0.0)
else
SetFlyThroughWindscreenParams(15.0, 20.0, 17.0, -500.0)
end
end
end
end
lib.addKeybind({
name = 'seatbelt',
description = 'Toggle vehicle seatbelt',
defaultKey = 'b',
onPressed = function(self)
ToggleSeatbelt()
end,
})
lib.onCache('vehicle', function(vehicledata)
vehicle = vehicledata
end)
local vehicle,seatbelt = false,false
local GetEntitySpeed = GetEntitySpeed
local GetVehicleFuelLevel = GetVehicleFuelLevel
local GetVehicleClass = GetVehicleClass
local SetFlyThroughWindscreenParams = SetFlyThroughWindscreenParams
CreateThread(function()
while true do
local sleep = 1000
local incar = vehicle and true or false
local showspeedometer = GlobalSettings.showspeedometer == true and incar or false
if incar then
sleep = 50
local speed = math.ceil(GetEntitySpeed(vehicle) * (GlobalSettings.speedunitmph and 2.2 or 3.6))
local fuel = math.ceil(GetVehicleFuelLevel(vehicle))
local data = {
show = showspeedometer,
speed = speed,
fuel = fuel,
seatbelt = not seatbelt,
unit = GlobalSettings.speedunitmph
}
NuiMessage('speedometer', data)
else
NuiMessage('speedometer', {show = showspeedometer})
end
Wait(sleep)
end
end)
---@return boolean
local VehicleTypeCheck = function()
local class = GetVehicleClass(vehicle)
if class == (8 and 13 and 14) then
return false
end
return true
end
local ToggleSeatbelt = function()
if vehicle then
if VehicleTypeCheck(vehicle) then
seatbelt = not seatbelt
if seatbelt then
SetFlyThroughWindscreenParams(1000.0, 1000.0, 0.0, 0.0)
else
SetFlyThroughWindscreenParams(15.0, 20.0, 17.0, -500.0)
end
end
end
end
lib.addKeybind({
name = 'seatbelt',
description = 'Toggle vehicle seatbelt',
defaultKey = 'b',
onPressed = function(self)
ToggleSeatbelt()
end,
})
lib.onCache('vehicle', function(vehicledata)
vehicle = vehicledata
end)

View File

@ -1,7 +1,7 @@
---@return string
local GetFramework = function()
if GetResourceState('ui_core') ~= 'missing' then
if GetResourceState('es_extended') ~= 'missing' then
return 'esx'
elseif GetResourceState('qbx_core') ~= 'missing' then
return 'qbx'

View File

@ -0,0 +1,14 @@
RegisterNUICallback('remove', function(data, cb)
--ShutdownLoadingScreenNui()
end)
RegisterNetEvent("origen_titlemenu:client:OnPlayerJoined", function()
-- SendNUIMessage({
-- action = "terminar"
-- })
Citizen.Wait(1100)
ShutdownLoadingScreen()
ShutdownLoadingScreenNui()
end)

View File

@ -0,0 +1,309 @@
:root {
--color-primary: #000000;
--color-secondary: #000000;
--anim-cubic: cubic-bezier(0, 0.605, 0.145, 1.005);
}
body {
background-image: url('../img/fondo.png');
width: 100%;
height: 100%;
margin: 0;
background-size: cover;
background-repeat: no-repeat;
background-color: black;
background-position: center;
}
.ilustracion {
position: fixed;
width: 100%;
height: 100%;
background-image: urL('../img/coches.png');
background-size: cover;
background-position: center;
transform: translateX(-10vh);
opacity: 0;
transition: var(--anim-cubic) 1s all;
}
.loading.show .ilustracion {
transform: translateX(0vh);
opacity: 1;
}
.loading {
position: fixed;
width: 100%;
height: 100%;
}
.bgtrueblack {
background-color: rgb(0, 0, 0);
position: fixed;
right: 0;
bottom: 0;
width: 100%;
height: 100%;
opacity: 0;
z-index: 99999;
transition: 4s ease-in-out all;
}
.bgtrueblack.show {
opacity: 1;
transition: 2s ease-in-out all;
}
.container {
width: 475px;
height: 100px;
margin: 0 auto;
margin-top: 20%;
opacity: 0;
animation: entrada 1s ease-in-out forwards;
text-align: center;
}
.progress {
/* border: 2px solid #ffffff; */
position: fixed;
bottom: -3vh;
width: 100%;
background-color: rgba(0, 0, 0, 0.308);
height: 2.5vh;
border: 0.1vh solid rgba(0, 0, 0, 0.137);
border-radius: 5px;
}
.sombra {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
background-image: url('../img/sombra.png');
opacity: 0.5;
}
.bottom {
left: 7%;
width: 86%;
position: absolute;
bottom: 8.5vh;
transform: translateY(10vh);
opacity: 0;
transition: var(--anim-cubic) 2s all;
transition-delay: 0.5s;
}
.loading.show .bottom {
transform: translateY(0vh);
opacity: 1;
}
.flex-bottom {
display: flex;
color: white;
justify-content: space-between;
align-items: center;
}
.bienvenido {
font-family: 'Bebas Neue';
font-size: 4.5vh;
text-shadow: 0 0 20px rgba(255, 255, 255, 0.342);
z-index: 9999;
}
.accediendo {
font-family: Quicksand;
font-size: 2.5vh;
text-shadow: 0 0 20px black, 0 0 20px black, 0 0 20px black;
font-weight: 500;
}
.barra {
width: 0%;
height: 100%;
/* background-image: url(https://i.imgur.com/upZzDJv.gif); */
/* animation: cargando 15s linear forwards; */
/* border-radius: 5px; */
/* filter: opacity(0.5);*/
background: linear-gradient(-45deg, var(--color-primary), #000000);
background-size: 400% 400%;
/* animation: gradient 5s ease infinite; */
box-shadow: 0 0 20px #0000009a;
/* animation: gradient 5s ease infinite; */
border-radius: 5px 0 0 5px;
transition: 0.25s linear all;
}
/* .videobg{
margin-left:17px;
animation: shake 10s ease-in-out infinite;
} */
.logo {
/* transition:ease-in-out 0.3s all;
width: 14vw;
margin-bottom:2vw;
opacity: 100;
animation: scale 10s ease-in-out infinite; */
position: fixed;
top: 2vh;
right: 2vh;
width: 10vh;
display: none;
}
.loading.show .logo {
display: block;
}
.logo img {
width: 100%;
}
.web {
font-family: 'Quicksand';
font-size: 1vw;
margin: 0 auto;
position: absolute;
bottom: 0.5vw;
color: white;
width: 100%;
left: 0;
opacity: 0.7;
}
.web p {
margin: 0 !important;
}
/*
@keyframes cargando{
0%{
width:0%;
}
100%{
width:100%;
}
}
*/
@media (width: 2560px) and (height: 1080px) {
.container {
margin-top: 11% !important;
}
}
@keyframes entrada {
0% {
opacity: 0;
}
100% {
opacity: 100;
}
}
@keyframes shake {
0% {
transform: translateY(0px) rotate(0deg);
}
25% {
transform: translateY(-10px);
}
50% {
transform: translateY(0px) rotate(-1.5deg);
}
75% {
transform: translateY(-10px) rotate(1deg);
}
100% {
transform: translateY(0px) rotate(0deg);
}
}
/*
@keyframes gradient {
0%{background-position:0% 50%}
50%{background-position:100% 50%}
100%{background-position:0% 50%}
} */
@keyframes scale {
0% {
transform: scale(1);
}
50% {
transform: scale(1.1);
}
100% {
transform: scale(1);
}
}
@keyframes fadein {
0% {
opacity: 0;
}
100% {
opacity: 32%;
}
}
@keyframes fadeout {
0% {
opacity: 100%;
}
100% {
opacity: 0;
}
}
@keyframes gradient {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
.dot-1 {
animation: fadeInDot 2s ease-in-out infinite;
animation-delay: 0.2s !important;
display: inline-block;
}
.dot-2 {
animation-delay: 0.4s !important;
animation: fadeInDot 2s ease-in-out infinite;
display: inline-block;
margin-left: -0.1vh;
}
.dot-3 {
animation-delay: 0.6s !important;
animation: fadeInDot 2s ease-in-out infinite;
display: inline-block;
margin-left: -0.1vh;
}
@keyframes fadeInDot {
0% {
opacity: 0;
}
30% {
opacity: 1;
}
}

View File

@ -0,0 +1,26 @@
fx_version 'adamant'
game 'gta5'
loadscreen_manual_shutdown "yes"
description 'Origen LoadingScreen System'
version '1.0.1'
loadscreen 'index.html'
files {
'index.html',
'css/style.css',
'img/*.png',
'img/*.jpg',
'img/*.svg',
'img/*.webp',
'js/app.js',
'js/jquery.min.js',
'js/jquery.easings.min.js'
}
client_script "client.lua"

View File

@ -0,0 +1,8 @@
<html>
<head>
<title>Origen Pantalla de Carga</title>
<link rel="stylesheet" href="css/style.css" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500

View File

@ -0,0 +1,73 @@
$(document).ready(function() {
setTimeout(()=>{
$(".loading").addClass("show");
}, 3000);
$(".bgtrueblack").removeClass("show");
var musica = document.getElementById("musica");
musica.volume = 0.5;
musica.play();
/* setTimeout(function(){
$(musica).animate({volume: 0}, 1000);
$(".videobg").fadeOut(1000);
$(".progress").fadeOut(1000);
},16000);
*/
// PROGRESS
let loadPercentage = 0;
const handlers = {
loadProgress(data) {
loadPercentage = data.loadFraction * 100
}
};
window.addEventListener('message', (e) => (handlers[e.data.eventName] || (() => {}))(e.data));
setInterval(() => {
//$(".bar").width(loadPercentage "%")
if (loadPercentage == 100) {
setTimeout(function() {
$(".loading").removeClass("show");
}, 1000);
setTimeout(function() {
$(".bgtrueblack").addClass("show");
$(musica).animate({ volume: 0 }, 1500);
}, 2000);
}
$(".barra").css( "width", loadPercentage "%");
// $(".bgblack").animate({opacity: 80}, 6000);
// $(".logo").css("opacity",loadPercentage "%");
}, 250);
window.addEventListener('message', function(event) {
if (event.action == "terminar") {
$(musica).animate({ volume: 0 }, 1000);
$(".videobg").fadeOut(1000);
$(".progress").fadeOut(1000);
}
});
});
function parallaxIt(e, target, movement) {
var $this = $("body");
var relX = e.pageX - $this.offset().left;
var relY = e.pageY - $this.offset().top;
TweenMax.to(target, 1, {
x: (relX - $this.width() / 2) / $this.width() * movement,
y: (relY - $this.height() / 2) / $this.height() * movement
})
}

View File

@ -0,0 +1,6 @@
/*! jQuery UI - v1.9.2 - 2014-03-21
* http://jqueryui.com
* Includes: jquery.ui.effect.js
* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */
jQuery.effects||function(e,t){var i=e.uiBackCompat!==!1,a="ui-effects-";e.effects={effect:{}},function(t,i){function a(e,t,i){var a=c[t.type]||{};return null==e?i||!t.def?null:t.def:(e=a.floor?~~e:parseFloat(e),isNaN(e)?t.def:a.mod?(e a.mod)%a.mod:0>e?0:e>a.max?a.max:e)}function s(e){var a=u(),s=a._rgba=[];return e=e.toLowerCase(),m(l,function(t,n){var r,o=n.re.exec(e),h=o

View File

@ -1,674 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View File

@ -1,13 +0,0 @@
![Frame 3 (2)](https://github.com/user-attachments/assets/be4e88ec-02d1-4fee-9ab4-c8975bef78e6)
# Afterlife IV Loading
> **REACT & SCSS**
> The resource is written with react and using scss for styling to ensure the best performance of the resource
[![Discord](https://img.shields.io/badge/Discord-%237289DA.svg?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/HWejPwZgvQ)
[![Website](https://img.shields.io/badge/Tebex-%23e62e56.svg?style=for-the-badge&logo=Tebex&logoColor=white)](https://al-studios.tebex.io/)
## Copyright
Copyright © 2024 AfterLifeStudio <https://github.com/AfterLifeStudio>

View File

@ -1,6 +0,0 @@
local shutdown = function ()
end
AddEventHandler('playerSpawned', shutdown)

View File

@ -1,20 +0,0 @@
fx_version 'cerulean'
game 'gta5'
lua54 'yes'
client_script 'client.lua'
loadscreen 'ui/dist/index.html'
loadscreen_cursor 'yes'
loadscreen_manual_shutdown 'yes'
files {
'ui/dist/index.html',
'ui/dist/assets/*.css',
'ui/dist/assets/*.js',
'ui/images/*.png',
'ui/song/*.mp3',
}

View File

@ -1,24 +0,0 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

View File

@ -1,8 +0,0 @@
# React + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh

View File

@ -1,38 +0,0 @@
import js from '@eslint/js'
import globals from 'globals'
import react from 'eslint-plugin-react'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
export default [
{ ignores: ['dist'] },
{
files: ['**/*.{js,jsx}'],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
parserOptions: {
ecmaVersion: 'latest',
ecmaFeatures: { jsx: true },
sourceType: 'module',
},
},
settings: { react: { version: '18.3' } },
plugins: {
react,
'react-hooks': reactHooks,
'react-refresh': reactRefresh,
},
rules: {
...js.configs.recommended.rules,
...react.configs.recommended.rules,
...react.configs['jsx-runtime'].rules,
...reactHooks.configs.recommended.rules,
'react/jsx-no-target-blank': 'off',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
},
]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 383 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 436 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 618 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 400 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 635 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 529 KiB

View File

@ -1,13 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -1,32 +0,0 @@
{
"name": "vite-project",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build --base=/ui/dist/",
"lint": "eslint .",
"preview": "vite preview"
},
"dependencies": {
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-notifications": "^1.7.4",
"react-redux": "^9.1.2",
"react-transition-group": "^4.4.5",
"sass": "^1.83.1"
},
"devDependencies": {
"@eslint/js": "^9.15.0",
"@types/react": "^18.3.12",
"@types/react-dom": "^18.3.1",
"@vitejs/plugin-react": "^4.3.4",
"eslint": "^9.15.0",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
"eslint-plugin-react-refresh": "^0.4.14",
"globals": "^15.12.0",
"vite": "^6.0.1"
}
}

View File

@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1,211 +0,0 @@
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
body {
font-family: inter;
margin: 0;
overflow: hidden;
}
.loading-wrapper {
position: absolute;
background-color: rgb(34, 34, 34);
width: 100%;
height: 100%;
}
.background {
width: 100%;
height: 100%;
background-size: cover;
animation: background forwards;
animation-duration: 8s;
}
@keyframes background {
0%{
opacity: 0;
transform: scale(1.2);
}
10%{
opacity: 1;
}
100%{
transform: scale(1.0);
}
}
.vignette {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background: radial-gradient(circle, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%);
width: 100%;
height: 100%;
}
.loading-container {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 87%;
height: 85%;
display: flex;
flex-direction: column;
align-items: start;
justify-content: space-between;
}
.header {
position: relative;
bottom: 3%;
display: flex;
flex-direction: row;
align-items: center;
gap: .5vw;
color: white;
font-size: 1.5vw;
font-weight: 500;
img{
width: 1.2vw;
}
}
.footer {
position: relative;
right: 2%;
display: flex;
flex-direction: row;
align-items: center;
gap: .7vw;
width: 100%;
img {
width: 1vw;
}
div {
width: 100%;
}
h {
color: white;
font-size: 1.4vw;
font-weight: bold
}
.quote {
color: rgba(255, 255, 255, 0.5);
font-size: .8vw;
font-weight: 500
}
}
.audiobutton{
padding: 0.3vw;
opacity: 0.7;
}
.audiobutton:hover{
opacity: 1.0;
}
.m {
padding: 0.3vw;
animation-duration: 1s;
animation-iteration-count: infinite;
position: absolute;
}
.m1 {
animation-delay: 0s;
animation-name: music1;
}
.m2 {
animation-delay: .8s;
animation-name: music2;
}
.m3 {
animation-delay: .3s;
animation-name: music3;
}
@keyframes music1 {
0% {
transform: translate(0px, 0px)
}
100% {
transform: translate(-5px, -100px);
opacity: 0;
}
}
@keyframes music3 {
0% {
transform: translate(0px, 0px)
}
100% {
transform: translate(20px, -100px);
opacity: 0;
}
}
@keyframes music2 {
0% {
transform: translate(0px, 0px)
}
100% {
transform: translate(-30px, -100px);
opacity: 0;
}
}
.loading {
width: 90%;
display: flex;
justify-content: start;
align-items: center;
height: 12px;
}
.loading-background {
width: 100%;
height: 3px;
opacity: 60%;
background: linear-gradient(90deg, rgba(233, 233, 233, 1) 0%, rgba(233, 233, 233, 0.6) 41%, rgba(233, 233, 233, 0) 100%);
}
.loading-value {
position: absolute;
height: 12px;
background-color: #e9e9e9a1;
transition: 1s ease;
}
.transition-fade-enter {
opacity: 0;
}
.transition-fade-enter-active {
opacity: 1;
transition: opacity 200ms;
}
.transition-fade-exit {
opacity: 1;
}
.transition-fade-exit-active {
opacity: 0;
transition: opacity 200ms;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 529 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 393 B

View File

@ -1,34 +0,0 @@
export const slides = [
{
id: 'paleto',
label: 'Paleto Bay',
quote: 'Humans can be museums too, filled with history they can no longer touch',
},
{
id: 'union',
label: 'Union Depository',
quote: 'Just slow things down and it becomes more beautiful',
},
{
id: 'legion',
label: 'Legion Square',
quote: 'I believe in poems as i do in haunted houses, We say someone must have died here',
},
{
id: 'bixby',
label: 'Bixby Bridge',
quote: 'What matters is how we face it',
},
{
id: 'bakersfield',
label: 'Bakersfield',
quote: "Freedom's always a lonely thing",
},
{
id: 'malibu',
label: 'Malibu Beach',
quote: 'We dont know if there is a destiny, but there is a decision',
},
]

View File

@ -1,99 +0,0 @@
import React, { useState, useEffect, useRef } from "react";
import map from "../assets/map.png";
import music from "../assets/music.png";
import Fade from "../utils/Fade";
import { slides } from "./data";
function Loading() {
const [progress, setProgress] = useState(0);
const [counter, setCounter] = useState(0);
const [audiostate, setAudiostate] = useState(true)
const audio = useRef();
const handleaudio = () => {
if (audiostate){
audio.current.pause();
}else{
audio.current.play();
}
setAudiostate(!audiostate)
}
useEffect(() => {
setTimeout(() => {
if (counter == slides.length - 1) {
setCounter(0);
} else {
setCounter(counter + 1);
}
}, 8000);
}, [counter]);
useEffect(() => {
setTimeout(() => {
if (progress < 100) {
setProgress(progress + 0.3);
}
}, 100);
}, [progress]);
return (
<>
<div className="loading-wrapper">
<audio ref={audio} autoPlay id="music">
<source src="../song/song.mp3" />
</audio>
{slides.map(
(data, index) =>
counter == index && (
<div
className="background"
style={{ backgroundImage: `url(../images/${data.id}.png)` }}
></div>
)
)}
<div className="vignette"></div>
<div className="loading-container">
<div className="header">
<img src={map} alt="" />
<p>{slides[counter].label}</p>
</div>
<div className="footer">
{audiostate && (
<>
<img className="m1 m" src={music} alt="" />
<img className="m2 m" src={music} alt="" />
<img className="m3 m" src={music} alt="" />
</>
)}
<img
className="audiobutton"
onClick={handleaudio}
autoPlay
src={music}
alt=""
/>
<div>
<h>LOADING</h>
<div className="loading">
<div className="loading-background"></div>
<div
style={{ width: progress + "%" }}
className="loading-value"
></div>
</div>
<h className="quote">{slides[counter].quote}</h>
</div>
</div>
</div>
</div>
</>
);
}
export default Loading;

View File

@ -1,27 +0,0 @@
import { useEffect, useRef } from "react"
import { noop } from "../utils/misc"
export const NuiEvent = (action, handler) => {
const savedHandler = useRef(noop)
useEffect(() => {
savedHandler.current = handler
}, [handler])
useEffect(() => {
const eventListener = event => {
const { action: eventAction, data } = event.data
if (savedHandler.current) {
if (eventAction === action) {
savedHandler.current(data)
}
}
}
window.addEventListener("message", eventListener)
return () => window.removeEventListener("message", eventListener)
}, [action])
}

View File

@ -1,12 +0,0 @@
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import './App.scss'
import Loading from './components/loading'
createRoot(document.getElementById('root')).render(
<StrictMode>
<Loading />
</StrictMode>,
)

View File

@ -1,19 +0,0 @@
import React, { useRef } from "react"
import { CSSTransition } from "react-transition-group"
const Fade = props => {
const nodeRef = useRef(null)
return (
<CSSTransition
in={props.in}
nodeRef={nodeRef}
classNames="transition-fade"
timeout={200}
unmountOnExit
>
<span ref={nodeRef}>{props.children}</span>
</CSSTransition>
)
}
export default Fade

View File

@ -1,7 +0,0 @@
export const noop = () => {};
export function click(){
let audio = document.getElementById("clickaudio");
audio.play();
}

View File

@ -1,23 +0,0 @@
export async function nuicallback(eventName, data) {
const options = {
method: "post",
headers: {
"Content-Type": "application/json; charset=UTF-8"
},
body: JSON.stringify(data)
}
const resourceName = window.GetParentResourceName
? window.GetParentResourceName()
: "nui-frame-app"
const resp = await fetch(`https://${resourceName}/${eventName}`, options)
const respFormatted = await resp.json()
return respFormatted
}

View File

@ -1,7 +0,0 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
})

View File

@ -16,7 +16,7 @@ RegisterNUICallback("event", function(eType)
CreateThread(function()
ActivateFrontendMenu(GetHashKey('FE_MENU_VERSION_MP_PAUSE'), 0, -1)
Wait(100)
PauseMenuceptionGoDeeper(0)
-- PauseMenuceptionGoDeeper(0)
while true do
Wait(10)
if IsControlJustPressed(0, 200) then
@ -92,7 +92,7 @@ function OpenPauseMenu()
if not DoesCamExist(cam) then
DisplayRadar(false)
cam = CreateCam('DEFAULT_SCRIPTED_CAMERA', true)
-- cam = CreateCam('DEFAULT_SCRIPTED_CAMERA', true)
SetCamActive(cam, true)
RenderScriptCams(true, false, 0, true, true)
SetCamUseShallowDofMode(cam, true)

View File

@ -2,60 +2,60 @@ Config = {
Framework = "esx", -- esx / qb
Tabs = {
{
icon = "book.svg",
title = "Rules",
subtitle = "Lorem Ipsum is simply dummy text of the printing",
contents = {
{
title = "Rule Number #1",
desc = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever.",
},
{
title = "Rule Number #2",
desc = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever.",
}
}
},
-- {
-- icon = "book.svg",
-- title = "Rules",
-- subtitle = "Lorem Ipsum is simply dummy text of the printing",
-- contents = {
-- {
-- title = "Rule Number #1",
-- desc = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever.",
-- },
-- {
-- title = "Rule Number #2",
-- desc = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever.",
-- }
-- }
-- },
{
icon = "update.svg",
title = "Updates",
subtitle = "Lorem Ipsum is simply dummy text of the printing",
contents = {
{
title = "Update Number #1",
desc = "Lorem ipsum dolor sit amet consectetur adipisicing elit. Modi earum debitis quod beatae corrupti tempore, alias eaque excepturi harum doloribus quisquam quia ipsam ea eum dolore natus et dolorem illo eligendi ducimus error culpa eos nihil ipsum. Libero, ullam, nostrum numquam molestiae velit reprehenderit delectus assumenda veritatis sequi, atque voluptatem.",
},
{
title = "Update Number #2",
desc = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever.",
}
}
},
-- {
-- icon = "update.svg",
-- title = "Updates",
-- subtitle = "Lorem Ipsum is simply dummy text of the printing",
-- contents = {
-- {
-- title = "Update Number #1",
-- desc = "Lorem ipsum dolor sit amet consectetur adipisicing elit. Modi earum debitis quod beatae corrupti tempore, alias eaque excepturi harum doloribus quisquam quia ipsam ea eum dolore natus et dolorem illo eligendi ducimus error culpa eos nihil ipsum. Libero, ullam, nostrum numquam molestiae velit reprehenderit delectus assumenda veritatis sequi, atque voluptatem.",
-- },
-- {
-- title = "Update Number #2",
-- desc = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever.",
-- }
-- }
-- },
{
icon = "new.svg",
title = "News",
subtitle = "Lorem Ipsum is simply dummy text of the printing",
contents = {
{
title = "New Number #1",
desc = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever.",
}
}
},
-- {
-- icon = "new.svg",
-- title = "News",
-- subtitle = "Lorem Ipsum is simply dummy text of the printing",
-- contents = {
-- {
-- title = "New Number #1",
-- desc = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever.",
-- }
-- }
-- },
{
icon = "new.svg",
title = "Custom Tab",
subtitle = "Lorem Ipsum is simply dummy text of the printing",
contents = {
{
title = "Csutom Number #1",
desc = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever.",
}
}
}
-- {
-- icon = "new.svg",
-- title = "Custom Tab",
-- subtitle = "Lorem Ipsum is simply dummy text of the printing",
-- contents = {
-- {
-- title = "Csutom Number #1",
-- desc = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever.",
-- }
-- }
-- }
}
}

View File

@ -125,8 +125,8 @@ main {
padding: 0 18px;
border-radius: 5px 5px 0px 0px;
background: rgba(21, 21, 21, 0.6);
display: flex;
align-items: center;
display: center;
align-items: right;
gap: 7px;
color: #FFF;
font-size: 12px;
@ -136,7 +136,7 @@ main {
border-radius: 0px 0px 5px 5px;
background: rgba(30, 30, 30, 0.7);
padding: 10px 18px;
display: flex;
display: center;
align-items: center;
color: #9E9E9E;
font-size: 10px;

View File

@ -31,55 +31,52 @@
</svg>
<span>12/128</span>
</div>
</div>
</div>
<center><img style="width: 250px" src ="https://cdn.discordapp.com/attachments/1294679345943543810/1351247557745184778/icon.png?ex=67d9aeda&is=67d85d5a&hm=0572d847ed0830f9d60d05c9f6d3a08c269a9eb988a24a606ab7e466db69ea18&"></center>
<div class="button-wrapper menu-btns">
<div class="btn resume">
<svg width="27" height="30" viewBox="0 0 27 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 3.21604V26.8003C0 30.0163 2.73109 29.9996 2.73109 29.9996H3.0084C3.53781 30.008 4.05882 29.8907 4.5126 29.6311L25.5882 17.6296C26.521 17.1103 27 16.0551 27 14.9998C27 13.9445 26.521 12.8893 25.5882 12.3784L4.5126 0.376879C4.05882 0.117252 3.53781 0 3.0084 0H2.73109C2.73109 0 0 0 0 3.21604Z" fill="white"/>
</svg>
<div class="hover-item">Resume</div>
<div class="hover-item">Назад</div>
</div>
<div class="btn map">
<svg width="32" height="32" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
<path opacity="0.5" d="M28.3464 29.3798C30.6288 28.1353 32 26.5397 32 24.8C32 22.956 30.4595 21.2737 27.9259 20C24.9962 18.527 20.7387 17.6 16 17.6C11.2613 17.6 7.00381 18.527 4.0741 20C1.54056 21.2737 0 22.956 0 24.8C0 26.644 1.54056 28.3262 4.0741 29.6C7.00381 31.0729 11.2613 32 16 32C20.9706 32 25.4117 30.98 28.3464 29.3798Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.8 10.4234C4.8 4.66672 9.81442 0 16 0C22.1856 0 27.2 4.66672 27.2 10.4234C27.2 16.135 23.6253 22.7998 18.0482 25.1834C16.748 25.7389 15.252 25.7389 13.9518 25.1834C8.37466 22.7998 4.8 16.135 4.8 10.4234ZM16 14.4C17.7674 14.4 19.2 12.9674 19.2 11.2C19.2 9.43269 17.7674 8 16 8C14.2326 8 12.8 9.43269 12.8 11.2C12.8 12.9674 14.2326 14.4 16 14.4Z" fill="white"/>
</svg>
<div class="hover-item">Map</div>
<div class="hover-item">Карта</div>
</div>
<div class="btn help">
<!-- <div class="btn help">
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M15 30C6.7155 30 0 23.2845 0 15C0 6.7155 6.7155 0 15 0C23.2845 0 30 6.7155 30 15C30 23.2845 23.2845 30 15 30ZM8.88 10.851V11.004C8.88 11.2029 8.95902 11.3937 9.09967 11.5343C9.24032 11.675 9.43109 11.754 9.63 11.754H11.1255C11.2238 11.754 11.3211 11.7346 11.4119 11.697C11.5028 11.6594 11.5853 11.6043 11.6548 11.5348C11.7243 11.4653 11.7794 11.3828 11.817 11.2919C11.8546 11.2011 11.874 11.1038 11.874 11.0055C11.874 9.0705 13.371 8.037 15.384 8.037C17.346 8.037 18.636 9.0705 18.636 10.542C18.636 11.934 17.913 12.5805 16.107 13.407L15.591 13.638C14.0685 14.31 13.5 15.315 13.5 17.0715V17.25C13.5 17.4489 13.579 17.6397 13.7197 17.7803C13.8603 17.921 14.0511 18 14.25 18H15.7455C15.8438 18 15.9411 17.9806 16.0319 17.943C16.1228 17.9054 16.2053 17.8503 16.2748 17.7808C16.3443 17.7113 16.3994 17.6288 16.437 17.5379C16.4746 17.4471 16.494 17.3498 16.494 17.2515C16.494 16.4775 16.701 16.167 17.319 15.8835L17.8365 15.651C20.004 14.67 21.63 13.38 21.63 10.566V10.4115C21.63 7.4445 19.05 5.25 15.384 5.25C11.667 5.25 8.88 7.392 8.88 10.851ZM12.75 22.4865C12.75 23.787 13.7385 24.75 14.9865 24.75C16.2615 24.75 17.25 23.787 17.25 22.4865C17.25 21.186 16.2615 20.25 14.9865 20.25C13.7385 20.25 12.75 21.186 12.75 22.4865Z" fill="white"/>
</svg>
<div class="hover-item">Help</div>
</div>
</div> -->
<div class="btn settings">
<svg width="29" height="30" viewBox="0 0 29 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M17.215 0.22836C16.6498 6.70552e-08 15.9332 0 14.5 0C13.0668 0 12.3502 6.70552e-08 11.785 0.22836C11.0313 0.532845 10.4325 1.11687 10.1203 1.85195C9.9778 2.18751 9.92203 2.57775 9.9002 3.14699C9.86814 3.98352 9.42828 4.75784 8.68498 5.1764C7.94168 5.59494 7.03423 5.57931 6.27542 5.18814C5.75905 4.92195 5.38467 4.77393 5.01545 4.72653C4.20666 4.62267 3.38869 4.83644 2.7415 5.3208C2.2561 5.68407 1.8978 6.28935 1.18121 7.49989C0.464622 8.71045 0.106335 9.31572 0.0264781 9.90736C-0.0800129 10.6962 0.139166 11.494 0.635783 12.1252C0.862456 12.4134 1.18101 12.6555 1.67543 12.9585C2.40228 13.404 2.86996 14.1629 2.86991 15C2.86986 15.8371 2.4022 16.5958 1.67543 17.0412C1.18094 17.3443 0.862318 17.5866 0.63563 17.8748C0.139013 18.506 -0.0801501 19.3037 0.0263256 20.0925C0.106182 20.6841 0.464484 21.2895 1.18106 22.5C1.89765 23.7105 2.25595 24.3159 2.74135 24.679C3.38854 25.1634 4.2065 25.3771 5.0153 25.2733C5.3845 25.2259 5.75886 25.0779 6.27518 24.8118C7.03405 24.4206 7.94156 24.405 8.68491 24.8235C9.42825 25.2421 9.86812 26.0164 9.9002 26.8531C9.92203 27.4222 9.9778 27.8125 10.1203 28.1481C10.4325 28.8831 11.0313 29.4672 11.785 29.7717C12.3502 30 13.0668 30 14.5 30C15.9332 30 16.6498 30 17.215 29.7717C17.9687 29.4672 18.5675 28.8831 18.8796 28.1481C19.0221 27.8125 19.078 27.4223 19.0998 26.853C19.1319 26.0165 19.5716 25.2421 20.3149 24.8235C21.0582 24.4048 21.9658 24.4206 22.7247 24.8118C23.241 25.0779 23.6153 25.2258 23.9845 25.2732C24.7933 25.3772 25.6112 25.1634 26.2584 24.679C26.7439 24.3157 27.1022 23.7105 27.8188 22.4999C28.5354 21.2894 28.8936 20.6841 28.9736 20.0925C29.0799 19.3037 28.8608 18.5058 28.3643 17.8746C28.1374 17.5864 27.8189 17.3442 27.3244 17.0412C26.5977 16.5958 26.13 15.837 26.13 14.9998C26.13 14.1627 26.5977 13.4042 27.3244 12.9588C27.8191 12.6557 28.1376 12.4135 28.3644 12.1252C28.8609 11.4941 29.0801 10.6963 28.9737 9.90745C28.8937 9.31582 28.5355 8.71055 27.8189 7.5C27.1023 6.28945 26.7441 5.68417 26.2586 5.3209C25.6114 4.83654 24.7934 4.62278 23.9847 4.72664C23.6154 4.77404 23.241 4.92204 22.7248 5.1882C21.9659 5.57938 21.0584 5.59503 20.3151 5.17644C19.5718 4.75787 19.1319 3.98349 19.0997 3.14691C19.0779 2.57772 19.0221 2.1875 18.8796 1.85195C18.5675 1.11687 17.9687 0.532845 17.215 0.22836ZM14.5 19.5C17.0482 19.5 19.1137 17.4854 19.1137 15C19.1137 12.5146 17.0482 10.5 14.5 10.5C11.9518 10.5 9.88618 12.5146 9.88618 15C9.88618 17.4854 11.9518 19.5 14.5 19.5Z" fill="white"/>
</svg>
<div class="hover-item">Settings</div>
<div class="hover-item">Настройки</div>
</div>
<div class="btn exit">
<svg width="29" height="34" viewBox="0 0 29 34" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.2017 1.27861C10.087 2.30633 10.087 4.18625 10.087 7.94611V26.0539C10.087 29.8138 10.087 31.6937 11.2017 32.7214C12.3163 33.7492 14.0201 33.44 17.4278 32.8219L21.0981 32.1563C24.8721 31.4716 26.759 31.1293 27.8796 29.6897C29 28.2502 29 26.1682 29 22.0041V11.9959C29 7.83188 29 5.74987 27.8796 4.31028C26.759 2.87068 24.8721 2.52842 21.0981 1.84385L17.4278 1.17806C14.0201 0.559948 12.3163 0.25089 11.2017 1.27861ZM14.8152 13.9981C15.4681 13.9981 15.9973 14.5741 15.9973 15.2847V18.7154C15.9973 19.4259 15.4681 20.0019 14.8152 20.0019C14.1624 20.0019 13.6332 19.4259 13.6332 18.7154V15.2847C13.6332 14.5741 14.1624 13.9981 14.8152 13.9981Z" fill="white"/>
<path d="M7.56522 5.65216C4.14082 5.6567 2.35581 5.72518 1.21823 6.75977C-9.91654e-08 7.86769 0 9.65088 0 13.2173V20.7827C0 24.349 -9.91654e-08 26.1322 1.21823 27.2402C2.35581 28.2747 4.14082 28.3433 7.56522 28.3478C7.48649 27.4047 7.48661 26.3144 7.48676 25.1358V8.86398C7.48661 7.68556 7.48649 6.59527 7.56522 5.65216Z" fill="white"/>
</svg>
<div class="hover-item">Exit</div>
<div class="hover-item">Изход</div>
</div>
</div>
<div class="box-wrapper player-box">
<div class="box player">
<div class="box-header">
<div class="icon">
<svg width="27" height="27" viewBox="0 0 27 27" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M13.5 13.5C17.2294 13.5 20.25 10.4794 20.25 6.75C20.25 3.02062 17.2294 0 13.5 0C9.77062 0 6.75 3.02062 6.75 6.75C6.75 10.4794 9.77062 13.5 13.5 13.5ZM13.5 16.875C8.99437 16.875 0 19.1363 0 23.625V25.3125C0 26.2406 0.759375 27 1.6875 27H25.3125C26.2406 27 27 26.2406 27 25.3125V23.625C27 19.1363 18.0056 16.875 13.5 16.875Z" fill="white"/>
</svg>
</div>
<div class="title-wrapper">
<div class="title">You</div>
<div class="subtitle">Lorem Ipsum is simply dummy text of the printing</div>
<!-- <div class="icon"></div> -->
<div class="title-wrapper">
<div class="title">Персонаж</div>
<div class="subtitle"></div>
</div>
</div>
@ -89,7 +86,7 @@
<svg width="9" height="9" viewBox="0 0 9 9" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M4.5 4.5C5.74313 4.5 6.75 3.49313 6.75 2.25C6.75 1.00687 5.74313 0 4.5 0C3.25688 0 2.25 1.00687 2.25 2.25C2.25 3.49313 3.25688 4.5 4.5 4.5ZM4.5 5.625C2.99813 5.625 0 6.37875 0 7.875V8.4375C0 8.74687 0.253125 9 0.5625 9H8.4375C8.74687 9 9 8.74687 9 8.4375V7.875C9 6.37875 6.00188 5.625 4.5 5.625Z" fill="white"/>
</svg>
<span>Name</span>
<span>Име</span>
</div>
<div class="desc name">John Smith</div>
</div>
@ -99,16 +96,16 @@
<path d="M4.23461 4.23148C3.98958 3.98556 3.69125 3.79125 3.35958 3.66511C3.20299 3.83913 3.09637 4.05099 3.05184 4.28072C3.03973 4.34265 3.03246 4.40475 3.02913 4.46655C3.05639 4.47592 3.08305 4.48592 3.10911 4.49728C3.39805 4.61979 3.64612 4.82485 3.81996 5.08321C3.95958 5.28976 4.05227 5.5289 4.08348 5.78802C4.09166 5.85268 4.09559 5.91857 4.09559 5.98581C4.09559 6.21025 4.05046 6.42167 3.96899 6.61459C3.86783 6.85252 3.71124 7.06301 3.51466 7.22672C3.47288 7.262 3.42894 7.29474 3.38352 7.32547C3.12517 7.49992 2.81683 7.60109 2.48033 7.60109C2.2565 7.60109 2.04539 7.55581 1.85216 7.47447C1.5626 7.35197 1.31544 7.14676 1.14098 6.88855C0.967122 6.63063 0.865958 6.32156 0.865958 5.98581C0.865958 5.76152 0.910485 5.55042 0.992255 5.35702C1.10221 5.09746 1.27939 4.87091 1.50201 4.70175C1.49776 4.64313 1.49593 4.58453 1.49593 4.52593C1.49593 4.22487 1.54318 3.93107 1.63315 3.65332C1.28876 3.77857 0.979828 3.9777 0.726618 4.23152C0.277749 4.67904 -0.000910945 5.30191 2.23756e-06 5.98583C-0.000891093 6.6699 0.277769 7.29277 0.726618 7.74043C1.10037 8.11477 1.59589 8.36965 2.14713 8.4437V9.21697H0.997694V9.88299H2.14713V11H2.81348V9.88297H3.96383V9.21695H2.81348V8.44368C3.36504 8.36963 3.86116 8.11475 4.23461 7.74041C4.3594 7.61562 4.47057 7.47781 4.56717 7.32864C4.81704 6.94171 4.96214 6.47936 4.96152 5.98581C4.96152 5.86997 4.95334 5.75533 4.9382 5.64356C4.86218 5.09532 4.60715 4.60313 4.23461 4.23148Z" fill="white"/>
<path d="M5.84652 0.835938V1.50199H6.86299L5.8126 2.55238C5.37038 2.21528 4.83883 2.04489 4.30999 2.04537C3.67666 2.04489 3.0391 2.28796 2.55569 2.77228C2.20979 3.11727 1.98749 3.54082 1.88813 3.98562C1.88692 3.99106 1.88633 3.99652 1.8848 4.00107C1.88087 4.01834 1.87753 4.03575 1.87422 4.05227C1.86814 4.08437 1.8627 4.11633 1.85756 4.14827C1.85423 4.16751 1.85151 4.18766 1.84938 4.20687C1.84545 4.23611 1.84212 4.26609 1.83969 4.29607C1.83819 4.31334 1.83636 4.33077 1.83547 4.34802C1.83487 4.35665 1.83426 4.36543 1.83366 4.37468C1.83213 4.39209 1.83154 4.40996 1.83092 4.42721C1.82971 4.45992 1.8288 4.49324 1.8288 4.52595C1.8288 4.55124 1.82971 4.57653 1.83032 4.60242C1.83154 4.62787 1.83306 4.653 1.83426 4.67907L1.83819 4.73509C1.83819 4.74434 1.83969 4.75371 1.84029 4.76372C1.89361 5.31706 2.13257 5.85803 2.55569 6.28039C2.81194 6.5368 3.11178 6.72579 3.43072 6.84649C3.52732 6.74002 3.60609 6.61676 3.66273 6.48409C3.72117 6.34493 3.7545 6.19771 3.76115 6.04582C3.54461 5.96799 3.34228 5.84274 3.16782 5.66828C3.01002 5.50973 2.8919 5.32846 2.81345 5.13399C2.75742 4.99662 2.72137 4.85277 2.70561 4.70767C2.69533 4.6218 2.69291 4.53518 2.69684 4.44932C2.69805 4.42796 2.69956 4.40738 2.70077 4.38663C2.70228 4.37134 2.70349 4.35604 2.70621 4.34059C2.70621 4.33468 2.70742 4.32878 2.70803 4.32273C2.70954 4.30804 2.71137 4.29275 2.71409 4.2782C2.71742 4.25821 2.72076 4.23746 2.72469 4.21763C2.74224 4.12691 2.76739 4.03772 2.8007 3.95108C2.80678 3.93518 2.81281 3.91989 2.8201 3.90383C2.82677 3.88718 2.83401 3.87052 2.84189 3.85387C2.84856 3.83721 2.85644 3.82054 2.86522 3.8045C2.87249 3.788 2.88126 3.77194 2.89067 3.75604C2.93458 3.67457 2.98639 3.59613 3.04575 3.52145C3.05786 3.50616 3.07059 3.49088 3.08301 3.47617C3.11057 3.44482 3.13844 3.41423 3.16842 3.38425C3.20566 3.34699 3.24354 3.31231 3.2829 3.28035C3.41194 3.17313 3.55336 3.08908 3.70177 3.02926C3.99284 2.9113 4.31329 2.88131 4.61891 2.94067C4.92482 3.00002 5.21436 3.14633 5.45245 3.38423C5.61086 3.54279 5.72807 3.72406 5.80652 3.91837C5.92526 4.20943 5.95525 4.52927 5.89587 4.83504C5.8359 5.14064 5.6893 5.43036 5.45245 5.66828C5.40035 5.72022 5.34584 5.76824 5.2892 5.81078C5.29252 5.86938 5.29435 5.928 5.29435 5.98583C5.29526 6.28432 5.24769 6.57857 5.15653 6.85844C5.4882 6.73849 5.79924 6.5454 6.06428 6.28037C6.54799 5.79744 6.79181 5.15988 6.79119 4.52593C6.79179 3.99694 6.62128 3.4663 6.28356 3.02333L7.33396 1.97293V2.98986H7.99999V0.835938H5.84652Z" fill="white"/>
</svg>
<span>Gender</span>
<span>Пол</span>
</div>
<div class="desc gender">Male</div>
<div class="desc gender">Мъж</div>
</div>
<div class="content">
<div class="title">
<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.13775 0.00254803C4.1795 -1.40164e-05 4.2237 -8.91111e-06 4.28045 1.21558e-06H5.71975C5.7765 -8.91111e-06 5.82065 -1.40164e-05 5.86245 0.00254803C6.39265 0.0350699 6.85695 0.373954 7.0551 0.873053C7.0707 0.912385 7.0847 0.954851 7.1026 1.00936L7.10415 1.01396C7.1458 1.12757 7.24145 1.25675 7.3753 1.35996C7.3902 1.37145 7.4052 1.38229 7.42015 1.39251C8.4971 1.39378 9.05925 1.41391 9.4467 1.73317C9.5262 1.79867 9.59885 1.87224 9.6635 1.95272C10 2.37152 10 2.99181 10 4.2324C10 4.54724 10 4.70461 9.9246 4.82739C9.90995 4.85129 9.8933 4.87392 9.8749 4.89504C9.78045 5.00344 9.63155 5.04871 9.3338 5.13914L7 5.84816V5.44309C7 4.8838 6.5523 4.43043 6 4.43043H4C3.44771 4.43043 3 4.8838 3 5.44309V5.84816L0.6662 5.13914C0.36845 5.04871 0.219575 5.00344 0.125105 4.89504C0.106705 4.87392 0.090075 4.85129 0.07539 4.82739C-2.23517e-08 4.70461 0 4.54724 0 4.2324C0 2.99181 2.98023e-08 2.37152 0.33649 1.95272C0.401165 1.87224 0.473815 1.79867 0.553295 1.73317C0.940765 1.41391 1.50291 1.39378 2.57986 1.39251C2.59484 1.38229 2.60981 1.37143 2.62472 1.35994C2.75864 1.25672 2.85427 1.12753 2.89595 1.01394C2.91492 0.956279 2.92912 0.913271 2.94509 0.873048C3.14322 0.373954 3.60751 0.0350699 4.13775 0.00254803ZM6.40935 1.30032C6.42145 1.3315 6.43475 1.36221 6.4492 1.39242H3.55086C3.56529 1.36226 3.5786 1.3316 3.59067 1.30048L3.59145 1.29871L3.59353 1.2937L3.59597 1.28756L3.59826 1.2815L3.60008 1.27646L3.60097 1.27392L3.60309 1.26773L3.605 1.26201L3.60605 1.25883L3.60742 1.25461L3.60853 1.25105L3.60943 1.24813C3.62884 1.18924 3.63518 1.17088 3.64095 1.15634C3.73101 0.929484 3.94206 0.775442 4.18305 0.760662C4.1992 0.759675 4.21895 0.759502 4.29065 0.759502H5.7095C5.7812 0.759502 5.801 0.759675 5.8171 0.760662C6.0581 0.775442 6.26915 0.929484 6.35925 1.15634C6.3649 1.17067 6.37095 1.18836 6.39065 1.24811L6.3915 1.25101L6.39265 1.25459L6.394 1.25882L6.39505 1.26198L6.39695 1.26769L6.3991 1.27388L6.39995 1.27641L6.4018 1.28144L6.40405 1.28746L6.4065 1.29354L6.40855 1.29849L6.40935 1.30032ZM6 5.18993H4C3.86193 5.18993 3.75 5.3033 3.75 5.44309V6.53754C3.75 6.64103 3.81224 6.73414 3.90715 6.77258L4.2572 6.9144C4.73405 7.10752 5.26595 7.10752 5.7428 6.9144L6.09285 6.77258C6.18775 6.73414 6.25 6.64103 6.25 6.53754V5.44309C6.25 5.3033 6.13805 5.18993 6 5.18993ZM3.00538 6.64265L0.50293 5.88244C0.517975 7.45942 0.608945 8.91174 1.15896 9.40683C1.81797 10 2.87863 10 4.99995 10C7.12125 10 8.18195 10 8.84095 9.40683C9.39095 8.91174 9.4819 7.45942 9.49695 5.88244L6.9946 6.64265C6.9565 7.01364 6.7186 7.33714 6.3714 7.47775L6.0213 7.61957C5.3657 7.88514 4.6343 7.88514 3.97867 7.61957L3.62861 7.47775C3.2814 7.33714 3.04351 7.01364 3.00538 6.64265Z" fill="white"/>
</svg>
<span>Job</span>
<span>Професия</span>
</div>
<div class="desc job">Male</div>
</div>
@ -117,7 +114,7 @@
<svg width="10" height="10" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.13775 0.00254803C4.1795 -1.40164e-05 4.2237 -8.91111e-06 4.28045 1.21558e-06H5.71975C5.7765 -8.91111e-06 5.82065 -1.40164e-05 5.86245 0.00254803C6.39265 0.0350699 6.85695 0.373954 7.0551 0.873053C7.0707 0.912385 7.0847 0.954851 7.1026 1.00936L7.10415 1.01396C7.1458 1.12757 7.24145 1.25675 7.3753 1.35996C7.3902 1.37145 7.4052 1.38229 7.42015 1.39251C8.4971 1.39378 9.05925 1.41391 9.4467 1.73317C9.5262 1.79867 9.59885 1.87224 9.6635 1.95272C10 2.37152 10 2.99181 10 4.2324C10 4.54724 10 4.70461 9.9246 4.82739C9.90995 4.85129 9.8933 4.87392 9.8749 4.89504C9.78045 5.00344 9.63155 5.04871 9.3338 5.13914L7 5.84816V5.44309C7 4.8838 6.5523 4.43043 6 4.43043H4C3.44771 4.43043 3 4.8838 3 5.44309V5.84816L0.6662 5.13914C0.36845 5.04871 0.219575 5.00344 0.125105 4.89504C0.106705 4.87392 0.090075 4.85129 0.07539 4.82739C-2.23517e-08 4.70461 0 4.54724 0 4.2324C0 2.99181 2.98023e-08 2.37152 0.33649 1.95272C0.401165 1.87224 0.473815 1.79867 0.553295 1.73317C0.940765 1.41391 1.50291 1.39378 2.57986 1.39251C2.59484 1.38229 2.60981 1.37143 2.62472 1.35994C2.75864 1.25672 2.85427 1.12753 2.89595 1.01394C2.91492 0.956279 2.92912 0.913271 2.94509 0.873048C3.14322 0.373954 3.60751 0.0350699 4.13775 0.00254803ZM6.40935 1.30032C6.42145 1.3315 6.43475 1.36221 6.4492 1.39242H3.55086C3.56529 1.36226 3.5786 1.3316 3.59067 1.30048L3.59145 1.29871L3.59353 1.2937L3.59597 1.28756L3.59826 1.2815L3.60008 1.27646L3.60097 1.27392L3.60309 1.26773L3.605 1.26201L3.60605 1.25883L3.60742 1.25461L3.60853 1.25105L3.60943 1.24813C3.62884 1.18924 3.63518 1.17088 3.64095 1.15634C3.73101 0.929484 3.94206 0.775442 4.18305 0.760662C4.1992 0.759675 4.21895 0.759502 4.29065 0.759502H5.7095C5.7812 0.759502 5.801 0.759675 5.8171 0.760662C6.0581 0.775442 6.26915 0.929484 6.35925 1.15634C6.3649 1.17067 6.37095 1.18836 6.39065 1.24811L6.3915 1.25101L6.39265 1.25459L6.394 1.25882L6.39505 1.26198L6.39695 1.26769L6.3991 1.27388L6.39995 1.27641L6.4018 1.28144L6.40405 1.28746L6.4065 1.29354L6.40855 1.29849L6.40935 1.30032ZM6 5.18993H4C3.86193 5.18993 3.75 5.3033 3.75 5.44309V6.53754C3.75 6.64103 3.81224 6.73414 3.90715 6.77258L4.2572 6.9144C4.73405 7.10752 5.26595 7.10752 5.7428 6.9144L6.09285 6.77258C6.18775 6.73414 6.25 6.64103 6.25 6.53754V5.44309C6.25 5.3033 6.13805 5.18993 6 5.18993ZM3.00538 6.64265L0.50293 5.88244C0.517975 7.45942 0.608945 8.91174 1.15896 9.40683C1.81797 10 2.87863 10 4.99995 10C7.12125 10 8.18195 10 8.84095 9.40683C9.39095 8.91174 9.4819 7.45942 9.49695 5.88244L6.9946 6.64265C6.9565 7.01364 6.7186 7.33714 6.3714 7.47775L6.0213 7.61957C5.3657 7.88514 4.6343 7.88514 3.97867 7.61957L3.62861 7.47775C3.2814 7.33714 3.04351 7.01364 3.00538 6.64265Z" fill="white"/>
</svg>
<span>Grade</span>
<span>Длъжност</span>
</div>
<div class="desc grade">Male</div>
</div>
@ -127,9 +124,9 @@
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.3089 3.66869C11.2758 3.6666 11.2398 3.66662 11.2025 3.66663L11.1932 3.66663H9.72989C8.52373 3.66663 7.4917 4.61604 7.4917 5.85413C7.4917 7.09219 8.52373 8.04163 9.72989 8.04163H11.1932H11.2025C11.2398 8.04163 11.2758 8.04169 11.3089 8.03959C11.7988 8.00861 12.232 7.62524 12.2685 7.08974C12.2709 7.05463 12.2708 7.01677 12.2708 6.98171V6.9722V4.73608V4.72656C12.2708 4.69147 12.2709 4.65362 12.2685 4.61851C12.232 4.08302 11.7988 3.69963 11.3089 3.66869ZM9.60016 6.43746C9.91067 6.43746 10.1624 6.1763 10.1624 5.85413C10.1624 5.53195 9.91067 5.27079 9.60016 5.27079C9.28965 5.27079 9.03788 5.53195 9.03788 5.85413C9.03788 6.1763 9.28965 6.43746 9.60016 6.43746Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M11.2021 8.91667C11.2891 8.91439 11.3549 8.99495 11.3313 9.07872C11.2142 9.49428 11.0283 9.84854 10.7301 10.1468C10.2936 10.5833 9.73999 10.777 9.05609 10.869C8.39156 10.9583 7.54246 10.9583 6.47041 10.9583H5.23794C4.16591 10.9583 3.31678 10.9583 2.65224 10.869C1.96833 10.777 1.41478 10.5833 0.978229 10.1468C0.541685 9.71023 0.347949 9.15665 0.256004 8.47275C0.166655 7.80822 0.16666 6.95912 0.166672 5.88707V5.82127C0.16666 4.74923 0.166655 3.90011 0.256004 3.23557C0.347949 2.55166 0.541685 1.99811 0.978229 1.56156C1.41478 1.12501 1.96833 0.931277 2.65224 0.839332C3.31678 0.749983 4.1659 0.749989 5.23794 0.75H6.47041C7.54246 0.749989 8.39156 0.749983 9.05609 0.839332C9.73999 0.931277 10.2936 1.12501 10.7301 1.56156C11.0283 1.8598 11.2142 2.21402 11.3313 2.62961C11.3549 2.71335 11.2891 2.79392 11.2021 2.79167L9.72984 2.79167C8.07516 2.79167 6.61665 4.09886 6.61665 5.85417C6.61665 7.60947 8.07516 8.91667 9.72984 8.91667H11.2021ZM3.08334 8.04167C2.84172 8.04167 2.64584 7.84578 2.64584 7.60417V4.10417C2.64584 3.86254 2.84172 3.66667 3.08334 3.66667C3.32496 3.66667 3.52084 3.86254 3.52084 4.10417V7.60417C3.52084 7.84578 3.32496 8.04167 3.08334 8.04167Z" fill="white"/>
</svg>
<span>Wallet</span>
<span>Портфейл</span>
</div>
<div class="desc wallet">Male</div>
<div class="desc wallet">Мъж</div>
</div>
<div class="content">
<div class="title">
@ -140,7 +137,7 @@
<path d="M3.84375 9.95776C4.0875 9.95776 4.25 9.79526 4.25 9.55151V6.70776C4.25 6.46401 4.0875 6.30151 3.84375 6.30151H3.03125C2.7875 6.30151 2.625 6.46401 2.625 6.70776V9.55151C2.625 9.79526 2.7875 9.95776 3.03125 9.95776H3.84375Z" fill="white" stroke="white" stroke-width="0.1"/>
<path d="M11.9688 10.364H1.40625C1.1625 10.364 1 10.5265 1 10.7703V11.989C1 12.2328 1.1625 12.3953 1.40625 12.3953H11.9688C12.2125 12.3953 12.375 12.2328 12.375 11.989V10.7703C12.375 10.5265 12.2125 10.364 11.9688 10.364Z" fill="white" stroke="white" stroke-width="0.1"/>
</svg>
<span>Bank</span>
<span>Банка</span>
</div>
<div class="desc bank">Male</div>
</div>

View File

@ -1,674 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
esx_menu_default
Copyright (C) 2015-2024 Jérémie N'gadi
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
esx_menu_default Copyright (C) 2015-2024 Jérémie N'gadi
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@ -1,18 +0,0 @@
<h1 align='center'>[ESX] Menu Defualt</a></h1><p align='center'><b><a href='https://discord.esx-framework.org/'>Discord</a> - <a href='https://esx-framework.org/'>Website</a> - <a href='https://documentation.esx-framework.org/legacy/installation'>Documentation</a></b></h5>
A default List type menu for ESX.
![Preview_1](https://cdn.discordapp.com/attachments/944789399852417096/997882867336101948/Screenshot_52.png)
![Preview_2](https://cdn.discordapp.com/attachments/944789399852417096/997882867688411176/Screenshot_53.png)
## Legal
esx_menu_default - Default Menu!
Copyright (C) 2015-2024 Jérémie N'gadi
This program Is free software: you can redistribute it And/Or modify it under the terms Of the GNU General Public License As published by the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version.
This program Is distributed In the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty Of MERCHANTABILITY Or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License For more details.
You should have received a copy Of the GNU General Public License along with this program. If Not, see <http://www.gnu.org/licenses/>.

View File

@ -1,132 +0,0 @@
local GUI, MenuType, OpenedMenus, CurrentNameSpace = {}, "default", 0, nil
GUI.Time = 0
local function openMenu(namespace, name, data)
CurrentNameSpace = namespace
OpenedMenus = OpenedMenus + 1
SendNUIMessage({
action = "openMenu",
namespace = namespace,
name = name,
data = data,
})
end
local function closeMenu(namespace, name)
CurrentNameSpace = namespace
OpenedMenus = OpenedMenus - 1
if OpenedMenus < 0 then
OpenedMenus = 0
end
SendNUIMessage({
action = "closeMenu",
namespace = namespace,
name = name,
})
end
AddEventHandler("onResourceStop", function(resource)
if GetCurrentResourceName() == resource and OpenedMenus > 0 then
ESX.UI.Menu.CloseAll()
elseif CurrentNameSpace ~= nil and CurrentNameSpace == resource and OpenedMenus > 0 then
ESX.UI.Menu.CloseAll()
end
end)
ESX.UI.Menu.RegisterType(MenuType, openMenu, closeMenu)
RegisterNUICallback("menu_submit", function(data, cb)
local menu = ESX.UI.Menu.GetOpened(MenuType, data._namespace, data._name)
if menu.submit ~= nil then
menu.submit(data, menu)
end
cb("OK")
end)
RegisterNUICallback("menu_cancel", function(data, cb)
local menu = ESX.UI.Menu.GetOpened(MenuType, data._namespace, data._name)
if menu.cancel ~= nil then
menu.cancel(data, menu)
end
cb("OK")
end)
RegisterNUICallback("menu_change", function(data, cb)
local menu = ESX.UI.Menu.GetOpened(MenuType, data._namespace, data._name)
for i = 1, #data.elements, 1 do
menu.setElement(i, "value", data.elements[i].value)
if data.elements[i].selected then
menu.setElement(i, "selected", true)
else
menu.setElement(i, "selected", false)
end
end
if menu.change ~= nil then
menu.change(data, menu)
end
cb("OK")
end)
ESX.RegisterInput("menu_default_enter", "Submit menu item", "keyboard", "RETURN", function()
if OpenedMenus > 0 and (GetGameTimer() - GUI.Time) > 200 then
SendNUIMessage({
action = "controlPressed",
control = "ENTER",
})
GUI.Time = GetGameTimer()
end
end)
ESX.RegisterInput("menu_default_backspace", "Close menu", "keyboard", "BACK", function()
if OpenedMenus > 0 then
SendNUIMessage({
action = "controlPressed",
control = "BACKSPACE",
})
GUI.Time = GetGameTimer()
end
end)
ESX.RegisterInput("menu_default_top", "Change menu focus to top item", "keyboard", "UP", function()
if OpenedMenus > 0 then
SendNUIMessage({
action = "controlPressed",
control = "TOP",
})
GUI.Time = GetGameTimer()
end
end)
ESX.RegisterInput("menu_default_down", "Change menu focus to down item", "keyboard", "DOWN", function()
if OpenedMenus > 0 then
SendNUIMessage({
action = "controlPressed",
control = "DOWN",
})
GUI.Time = GetGameTimer()
end
end)
ESX.RegisterInput("menu_default_left", "Change menu slider to left", "keyboard", "LEFT", function()
if OpenedMenus > 0 then
SendNUIMessage({
action = "controlPressed",
control = "LEFT",
})
GUI.Time = GetGameTimer()
end
end)
ESX.RegisterInput("menu_default_right", "Change menu slider to right", "keyboard", "RIGHT", function()
if OpenedMenus > 0 then
SendNUIMessage({
action = "controlPressed",
control = "RIGHT",
})
GUI.Time = GetGameTimer()
end
end)

View File

@ -1,14 +0,0 @@
fx_version 'adamant'
game 'gta5'
description 'A basic menu system for ESX Legacy.'
lua54 'yes'
version '1.10.8'
client_scripts { '@ui_core/imports.lua', 'client/main.lua' }
ui_page { 'html/ui.html' }
files { 'html/ui.html', 'html/css/app.css', 'html/js/mustache.min.js', 'html/js/app.js' }
dependencies { 'ui_core' }

View File

@ -1,110 +0,0 @@
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@500;600&display=swap");
::-webkit-scrollbar {
display: none;
}
.menu {
font-family: "Poppins", sans-serif;
min-width: 350px;
color: #fff;
position: absolute;
background: rgba(33, 33, 33, 0);
text-align: center;
}
.head {
display: block;
overflow: hidden;
padding-bottom: 3px;
text-align: center;
margin-bottom: 5px;
white-space: nowrap;
background: rgba(10, 10, 10, 0.9);
}
.menu .head {
text-align: center;
height: 28px;
color: #ffffff;
font-weight: 700;
font-size: 20px;
}
.menu .menu-items {
max-height: 450px;
overflow-y: auto;
font-weight: 550;
}
.menu-items {
margin-bottom: 2px;
}
.menu .menu-items .menu-item {
display: block;
padding: 7px;
font-size: 13px;
height: 16px;
text-indent: 5px;
margin-top: 5px;
background: rgba(40, 40, 40, 0.8);
color: rgb(202, 202, 202);
border-radius: 5px;
margin-bottom: 6px;
}
.menu .menu-items .menu-item.selected {
border: 1px solid rgba(55, 55, 55, 0.9);
background: rgba(20, 20, 20, 0.9);
color: rgba(243, 243, 243);
letter-spacing: 0.2px;
font-weight: 500;
}
.menu.align-left {
left: 0;
top: 50%;
}
.menu.align-top-left {
left: 3rem;
top: 0;
}
.menu.align-top {
left: 50%;
top: 0;
}
.menu.align-top-right {
right: 3rem;
top: 0;
}
.menu.align-right {
right: 0;
top: 50%;
}
.menu.align-bottom-right {
right: 3rem;
bottom: 0;
}
.menu.align-bottom {
left: 50%;
bottom: 0;
transform: translate(0, -50%);
}
.menu.align-bottom-left {
left: 3rem;
bottom: 0;
}
.menu.align-center {
left: 50%;
top: 35%;
transform: translate(-50%, 50%);
}

View File

@ -1,366 +0,0 @@
(function () {
let MenuTpl =
'<div id="menu_{{_namespace}}_{{_name}}" class="menu{{#align}} align-{{align}}{{/align}}">' +
'<div class="head"><span>{{{title}}}</span></div>' +
'<div class="menu-items">' +
"{{#elements}}" +
'<div class="menu-item {{#selected}}selected{{/selected}}">' +
"{{{label}}}{{#isSlider}} : &lt;{{{sliderLabel}}}&gt;{{/isSlider}}" +
"</div>" +
"{{/elements}}" +
"</div>" +
"</div>" +
"</div>";
window.ESX_MENU = {};
ESX_MENU.ResourceName = "esx_menu_default";
ESX_MENU.opened = {};
ESX_MENU.focus = [];
ESX_MENU.pos = {};
ESX_MENU.open = function (namespace, name, data) {
if (typeof ESX_MENU.opened[namespace] === "undefined") {
ESX_MENU.opened[namespace] = {};
}
if (typeof ESX_MENU.opened[namespace][name] != "undefined") {
ESX_MENU.close(namespace, name);
}
if (typeof ESX_MENU.pos[namespace] === "undefined") {
ESX_MENU.pos[namespace] = {};
}
for (let i = 0; i < data.elements.length; i++) {
if (typeof data.elements[i].type === "undefined") {
data.elements[i].type = "default";
}
}
data._index = ESX_MENU.focus.length;
data._namespace = namespace;
data._name = name;
for (let i = 0; i < data.elements.length; i++) {
data.elements[i]._namespace = namespace;
data.elements[i]._name = name;
}
ESX_MENU.opened[namespace][name] = data;
ESX_MENU.pos[namespace][name] = 0;
for (let i = 0; i < data.elements.length; i++) {
if (data.elements[i].selected) {
ESX_MENU.pos[namespace][name] = i;
} else {
data.elements[i].selected = false;
}
}
ESX_MENU.focus.push({
namespace: namespace,
name: name,
});
ESX_MENU.render();
$(document.getElementById("menu_" + namespace + "_" + name))
.find(".menu-item.selected")[0]
.scrollIntoView();
};
ESX_MENU.close = function (namespace, name) {
delete ESX_MENU.opened[namespace][name];
for (let i = 0; i < ESX_MENU.focus.length; i++) {
if (ESX_MENU.focus[i].namespace === namespace && ESX_MENU.focus[i].name === name) {
ESX_MENU.focus.splice(i, 1);
break;
}
}
ESX_MENU.render();
};
ESX_MENU.render = function () {
let menuContainer = document.getElementById("menus");
let focused = ESX_MENU.getFocused();
menuContainer.innerHTML = "";
$(menuContainer).hide();
for (let namespace in ESX_MENU.opened) {
for (let name in ESX_MENU.opened[namespace]) {
let menuData = ESX_MENU.opened[namespace][name];
let view = JSON.parse(JSON.stringify(menuData));
for (let i = 0; i < menuData.elements.length; i++) {
let element = view.elements[i];
switch (element.type) {
case "default":
break;
case "slider": {
element.isSlider = true;
element.sliderLabel = typeof element.options === "undefined" ? element.value : element.options[element.value];
break;
}
default:
break;
}
if (i === ESX_MENU.pos[namespace][name]) {
element.selected = true;
}
}
let menu = $(Mustache.render(MenuTpl, view))[0];
$(menu).hide();
menuContainer.appendChild(menu);
}
}
if (typeof focused != "undefined") {
$(document.getElementById("menu_" + focused.namespace + "_" + focused.name)).show();
}
$(menuContainer).show();
};
ESX_MENU.submit = function (namespace, name, data) {
$.post(
"http://" + ESX_MENU.ResourceName + "/menu_submit",
JSON.stringify({
_namespace: namespace,
_name: name,
current: data,
elements: ESX_MENU.opened[namespace][name].elements,
})
);
};
ESX_MENU.cancel = function (namespace, name) {
$.post(
"http://" + ESX_MENU.ResourceName + "/menu_cancel",
JSON.stringify({
_namespace: namespace,
_name: name,
})
);
};
ESX_MENU.change = function (namespace, name, data) {
$.post(
"http://" + ESX_MENU.ResourceName + "/menu_change",
JSON.stringify({
_namespace: namespace,
_name: name,
current: data,
elements: ESX_MENU.opened[namespace][name].elements,
})
);
};
ESX_MENU.getFocused = function () {
return ESX_MENU.focus[ESX_MENU.focus.length - 1];
};
window.onData = (data) => {
switch (data.action) {
case "openMenu": {
ESX_MENU.open(data.namespace, data.name, data.data);
break;
}
case "closeMenu": {
ESX_MENU.close(data.namespace, data.name);
break;
}
case "controlPressed": {
switch (data.control) {
case "ENTER": {
let focused = ESX_MENU.getFocused();
if (typeof focused != "undefined") {
let menu = ESX_MENU.opened[focused.namespace][focused.name];
let pos = ESX_MENU.pos[focused.namespace][focused.name];
let elem = menu.elements[pos];
if (menu.elements.length > 0) {
ESX_MENU.submit(focused.namespace, focused.name, elem);
}
}
break;
}
case "BACKSPACE": {
let focused = ESX_MENU.getFocused();
if (typeof focused != "undefined") {
ESX_MENU.cancel(focused.namespace, focused.name);
}
break;
}
case "TOP": {
let focused = ESX_MENU.getFocused();
if (typeof focused != "undefined") {
let menu = ESX_MENU.opened[focused.namespace][focused.name];
let pos = ESX_MENU.pos[focused.namespace][focused.name];
if (pos > 0) {
ESX_MENU.pos[focused.namespace][focused.name]--;
} else {
ESX_MENU.pos[focused.namespace][focused.name] = menu.elements.length - 1;
}
let elem = menu.elements[ESX_MENU.pos[focused.namespace][focused.name]];
for (let i = 0; i < menu.elements.length; i++) {
if (i === ESX_MENU.pos[focused.namespace][focused.name]) {
menu.elements[i].selected = true;
} else {
menu.elements[i].selected = false;
}
}
ESX_MENU.change(focused.namespace, focused.name, elem);
ESX_MENU.render();
$(document.getElementById("menu_" + focused.namespace + "_" + focused.name))
.find(".menu-item.selected")[0]
.scrollIntoView();
}
break;
}
case "DOWN": {
let focused = ESX_MENU.getFocused();
if (typeof focused != "undefined") {
let menu = ESX_MENU.opened[focused.namespace][focused.name];
let pos = ESX_MENU.pos[focused.namespace][focused.name];
let length = menu.elements.length;
if (pos < length - 1) {
ESX_MENU.pos[focused.namespace][focused.name]++;
} else {
ESX_MENU.pos[focused.namespace][focused.name] = 0;
}
let elem = menu.elements[ESX_MENU.pos[focused.namespace][focused.name]];
for (let i = 0; i < menu.elements.length; i++) {
if (i === ESX_MENU.pos[focused.namespace][focused.name]) {
menu.elements[i].selected = true;
} else {
menu.elements[i].selected = false;
}
}
ESX_MENU.change(focused.namespace, focused.name, elem);
ESX_MENU.render();
$(document.getElementById("menu_" + focused.namespace + "_" + focused.name))
.find(".menu-item.selected")[0]
.scrollIntoView();
}
break;
}
case "LEFT": {
let focused = ESX_MENU.getFocused();
if (typeof focused != "undefined") {
let menu = ESX_MENU.opened[focused.namespace][focused.name];
let pos = ESX_MENU.pos[focused.namespace][focused.name];
let elem = menu.elements[pos];
switch (elem.type) {
case "default":
break;
case "slider": {
let min = typeof elem.min === "undefined" ? 0 : elem.min;
if (elem.value > min) {
elem.value--;
ESX_MENU.change(focused.namespace, focused.name, elem);
}
ESX_MENU.render();
break;
}
default:
break;
}
$(document.getElementById("menu_" + focused.namespace + "_" + focused.name))
.find(".menu-item.selected")[0]
.scrollIntoView();
}
break;
}
case "RIGHT": {
let focused = ESX_MENU.getFocused();
if (typeof focused != "undefined") {
let menu = ESX_MENU.opened[focused.namespace][focused.name];
let pos = ESX_MENU.pos[focused.namespace][focused.name];
let elem = menu.elements[pos];
switch (elem.type) {
case "default":
break;
case "slider": {
if (typeof elem.options != "undefined" && elem.value < elem.options.length - 1) {
elem.value++;
ESX_MENU.change(focused.namespace, focused.name, elem);
}
if (typeof elem.max != "undefined" && elem.value < elem.max) {
elem.value++;
ESX_MENU.change(focused.namespace, focused.name, elem);
}
ESX_MENU.render();
break;
}
default:
break;
}
$(document.getElementById("menu_" + focused.namespace + "_" + focused.name))
.find(".menu-item.selected")[0]
.scrollIntoView();
}
break;
}
default:
break;
}
break;
}
}
};
window.onload = function (e) {
window.addEventListener("message", (event) => {
onData(event.data);
});
};
})();

View File

@ -1,347 +0,0 @@
(function defineMustache(global, factory) {
if (typeof exports === "object" && exports && typeof exports.nodeName !== "string") {
factory(exports);
} else if (typeof define === "function" && define.amd) {
define(["exports"], factory);
} else {
global.Mustache = {};
factory(global.Mustache);
}
})(this, function mustacheFactory(mustache) {
var objectToString = Object.prototype.toString;
var isArray =
Array.isArray ||
function isArrayPolyfill(object) {
return objectToString.call(object) === "[object Array]";
};
function isFunction(object) {
return typeof object === "function";
}
function typeStr(obj) {
return isArray(obj) ? "array" : typeof obj;
}
function escapeRegExp(string) {
return string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
}
function hasProperty(obj, propName) {
return obj != null && typeof obj === "object" && propName in obj;
}
var regExpTest = RegExp.prototype.test;
function testRegExp(re, string) {
return regExpTest.call(re, string);
}
var nonSpaceRe = /\S/;
function isWhitespace(string) {
return !testRegExp(nonSpaceRe, string);
}
var entityMap = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;", "/": "&#x2F;", "`": "&#x60;", "=": "&#x3D;" };
function escapeHtml(string) {
return String(string).replace(/[&<>"'`=\/]/g, function fromEntityMap(s) {
return entityMap[s];
});
}
var whiteRe = /\s*/;
var spaceRe = /\s+/;
var equalsRe = /\s*=/;
var curlyRe = /\s*\}/;
var tagRe = /#|\^|\/|>|\{|&|=|!/;
function parseTemplate(template, tags) {
if (!template) return [];
var sections = [];
var tokens = [];
var spaces = [];
var hasTag = false;
var nonSpace = false;
function stripSpace() {
if (hasTag && !nonSpace) {
while (spaces.length) delete tokens[spaces.pop()];
} else {
spaces = [];
}
hasTag = false;
nonSpace = false;
}
var openingTagRe, closingTagRe, closingCurlyRe;
function compileTags(tagsToCompile) {
if (typeof tagsToCompile === "string") tagsToCompile = tagsToCompile.split(spaceRe, 2);
if (!isArray(tagsToCompile) || tagsToCompile.length !== 2) throw new Error("Invalid tags: " + tagsToCompile);
openingTagRe = new RegExp(escapeRegExp(tagsToCompile[0]) + "\\s*");
closingTagRe = new RegExp("\\s*" + escapeRegExp(tagsToCompile[1]));
closingCurlyRe = new RegExp("\\s*" + escapeRegExp("}" + tagsToCompile[1]));
}
compileTags(tags || mustache.tags);
var scanner = new Scanner(template);
var start, type, value, chr, token, openSection;
while (!scanner.eos()) {
start = scanner.pos;
value = scanner.scanUntil(openingTagRe);
if (value) {
for (var i = 0, valueLength = value.length; i < valueLength; ++i) {
chr = value.charAt(i);
if (isWhitespace(chr)) {
spaces.push(tokens.length);
} else {
nonSpace = true;
}
tokens.push(["text", chr, start, start + 1]);
start += 1;
if (chr === "\n") stripSpace();
}
}
if (!scanner.scan(openingTagRe)) break;
hasTag = true;
type = scanner.scan(tagRe) || "name";
scanner.scan(whiteRe);
if (type === "=") {
value = scanner.scanUntil(equalsRe);
scanner.scan(equalsRe);
scanner.scanUntil(closingTagRe);
} else if (type === "{") {
value = scanner.scanUntil(closingCurlyRe);
scanner.scan(curlyRe);
scanner.scanUntil(closingTagRe);
type = "&";
} else {
value = scanner.scanUntil(closingTagRe);
}
if (!scanner.scan(closingTagRe)) throw new Error("Unclosed tag at " + scanner.pos);
token = [type, value, start, scanner.pos];
tokens.push(token);
if (type === "#" || type === "^") {
sections.push(token);
} else if (type === "/") {
openSection = sections.pop();
if (!openSection) throw new Error('Unopened section "' + value + '" at ' + start);
if (openSection[1] !== value) throw new Error('Unclosed section "' + openSection[1] + '" at ' + start);
} else if (type === "name" || type === "{" || type === "&") {
nonSpace = true;
} else if (type === "=") {
compileTags(value);
}
}
openSection = sections.pop();
if (openSection) throw new Error('Unclosed section "' + openSection[1] + '" at ' + scanner.pos);
return nestTokens(squashTokens(tokens));
}
function squashTokens(tokens) {
var squashedTokens = [];
var token, lastToken;
for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {
token = tokens[i];
if (token) {
if (token[0] === "text" && lastToken && lastToken[0] === "text") {
lastToken[1] += token[1];
lastToken[3] = token[3];
} else {
squashedTokens.push(token);
lastToken = token;
}
}
}
return squashedTokens;
}
function nestTokens(tokens) {
var nestedTokens = [];
var collector = nestedTokens;
var sections = [];
var token, section;
for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {
token = tokens[i];
switch (token[0]) {
case "#":
case "^":
collector.push(token);
sections.push(token);
collector = token[4] = [];
break;
case "/":
section = sections.pop();
section[5] = token[2];
collector = sections.length > 0 ? sections[sections.length - 1][4] : nestedTokens;
break;
default:
collector.push(token);
}
}
return nestedTokens;
}
function Scanner(string) {
this.string = string;
this.tail = string;
this.pos = 0;
}
Scanner.prototype.eos = function eos() {
return this.tail === "";
};
Scanner.prototype.scan = function scan(re) {
var match = this.tail.match(re);
if (!match || match.index !== 0) return "";
var string = match[0];
this.tail = this.tail.substring(string.length);
this.pos += string.length;
return string;
};
Scanner.prototype.scanUntil = function scanUntil(re) {
var index = this.tail.search(re),
match;
switch (index) {
case -1:
match = this.tail;
this.tail = "";
break;
case 0:
match = "";
break;
default:
match = this.tail.substring(0, index);
this.tail = this.tail.substring(index);
}
this.pos += match.length;
return match;
};
function Context(view, parentContext) {
this.view = view;
this.cache = { ".": this.view };
this.parent = parentContext;
}
Context.prototype.push = function push(view) {
return new Context(view, this);
};
Context.prototype.lookup = function lookup(name) {
var cache = this.cache;
var value;
if (cache.hasOwnProperty(name)) {
value = cache[name];
} else {
var context = this,
names,
index,
lookupHit = false;
while (context) {
if (name.indexOf(".") > 0) {
value = context.view;
names = name.split(".");
index = 0;
while (value != null && index < names.length) {
if (index === names.length - 1) lookupHit = hasProperty(value, names[index]);
value = value[names[index++]];
}
} else {
value = context.view[name];
lookupHit = hasProperty(context.view, name);
}
if (lookupHit) break;
context = context.parent;
}
cache[name] = value;
}
if (isFunction(value)) value = value.call(this.view);
return value;
};
function Writer() {
this.cache = {};
}
Writer.prototype.clearCache = function clearCache() {
this.cache = {};
};
Writer.prototype.parse = function parse(template, tags) {
var cache = this.cache;
var tokens = cache[template];
if (tokens == null) tokens = cache[template] = parseTemplate(template, tags);
return tokens;
};
Writer.prototype.render = function render(template, view, partials) {
var tokens = this.parse(template);
var context = view instanceof Context ? view : new Context(view);
return this.renderTokens(tokens, context, partials, template);
};
Writer.prototype.renderTokens = function renderTokens(tokens, context, partials, originalTemplate) {
var buffer = "";
var token, symbol, value;
for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {
value = undefined;
token = tokens[i];
symbol = token[0];
if (symbol === "#") value = this.renderSection(token, context, partials, originalTemplate);
else if (symbol === "^") value = this.renderInverted(token, context, partials, originalTemplate);
else if (symbol === ">") value = this.renderPartial(token, context, partials, originalTemplate);
else if (symbol === "&") value = this.unescapedValue(token, context);
else if (symbol === "name") value = this.escapedValue(token, context);
else if (symbol === "text") value = this.rawValue(token);
if (value !== undefined) buffer += value;
}
return buffer;
};
Writer.prototype.renderSection = function renderSection(token, context, partials, originalTemplate) {
var self = this;
var buffer = "";
var value = context.lookup(token[1]);
function subRender(template) {
return self.render(template, context, partials);
}
if (!value) return;
if (isArray(value)) {
for (var j = 0, valueLength = value.length; j < valueLength; ++j) {
buffer += this.renderTokens(token[4], context.push(value[j]), partials, originalTemplate);
}
} else if (typeof value === "object" || typeof value === "string" || typeof value === "number") {
buffer += this.renderTokens(token[4], context.push(value), partials, originalTemplate);
} else if (isFunction(value)) {
if (typeof originalTemplate !== "string") throw new Error("Cannot use higher-order sections without the original template");
value = value.call(context.view, originalTemplate.slice(token[3], token[5]), subRender);
if (value != null) buffer += value;
} else {
buffer += this.renderTokens(token[4], context, partials, originalTemplate);
}
return buffer;
};
Writer.prototype.renderInverted = function renderInverted(token, context, partials, originalTemplate) {
var value = context.lookup(token[1]);
if (!value || (isArray(value) && value.length === 0)) return this.renderTokens(token[4], context, partials, originalTemplate);
};
Writer.prototype.renderPartial = function renderPartial(token, context, partials) {
if (!partials) return;
var value = isFunction(partials) ? partials(token[1]) : partials[token[1]];
if (value != null) return this.renderTokens(this.parse(value), context, partials, value);
};
Writer.prototype.unescapedValue = function unescapedValue(token, context) {
var value = context.lookup(token[1]);
if (value != null) return value;
};
Writer.prototype.escapedValue = function escapedValue(token, context) {
var value = context.lookup(token[1]);
if (value != null) return mustache.escape(value);
};
Writer.prototype.rawValue = function rawValue(token) {
return token[1];
};
mustache.name = "mustache.js";
mustache.version = "2.3.0";
mustache.tags = ["{{", "}}"];
var defaultWriter = new Writer();
mustache.clearCache = function clearCache() {
return defaultWriter.clearCache();
};
mustache.parse = function parse(template, tags) {
return defaultWriter.parse(template, tags);
};
mustache.render = function render(template, view, partials) {
if (typeof template !== "string") {
throw new TypeError('Invalid template! Template should be a "string" ' + 'but "' + typeStr(template) + '" was given as the first ' + "argument for mustache#render(template, view, partials)");
}
return defaultWriter.render(template, view, partials);
};
mustache.to_html = function to_html(template, view, partials, send) {
var result = mustache.render(template, view, partials);
if (isFunction(send)) {
send(result);
} else {
return result;
}
};
mustache.escape = escapeHtml;
mustache.Scanner = Scanner;
mustache.Context = Context;
mustache.Writer = Writer;
return mustache;
});

View File

@ -1,16 +0,0 @@
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="nui://esx_menu_default/html/css/app.css" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link href="https://fonts.googleapis.com/css2?family=PT+Sans+Narrow&display=swap" rel="stylesheet" />
</head>
<body>
<div id="menus"></div>
<script src="nui://game/ui/jquery.js" type="text/javascript"></script>
<script src="nui://esx_menu_default/html/js/mustache.min.js" type="text/javascript"></script>
<script src="nui://esx_menu_default/html/js/app.js" type="text/javascript"></script>
</body>
</html>

View File

@ -1,674 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
esx_menu_dialog
Copyright (C) 2015-2024 Jérémie N'gadi
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
esx_menu_dialog Copyright (C) 2015-2024 Jérémie N'gadi
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@ -1,21 +0,0 @@
# esx_menu_dialog
Simple script used for inputs.
## Installation
- Add this to your `server.cfg`:
```
start esx_menu_dialog
```
# Legal
### License
esx_menu_dialog - input dialog for ESX
Copyright (C) 2015-2024 Jérémie N'gadi
This program Is free software: you can redistribute it And/Or modify it under the terms Of the GNU General Public License As published by the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version.
This program Is distributed In the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty Of MERCHANTABILITY Or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License For more details.
You should have received a copy Of the GNU General Public License along with this program. If Not, see http://www.gnu.org/licenses/.

View File

@ -1,80 +0,0 @@
local Timeouts, OpenedMenus, MenuType = {}, {}, "dialog"
local function openMenu(namespace, name, data)
for i = 1, #Timeouts, 1 do
ESX.ClearTimeout(Timeouts[i])
end
OpenedMenus[namespace .. "_" .. name] = true
SendNUIMessage({
action = "openMenu",
namespace = namespace,
name = name,
data = data,
})
local timeoutId = ESX.SetTimeout(200, function()
SetNuiFocus(true, true)
end)
table.insert(Timeouts, timeoutId)
end
local function closeMenu(namespace, name)
OpenedMenus[namespace .. "_" .. name] = nil
SendNUIMessage({
action = "closeMenu",
namespace = namespace,
name = name,
})
if not next(OpenedMenus) then
SetNuiFocus(false)
end
end
ESX.UI.Menu.RegisterType(MenuType, openMenu, closeMenu)
AddEventHandler("esx_menu_dialog:message:menu_submit", function(data)
local menu = ESX.UI.Menu.GetOpened(MenuType, data._namespace, data._name)
local cancel = false
if menu.submit then
-- is the submitted data a number?
if tonumber(data.value) then
data.value = ESX.Math.Round(tonumber(data.value))
-- check for negative value
if tonumber(data.value) <= 0 then
cancel = true
end
end
data.value = ESX.Math.Trim(data.value)
-- don't submit if the value is negative or if it's 0
if cancel then
ESX.ShowNotification("That input is not allowed!")
else
menu.submit(data, menu)
end
end
end)
AddEventHandler("esx_menu_dialog:message:menu_cancel", function(data)
local menu = ESX.UI.Menu.GetOpened(MenuType, data._namespace, data._name)
if menu.cancel ~= nil then
menu.cancel(data, menu)
end
end)
AddEventHandler("esx_menu_dialog:message:menu_change", function(data)
local menu = ESX.UI.Menu.GetOpened(MenuType, data._namespace, data._name)
if menu.change ~= nil then
menu.change(data, menu)
end
end)

View File

@ -1,28 +0,0 @@
fx_version 'adamant'
game 'gta5'
description 'A basic input dialog for ESX Legacy.'
lua54 'yes'
version '1.10.8'
client_scripts {
'@ui_core/imports.lua',
'@ui_core/client/wrapper.lua',
'client/main.lua'
}
ui_page 'html/ui.html'
files {
'html/ui.html',
'html/css/app.css',
'html/js/mustache.min.js',
'html/js/app.js',
'html/fonts/pdown.ttf',
'html/fonts/bankgothic.ttf'
}
dependency 'ui_core'

View File

@ -1,132 +0,0 @@
@import url("https://fonts.googleapis.com/css?family=Montserrat&display=swap");
#controls {
font-family: montserrat;
font-size: 3em;
color: #fff;
position: absolute;
bottom: 40;
right: 40;
}
.controls {
display: none;
}
.dialog {
font-family: montserrat;
background: rgba(33, 33, 33, 0.8);
color: #fff;
position: absolute;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
overflow: hidden;
top: 50%;
left: 50%;
width: 600px;
height: 152px;
transform: translate(-50%, -50%);
}
.head {
display: flex;
flex-basis: 100%;
align-items: center;
color: #fff;
}
.dialog.big {
height: 200px;
}
.dialog .head {
background: rgba(25, 25, 25, 0.9);
text-align: center;
height: 40px;
}
.dialog .head span::before {
content: "";
display: inline-block;
height: 100%;
vertical-align: middle;
}
.dialog input[type="text"] {
width: 60%;
height: 32px;
outline: 0;
background: none;
text-align: center;
margin-top: 26px;
margin-left: 125px;
font-size: large;
transition: all 0.2s ease-in-out;
color: white;
border: 0.5px solid #ffffff3b;
border-radius: 0px;
}
.dialog input[type="text"]:active,
.dialog input[type="text"]:hover {
color: white;
}
.dialog textarea {
width: 100%;
height: 128px;
}
.dialog button[name="submit"] {
width: 17.6%;
height: 32px;
margin-left: 160px;
font-weight: 300;
color: rgb(37, 34, 53);
border-radius: 10px;
text-transform: uppercase;
background: rgb(50, 79, 208);
outline: 0;
border: none;
transition: all 0.2s ease-in-out;
}
.dialog button {
z-index: 9999;
transform: translate(-0%, 50%);
}
.dialog button[name="cancel"] {
width: 17.6%;
height: 32px;
margin-left: 60px;
border: none;
text-transform: uppercase;
font-weight: 200;
border-radius: 10px;
color: rgb(53, 34, 34);
outline: 0;
background: #c74545;
transition: all 0.2s ease-in-out;
}
.dialog button[name="cancel"]:hover {
letter-spacing: 1px;
color: #ffffff;
width: 17.6%;
}
.dialog button[name="submit"]:hover {
letter-spacing: 1px;
color: white;
width: 17.6%;
}
.head::before,
.head::after {
content: "";
flex-grow: 1;
background: #00e1ff;
height: 2px;
margin: 0px 3px;
}

View File

@ -1,181 +0,0 @@
(function () {
let MenuTpl =
'<div id="menu_{{_namespace}}_{{_name}}" class="dialog {{#isBig}}big{{/isBig}}">' +
'<div class="head"><span>{{title}}</span></div>' +
'{{#isDefault}}<input type="text" name="value" id="inputText"/>{{/isDefault}}' +
'{{#isBig}}<textarea name="value"/>{{/isBig}}' +
'<button type="button" name="submit">Submit</button>' +
'<button type="button" name="cancel">Cancel</button>' +
"</div>" +
"</div>";
window.ESX_MENU = {};
ESX_MENU.ResourceName = "esx_menu_dialog";
ESX_MENU.opened = {};
ESX_MENU.focus = [];
ESX_MENU.pos = {};
ESX_MENU.open = function (namespace, name, data) {
if (typeof ESX_MENU.opened[namespace] === "undefined") {
ESX_MENU.opened[namespace] = {};
}
if (typeof ESX_MENU.opened[namespace][name] != "undefined") {
ESX_MENU.close(namespace, name);
}
if (typeof ESX_MENU.pos[namespace] === "undefined") {
ESX_MENU.pos[namespace] = {};
}
if (typeof data.type === "undefined") {
data.type = "default";
}
if (typeof data.align === "undefined") {
data.align = "top-left";
}
data._index = ESX_MENU.focus.length;
data._namespace = namespace;
data._name = name;
ESX_MENU.opened[namespace][name] = data;
ESX_MENU.pos[namespace][name] = 0;
ESX_MENU.focus.push({
namespace: namespace,
name: name,
});
document.onkeyup = function (key) {
if (key.which === 27) {
// Escape key
SendMessage(ESX_MENU.ResourceName, "menu_cancel", data);
} else if (key.which === 13) {
// Enter key
SendMessage(ESX_MENU.ResourceName, "menu_submit", data);
}
};
ESX_MENU.render();
};
ESX_MENU.close = function (namespace, name) {
delete ESX_MENU.opened[namespace][name];
for (let i = 0; i < ESX_MENU.focus.length; i++) {
if (ESX_MENU.focus[i].namespace === namespace && ESX_MENU.focus[i].name === name) {
ESX_MENU.focus.splice(i, 1);
break;
}
}
ESX_MENU.render();
};
ESX_MENU.render = function () {
let menuContainer = $("#menus")[0];
$(menuContainer).find('button[name="submit"]').unbind("click");
$(menuContainer).find('button[name="cancel"]').unbind("click");
$(menuContainer).find('[name="value"]').unbind("input propertychange");
menuContainer.innerHTML = "";
$(menuContainer).hide();
for (let namespace in ESX_MENU.opened) {
for (let name in ESX_MENU.opened[namespace]) {
let menuData = ESX_MENU.opened[namespace][name];
let view = JSON.parse(JSON.stringify(menuData));
switch (menuData.type) {
case "default": {
view.isDefault = true;
break;
}
case "big": {
view.isBig = true;
break;
}
default:
break;
}
let menu = $(Mustache.render(MenuTpl, view))[0];
$(menu).css("z-index", 1000 + view._index);
$(menu)
.find('button[name="submit"]')
.click(
function () {
ESX_MENU.submit(this.namespace, this.name, this.data);
}.bind({ namespace: namespace, name: name, data: menuData })
);
$(menu)
.find('button[name="cancel"]')
.click(
function () {
ESX_MENU.cancel(this.namespace, this.name, this.data);
}.bind({ namespace: namespace, name: name, data: menuData })
);
$(menu)
.find('[name="value"]')
.bind(
"input propertychange",
function () {
this.data.value = $(menu).find('[name="value"]').val();
ESX_MENU.change(this.namespace, this.name, this.data);
}.bind({ namespace: namespace, name: name, data: menuData })
);
if (typeof menuData.value != "undefined") {
$(menu).find('[name="value"]').val(menuData.value);
}
menuContainer.appendChild(menu);
}
}
$(menuContainer).show();
$("#inputText").focus();
};
ESX_MENU.submit = function (namespace, name, data) {
SendMessage(ESX_MENU.ResourceName, "menu_submit", data);
};
ESX_MENU.cancel = function (namespace, name, data) {
SendMessage(ESX_MENU.ResourceName, "menu_cancel", data);
};
ESX_MENU.change = function (namespace, name, data) {
SendMessage(ESX_MENU.ResourceName, "menu_change", data);
};
ESX_MENU.getFocused = function () {
return ESX_MENU.focus[ESX_MENU.focus.length - 1];
};
window.onData = (data) => {
switch (data.action) {
case "openMenu": {
ESX_MENU.open(data.namespace, data.name, data.data);
break;
}
case "closeMenu": {
ESX_MENU.close(data.namespace, data.name);
break;
}
}
};
window.onload = function (e) {
window.addEventListener("message", (event) => {
onData(event.data);
});
};
})();

View File

@ -1,347 +0,0 @@
(function defineMustache(global, factory) {
if (typeof exports === "object" && exports && typeof exports.nodeName !== "string") {
factory(exports);
} else if (typeof define === "function" && define.amd) {
define(["exports"], factory);
} else {
global.Mustache = {};
factory(global.Mustache);
}
})(this, function mustacheFactory(mustache) {
var objectToString = Object.prototype.toString;
var isArray =
Array.isArray ||
function isArrayPolyfill(object) {
return objectToString.call(object) === "[object Array]";
};
function isFunction(object) {
return typeof object === "function";
}
function typeStr(obj) {
return isArray(obj) ? "array" : typeof obj;
}
function escapeRegExp(string) {
return string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
}
function hasProperty(obj, propName) {
return obj != null && typeof obj === "object" && propName in obj;
}
var regExpTest = RegExp.prototype.test;
function testRegExp(re, string) {
return regExpTest.call(re, string);
}
var nonSpaceRe = /\S/;
function isWhitespace(string) {
return !testRegExp(nonSpaceRe, string);
}
var entityMap = { "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;", "/": "&#x2F;", "`": "&#x60;", "=": "&#x3D;" };
function escapeHtml(string) {
return String(string).replace(/[&<>"'`=\/]/g, function fromEntityMap(s) {
return entityMap[s];
});
}
var whiteRe = /\s*/;
var spaceRe = /\s+/;
var equalsRe = /\s*=/;
var curlyRe = /\s*\}/;
var tagRe = /#|\^|\/|>|\{|&|=|!/;
function parseTemplate(template, tags) {
if (!template) return [];
var sections = [];
var tokens = [];
var spaces = [];
var hasTag = false;
var nonSpace = false;
function stripSpace() {
if (hasTag && !nonSpace) {
while (spaces.length) delete tokens[spaces.pop()];
} else {
spaces = [];
}
hasTag = false;
nonSpace = false;
}
var openingTagRe, closingTagRe, closingCurlyRe;
function compileTags(tagsToCompile) {
if (typeof tagsToCompile === "string") tagsToCompile = tagsToCompile.split(spaceRe, 2);
if (!isArray(tagsToCompile) || tagsToCompile.length !== 2) throw new Error("Invalid tags: " + tagsToCompile);
openingTagRe = new RegExp(escapeRegExp(tagsToCompile[0]) + "\\s*");
closingTagRe = new RegExp("\\s*" + escapeRegExp(tagsToCompile[1]));
closingCurlyRe = new RegExp("\\s*" + escapeRegExp("}" + tagsToCompile[1]));
}
compileTags(tags || mustache.tags);
var scanner = new Scanner(template);
var start, type, value, chr, token, openSection;
while (!scanner.eos()) {
start = scanner.pos;
value = scanner.scanUntil(openingTagRe);
if (value) {
for (var i = 0, valueLength = value.length; i < valueLength; ++i) {
chr = value.charAt(i);
if (isWhitespace(chr)) {
spaces.push(tokens.length);
} else {
nonSpace = true;
}
tokens.push(["text", chr, start, start + 1]);
start += 1;
if (chr === "\n") stripSpace();
}
}
if (!scanner.scan(openingTagRe)) break;
hasTag = true;
type = scanner.scan(tagRe) || "name";
scanner.scan(whiteRe);
if (type === "=") {
value = scanner.scanUntil(equalsRe);
scanner.scan(equalsRe);
scanner.scanUntil(closingTagRe);
} else if (type === "{") {
value = scanner.scanUntil(closingCurlyRe);
scanner.scan(curlyRe);
scanner.scanUntil(closingTagRe);
type = "&";
} else {
value = scanner.scanUntil(closingTagRe);
}
if (!scanner.scan(closingTagRe)) throw new Error("Unclosed tag at " + scanner.pos);
token = [type, value, start, scanner.pos];
tokens.push(token);
if (type === "#" || type === "^") {
sections.push(token);
} else if (type === "/") {
openSection = sections.pop();
if (!openSection) throw new Error('Unopened section "' + value + '" at ' + start);
if (openSection[1] !== value) throw new Error('Unclosed section "' + openSection[1] + '" at ' + start);
} else if (type === "name" || type === "{" || type === "&") {
nonSpace = true;
} else if (type === "=") {
compileTags(value);
}
}
openSection = sections.pop();
if (openSection) throw new Error('Unclosed section "' + openSection[1] + '" at ' + scanner.pos);
return nestTokens(squashTokens(tokens));
}
function squashTokens(tokens) {
var squashedTokens = [];
var token, lastToken;
for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {
token = tokens[i];
if (token) {
if (token[0] === "text" && lastToken && lastToken[0] === "text") {
lastToken[1] += token[1];
lastToken[3] = token[3];
} else {
squashedTokens.push(token);
lastToken = token;
}
}
}
return squashedTokens;
}
function nestTokens(tokens) {
var nestedTokens = [];
var collector = nestedTokens;
var sections = [];
var token, section;
for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {
token = tokens[i];
switch (token[0]) {
case "#":
case "^":
collector.push(token);
sections.push(token);
collector = token[4] = [];
break;
case "/":
section = sections.pop();
section[5] = token[2];
collector = sections.length > 0 ? sections[sections.length - 1][4] : nestedTokens;
break;
default:
collector.push(token);
}
}
return nestedTokens;
}
function Scanner(string) {
this.string = string;
this.tail = string;
this.pos = 0;
}
Scanner.prototype.eos = function eos() {
return this.tail === "";
};
Scanner.prototype.scan = function scan(re) {
var match = this.tail.match(re);
if (!match || match.index !== 0) return "";
var string = match[0];
this.tail = this.tail.substring(string.length);
this.pos += string.length;
return string;
};
Scanner.prototype.scanUntil = function scanUntil(re) {
var index = this.tail.search(re),
match;
switch (index) {
case -1:
match = this.tail;
this.tail = "";
break;
case 0:
match = "";
break;
default:
match = this.tail.substring(0, index);
this.tail = this.tail.substring(index);
}
this.pos += match.length;
return match;
};
function Context(view, parentContext) {
this.view = view;
this.cache = { ".": this.view };
this.parent = parentContext;
}
Context.prototype.push = function push(view) {
return new Context(view, this);
};
Context.prototype.lookup = function lookup(name) {
var cache = this.cache;
var value;
if (cache.hasOwnProperty(name)) {
value = cache[name];
} else {
var context = this,
names,
index,
lookupHit = false;
while (context) {
if (name.indexOf(".") > 0) {
value = context.view;
names = name.split(".");
index = 0;
while (value != null && index < names.length) {
if (index === names.length - 1) lookupHit = hasProperty(value, names[index]);
value = value[names[index++]];
}
} else {
value = context.view[name];
lookupHit = hasProperty(context.view, name);
}
if (lookupHit) break;
context = context.parent;
}
cache[name] = value;
}
if (isFunction(value)) value = value.call(this.view);
return value;
};
function Writer() {
this.cache = {};
}
Writer.prototype.clearCache = function clearCache() {
this.cache = {};
};
Writer.prototype.parse = function parse(template, tags) {
var cache = this.cache;
var tokens = cache[template];
if (tokens == null) tokens = cache[template] = parseTemplate(template, tags);
return tokens;
};
Writer.prototype.render = function render(template, view, partials) {
var tokens = this.parse(template);
var context = view instanceof Context ? view : new Context(view);
return this.renderTokens(tokens, context, partials, template);
};
Writer.prototype.renderTokens = function renderTokens(tokens, context, partials, originalTemplate) {
var buffer = "";
var token, symbol, value;
for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {
value = undefined;
token = tokens[i];
symbol = token[0];
if (symbol === "#") value = this.renderSection(token, context, partials, originalTemplate);
else if (symbol === "^") value = this.renderInverted(token, context, partials, originalTemplate);
else if (symbol === ">") value = this.renderPartial(token, context, partials, originalTemplate);
else if (symbol === "&") value = this.unescapedValue(token, context);
else if (symbol === "name") value = this.escapedValue(token, context);
else if (symbol === "text") value = this.rawValue(token);
if (value !== undefined) buffer += value;
}
return buffer;
};
Writer.prototype.renderSection = function renderSection(token, context, partials, originalTemplate) {
var self = this;
var buffer = "";
var value = context.lookup(token[1]);
function subRender(template) {
return self.render(template, context, partials);
}
if (!value) return;
if (isArray(value)) {
for (var j = 0, valueLength = value.length; j < valueLength; ++j) {
buffer += this.renderTokens(token[4], context.push(value[j]), partials, originalTemplate);
}
} else if (typeof value === "object" || typeof value === "string" || typeof value === "number") {
buffer += this.renderTokens(token[4], context.push(value), partials, originalTemplate);
} else if (isFunction(value)) {
if (typeof originalTemplate !== "string") throw new Error("Cannot use higher-order sections without the original template");
value = value.call(context.view, originalTemplate.slice(token[3], token[5]), subRender);
if (value != null) buffer += value;
} else {
buffer += this.renderTokens(token[4], context, partials, originalTemplate);
}
return buffer;
};
Writer.prototype.renderInverted = function renderInverted(token, context, partials, originalTemplate) {
var value = context.lookup(token[1]);
if (!value || (isArray(value) && value.length === 0)) return this.renderTokens(token[4], context, partials, originalTemplate);
};
Writer.prototype.renderPartial = function renderPartial(token, context, partials) {
if (!partials) return;
var value = isFunction(partials) ? partials(token[1]) : partials[token[1]];
if (value != null) return this.renderTokens(this.parse(value), context, partials, value);
};
Writer.prototype.unescapedValue = function unescapedValue(token, context) {
var value = context.lookup(token[1]);
if (value != null) return value;
};
Writer.prototype.escapedValue = function escapedValue(token, context) {
var value = context.lookup(token[1]);
if (value != null) return mustache.escape(value);
};
Writer.prototype.rawValue = function rawValue(token) {
return token[1];
};
mustache.name = "mustache.js";
mustache.version = "2.3.0";
mustache.tags = ["{{", "}}"];
var defaultWriter = new Writer();
mustache.clearCache = function clearCache() {
return defaultWriter.clearCache();
};
mustache.parse = function parse(template, tags) {
return defaultWriter.parse(template, tags);
};
mustache.render = function render(template, view, partials) {
if (typeof template !== "string") {
throw new TypeError('Invalid template! Template should be a "string" ' + 'but "' + typeStr(template) + '" was given as the first ' + "argument for mustache#render(template, view, partials)");
}
return defaultWriter.render(template, view, partials);
};
mustache.to_html = function to_html(template, view, partials, send) {
var result = mustache.render(template, view, partials);
if (isFunction(send)) {
send(result);
} else {
return result;
}
};
mustache.escape = escapeHtml;
mustache.Scanner = Scanner;
mustache.Context = Context;
mustache.Writer = Writer;
return mustache;
});

View File

@ -1,17 +0,0 @@
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="nui://esx_menu_dialog/html/css/app.css" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@1,300&family=PT+Sans+Narrow&display=swap" rel="stylesheet" />
</head>
<body>
<div id="menus"></div>
<script src="nui://game/ui/jquery.js" type="text/javascript"></script>
<script src="nui://es_extended/html/js/wrapper.js"></script>
<script src="nui://esx_menu_dialog/html/js/mustache.min.js" type="text/javascript"></script>
<script src="nui://esx_menu_dialog/html/js/app.js" type="text/javascript"></script>
</body>
</html>

View File

@ -1,674 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
esx_menu_list
Copyright (C) 2015-2024 Jérémie N'gadi
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
esx_menu_list Copyright (C) 2015-2024 Jérémie N'gadi
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.

View File

@ -1,14 +0,0 @@
# esx_menu_list
Advanced menu inputs for ESX
# Legal
### License
esx_menu_list - advanced menu inputs for ESX
Copyright (C) 2015-2024 Jérémie N'gadi
This program Is free software: you can redistribute it And/Or modify it under the terms Of the GNU General Public License As published by the Free Software Foundation, either version 3 Of the License, Or (at your option) any later version.
This program Is distributed In the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty Of MERCHANTABILITY Or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License For more details.
You should have received a copy Of the GNU General Public License along with this program. If Not, see http://www.gnu.org/licenses/.

View File

@ -1,59 +0,0 @@
CreateThread(function()
local MenuType = "list"
local OpenedMenus = {}
local function openMenu(namespace, name, data)
OpenedMenus[namespace .. "_" .. name] = true
SendNUIMessage({
action = "openMenu",
namespace = namespace,
name = name,
data = data,
})
SetTimeout(200, function()
SetNuiFocus(true, true)
end)
end
local function closeMenu(namespace, name)
OpenedMenus[namespace .. "_" .. name] = nil
local OpenedMenuCount = 0
SendNUIMessage({
action = "closeMenu",
namespace = namespace,
name = name,
})
for _, v in pairs(OpenedMenus) do
if v then
OpenedMenuCount = OpenedMenuCount + 1
end
end
if OpenedMenuCount == 0 then
SetNuiFocus(false)
end
end
ESX.UI.Menu.RegisterType(MenuType, openMenu, closeMenu)
RegisterNUICallback("menu_submit", function(data, cb)
local menu = ESX.UI.Menu.GetOpened(MenuType, data._namespace, data._name)
if menu.submit then
menu.submit(data, menu)
end
cb("OK")
end)
RegisterNUICallback("menu_cancel", function(data, cb)
local menu = ESX.UI.Menu.GetOpened(MenuType, data._namespace, data._name)
if menu.cancel ~= nil then
menu.cancel(data, menu)
end
cb("OK")
end)
end)

View File

@ -1,29 +0,0 @@
fx_version 'adamant'
game 'gta5'
description 'A basic table-based menu system for ESX Legacy.'
lua54 'yes'
version '1.10.8'
client_scripts {
'@ui_core/imports.lua',
'@ui_core/client/wrapper.lua',
'client/main.lua'
}
ui_page 'html/ui.html'
files {
'html/ui.html',
'html/css/app.css',
'html/js/mustache.min.js',
'html/js/app.js',
'html/fonts/pdown.ttf',
'html/fonts/bankgothic.ttf'
}
dependency 'ui_core'

View File

@ -1,55 +0,0 @@
@font-face {
font-family: bankgothic;
src: url("../fonts/bankgothic.ttf");
}
@font-face {
font-family: pcdown;
src: url("../fonts/pdown.ttf");
}
.menu {
font-family: bankgothic;
position: absolute;
left: 50%;
top: 40%;
transform: translate(-50%, -50%);
overflow-y: auto;
max-height: 90%;
}
.menu button {
font-family: bankgothic;
}
.menu > table {
border-collapse: separate;
border-spacing: 0 5px;
min-width: 400px;
background: rgba(33, 33, 33, 0);
}
.menu > table > thead {
background: rgba(10, 10, 10, 0.9);
text-align: center;
height: 20px;
line-height: 20px;
margin-bottom: 20px;
color: #fff;
}
.menu td {
text-align: center;
padding: 8px;
margin: 20px;
}
.menu tbody tr:nth-child(even) {
color: #fff;
background: rgba(40, 40, 40, 0.8);
}
.menu tbody tr:nth-child(odd) {
color: #fff;
background: rgba(40, 40, 40, 0.8);
}

Some files were not shown because too many files have changed in this diff Show More