diff --git a/[core]/async/LICENSE b/[esx]/async/LICENSE similarity index 100% rename from [core]/async/LICENSE rename to [esx]/async/LICENSE diff --git a/[core]/async/README.md b/[esx]/async/README.md similarity index 100% rename from [core]/async/README.md rename to [esx]/async/README.md diff --git a/[core]/async/async.lua b/[esx]/async/async.lua similarity index 100% rename from [core]/async/async.lua rename to [esx]/async/async.lua diff --git a/[core]/async/fxmanifest.lua b/[esx]/async/fxmanifest.lua similarity index 100% rename from [core]/async/fxmanifest.lua rename to [esx]/async/fxmanifest.lua diff --git a/[core]/cron/LICENSE b/[esx]/cron/LICENSE similarity index 100% rename from [core]/cron/LICENSE rename to [esx]/cron/LICENSE diff --git a/[core]/cron/README.md b/[esx]/cron/README.md similarity index 100% rename from [core]/cron/README.md rename to [esx]/cron/README.md diff --git a/[core]/cron/fxmanifest.lua b/[esx]/cron/fxmanifest.lua similarity index 100% rename from [core]/cron/fxmanifest.lua rename to [esx]/cron/fxmanifest.lua diff --git a/[core]/cron/server/main.lua b/[esx]/cron/server/main.lua similarity index 100% rename from [core]/cron/server/main.lua rename to [esx]/cron/server/main.lua diff --git a/[core]/es_extended/.editorconfig b/[esx]/es_extended/.editorconfig similarity index 100% rename from [core]/es_extended/.editorconfig rename to [esx]/es_extended/.editorconfig diff --git a/[core]/es_extended/LICENSE b/[esx]/es_extended/LICENSE similarity index 100% rename from [core]/es_extended/LICENSE rename to [esx]/es_extended/LICENSE diff --git a/[core]/es_extended/client/common.lua b/[esx]/es_extended/client/common.lua similarity index 100% rename from [core]/es_extended/client/common.lua rename to [esx]/es_extended/client/common.lua diff --git a/[core]/es_extended/client/functions.lua b/[esx]/es_extended/client/functions.lua similarity index 100% rename from [core]/es_extended/client/functions.lua rename to [esx]/es_extended/client/functions.lua diff --git a/[core]/es_extended/client/main.lua b/[esx]/es_extended/client/main.lua similarity index 100% rename from [core]/es_extended/client/main.lua rename to [esx]/es_extended/client/main.lua diff --git a/[core]/es_extended/client/modules/death.lua b/[esx]/es_extended/client/modules/death.lua similarity index 100% rename from [core]/es_extended/client/modules/death.lua rename to [esx]/es_extended/client/modules/death.lua diff --git a/[core]/es_extended/client/modules/scaleform.lua b/[esx]/es_extended/client/modules/scaleform.lua similarity index 100% rename from [core]/es_extended/client/modules/scaleform.lua rename to [esx]/es_extended/client/modules/scaleform.lua diff --git a/[core]/es_extended/client/modules/streaming.lua b/[esx]/es_extended/client/modules/streaming.lua similarity index 100% rename from [core]/es_extended/client/modules/streaming.lua rename to [esx]/es_extended/client/modules/streaming.lua diff --git a/[core]/es_extended/client/wrapper.lua b/[esx]/es_extended/client/wrapper.lua similarity index 100% rename from [core]/es_extended/client/wrapper.lua rename to [esx]/es_extended/client/wrapper.lua diff --git a/[core]/es_extended/common/functions.lua b/[esx]/es_extended/common/functions.lua similarity index 100% rename from [core]/es_extended/common/functions.lua rename to [esx]/es_extended/common/functions.lua diff --git a/[core]/es_extended/common/modules/math.lua b/[esx]/es_extended/common/modules/math.lua similarity index 100% rename from [core]/es_extended/common/modules/math.lua rename to [esx]/es_extended/common/modules/math.lua diff --git a/[core]/es_extended/common/modules/table.lua b/[esx]/es_extended/common/modules/table.lua similarity index 100% rename from [core]/es_extended/common/modules/table.lua rename to [esx]/es_extended/common/modules/table.lua diff --git a/[core]/es_extended/config.logs.lua b/[esx]/es_extended/config.logs.lua similarity index 100% rename from [core]/es_extended/config.logs.lua rename to [esx]/es_extended/config.logs.lua diff --git a/[core]/es_extended/config.lua b/[esx]/es_extended/config.lua similarity index 100% rename from [core]/es_extended/config.lua rename to [esx]/es_extended/config.lua diff --git a/[core]/es_extended/config.weapons.lua b/[esx]/es_extended/config.weapons.lua similarity index 100% rename from [core]/es_extended/config.weapons.lua rename to [esx]/es_extended/config.weapons.lua diff --git a/[core]/es_extended/es_extended.sql b/[esx]/es_extended/es_extended.sql similarity index 100% rename from [core]/es_extended/es_extended.sql rename to [esx]/es_extended/es_extended.sql diff --git a/[core]/es_extended/fxmanifest.lua b/[esx]/es_extended/fxmanifest.lua similarity index 100% rename from [core]/es_extended/fxmanifest.lua rename to [esx]/es_extended/fxmanifest.lua diff --git a/[core]/es_extended/html/css/app.css b/[esx]/es_extended/html/css/app.css similarity index 100% rename from [core]/es_extended/html/css/app.css rename to [esx]/es_extended/html/css/app.css diff --git a/[core]/es_extended/html/fonts/bankgothic.ttf b/[esx]/es_extended/html/fonts/bankgothic.ttf similarity index 100% rename from [core]/es_extended/html/fonts/bankgothic.ttf rename to [esx]/es_extended/html/fonts/bankgothic.ttf diff --git a/[core]/es_extended/html/fonts/pdown.ttf b/[esx]/es_extended/html/fonts/pdown.ttf similarity index 100% rename from [core]/es_extended/html/fonts/pdown.ttf rename to [esx]/es_extended/html/fonts/pdown.ttf diff --git a/[core]/es_extended/html/img/accounts/bank.png b/[esx]/es_extended/html/img/accounts/bank.png similarity index 100% rename from [core]/es_extended/html/img/accounts/bank.png rename to [esx]/es_extended/html/img/accounts/bank.png diff --git a/[core]/es_extended/html/img/accounts/black_money.png b/[esx]/es_extended/html/img/accounts/black_money.png similarity index 100% rename from [core]/es_extended/html/img/accounts/black_money.png rename to [esx]/es_extended/html/img/accounts/black_money.png diff --git a/[core]/es_extended/html/img/accounts/money.png b/[esx]/es_extended/html/img/accounts/money.png similarity index 100% rename from [core]/es_extended/html/img/accounts/money.png rename to [esx]/es_extended/html/img/accounts/money.png diff --git a/[core]/es_extended/html/js/app.js b/[esx]/es_extended/html/js/app.js similarity index 100% rename from [core]/es_extended/html/js/app.js rename to [esx]/es_extended/html/js/app.js diff --git a/[core]/es_extended/html/js/mustache.min.js b/[esx]/es_extended/html/js/mustache.min.js similarity index 100% rename from [core]/es_extended/html/js/mustache.min.js rename to [esx]/es_extended/html/js/mustache.min.js diff --git a/[core]/es_extended/html/js/wrapper.js b/[esx]/es_extended/html/js/wrapper.js similarity index 100% rename from [core]/es_extended/html/js/wrapper.js rename to [esx]/es_extended/html/js/wrapper.js diff --git a/[core]/es_extended/html/ui.html b/[esx]/es_extended/html/ui.html similarity index 100% rename from [core]/es_extended/html/ui.html rename to [esx]/es_extended/html/ui.html diff --git a/[core]/es_extended/imports.lua b/[esx]/es_extended/imports.lua similarity index 100% rename from [core]/es_extended/imports.lua rename to [esx]/es_extended/imports.lua diff --git a/[core]/es_extended/locale.js b/[esx]/es_extended/locale.js similarity index 100% rename from [core]/es_extended/locale.js rename to [esx]/es_extended/locale.js diff --git a/[core]/es_extended/locale.lua b/[esx]/es_extended/locale.lua similarity index 100% rename from [core]/es_extended/locale.lua rename to [esx]/es_extended/locale.lua diff --git a/[core]/es_extended/locales/br.lua b/[esx]/es_extended/locales/br.lua similarity index 100% rename from [core]/es_extended/locales/br.lua rename to [esx]/es_extended/locales/br.lua diff --git a/[core]/es_extended/locales/cs.lua b/[esx]/es_extended/locales/cs.lua similarity index 100% rename from [core]/es_extended/locales/cs.lua rename to [esx]/es_extended/locales/cs.lua diff --git a/[core]/es_extended/locales/de.lua b/[esx]/es_extended/locales/de.lua similarity index 100% rename from [core]/es_extended/locales/de.lua rename to [esx]/es_extended/locales/de.lua diff --git a/[core]/es_extended/locales/en.lua b/[esx]/es_extended/locales/en.lua similarity index 100% rename from [core]/es_extended/locales/en.lua rename to [esx]/es_extended/locales/en.lua diff --git a/[core]/es_extended/locales/es.lua b/[esx]/es_extended/locales/es.lua similarity index 100% rename from [core]/es_extended/locales/es.lua rename to [esx]/es_extended/locales/es.lua diff --git a/[core]/es_extended/locales/fi.lua b/[esx]/es_extended/locales/fi.lua similarity index 100% rename from [core]/es_extended/locales/fi.lua rename to [esx]/es_extended/locales/fi.lua diff --git a/[core]/es_extended/locales/fr.lua b/[esx]/es_extended/locales/fr.lua similarity index 100% rename from [core]/es_extended/locales/fr.lua rename to [esx]/es_extended/locales/fr.lua diff --git a/[core]/es_extended/locales/hu.lua b/[esx]/es_extended/locales/hu.lua similarity index 100% rename from [core]/es_extended/locales/hu.lua rename to [esx]/es_extended/locales/hu.lua diff --git a/[core]/es_extended/locales/nl.lua b/[esx]/es_extended/locales/nl.lua similarity index 100% rename from [core]/es_extended/locales/nl.lua rename to [esx]/es_extended/locales/nl.lua diff --git a/[core]/es_extended/locales/pl.lua b/[esx]/es_extended/locales/pl.lua similarity index 100% rename from [core]/es_extended/locales/pl.lua rename to [esx]/es_extended/locales/pl.lua diff --git a/[core]/es_extended/locales/sc.lua b/[esx]/es_extended/locales/sc.lua similarity index 100% rename from [core]/es_extended/locales/sc.lua rename to [esx]/es_extended/locales/sc.lua diff --git a/[core]/es_extended/locales/sv.lua b/[esx]/es_extended/locales/sv.lua similarity index 100% rename from [core]/es_extended/locales/sv.lua rename to [esx]/es_extended/locales/sv.lua diff --git a/[core]/es_extended/locales/tc.lua b/[esx]/es_extended/locales/tc.lua similarity index 100% rename from [core]/es_extended/locales/tc.lua rename to [esx]/es_extended/locales/tc.lua diff --git a/[core]/es_extended/server/classes/overrides/oxinventory.lua b/[esx]/es_extended/server/classes/overrides/oxinventory.lua similarity index 100% rename from [core]/es_extended/server/classes/overrides/oxinventory.lua rename to [esx]/es_extended/server/classes/overrides/oxinventory.lua diff --git a/[core]/es_extended/server/classes/player.lua b/[esx]/es_extended/server/classes/player.lua similarity index 100% rename from [core]/es_extended/server/classes/player.lua rename to [esx]/es_extended/server/classes/player.lua diff --git a/[core]/es_extended/server/commands.lua b/[esx]/es_extended/server/commands.lua similarity index 100% rename from [core]/es_extended/server/commands.lua rename to [esx]/es_extended/server/commands.lua diff --git a/[core]/es_extended/server/common.lua b/[esx]/es_extended/server/common.lua similarity index 100% rename from [core]/es_extended/server/common.lua rename to [esx]/es_extended/server/common.lua diff --git a/[core]/es_extended/server/functions.lua b/[esx]/es_extended/server/functions.lua similarity index 100% rename from [core]/es_extended/server/functions.lua rename to [esx]/es_extended/server/functions.lua diff --git a/[core]/es_extended/server/main.lua b/[esx]/es_extended/server/main.lua similarity index 100% rename from [core]/es_extended/server/main.lua rename to [esx]/es_extended/server/main.lua diff --git a/[core]/es_extended/server/onesync.lua b/[esx]/es_extended/server/onesync.lua similarity index 100% rename from [core]/es_extended/server/onesync.lua rename to [esx]/es_extended/server/onesync.lua diff --git a/[core]/es_extended/server/paycheck.lua b/[esx]/es_extended/server/paycheck.lua similarity index 100% rename from [core]/es_extended/server/paycheck.lua rename to [esx]/es_extended/server/paycheck.lua diff --git a/[core]/es_extended/version.json b/[esx]/es_extended/version.json similarity index 100% rename from [core]/es_extended/version.json rename to [esx]/es_extended/version.json diff --git a/[core]/esx_context/LICENSE b/[esx]/esx_context/LICENSE similarity index 100% rename from [core]/esx_context/LICENSE rename to [esx]/esx_context/LICENSE diff --git a/[core]/esx_context/README.md b/[esx]/esx_context/README.md similarity index 100% rename from [core]/esx_context/README.md rename to [esx]/esx_context/README.md diff --git a/[core]/esx_context/config.lua b/[esx]/esx_context/config.lua similarity index 100% rename from [core]/esx_context/config.lua rename to [esx]/esx_context/config.lua diff --git a/[core]/esx_context/fxmanifest.lua b/[esx]/esx_context/fxmanifest.lua similarity index 93% rename from [core]/esx_context/fxmanifest.lua rename to [esx]/esx_context/fxmanifest.lua index 6bc711a9..9166aa6f 100644 --- a/[core]/esx_context/fxmanifest.lua +++ b/[esx]/esx_context/fxmanifest.lua @@ -1,24 +1,24 @@ -fx_version 'bodacious' - -game 'gta5' -author 'ESX-Framework & Brayden' -description 'Offical ESX Legacy Context Menu' -lua54 'yes' -version '1.9.0' - -ui_page 'index.html' - -shared_script '@es_extended/imports.lua' - -client_scripts { - 'config.lua', - 'main.lua', -} - -files { - 'index.html' -} - -dependencies { - 'es_extended' +fx_version 'bodacious' + +game 'gta5' +author 'ESX-Framework & Brayden' +description 'Offical ESX Legacy Context Menu' +lua54 'yes' +version '1.9.0' + +ui_page 'index.html' + +shared_script '@es_extended/imports.lua' + +client_scripts { + 'config.lua', + 'main.lua', +} + +files { + 'index.html' +} + +dependencies { + 'es_extended' } \ No newline at end of file diff --git a/[core]/esx_context/index.html b/[esx]/esx_context/index.html similarity index 95% rename from [core]/esx_context/index.html rename to [esx]/esx_context/index.html index cba395b1..5d15770d 100644 --- a/[core]/esx_context/index.html +++ b/[esx]/esx_context/index.html @@ -1,443 +1,443 @@ - - - - - - - - - - - ESX Context HUD - - - - - - -
-
- -
- Unselectable Item - Testing, testing a description here. -
-
-
- -
- Disabled Item - Testing, testing a description here. -
-
-
- -
- Item - Testing, testing a description here. Generic words to force overflow. -
-
-
- - - - - + + + + + + + + + + + ESX Context HUD + + + + + + +
+
+ +
+ Unselectable Item + Testing, testing a description here. +
+
+
+ +
+ Disabled Item + Testing, testing a description here. +
+
+
+ +
+ Item + Testing, testing a description here. Generic words to force overflow. +
+
+
+ + + + + diff --git a/[core]/esx_context/main.lua b/[esx]/esx_context/main.lua similarity index 94% rename from [core]/esx_context/main.lua rename to [esx]/esx_context/main.lua index 833b5464..6c16fc7d 100644 --- a/[core]/esx_context/main.lua +++ b/[esx]/esx_context/main.lua @@ -1,271 +1,271 @@ -local defaultPosition = "right" -- [ left | center | right ] -local activeMenu -local Debug = ESX.GetConfig().EnableDebug - --- Global functions --- [ Post | Open | Closed ] - -function Post(fn,...) - SendNUIMessage({ - func = fn, - args = {...} - }) -end - -function Open(position,eles,onSelect,onClose,canClose) - local canClose = canClose == nil and true or canClose - activeMenu = { - position = position, - eles = eles, - canClose = canClose, - onSelect = onSelect, - onClose = onClose - } - - LocalPlayer.state:set("context:active",true) - - Post("Open",eles,position) -end - -function Closed() - SetNuiFocus(false,false) - - local menu = activeMenu - local cb = menu.onClose - - activeMenu = nil - - LocalPlayer.state:set("context:active",false) - - if cb then - cb(menu) - end -end - --- Exports --- [ Preview | Open | Close ] - -exports("Preview",Open) - -exports("Open",function(...) - Open(...) - SetNuiFocus(true,true) -end) - -exports("Close",function() - if not activeMenu then - return - end - - Post("Closed") - - Closed() -end) - -exports("Refresh",function(eles,position) - if not activeMenu then - return - end - - activeMenu.eles = eles or activeMenu.eles - activeMenu.position = position or activeMenu.position - - Post("Open",activeMenu.eles,activeMenu.position) -end) - --- NUI Callbacks --- [ closed | selected | changed ] - -RegisterNUICallback("closed",function(data,cb) - if not activeMenu or (activeMenu and not activeMenu.canClose) then - return cb(false) - end - cb(true) - Closed() -end) - -RegisterNUICallback("selected",function(data) - if not activeMenu - or not activeMenu.onSelect - or not data.index - then - return - end - - local index = tonumber(data.index) - local ele = activeMenu.eles[index] - - if not ele - or ele.input - then - return - end - - activeMenu:onSelect(ele) -end) - -RegisterNUICallback("changed",function(data) - if not activeMenu - or not data.index - or not data.value - then - return - end - - local index = tonumber(data.index) - local ele = activeMenu.eles[index] - - if not ele - or not ele.input - then - return - end - - if ele.inputType == "number" then - ele.inputValue = tonumber(data.value) - - if ele.inputMin then - ele.inputValue = math.max(ele.inputMin,ele.inputValue) - end - - if ele.inputMax then - ele.inputValue = math.min(ele.inputMax,ele.inputValue) - end - elseif ele.inputType == "text" then - ele.inputValue = data.value - elseif ele.inputType == "radio" then - ele.inputValue = data.value - end -end) - --- Keybind - -local function focusPreview() - if not activeMenu - or not activeMenu.onSelect - then - return - end - - SetNuiFocus(true,true) -end - -if PREVIEW_KEYBIND then - RegisterCommand("previewContext",focusPreview) - - RegisterKeyMapping("previewContext","Preview Active Context","keyboard",PREVIEW_KEYBIND) -end - -exports("focusPreview",focusPreview) - --- Debug/Test --- Commands: --- [ ctx:preview | ctx:open | ctx:close | ctx:form ] - -if Debug then - local position = "right" - - local eles = { - { - unselectable=true, - icon="fas fa-info-circle", - title="Unselectable Item (Header/Label?)", - }, - { - icon="fas fa-check", - title="Item A", - description="Some description here. Add some words to make the text overflow." - }, - { - disabled=true, - icon="fas fa-times", - title="Disabled Item", - description="Some description here. Add some words to make the text overflow." - }, - { - icon="fas fa-check", - title="Item B", - description="Some description here. Add some words to make the text overflow." - }, - } - - local function onSelect(menu,ele) - print("Ele selected",ele.title) - - if ele.name == "close" then - exports["esx_context"]:Close() - end - - if ele.name ~= "submit" then - return - end - - for _,ele in ipairs(menu.eles) do - if ele.input then - print(ele.name,ele.inputType,ele.inputValue) - end - end - - exports["esx_context"]:Close() - end - - local function onClose(menu) - print("Menu closed.") - end - - RegisterCommand("ctx:preview",function() - exports["esx_context"]:Preview(position,eles) - end) - - RegisterCommand("ctx:open",function() - exports["esx_context"]:Open(position,eles,onSelect,onClose) - end) - - RegisterCommand("ctx:close",function() - exports["esx_context"]:Close() - end) - - RegisterCommand("ctx:form",function() - local eles = { - { - unselectable=true, - icon="fas fa-info-circle", - title="Unselectable Item (Header/Label?)", - }, - { - icon="", - title="Input Text", - input=true, - inputType="text", - inputPlaceholder="Placeholder...", - name="firstname", - }, - { - icon="", - title="Input Text", - input=true, - inputType="text", - inputPlaceholder="Placeholder...", - name="lastname", - }, - { - icon="", - title="Input Number", - input=true, - inputType="number", - inputPlaceholder="Placeholder...", - inputValue=0, - inputMin=0, - inputMax=50, - name="age", - }, - { - icon = "fas fa-check", - title = "Submit", - name = "submit" - } - } - - exports["esx_context"]:Open(position,eles,onSelect,onClose) - end) -end +local defaultPosition = "right" -- [ left | center | right ] +local activeMenu +local Debug = ESX.GetConfig().EnableDebug + +-- Global functions +-- [ Post | Open | Closed ] + +function Post(fn,...) + SendNUIMessage({ + func = fn, + args = {...} + }) +end + +function Open(position,eles,onSelect,onClose,canClose) + local canClose = canClose == nil and true or canClose + activeMenu = { + position = position, + eles = eles, + canClose = canClose, + onSelect = onSelect, + onClose = onClose + } + + LocalPlayer.state:set("context:active",true) + + Post("Open",eles,position) +end + +function Closed() + SetNuiFocus(false,false) + + local menu = activeMenu + local cb = menu.onClose + + activeMenu = nil + + LocalPlayer.state:set("context:active",false) + + if cb then + cb(menu) + end +end + +-- Exports +-- [ Preview | Open | Close ] + +exports("Preview",Open) + +exports("Open",function(...) + Open(...) + SetNuiFocus(true,true) +end) + +exports("Close",function() + if not activeMenu then + return + end + + Post("Closed") + + Closed() +end) + +exports("Refresh",function(eles,position) + if not activeMenu then + return + end + + activeMenu.eles = eles or activeMenu.eles + activeMenu.position = position or activeMenu.position + + Post("Open",activeMenu.eles,activeMenu.position) +end) + +-- NUI Callbacks +-- [ closed | selected | changed ] + +RegisterNUICallback("closed",function(data,cb) + if not activeMenu or (activeMenu and not activeMenu.canClose) then + return cb(false) + end + cb(true) + Closed() +end) + +RegisterNUICallback("selected",function(data) + if not activeMenu + or not activeMenu.onSelect + or not data.index + then + return + end + + local index = tonumber(data.index) + local ele = activeMenu.eles[index] + + if not ele + or ele.input + then + return + end + + activeMenu:onSelect(ele) +end) + +RegisterNUICallback("changed",function(data) + if not activeMenu + or not data.index + or not data.value + then + return + end + + local index = tonumber(data.index) + local ele = activeMenu.eles[index] + + if not ele + or not ele.input + then + return + end + + if ele.inputType == "number" then + ele.inputValue = tonumber(data.value) + + if ele.inputMin then + ele.inputValue = math.max(ele.inputMin,ele.inputValue) + end + + if ele.inputMax then + ele.inputValue = math.min(ele.inputMax,ele.inputValue) + end + elseif ele.inputType == "text" then + ele.inputValue = data.value + elseif ele.inputType == "radio" then + ele.inputValue = data.value + end +end) + +-- Keybind + +local function focusPreview() + if not activeMenu + or not activeMenu.onSelect + then + return + end + + SetNuiFocus(true,true) +end + +if PREVIEW_KEYBIND then + RegisterCommand("previewContext",focusPreview) + + RegisterKeyMapping("previewContext","Preview Active Context","keyboard",PREVIEW_KEYBIND) +end + +exports("focusPreview",focusPreview) + +-- Debug/Test +-- Commands: +-- [ ctx:preview | ctx:open | ctx:close | ctx:form ] + +if Debug then + local position = "right" + + local eles = { + { + unselectable=true, + icon="fas fa-info-circle", + title="Unselectable Item (Header/Label?)", + }, + { + icon="fas fa-check", + title="Item A", + description="Some description here. Add some words to make the text overflow." + }, + { + disabled=true, + icon="fas fa-times", + title="Disabled Item", + description="Some description here. Add some words to make the text overflow." + }, + { + icon="fas fa-check", + title="Item B", + description="Some description here. Add some words to make the text overflow." + }, + } + + local function onSelect(menu,ele) + print("Ele selected",ele.title) + + if ele.name == "close" then + exports["esx_context"]:Close() + end + + if ele.name ~= "submit" then + return + end + + for _,ele in ipairs(menu.eles) do + if ele.input then + print(ele.name,ele.inputType,ele.inputValue) + end + end + + exports["esx_context"]:Close() + end + + local function onClose(menu) + print("Menu closed.") + end + + RegisterCommand("ctx:preview",function() + exports["esx_context"]:Preview(position,eles) + end) + + RegisterCommand("ctx:open",function() + exports["esx_context"]:Open(position,eles,onSelect,onClose) + end) + + RegisterCommand("ctx:close",function() + exports["esx_context"]:Close() + end) + + RegisterCommand("ctx:form",function() + local eles = { + { + unselectable=true, + icon="fas fa-info-circle", + title="Unselectable Item (Header/Label?)", + }, + { + icon="", + title="Input Text", + input=true, + inputType="text", + inputPlaceholder="Placeholder...", + name="firstname", + }, + { + icon="", + title="Input Text", + input=true, + inputType="text", + inputPlaceholder="Placeholder...", + name="lastname", + }, + { + icon="", + title="Input Number", + input=true, + inputType="number", + inputPlaceholder="Placeholder...", + inputValue=0, + inputMin=0, + inputMax=50, + name="age", + }, + { + icon = "fas fa-check", + title = "Submit", + name = "submit" + } + } + + exports["esx_context"]:Open(position,eles,onSelect,onClose) + end) +end diff --git a/[core]/esx_identity/LICENSE b/[esx]/esx_identity/LICENSE similarity index 100% rename from [core]/esx_identity/LICENSE rename to [esx]/esx_identity/LICENSE diff --git a/[core]/esx_identity/README.md b/[esx]/esx_identity/README.md similarity index 100% rename from [core]/esx_identity/README.md rename to [esx]/esx_identity/README.md diff --git a/[core]/esx_identity/client/main.lua b/[esx]/esx_identity/client/main.lua similarity index 100% rename from [core]/esx_identity/client/main.lua rename to [esx]/esx_identity/client/main.lua diff --git a/[core]/esx_identity/config.lua b/[esx]/esx_identity/config.lua similarity index 100% rename from [core]/esx_identity/config.lua rename to [esx]/esx_identity/config.lua diff --git a/[core]/esx_identity/esx_identity.sql b/[esx]/esx_identity/esx_identity.sql similarity index 100% rename from [core]/esx_identity/esx_identity.sql rename to [esx]/esx_identity/esx_identity.sql diff --git a/[core]/esx_identity/fxmanifest.lua b/[esx]/esx_identity/fxmanifest.lua similarity index 100% rename from [core]/esx_identity/fxmanifest.lua rename to [esx]/esx_identity/fxmanifest.lua diff --git a/[core]/esx_identity/html/css/style.css b/[esx]/esx_identity/html/css/style.css similarity index 100% rename from [core]/esx_identity/html/css/style.css rename to [esx]/esx_identity/html/css/style.css diff --git a/[core]/esx_identity/html/index.html b/[esx]/esx_identity/html/index.html similarity index 100% rename from [core]/esx_identity/html/index.html rename to [esx]/esx_identity/html/index.html diff --git a/[core]/esx_identity/html/js/script.js b/[esx]/esx_identity/html/js/script.js similarity index 100% rename from [core]/esx_identity/html/js/script.js rename to [esx]/esx_identity/html/js/script.js diff --git a/[core]/esx_identity/locales/cs.lua b/[esx]/esx_identity/locales/cs.lua similarity index 100% rename from [core]/esx_identity/locales/cs.lua rename to [esx]/esx_identity/locales/cs.lua diff --git a/[core]/esx_identity/locales/de.lua b/[esx]/esx_identity/locales/de.lua similarity index 100% rename from [core]/esx_identity/locales/de.lua rename to [esx]/esx_identity/locales/de.lua diff --git a/[core]/esx_identity/locales/en.lua b/[esx]/esx_identity/locales/en.lua similarity index 100% rename from [core]/esx_identity/locales/en.lua rename to [esx]/esx_identity/locales/en.lua diff --git a/[core]/esx_identity/locales/es.lua b/[esx]/esx_identity/locales/es.lua similarity index 100% rename from [core]/esx_identity/locales/es.lua rename to [esx]/esx_identity/locales/es.lua diff --git a/[core]/esx_identity/locales/fi.lua b/[esx]/esx_identity/locales/fi.lua similarity index 100% rename from [core]/esx_identity/locales/fi.lua rename to [esx]/esx_identity/locales/fi.lua diff --git a/[core]/esx_identity/locales/hu.lua b/[esx]/esx_identity/locales/hu.lua similarity index 100% rename from [core]/esx_identity/locales/hu.lua rename to [esx]/esx_identity/locales/hu.lua diff --git a/[core]/esx_identity/locales/nl.lua b/[esx]/esx_identity/locales/nl.lua similarity index 100% rename from [core]/esx_identity/locales/nl.lua rename to [esx]/esx_identity/locales/nl.lua diff --git a/[core]/esx_identity/locales/pl.lua b/[esx]/esx_identity/locales/pl.lua similarity index 100% rename from [core]/esx_identity/locales/pl.lua rename to [esx]/esx_identity/locales/pl.lua diff --git a/[core]/esx_identity/locales/sv.lua b/[esx]/esx_identity/locales/sv.lua similarity index 100% rename from [core]/esx_identity/locales/sv.lua rename to [esx]/esx_identity/locales/sv.lua diff --git a/[core]/esx_identity/locales/tc.lua b/[esx]/esx_identity/locales/tc.lua similarity index 100% rename from [core]/esx_identity/locales/tc.lua rename to [esx]/esx_identity/locales/tc.lua diff --git a/[core]/esx_identity/preview.png b/[esx]/esx_identity/preview.png similarity index 100% rename from [core]/esx_identity/preview.png rename to [esx]/esx_identity/preview.png diff --git a/[core]/esx_identity/server/main.lua b/[esx]/esx_identity/server/main.lua similarity index 100% rename from [core]/esx_identity/server/main.lua rename to [esx]/esx_identity/server/main.lua diff --git a/[core]/esx_loadingscreen/LICENSE b/[esx]/esx_loadingscreen/LICENSE similarity index 100% rename from [core]/esx_loadingscreen/LICENSE rename to [esx]/esx_loadingscreen/LICENSE diff --git a/[core]/esx_loadingscreen/README.md b/[esx]/esx_loadingscreen/README.md similarity index 100% rename from [core]/esx_loadingscreen/README.md rename to [esx]/esx_loadingscreen/README.md diff --git a/[core]/esx_loadingscreen/client/client.lua b/[esx]/esx_loadingscreen/client/client.lua similarity index 100% rename from [core]/esx_loadingscreen/client/client.lua rename to [esx]/esx_loadingscreen/client/client.lua diff --git a/[core]/esx_loadingscreen/config.lua b/[esx]/esx_loadingscreen/config.lua similarity index 100% rename from [core]/esx_loadingscreen/config.lua rename to [esx]/esx_loadingscreen/config.lua diff --git a/[core]/esx_loadingscreen/css/index.css b/[esx]/esx_loadingscreen/css/index.css similarity index 100% rename from [core]/esx_loadingscreen/css/index.css rename to [esx]/esx_loadingscreen/css/index.css diff --git a/[core]/esx_loadingscreen/fxmanifest.lua b/[esx]/esx_loadingscreen/fxmanifest.lua similarity index 100% rename from [core]/esx_loadingscreen/fxmanifest.lua rename to [esx]/esx_loadingscreen/fxmanifest.lua diff --git a/[core]/esx_loadingscreen/index.html b/[esx]/esx_loadingscreen/index.html similarity index 100% rename from [core]/esx_loadingscreen/index.html rename to [esx]/esx_loadingscreen/index.html diff --git a/[core]/esx_loadingscreen/js/index.js b/[esx]/esx_loadingscreen/js/index.js similarity index 100% rename from [core]/esx_loadingscreen/js/index.js rename to [esx]/esx_loadingscreen/js/index.js diff --git a/[core]/esx_loadingscreen/vid/esx_intro.mp4 b/[esx]/esx_loadingscreen/vid/esx_intro.mp4 similarity index 100% rename from [core]/esx_loadingscreen/vid/esx_intro.mp4 rename to [esx]/esx_loadingscreen/vid/esx_intro.mp4 diff --git a/[core]/esx_loadingscreen/vid/esx_loop.mp4 b/[esx]/esx_loadingscreen/vid/esx_loop.mp4 similarity index 100% rename from [core]/esx_loadingscreen/vid/esx_loop.mp4 rename to [esx]/esx_loadingscreen/vid/esx_loop.mp4 diff --git a/[core]/esx_menu_default/LICENSE b/[esx]/esx_menu_default/LICENSE similarity index 100% rename from [core]/esx_menu_default/LICENSE rename to [esx]/esx_menu_default/LICENSE diff --git a/[core]/esx_menu_default/README.md b/[esx]/esx_menu_default/README.md similarity index 100% rename from [core]/esx_menu_default/README.md rename to [esx]/esx_menu_default/README.md diff --git a/[core]/esx_menu_default/client/main.lua b/[esx]/esx_menu_default/client/main.lua similarity index 100% rename from [core]/esx_menu_default/client/main.lua rename to [esx]/esx_menu_default/client/main.lua diff --git a/[core]/esx_menu_default/fxmanifest.lua b/[esx]/esx_menu_default/fxmanifest.lua similarity index 100% rename from [core]/esx_menu_default/fxmanifest.lua rename to [esx]/esx_menu_default/fxmanifest.lua diff --git a/[core]/esx_menu_default/html/css/app.css b/[esx]/esx_menu_default/html/css/app.css similarity index 100% rename from [core]/esx_menu_default/html/css/app.css rename to [esx]/esx_menu_default/html/css/app.css diff --git a/[core]/esx_menu_default/html/fonts/bankgothic.ttf b/[esx]/esx_menu_default/html/fonts/bankgothic.ttf similarity index 100% rename from [core]/esx_menu_default/html/fonts/bankgothic.ttf rename to [esx]/esx_menu_default/html/fonts/bankgothic.ttf diff --git a/[core]/esx_menu_default/html/fonts/pdown.ttf b/[esx]/esx_menu_default/html/fonts/pdown.ttf similarity index 100% rename from [core]/esx_menu_default/html/fonts/pdown.ttf rename to [esx]/esx_menu_default/html/fonts/pdown.ttf diff --git a/[core]/esx_menu_default/html/js/app.js b/[esx]/esx_menu_default/html/js/app.js similarity index 100% rename from [core]/esx_menu_default/html/js/app.js rename to [esx]/esx_menu_default/html/js/app.js diff --git a/[core]/esx_menu_default/html/js/mustache.min.js b/[esx]/esx_menu_default/html/js/mustache.min.js similarity index 100% rename from [core]/esx_menu_default/html/js/mustache.min.js rename to [esx]/esx_menu_default/html/js/mustache.min.js diff --git a/[core]/esx_menu_default/html/ui.html b/[esx]/esx_menu_default/html/ui.html similarity index 100% rename from [core]/esx_menu_default/html/ui.html rename to [esx]/esx_menu_default/html/ui.html diff --git a/[core]/esx_menu_dialog/.editorconfig b/[esx]/esx_menu_dialog/.editorconfig similarity index 100% rename from [core]/esx_menu_dialog/.editorconfig rename to [esx]/esx_menu_dialog/.editorconfig diff --git a/[core]/esx_menu_dialog/LICENSE b/[esx]/esx_menu_dialog/LICENSE similarity index 100% rename from [core]/esx_menu_dialog/LICENSE rename to [esx]/esx_menu_dialog/LICENSE diff --git a/[core]/esx_menu_dialog/README.md b/[esx]/esx_menu_dialog/README.md similarity index 100% rename from [core]/esx_menu_dialog/README.md rename to [esx]/esx_menu_dialog/README.md diff --git a/[core]/esx_menu_dialog/client/main.lua b/[esx]/esx_menu_dialog/client/main.lua similarity index 100% rename from [core]/esx_menu_dialog/client/main.lua rename to [esx]/esx_menu_dialog/client/main.lua diff --git a/[core]/esx_menu_dialog/fxmanifest.lua b/[esx]/esx_menu_dialog/fxmanifest.lua similarity index 100% rename from [core]/esx_menu_dialog/fxmanifest.lua rename to [esx]/esx_menu_dialog/fxmanifest.lua diff --git a/[core]/esx_menu_dialog/html/css/app.css b/[esx]/esx_menu_dialog/html/css/app.css similarity index 100% rename from [core]/esx_menu_dialog/html/css/app.css rename to [esx]/esx_menu_dialog/html/css/app.css diff --git a/[core]/esx_menu_dialog/html/fonts/bankgothic.ttf b/[esx]/esx_menu_dialog/html/fonts/bankgothic.ttf similarity index 100% rename from [core]/esx_menu_dialog/html/fonts/bankgothic.ttf rename to [esx]/esx_menu_dialog/html/fonts/bankgothic.ttf diff --git a/[core]/esx_menu_dialog/html/fonts/pdown.ttf b/[esx]/esx_menu_dialog/html/fonts/pdown.ttf similarity index 100% rename from [core]/esx_menu_dialog/html/fonts/pdown.ttf rename to [esx]/esx_menu_dialog/html/fonts/pdown.ttf diff --git a/[core]/esx_menu_dialog/html/js/app.js b/[esx]/esx_menu_dialog/html/js/app.js similarity index 100% rename from [core]/esx_menu_dialog/html/js/app.js rename to [esx]/esx_menu_dialog/html/js/app.js diff --git a/[core]/esx_menu_dialog/html/js/mustache.min.js b/[esx]/esx_menu_dialog/html/js/mustache.min.js similarity index 100% rename from [core]/esx_menu_dialog/html/js/mustache.min.js rename to [esx]/esx_menu_dialog/html/js/mustache.min.js diff --git a/[core]/esx_menu_dialog/html/ui.html b/[esx]/esx_menu_dialog/html/ui.html similarity index 100% rename from [core]/esx_menu_dialog/html/ui.html rename to [esx]/esx_menu_dialog/html/ui.html diff --git a/[core]/esx_menu_list/.editorconfig b/[esx]/esx_menu_list/.editorconfig similarity index 100% rename from [core]/esx_menu_list/.editorconfig rename to [esx]/esx_menu_list/.editorconfig diff --git a/[core]/esx_menu_list/LICENSE b/[esx]/esx_menu_list/LICENSE similarity index 100% rename from [core]/esx_menu_list/LICENSE rename to [esx]/esx_menu_list/LICENSE diff --git a/[core]/esx_menu_list/README.md b/[esx]/esx_menu_list/README.md similarity index 100% rename from [core]/esx_menu_list/README.md rename to [esx]/esx_menu_list/README.md diff --git a/[core]/esx_menu_list/client/main.lua b/[esx]/esx_menu_list/client/main.lua similarity index 100% rename from [core]/esx_menu_list/client/main.lua rename to [esx]/esx_menu_list/client/main.lua diff --git a/[core]/esx_menu_list/fxmanifest.lua b/[esx]/esx_menu_list/fxmanifest.lua similarity index 100% rename from [core]/esx_menu_list/fxmanifest.lua rename to [esx]/esx_menu_list/fxmanifest.lua diff --git a/[core]/esx_menu_list/html/css/app.css b/[esx]/esx_menu_list/html/css/app.css similarity index 100% rename from [core]/esx_menu_list/html/css/app.css rename to [esx]/esx_menu_list/html/css/app.css diff --git a/[core]/esx_menu_list/html/fonts/bankgothic.ttf b/[esx]/esx_menu_list/html/fonts/bankgothic.ttf similarity index 100% rename from [core]/esx_menu_list/html/fonts/bankgothic.ttf rename to [esx]/esx_menu_list/html/fonts/bankgothic.ttf diff --git a/[core]/esx_menu_list/html/fonts/pdown.ttf b/[esx]/esx_menu_list/html/fonts/pdown.ttf similarity index 100% rename from [core]/esx_menu_list/html/fonts/pdown.ttf rename to [esx]/esx_menu_list/html/fonts/pdown.ttf diff --git a/[core]/esx_menu_list/html/js/app.js b/[esx]/esx_menu_list/html/js/app.js similarity index 100% rename from [core]/esx_menu_list/html/js/app.js rename to [esx]/esx_menu_list/html/js/app.js diff --git a/[core]/esx_menu_list/html/js/mustache.min.js b/[esx]/esx_menu_list/html/js/mustache.min.js similarity index 100% rename from [core]/esx_menu_list/html/js/mustache.min.js rename to [esx]/esx_menu_list/html/js/mustache.min.js diff --git a/[core]/esx_menu_list/html/ui.html b/[esx]/esx_menu_list/html/ui.html similarity index 100% rename from [core]/esx_menu_list/html/ui.html rename to [esx]/esx_menu_list/html/ui.html diff --git a/[core]/esx_multicharacter/LICENSE.md b/[esx]/esx_multicharacter/LICENSE.md similarity index 100% rename from [core]/esx_multicharacter/LICENSE.md rename to [esx]/esx_multicharacter/LICENSE.md diff --git a/[core]/esx_multicharacter/client/main.lua b/[esx]/esx_multicharacter/client/main.lua similarity index 100% rename from [core]/esx_multicharacter/client/main.lua rename to [esx]/esx_multicharacter/client/main.lua diff --git a/[core]/esx_multicharacter/config.lua b/[esx]/esx_multicharacter/config.lua similarity index 100% rename from [core]/esx_multicharacter/config.lua rename to [esx]/esx_multicharacter/config.lua diff --git a/[core]/esx_multicharacter/esx_multicharacter.sql b/[esx]/esx_multicharacter/esx_multicharacter.sql similarity index 100% rename from [core]/esx_multicharacter/esx_multicharacter.sql rename to [esx]/esx_multicharacter/esx_multicharacter.sql diff --git a/[core]/esx_multicharacter/fxmanifest.lua b/[esx]/esx_multicharacter/fxmanifest.lua similarity index 100% rename from [core]/esx_multicharacter/fxmanifest.lua rename to [esx]/esx_multicharacter/fxmanifest.lua diff --git a/[core]/esx_multicharacter/html/css/main.css b/[esx]/esx_multicharacter/html/css/main.css similarity index 100% rename from [core]/esx_multicharacter/html/css/main.css rename to [esx]/esx_multicharacter/html/css/main.css diff --git a/[core]/esx_multicharacter/html/js/app.js b/[esx]/esx_multicharacter/html/js/app.js similarity index 100% rename from [core]/esx_multicharacter/html/js/app.js rename to [esx]/esx_multicharacter/html/js/app.js diff --git a/[core]/esx_multicharacter/html/locales/cs.js b/[esx]/esx_multicharacter/html/locales/cs.js similarity index 100% rename from [core]/esx_multicharacter/html/locales/cs.js rename to [esx]/esx_multicharacter/html/locales/cs.js diff --git a/[core]/esx_multicharacter/html/locales/de.js b/[esx]/esx_multicharacter/html/locales/de.js similarity index 100% rename from [core]/esx_multicharacter/html/locales/de.js rename to [esx]/esx_multicharacter/html/locales/de.js diff --git a/[core]/esx_multicharacter/html/locales/en.js b/[esx]/esx_multicharacter/html/locales/en.js similarity index 100% rename from [core]/esx_multicharacter/html/locales/en.js rename to [esx]/esx_multicharacter/html/locales/en.js diff --git a/[core]/esx_multicharacter/html/locales/es.js b/[esx]/esx_multicharacter/html/locales/es.js similarity index 100% rename from [core]/esx_multicharacter/html/locales/es.js rename to [esx]/esx_multicharacter/html/locales/es.js diff --git a/[core]/esx_multicharacter/html/locales/fr.js b/[esx]/esx_multicharacter/html/locales/fr.js similarity index 100% rename from [core]/esx_multicharacter/html/locales/fr.js rename to [esx]/esx_multicharacter/html/locales/fr.js diff --git a/[core]/esx_multicharacter/html/locales/hu.js b/[esx]/esx_multicharacter/html/locales/hu.js similarity index 100% rename from [core]/esx_multicharacter/html/locales/hu.js rename to [esx]/esx_multicharacter/html/locales/hu.js diff --git a/[core]/esx_multicharacter/html/locales/it.js b/[esx]/esx_multicharacter/html/locales/it.js similarity index 100% rename from [core]/esx_multicharacter/html/locales/it.js rename to [esx]/esx_multicharacter/html/locales/it.js diff --git a/[core]/esx_multicharacter/html/locales/pl.js b/[esx]/esx_multicharacter/html/locales/pl.js similarity index 100% rename from [core]/esx_multicharacter/html/locales/pl.js rename to [esx]/esx_multicharacter/html/locales/pl.js diff --git a/[core]/esx_multicharacter/html/locales/pt.js b/[esx]/esx_multicharacter/html/locales/pt.js similarity index 100% rename from [core]/esx_multicharacter/html/locales/pt.js rename to [esx]/esx_multicharacter/html/locales/pt.js diff --git a/[core]/esx_multicharacter/html/locales/tr.js b/[esx]/esx_multicharacter/html/locales/tr.js similarity index 100% rename from [core]/esx_multicharacter/html/locales/tr.js rename to [esx]/esx_multicharacter/html/locales/tr.js diff --git a/[core]/esx_multicharacter/html/ui.html b/[esx]/esx_multicharacter/html/ui.html similarity index 100% rename from [core]/esx_multicharacter/html/ui.html rename to [esx]/esx_multicharacter/html/ui.html diff --git a/[core]/esx_multicharacter/locales/cs.lua b/[esx]/esx_multicharacter/locales/cs.lua similarity index 100% rename from [core]/esx_multicharacter/locales/cs.lua rename to [esx]/esx_multicharacter/locales/cs.lua diff --git a/[core]/esx_multicharacter/locales/de.lua b/[esx]/esx_multicharacter/locales/de.lua similarity index 100% rename from [core]/esx_multicharacter/locales/de.lua rename to [esx]/esx_multicharacter/locales/de.lua diff --git a/[core]/esx_multicharacter/locales/en.lua b/[esx]/esx_multicharacter/locales/en.lua similarity index 100% rename from [core]/esx_multicharacter/locales/en.lua rename to [esx]/esx_multicharacter/locales/en.lua diff --git a/[core]/esx_multicharacter/locales/es.lua b/[esx]/esx_multicharacter/locales/es.lua similarity index 100% rename from [core]/esx_multicharacter/locales/es.lua rename to [esx]/esx_multicharacter/locales/es.lua diff --git a/[core]/esx_multicharacter/locales/fr.lua b/[esx]/esx_multicharacter/locales/fr.lua similarity index 100% rename from [core]/esx_multicharacter/locales/fr.lua rename to [esx]/esx_multicharacter/locales/fr.lua diff --git a/[core]/esx_multicharacter/locales/hu.lua b/[esx]/esx_multicharacter/locales/hu.lua similarity index 100% rename from [core]/esx_multicharacter/locales/hu.lua rename to [esx]/esx_multicharacter/locales/hu.lua diff --git a/[core]/esx_multicharacter/locales/it.lua b/[esx]/esx_multicharacter/locales/it.lua similarity index 100% rename from [core]/esx_multicharacter/locales/it.lua rename to [esx]/esx_multicharacter/locales/it.lua diff --git a/[core]/esx_multicharacter/locales/nl.lua b/[esx]/esx_multicharacter/locales/nl.lua similarity index 100% rename from [core]/esx_multicharacter/locales/nl.lua rename to [esx]/esx_multicharacter/locales/nl.lua diff --git a/[core]/esx_multicharacter/locales/pt.lua b/[esx]/esx_multicharacter/locales/pt.lua similarity index 100% rename from [core]/esx_multicharacter/locales/pt.lua rename to [esx]/esx_multicharacter/locales/pt.lua diff --git a/[core]/esx_multicharacter/locales/tr.lua b/[esx]/esx_multicharacter/locales/tr.lua similarity index 100% rename from [core]/esx_multicharacter/locales/tr.lua rename to [esx]/esx_multicharacter/locales/tr.lua diff --git a/[core]/esx_multicharacter/readme.md b/[esx]/esx_multicharacter/readme.md similarity index 100% rename from [core]/esx_multicharacter/readme.md rename to [esx]/esx_multicharacter/readme.md diff --git a/[core]/esx_multicharacter/server/commands.lua b/[esx]/esx_multicharacter/server/commands.lua similarity index 100% rename from [core]/esx_multicharacter/server/commands.lua rename to [esx]/esx_multicharacter/server/commands.lua diff --git a/[core]/esx_multicharacter/server/main.lua b/[esx]/esx_multicharacter/server/main.lua similarity index 100% rename from [core]/esx_multicharacter/server/main.lua rename to [esx]/esx_multicharacter/server/main.lua diff --git a/[core]/esx_notify/LICENSE b/[esx]/esx_notify/LICENSE similarity index 100% rename from [core]/esx_notify/LICENSE rename to [esx]/esx_notify/LICENSE diff --git a/[core]/esx_notify/Notify.lua b/[esx]/esx_notify/Notify.lua similarity index 96% rename from [core]/esx_notify/Notify.lua rename to [esx]/esx_notify/Notify.lua index f1798c72..a238082e 100644 --- a/[core]/esx_notify/Notify.lua +++ b/[esx]/esx_notify/Notify.lua @@ -1,59 +1,59 @@ -local Debug = ESX.GetConfig().EnableDebug - ----@param type string the notification type ----@param length number the length of the notification ----@param message any the message :D -local function Notify(notificatonType, length, message) - - if Debug then - print("1 ".. tostring(notificatonType)) - print("2 "..tostring(length)) - print("3 "..message) - end - - if type(notificatonType) ~= "string" then - notificatonType = "info" - end - - if type(length) ~= "number" then - length = 3000 - end - - if Debug then - print("4 ".. tostring(notificatonType)) - print("5 "..tostring(length)) - print("6 "..message) - end - - SendNuiMessage(json.encode({ - type = notificatonType or "info", - length = length or 3000, - message = message or "ESX-Notify" - })) -end - - -exports('Notify', Notify) -RegisterNetEvent("ESX:Notify", Notify) - -if Debug then - RegisterCommand("oldnotify", function() - ESX.ShowNotification('No Waypoint Set.', true, false, 140) - end) - - RegisterCommand("notify", function() - ESX.ShowNotification("You Recived ~br~ 1x ball~s~!", "success", 3000) - end) - - RegisterCommand("notify1", function() - ESX.ShowNotification("Well ~g~Done~s~!", "success", 3000) - end) - - RegisterCommand("notify2", function() - ESX.ShowNotification("Information Recived", "info", 3000) - end) - - RegisterCommand("notify3", function() - ESX.ShowNotification("You Did something ~r~WRONG~s~!", "error", 3000) - end) +local Debug = ESX.GetConfig().EnableDebug + +---@param type string the notification type +---@param length number the length of the notification +---@param message any the message :D +local function Notify(notificatonType, length, message) + + if Debug then + print("1 ".. tostring(notificatonType)) + print("2 "..tostring(length)) + print("3 "..message) + end + + if type(notificatonType) ~= "string" then + notificatonType = "info" + end + + if type(length) ~= "number" then + length = 3000 + end + + if Debug then + print("4 ".. tostring(notificatonType)) + print("5 "..tostring(length)) + print("6 "..message) + end + + SendNuiMessage(json.encode({ + type = notificatonType or "info", + length = length or 3000, + message = message or "ESX-Notify" + })) +end + + +exports('Notify', Notify) +RegisterNetEvent("ESX:Notify", Notify) + +if Debug then + RegisterCommand("oldnotify", function() + ESX.ShowNotification('No Waypoint Set.', true, false, 140) + end) + + RegisterCommand("notify", function() + ESX.ShowNotification("You Recived ~br~ 1x ball~s~!", "success", 3000) + end) + + RegisterCommand("notify1", function() + ESX.ShowNotification("Well ~g~Done~s~!", "success", 3000) + end) + + RegisterCommand("notify2", function() + ESX.ShowNotification("Information Recived", "info", 3000) + end) + + RegisterCommand("notify3", function() + ESX.ShowNotification("You Did something ~r~WRONG~s~!", "error", 3000) + end) end \ No newline at end of file diff --git a/[core]/esx_notify/fxmanifest.lua b/[esx]/esx_notify/fxmanifest.lua similarity index 94% rename from [core]/esx_notify/fxmanifest.lua rename to [esx]/esx_notify/fxmanifest.lua index fc2568c8..a0fdeaf7 100644 --- a/[core]/esx_notify/fxmanifest.lua +++ b/[esx]/esx_notify/fxmanifest.lua @@ -1,19 +1,19 @@ -fx_version 'adamant' -lua54 'yes' -game 'gta5' -version '1.9.0' -author 'ESX-Framework' -description 'Official NUI Notification system for ESX' - -shared_script '@es_extended/imports.lua' - -client_scripts { 'Notify.lua' } - -ui_page 'nui/index.html' - -files { - 'nui/index.html', - 'nui/js/*.js', - 'nui/css/*.css', - 'nui/img/*.png', -} +fx_version 'adamant' +lua54 'yes' +game 'gta5' +version '1.9.0' +author 'ESX-Framework' +description 'Official NUI Notification system for ESX' + +shared_script '@es_extended/imports.lua' + +client_scripts { 'Notify.lua' } + +ui_page 'nui/index.html' + +files { + 'nui/index.html', + 'nui/js/*.js', + 'nui/css/*.css', + 'nui/img/*.png', +} diff --git a/[core]/esx_notify/nui/css/style.css b/[esx]/esx_notify/nui/css/style.css similarity index 94% rename from [core]/esx_notify/nui/css/style.css rename to [esx]/esx_notify/nui/css/style.css index e86093e3..334ae6c5 100644 --- a/[core]/esx_notify/nui/css/style.css +++ b/[esx]/esx_notify/nui/css/style.css @@ -1,88 +1,88 @@ -@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100&family=Poppins:wght@300;400;500;600;800&display=swap'); - -:root { - --color: #919191; -} - -* { - border: 0; - margin: 0; - padding: 0; - box-sizing: border-box; -} - -body { - width: 100vw; - height: 100vh; - color: var(--color); - font-weight: 100; - font-family: 'Poppins', sans-serif; - overflow: hidden; -} - -#root { - display: grid; - justify-content: center; -} - -#root .notify { - display: flex; - position: relative; - flex: auto; - min-width: 20rem; - width: fit-content; - height: 3.5rem; - background: rgba(5,5, 5, 0.9); - border-radius: .5rem; - margin-top: .5rem; - animation: anim 300ms ease-in-out; - align-items: center; -} - -#root .innerText { - padding-left: .4rem; - padding-right: .4rem; - width: 100%; -} - -#root .icon { - float: left; - color: #fff; -} - -#root .text { - display: inline-block; - margin-left: .5rem; -} - -#root .error { - border-bottom: 3px solid #c0392b; -} - -#root .success { - border-bottom: 3px solid #2ecc71; -} - -#root .info { - border-bottom: 3px solid #2980b9; -} - -.material-symbols-outlined { - font-variation-settings: - 'FILL' 0, - 'wght' 400, - 'GRAD' 0, - 'opsz' 48 -} - -@keyframes anim { - 0% { - transform: scaleY(0); - } - 80% { - transform: scaleY(1.1) - } - 100% { - transform: scaleY(1) - } -} +@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@100&family=Poppins:wght@300;400;500;600;800&display=swap'); + +:root { + --color: #919191; +} + +* { + border: 0; + margin: 0; + padding: 0; + box-sizing: border-box; +} + +body { + width: 100vw; + height: 100vh; + color: var(--color); + font-weight: 100; + font-family: 'Poppins', sans-serif; + overflow: hidden; +} + +#root { + display: grid; + justify-content: center; +} + +#root .notify { + display: flex; + position: relative; + flex: auto; + min-width: 20rem; + width: fit-content; + height: 3.5rem; + background: rgba(5,5, 5, 0.9); + border-radius: .5rem; + margin-top: .5rem; + animation: anim 300ms ease-in-out; + align-items: center; +} + +#root .innerText { + padding-left: .4rem; + padding-right: .4rem; + width: 100%; +} + +#root .icon { + float: left; + color: #fff; +} + +#root .text { + display: inline-block; + margin-left: .5rem; +} + +#root .error { + border-bottom: 3px solid #c0392b; +} + +#root .success { + border-bottom: 3px solid #2ecc71; +} + +#root .info { + border-bottom: 3px solid #2980b9; +} + +.material-symbols-outlined { + font-variation-settings: + 'FILL' 0, + 'wght' 400, + 'GRAD' 0, + 'opsz' 48 +} + +@keyframes anim { + 0% { + transform: scaleY(0); + } + 80% { + transform: scaleY(1.1) + } + 100% { + transform: scaleY(1) + } +} diff --git a/[core]/esx_notify/nui/index.html b/[esx]/esx_notify/nui/index.html similarity index 97% rename from [core]/esx_notify/nui/index.html rename to [esx]/esx_notify/nui/index.html index 2852ba79..683bde80 100644 --- a/[core]/esx_notify/nui/index.html +++ b/[esx]/esx_notify/nui/index.html @@ -1,15 +1,15 @@ - - - - - - - - ESX Notify - - -
- -
- - + + + + + + + + ESX Notify + + +
+ +
+ + diff --git a/[core]/esx_notify/nui/js/script.js b/[esx]/esx_notify/nui/js/script.js similarity index 95% rename from [core]/esx_notify/nui/js/script.js rename to [esx]/esx_notify/nui/js/script.js index 55591a8a..be430ef7 100644 --- a/[core]/esx_notify/nui/js/script.js +++ b/[esx]/esx_notify/nui/js/script.js @@ -1,74 +1,74 @@ -const w = window - -// Gets the current icon it needs to use. -const types = { - ["success"]: { - ["icon"]: "check_circle", - }, - ["error"]: { - ["icon"]: "error", - }, - ["info"]: { - ["icon"]: "info", - } -} - -// the color codes example `i ~r~love~s~ donuts` -const codes = { - "~r~": "red", - "~b~": "#378cbf", - "~g~": "green", - "~y~": "yellow", - "~p~": "purple", - "~c~": "grey", - "~m~": "#212121", - "~u~": "black", - "~o~": "orange" -} - -w.addEventListener("message", (event) => { - notification({ - type: event.data.type, - message: event.data.message, - length: event.data.length, - }); -}); - -const replaceColors = (str, obj) => { - let strToReplace = str; - - for (let id in obj) { - strToReplace = strToReplace.replace(new RegExp(id, "g"), obj[id]); - } - - return strToReplace -} - -notification = (data) => { - for (color in codes) { - if (data["message"].includes(color)) { - let objArr = {}; - objArr[color] = ``; - objArr["~s~"] = ""; - - let newStr = replaceColors(data["message"], objArr); - - data["message"] = newStr - } - } - - const notification = $(` -
-
- ${types[data.type]["icon"]} -

${data["message"]}

-
-
- `).appendTo(`#root`); - - setTimeout(() => { - notification.fadeOut(700); - }, data.length); - - return notification; -} +const w = window + +// Gets the current icon it needs to use. +const types = { + ["success"]: { + ["icon"]: "check_circle", + }, + ["error"]: { + ["icon"]: "error", + }, + ["info"]: { + ["icon"]: "info", + } +} + +// the color codes example `i ~r~love~s~ donuts` +const codes = { + "~r~": "red", + "~b~": "#378cbf", + "~g~": "green", + "~y~": "yellow", + "~p~": "purple", + "~c~": "grey", + "~m~": "#212121", + "~u~": "black", + "~o~": "orange" +} + +w.addEventListener("message", (event) => { + notification({ + type: event.data.type, + message: event.data.message, + length: event.data.length, + }); +}); + +const replaceColors = (str, obj) => { + let strToReplace = str; + + for (let id in obj) { + strToReplace = strToReplace.replace(new RegExp(id, "g"), obj[id]); + } + + return strToReplace +} + +notification = (data) => { + for (color in codes) { + if (data["message"].includes(color)) { + let objArr = {}; + objArr[color] = ``; + objArr["~s~"] = ""; + + let newStr = replaceColors(data["message"], objArr); + + data["message"] = newStr + } + } + + const notification = $(` +
+
+ ${types[data.type]["icon"]} +

${data["message"]}

+
+
+ `).appendTo(`#root`); + + setTimeout(() => { + notification.fadeOut(700); + }, data.length); + + return notification; +} diff --git a/[core]/esx_notify/readme.md b/[esx]/esx_notify/readme.md similarity index 100% rename from [core]/esx_notify/readme.md rename to [esx]/esx_notify/readme.md diff --git a/[core]/esx_progressbar/Progress.lua b/[esx]/esx_progressbar/Progress.lua similarity index 97% rename from [core]/esx_progressbar/Progress.lua rename to [esx]/esx_progressbar/Progress.lua index e82cb05c..52652729 100644 --- a/[core]/esx_progressbar/Progress.lua +++ b/[esx]/esx_progressbar/Progress.lua @@ -1,50 +1,50 @@ -local CurrentProgress = nil -local function Progressbar(message,length,Options) - local Canceled = false - if not CurrentProgress then - CurrentProgress = Options or {} - if CurrentProgress.animation then - if CurrentProgress.animation.type == "anim" then - ESX.Streaming.RequestAnimDict(CurrentProgress.animation.dict, function() - TaskPlayAnim(ESX.PlayerData.ped, CurrentProgress.animation.dict, CurrentProgress.animation.lib, 1.0, 1.0, length, 1, 1.0, false,false,false) - RemoveAnimDict(CurrentProgress.animation.dict) - end) - elseif CurrentProgress.animation.type == "Scenario" then - TaskStartScenarioInPlace(ESX.PlayerData.ped, CurrentProgress.animation.Scenario, 0, true) - end - end - if CurrentProgress.FreezePlayer then FreezeEntityPosition(PlayerPedId(),CurrentProgress.FreezePlayer) end - SendNuiMessage(json.encode({ - type = "Progressbar", - length = length or 3000, - message = message or "ESX-Framework" - })) - CurrentProgress.length = length or 3000 - while CurrentProgress ~= nil do - if CurrentProgress.length > 0 then - CurrentProgress.length -= 1000 - else - ClearPedTasks(ESX.PlayerData.ped) - if CurrentProgress.FreezePlayer then FreezeEntityPosition(PlayerPedId(), false) end - if CurrentProgress.onFinish then CurrentProgress.onFinish() end - CurrentProgress = nil - end - Wait(1000) - end - end -end - -ESX.RegisterInput("cancelprog", "[ProgressBar] Cancel Progressbar", "keyboard", "BACK", function() - if not CurrentProgress then return end - if not CurrentProgress.onCancel then return end - SendNuiMessage(json.encode({ - type = "Close" - })) - ClearPedTasks(ESX.PlayerData.ped) - if CurrentProgress.FreezePlayer then FreezeEntityPosition(PlayerPedId(), false) end - CurrentProgress.canceled = true - CurrentProgress.length = 0 - CurrentProgress.onCancel() - CurrentProgress = nil -end) +local CurrentProgress = nil +local function Progressbar(message,length,Options) + local Canceled = false + if not CurrentProgress then + CurrentProgress = Options or {} + if CurrentProgress.animation then + if CurrentProgress.animation.type == "anim" then + ESX.Streaming.RequestAnimDict(CurrentProgress.animation.dict, function() + TaskPlayAnim(ESX.PlayerData.ped, CurrentProgress.animation.dict, CurrentProgress.animation.lib, 1.0, 1.0, length, 1, 1.0, false,false,false) + RemoveAnimDict(CurrentProgress.animation.dict) + end) + elseif CurrentProgress.animation.type == "Scenario" then + TaskStartScenarioInPlace(ESX.PlayerData.ped, CurrentProgress.animation.Scenario, 0, true) + end + end + if CurrentProgress.FreezePlayer then FreezeEntityPosition(PlayerPedId(),CurrentProgress.FreezePlayer) end + SendNuiMessage(json.encode({ + type = "Progressbar", + length = length or 3000, + message = message or "ESX-Framework" + })) + CurrentProgress.length = length or 3000 + while CurrentProgress ~= nil do + if CurrentProgress.length > 0 then + CurrentProgress.length -= 1000 + else + ClearPedTasks(ESX.PlayerData.ped) + if CurrentProgress.FreezePlayer then FreezeEntityPosition(PlayerPedId(), false) end + if CurrentProgress.onFinish then CurrentProgress.onFinish() end + CurrentProgress = nil + end + Wait(1000) + end + end +end + +ESX.RegisterInput("cancelprog", "[ProgressBar] Cancel Progressbar", "keyboard", "BACK", function() + if not CurrentProgress then return end + if not CurrentProgress.onCancel then return end + SendNuiMessage(json.encode({ + type = "Close" + })) + ClearPedTasks(ESX.PlayerData.ped) + if CurrentProgress.FreezePlayer then FreezeEntityPosition(PlayerPedId(), false) end + CurrentProgress.canceled = true + CurrentProgress.length = 0 + CurrentProgress.onCancel() + CurrentProgress = nil +end) exports('Progressbar', Progressbar) \ No newline at end of file diff --git a/[core]/esx_progressbar/fxmanifest.lua b/[esx]/esx_progressbar/fxmanifest.lua similarity index 94% rename from [core]/esx_progressbar/fxmanifest.lua rename to [esx]/esx_progressbar/fxmanifest.lua index 993113ad..0ac65731 100644 --- a/[core]/esx_progressbar/fxmanifest.lua +++ b/[esx]/esx_progressbar/fxmanifest.lua @@ -1,16 +1,16 @@ -fx_version 'adamant' -game 'gta5' -author 'ESX-Framework' -lua54 'yes' -description 'ESX Progressbar' - -client_scripts { 'Progress.lua' } -shared_script '@es_extended/imports.lua' -ui_page 'nui/index.html' - -files { - 'nui/index.html', - 'nui/js/*.js', - 'nui/css/*.css', - 'nui/img/*.png', -} +fx_version 'adamant' +game 'gta5' +author 'ESX-Framework' +lua54 'yes' +description 'ESX Progressbar' + +client_scripts { 'Progress.lua' } +shared_script '@es_extended/imports.lua' +ui_page 'nui/index.html' + +files { + 'nui/index.html', + 'nui/js/*.js', + 'nui/css/*.css', + 'nui/img/*.png', +} diff --git a/[core]/esx_progressbar/nui/css/style.css b/[esx]/esx_progressbar/nui/css/style.css similarity index 92% rename from [core]/esx_progressbar/nui/css/style.css rename to [esx]/esx_progressbar/nui/css/style.css index 61d24738..4b24467e 100644 --- a/[core]/esx_progressbar/nui/css/style.css +++ b/[esx]/esx_progressbar/nui/css/style.css @@ -1,14 +1,14 @@ -:root { - --color: white; - --bgColor: #212121; -} - -* { - padding: 0; - margin: 0; -} - -body { - color: var(--color); - font-family: sans-serif; +:root { + --color: white; + --bgColor: #212121; +} + +* { + padding: 0; + margin: 0; +} + +body { + color: var(--color); + font-family: sans-serif; } \ No newline at end of file diff --git a/[core]/esx_progressbar/nui/index.html b/[esx]/esx_progressbar/nui/index.html similarity index 95% rename from [core]/esx_progressbar/nui/index.html rename to [esx]/esx_progressbar/nui/index.html index dcf006ee..a2e2c2be 100644 --- a/[core]/esx_progressbar/nui/index.html +++ b/[esx]/esx_progressbar/nui/index.html @@ -1,88 +1,88 @@ - - - - - - - - - -
-
- -

-
-
-
- - - - + + + + + + + + + +
+
+ +

+
+
+
+ + + + diff --git a/[core]/esx_progressbar/nui/js/script.js b/[esx]/esx_progressbar/nui/js/script.js similarity index 96% rename from [core]/esx_progressbar/nui/js/script.js rename to [esx]/esx_progressbar/nui/js/script.js index e7acda3b..9e3fbe2a 100644 --- a/[core]/esx_progressbar/nui/js/script.js +++ b/[esx]/esx_progressbar/nui/js/script.js @@ -1,69 +1,69 @@ -const w = window -const doc = document - -const codes = { - "~r~": "red", - "~b~": "#378cbf", - "~g~": "green", - "~y~": "yellow", - "~p~": "purple", - "~c~": "grey", - "~m~": "#212121", - "~u~": "black", - "~o~": "orange" -} - -$(function () { - w.addEventListener('message', function(e) { - if (e.data.type === "Progressbar") { - var message = e.data.message - const replaceColors = (str, obj) => { - let strToReplace = str; - - for (let id in obj) { - strToReplace = strToReplace.replace(new RegExp(id, "g"), obj[id]); - } - - return strToReplace - } - for (color in codes) { - if (message.includes(color)) { - let objArr = {}; - objArr[color] = ``; - objArr["~s~"] = ""; - - let newStr = replaceColors(message, objArr); - - message = newStr - } - } - $(".text").html(`

${message}

`) - doc.getElementById("notifyInfo").style.display = "block"; - const start = new Date(); - const maxTime = e.data.length; - const timeoutValue = Math.floor(maxTime/100); - animUpdate(); - - function updateProg(prc) { - $("#progline").css("width", prc + "%"); - } - - function animUpdate() { - const now = new Date(); - const timeoutDiff = now.getTime() - start.getTime(); - const prc = Math.round((timeoutDiff/maxTime)*100); - if (prc <= 100) { - updateProg(prc); - this.timeoutID = setTimeout(animUpdate, timeoutValue); - } else { - doc.getElementById('notifyInfo').style.display = "none"; - } - } - } else { - doc.getElementById("notifyInfo").style.display = "none" - clearTimeout(this.timeoutID); - timeoutValue = 0; - - } - }) -}) +const w = window +const doc = document + +const codes = { + "~r~": "red", + "~b~": "#378cbf", + "~g~": "green", + "~y~": "yellow", + "~p~": "purple", + "~c~": "grey", + "~m~": "#212121", + "~u~": "black", + "~o~": "orange" +} + +$(function () { + w.addEventListener('message', function(e) { + if (e.data.type === "Progressbar") { + var message = e.data.message + const replaceColors = (str, obj) => { + let strToReplace = str; + + for (let id in obj) { + strToReplace = strToReplace.replace(new RegExp(id, "g"), obj[id]); + } + + return strToReplace + } + for (color in codes) { + if (message.includes(color)) { + let objArr = {}; + objArr[color] = ``; + objArr["~s~"] = ""; + + let newStr = replaceColors(message, objArr); + + message = newStr + } + } + $(".text").html(`

${message}

`) + doc.getElementById("notifyInfo").style.display = "block"; + const start = new Date(); + const maxTime = e.data.length; + const timeoutValue = Math.floor(maxTime/100); + animUpdate(); + + function updateProg(prc) { + $("#progline").css("width", prc + "%"); + } + + function animUpdate() { + const now = new Date(); + const timeoutDiff = now.getTime() - start.getTime(); + const prc = Math.round((timeoutDiff/maxTime)*100); + if (prc <= 100) { + updateProg(prc); + this.timeoutID = setTimeout(animUpdate, timeoutValue); + } else { + doc.getElementById('notifyInfo').style.display = "none"; + } + } + } else { + doc.getElementById("notifyInfo").style.display = "none" + clearTimeout(this.timeoutID); + timeoutValue = 0; + + } + }) +}) diff --git a/[core]/esx_progressbar/readme.md b/[esx]/esx_progressbar/readme.md similarity index 100% rename from [core]/esx_progressbar/readme.md rename to [esx]/esx_progressbar/readme.md diff --git a/[core]/esx_skin/.editorconfig b/[esx]/esx_skin/.editorconfig similarity index 100% rename from [core]/esx_skin/.editorconfig rename to [esx]/esx_skin/.editorconfig diff --git a/[core]/esx_skin/LICENSE b/[esx]/esx_skin/LICENSE similarity index 100% rename from [core]/esx_skin/LICENSE rename to [esx]/esx_skin/LICENSE diff --git a/[core]/esx_skin/README.md b/[esx]/esx_skin/README.md similarity index 100% rename from [core]/esx_skin/README.md rename to [esx]/esx_skin/README.md diff --git a/[core]/esx_skin/client/main.lua b/[esx]/esx_skin/client/main.lua similarity index 100% rename from [core]/esx_skin/client/main.lua rename to [esx]/esx_skin/client/main.lua diff --git a/[core]/esx_skin/config.lua b/[esx]/esx_skin/config.lua similarity index 100% rename from [core]/esx_skin/config.lua rename to [esx]/esx_skin/config.lua diff --git a/[core]/esx_skin/esx_skin.sql b/[esx]/esx_skin/esx_skin.sql similarity index 100% rename from [core]/esx_skin/esx_skin.sql rename to [esx]/esx_skin/esx_skin.sql diff --git a/[core]/esx_skin/fxmanifest.lua b/[esx]/esx_skin/fxmanifest.lua similarity index 100% rename from [core]/esx_skin/fxmanifest.lua rename to [esx]/esx_skin/fxmanifest.lua diff --git a/[core]/esx_skin/locales/br.lua b/[esx]/esx_skin/locales/br.lua similarity index 100% rename from [core]/esx_skin/locales/br.lua rename to [esx]/esx_skin/locales/br.lua diff --git a/[core]/esx_skin/locales/de.lua b/[esx]/esx_skin/locales/de.lua similarity index 100% rename from [core]/esx_skin/locales/de.lua rename to [esx]/esx_skin/locales/de.lua diff --git a/[core]/esx_skin/locales/en.lua b/[esx]/esx_skin/locales/en.lua similarity index 100% rename from [core]/esx_skin/locales/en.lua rename to [esx]/esx_skin/locales/en.lua diff --git a/[core]/esx_skin/locales/es.lua b/[esx]/esx_skin/locales/es.lua similarity index 100% rename from [core]/esx_skin/locales/es.lua rename to [esx]/esx_skin/locales/es.lua diff --git a/[core]/esx_skin/locales/fi.lua b/[esx]/esx_skin/locales/fi.lua similarity index 100% rename from [core]/esx_skin/locales/fi.lua rename to [esx]/esx_skin/locales/fi.lua diff --git a/[core]/esx_skin/locales/fr.lua b/[esx]/esx_skin/locales/fr.lua similarity index 100% rename from [core]/esx_skin/locales/fr.lua rename to [esx]/esx_skin/locales/fr.lua diff --git a/[core]/esx_skin/locales/hu.lua b/[esx]/esx_skin/locales/hu.lua similarity index 100% rename from [core]/esx_skin/locales/hu.lua rename to [esx]/esx_skin/locales/hu.lua diff --git a/[core]/esx_skin/locales/it.lua b/[esx]/esx_skin/locales/it.lua similarity index 100% rename from [core]/esx_skin/locales/it.lua rename to [esx]/esx_skin/locales/it.lua diff --git a/[core]/esx_skin/locales/nl.lua b/[esx]/esx_skin/locales/nl.lua similarity index 100% rename from [core]/esx_skin/locales/nl.lua rename to [esx]/esx_skin/locales/nl.lua diff --git a/[core]/esx_skin/locales/pl.lua b/[esx]/esx_skin/locales/pl.lua similarity index 100% rename from [core]/esx_skin/locales/pl.lua rename to [esx]/esx_skin/locales/pl.lua diff --git a/[core]/esx_skin/locales/sv.lua b/[esx]/esx_skin/locales/sv.lua similarity index 100% rename from [core]/esx_skin/locales/sv.lua rename to [esx]/esx_skin/locales/sv.lua diff --git a/[core]/esx_skin/locales/tr.lua b/[esx]/esx_skin/locales/tr.lua similarity index 100% rename from [core]/esx_skin/locales/tr.lua rename to [esx]/esx_skin/locales/tr.lua diff --git a/[core]/esx_skin/server/main.lua b/[esx]/esx_skin/server/main.lua similarity index 100% rename from [core]/esx_skin/server/main.lua rename to [esx]/esx_skin/server/main.lua diff --git a/[core]/esx_textui/LICENSE b/[esx]/esx_textui/LICENSE similarity index 100% rename from [core]/esx_textui/LICENSE rename to [esx]/esx_textui/LICENSE diff --git a/[core]/esx_textui/TextUI.lua b/[esx]/esx_textui/TextUI.lua similarity index 100% rename from [core]/esx_textui/TextUI.lua rename to [esx]/esx_textui/TextUI.lua diff --git a/[core]/esx_textui/fxmanifest.lua b/[esx]/esx_textui/fxmanifest.lua similarity index 100% rename from [core]/esx_textui/fxmanifest.lua rename to [esx]/esx_textui/fxmanifest.lua diff --git a/[core]/esx_textui/nui/css/style.css b/[esx]/esx_textui/nui/css/style.css similarity index 100% rename from [core]/esx_textui/nui/css/style.css rename to [esx]/esx_textui/nui/css/style.css diff --git a/[core]/esx_textui/nui/index.html b/[esx]/esx_textui/nui/index.html similarity index 100% rename from [core]/esx_textui/nui/index.html rename to [esx]/esx_textui/nui/index.html diff --git a/[core]/esx_textui/nui/js/script.js b/[esx]/esx_textui/nui/js/script.js similarity index 100% rename from [core]/esx_textui/nui/js/script.js rename to [esx]/esx_textui/nui/js/script.js diff --git a/[core]/esx_textui/readme.md b/[esx]/esx_textui/readme.md similarity index 100% rename from [core]/esx_textui/readme.md rename to [esx]/esx_textui/readme.md diff --git a/[core]/skinchanger/LICENSE b/[esx]/skinchanger/LICENSE similarity index 100% rename from [core]/skinchanger/LICENSE rename to [esx]/skinchanger/LICENSE diff --git a/[core]/skinchanger/README.md b/[esx]/skinchanger/README.md similarity index 100% rename from [core]/skinchanger/README.md rename to [esx]/skinchanger/README.md diff --git a/[core]/skinchanger/client/main.lua b/[esx]/skinchanger/client/main.lua similarity index 100% rename from [core]/skinchanger/client/main.lua rename to [esx]/skinchanger/client/main.lua diff --git a/[core]/skinchanger/config.lua b/[esx]/skinchanger/config.lua similarity index 100% rename from [core]/skinchanger/config.lua rename to [esx]/skinchanger/config.lua diff --git a/[core]/skinchanger/fxmanifest.lua b/[esx]/skinchanger/fxmanifest.lua similarity index 100% rename from [core]/skinchanger/fxmanifest.lua rename to [esx]/skinchanger/fxmanifest.lua diff --git a/[core]/skinchanger/locales/br.lua b/[esx]/skinchanger/locales/br.lua similarity index 100% rename from [core]/skinchanger/locales/br.lua rename to [esx]/skinchanger/locales/br.lua diff --git a/[core]/skinchanger/locales/de.lua b/[esx]/skinchanger/locales/de.lua similarity index 100% rename from [core]/skinchanger/locales/de.lua rename to [esx]/skinchanger/locales/de.lua diff --git a/[core]/skinchanger/locales/en.lua b/[esx]/skinchanger/locales/en.lua similarity index 100% rename from [core]/skinchanger/locales/en.lua rename to [esx]/skinchanger/locales/en.lua diff --git a/[core]/skinchanger/locales/es.lua b/[esx]/skinchanger/locales/es.lua similarity index 100% rename from [core]/skinchanger/locales/es.lua rename to [esx]/skinchanger/locales/es.lua diff --git a/[core]/skinchanger/locales/fi.lua b/[esx]/skinchanger/locales/fi.lua similarity index 100% rename from [core]/skinchanger/locales/fi.lua rename to [esx]/skinchanger/locales/fi.lua diff --git a/[core]/skinchanger/locales/fr.lua b/[esx]/skinchanger/locales/fr.lua similarity index 100% rename from [core]/skinchanger/locales/fr.lua rename to [esx]/skinchanger/locales/fr.lua diff --git a/[core]/skinchanger/locales/hu.lua b/[esx]/skinchanger/locales/hu.lua similarity index 100% rename from [core]/skinchanger/locales/hu.lua rename to [esx]/skinchanger/locales/hu.lua diff --git a/[core]/skinchanger/locales/it.lua b/[esx]/skinchanger/locales/it.lua similarity index 100% rename from [core]/skinchanger/locales/it.lua rename to [esx]/skinchanger/locales/it.lua diff --git a/[core]/skinchanger/locales/pl.lua b/[esx]/skinchanger/locales/pl.lua similarity index 100% rename from [core]/skinchanger/locales/pl.lua rename to [esx]/skinchanger/locales/pl.lua diff --git a/[core]/skinchanger/locales/sv.lua b/[esx]/skinchanger/locales/sv.lua similarity index 100% rename from [core]/skinchanger/locales/sv.lua rename to [esx]/skinchanger/locales/sv.lua diff --git a/[core]/skinchanger/locales/tr.lua b/[esx]/skinchanger/locales/tr.lua similarity index 100% rename from [core]/skinchanger/locales/tr.lua rename to [esx]/skinchanger/locales/tr.lua diff --git a/[esx_addons]/esx_accessories/.editorconfig b/[esx_addons]/esx_accessories/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_accessories/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_accessories/.gitattributes b/[esx_addons]/esx_accessories/.gitattributes new file mode 100644 index 00000000..eba1110b --- /dev/null +++ b/[esx_addons]/esx_accessories/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto \ No newline at end of file diff --git a/[esx_addons]/esx_accessories/LICENSE b/[esx_addons]/esx_accessories/LICENSE new file mode 100644 index 00000000..08caf3c7 --- /dev/null +++ b/[esx_addons]/esx_accessories/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_accessories + Copyright (C) 2015-20202322 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 . + +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_accessories Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_accessories/README.md b/[esx_addons]/esx_accessories/README.md new file mode 100644 index 00000000..2ed2e25f --- /dev/null +++ b/[esx_addons]/esx_accessories/README.md @@ -0,0 +1,22 @@ +

[ESX] Accessories

Discord - Website - Documentation + +Shops with accessories (hat/helmet, glasses, masks, ears accessories). You can put on or take off the accessories with a menu. Accessories saved in database. + +> Note: Works only with accessories purchased in the special areas of the clothing store, not via the esx_clotheshop script. + +## Requirements + +- [esx_skin](https://github.com/esx-framework/esx-legacy/tree/main/%5Besx%5D/esx_skin) +- [esx_datastore](https://github.com/esx-framework/esx-legacy/tree/main/%5Besx_addons%5D/esx_datastore) + +## Legal + +esx_accessories - accessories 4 you! + +Copyright (C) 2015-2023 ESX-Framework + +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 . diff --git a/[esx_addons]/esx_accessories/client/main.lua b/[esx_addons]/esx_accessories/client/main.lua new file mode 100644 index 00000000..47305223 --- /dev/null +++ b/[esx_addons]/esx_accessories/client/main.lua @@ -0,0 +1,234 @@ +local HasAlreadyEnteredMarker = false +local LastZone, CurrentAction, CurrentActionMsg +local CurrentActionData = {} + +function OpenAccessoryMenu() + local elements = { + {unselectable = true, icon = "fas fa-user", title = TranslateCap('set_unset')}, + {icon = "fas fa-hat-cowboy", title = TranslateCap("helmet"), value = "Helmet"}, + {icon = "fas fa-deaf", title = TranslateCap("ears"), value = "Ears"}, + {icon = "fas fa-mask", title = TranslateCap("mask"), value = "Mask"}, + {icon = "fas fa-glasses", title = TranslateCap("glasses"), value = "Glasses"} + } + + ESX.OpenContext("right", elements, function(menu,element) + SetUnsetAccessory(element.value) + end) +end + +function SetUnsetAccessory(accessory) + ESX.TriggerServerCallback('esx_accessories:get', function(hasAccessory, accessorySkin) + local _accessory = string.lower(accessory) + + if hasAccessory then + TriggerEvent('skinchanger:getSkin', function(skin) + local mAccessory = -1 + local mColor = 0 + + if _accessory == "mask" then + mAccessory = 0 + end + + if skin[_accessory .. '_1'] == mAccessory then + mAccessory = accessorySkin[_accessory .. '_1'] + mColor = accessorySkin[_accessory .. '_2'] + end + + local accessorySkin = {} + accessorySkin[_accessory .. '_1'] = mAccessory + accessorySkin[_accessory .. '_2'] = mColor + TriggerEvent('skinchanger:loadClothes', skin, accessorySkin) + end) + else + ESX.ShowNotification(TranslateCap('no_' .. _accessory)) + end + end, accessory) +end + +function OpenShopMenu(accessory) + local _accessory = string.lower(accessory) + local restrict = {} + + restrict = { _accessory .. '_1', _accessory .. '_2' } + + TriggerEvent('esx_skin:openRestrictedMenu', function(data, menu) + + menu.close() + local elements = { + {unselectable = true, icon = "fas fa-check-double", title = TranslateCap('valid_purchase')}, + {icon = "fas fa-check-circle", title = TranslateCap("yes", ESX.Math.GroupDigits(Config.Price)), value = "yes"}, + {icon = "fas fa-window-close", title = TranslateCap("no"), value = "no"} + } + + ESX.OpenContext("right", elements, function(menu,element) + if element.value == "yes" then + ESX.TriggerServerCallback('esx_accessories:checkMoney', function(hasEnoughMoney) + if hasEnoughMoney then + ESX.CloseContext() + TriggerServerEvent('esx_accessories:pay') + TriggerEvent('skinchanger:getSkin', function(skin) + TriggerServerEvent('esx_accessories:save', skin, accessory) + end) + else + ESX.CloseContext() + local player = PlayerPedId() + TriggerEvent('esx_skin:getLastSkin', function(skin) + TriggerEvent('skinchanger:loadSkin', skin) + end) + if accessory == "Ears" then + ClearPedProp(player, 2) + elseif accessory == "Mask" then + SetPedComponentVariation(player, 1, 0 ,0, 2) + elseif accessory == "Helmet" then + ClearPedProp(player, 0) + elseif accessory == "Glasses" then + SetPedPropIndex(player, 1, -1, 0, 0) + end + ESX.ShowNotification(TranslateCap('not_enough_money')) + end + end) + elseif element.value == "no" then + local player = PlayerPedId() + TriggerEvent('esx_skin:getLastSkin', function(skin) + TriggerEvent('skinchanger:loadSkin', skin) + end) + if accessory == "Ears" then + ClearPedProp(player, 2) + elseif accessory == "Mask" then + SetPedComponentVariation(player, 1, 0 ,0, 2) + elseif accessory == "Helmet" then + ClearPedProp(player, 0) + elseif accessory == "Glasses" then + SetPedPropIndex(player, 1, -1, 0, 0) + end + + ESX.CloseContext() + end + CurrentAction = 'shop_menu' + CurrentActionMsg = TranslateCap('press_access') + CurrentActionData = {} + end, function(menu) + CurrentAction = 'shop_menu' + CurrentActionMsg = TranslateCap('press_access') + CurrentActionData = {} + end) + end, function(data, menu) + menu.close() + CurrentAction = 'shop_menu' + CurrentActionMsg = TranslateCap('press_access') + CurrentActionData = {} + end, restrict) +end + +AddEventHandler('esx_accessories:hasEnteredMarker', function(zone) + CurrentAction = 'shop_menu' + CurrentActionMsg = TranslateCap('press_access') + CurrentActionData = { accessory = zone } +end) + +AddEventHandler('esx_accessories:hasExitedMarker', function(zone) + ESX.CloseContext() + CurrentAction = nil +end) + +-- Create Blips -- +CreateThread(function() + for k,v in pairs(Config.ShopsBlips) do + if v.Pos then + for i=1, #v.Pos, 1 do + local blip = AddBlipForCoord(v.Pos[i]) + + SetBlipSprite (blip, v.Blip.sprite) + SetBlipDisplay(blip, 4) + SetBlipScale (blip, 1.0) + SetBlipColour (blip, v.Blip.color) + SetBlipAsShortRange(blip, true) + + BeginTextCommandSetBlipName("STRING") + AddTextComponentSubstringPlayerName(TranslateCap('shop', TranslateCap(string.lower(k)))) + EndTextCommandSetBlipName(blip) + end + end + end +end) + +local nearMarker = false +-- Display markers +CreateThread(function() + while true do + local sleep = 1500 + local coords = GetEntityCoords(PlayerPedId()) + for k,v in pairs(Config.Zones) do + for i = 1, #v.Pos, 1 do + if(Config.Type ~= -1 and #(coords - v.Pos[i]) < Config.DrawDistance) then + DrawMarker(Config.Type, v.Pos[i], 0.0, 0.0, 0.0, 0, 0.0, 0.0, Config.Size.x, Config.Size.y, Config.Size.z, Config.Color.r, Config.Color.g, Config.Color.b, 255, true, false, 2, true, false, false, false) + sleep = 0 + break + end + end + end + if sleep == 0 then nearMarker = true else nearMarker = false end + Wait(sleep) + end +end) + +CreateThread(function() + while true do + local sleep = 1500 + if nearMarker then + sleep = 0 + local coords = GetEntityCoords(PlayerPedId()) + local isInMarker = false + local currentZone = nil + for k,v in pairs(Config.Zones) do + for i = 1, #v.Pos, 1 do + if #(coords - v.Pos[i]) < Config.Size.x then + isInMarker = true + currentZone = k + break + end + end + end + + if (isInMarker and not HasAlreadyEnteredMarker) or (isInMarker and LastZone ~= currentZone) then + HasAlreadyEnteredMarker = true + LastZone = currentZone + TriggerEvent('esx_accessories:hasEnteredMarker', currentZone) + end + + if not isInMarker and HasAlreadyEnteredMarker then + HasAlreadyEnteredMarker = false + TriggerEvent('esx_accessories:hasExitedMarker', LastZone) + end + end + Wait(sleep) + end +end) + +-- Key controls +CreateThread(function() + while true do + local Sleep = 1500 + + if CurrentAction then + Sleep = 0 + ESX.ShowHelpNotification(CurrentActionMsg) + + if IsControlJustReleased(0, 38) and CurrentActionData.accessory then + OpenShopMenu(CurrentActionData.accessory) + CurrentAction = nil + end + end + Wait(Sleep) + end +end) + +if Config.EnableControls then + RegisterCommand("accessory", function(src) + if not ESX.PlayerData.dead then + OpenAccessoryMenu() + end + end) + + RegisterKeyMapping("accessory", "Open Accessory Menu", "keyboard", "k") +end diff --git a/[esx_addons]/esx_accessories/config.lua b/[esx_addons]/esx_accessories/config.lua new file mode 100644 index 00000000..2cf115df --- /dev/null +++ b/[esx_addons]/esx_accessories/config.lua @@ -0,0 +1,97 @@ +Config = {} + +Config.Locale = GetConvar('esx:locale', 'en') + +Config.Price = 100 + +Config.EnableControls = true + +Config.DrawDistance = 10 +Config.Size = {x = 1.5, y = 1.5, z = 1.0} +Config.Color = {r = 50, g = 200, b = 50} +Config.Type = 1 + +-- Fill this if you want to see the blips, +-- If you have esx_clothesshop you should not fill this +-- more than it's already filled. +Config.ShopsBlips = { + -- Ears = { + -- Pos = nil, + -- Blip = nil + -- }, + Mask = { + Pos = { + vector3(-1338.1, -1278.2, 3.8), + }, + Blip = {sprite = 362, color = 2} + }, + -- Helmet = { + -- Pos = nil, + -- Blip = nil + -- }, + -- Glasses = { + -- Pos = nil, + -- Blip = nil + -- } +} + +Config.Zones = { + Ears = { + Pos = { + vector3(80.3, -1389.4, 28.4), + vector3(-163.0, -302.0, 38.8), + vector3(-163.0,-302.0, 38.8), + vector3(420.7, -809.6, 28.6), + vector3(-817.0, -1075.9, 10.4), + vector3(-1451.3, -238.2, 48.9), + vector3(-0.7, 6513.6, 30.9), + vector3(123.4, -208.0, 53.6), + vector3(1687.3, 4827.6, 41.1), + vector3(622.8, 2749.2, 41.2), + vector3(1200.0, 2705.4, 37.3), + vector3(-1199.9, -782.5, 16.4), + vector3(-3171.8, 1059.6, 19.9), + vector3(-1095.6, 2709.2, 18.2), + }}, + + Mask = { + Pos = { + vector3(-1338.1, -1278.2, 3.8), + }}, + + Helmet = { + Pos = { + vector3(81.5, -1400.6, 28.4), + vector3(-705.8, -159.0, 36.5), + vector3(-161.3, -295.7, 38.8), + vector3(419.3, -800.6, 28.6), + vector3(-824.3, -1081.7, 10.4), + vector3(-1454.8, -242.9, 48.9), + vector3(4.7, 6520.9, 30.9), + vector3(121.0, -223.2, 53.3), + vector3(1689.6, 4818.8, 41.1), + vector3(613.9, 2749.9, 41.2), + vector3(1189.5, 2703.9, 37.3), + vector3(-1204.0, -774.4, 16.4), + vector3(-3164.2, 1054.7, 19.9), + vector3(-1103.1, 2700.5, 18.2), + }}, + + Glasses = { + Pos = { + vector3(75.2, -1391.1, 28.4), + vector3(-713.1, -160.1, 36.5), + vector3(-156.1, -300.5, 38.8), + vector3(425.4, -807.8, 28.6), + vector3(-820.8, -1072.9, 10.4), + vector3(-1458.0, -236.7, 48.9), + vector3(3.5, 6511.5, 30.9), + vector3(131.3, -212.3, 53.6), + vector3(1694.9, 4820.8, 41.1), + vector3(613.9, 2768.8, 41.2), + vector3(1198.6, 2711.0, 37.3), + vector3(-1188.2, -764.5, 16.4), + vector3(-3173.1, 1038.2, 19.9), + vector3(-1100.4, 2712.4, 18.2), + }} +} diff --git a/[esx_addons]/esx_accessories/esx_accessories.sql b/[esx_addons]/esx_accessories/esx_accessories.sql new file mode 100644 index 00000000..9b48fc80 --- /dev/null +++ b/[esx_addons]/esx_accessories/esx_accessories.sql @@ -0,0 +1,6 @@ +INSERT INTO `datastore` (name, label, shared) VALUES + ('user_ears', 'Ears', 0), + ('user_glasses', 'Glasses', 0), + ('user_helmet', 'Helmet', 0), + ('user_mask', 'Mask', 0) +; diff --git a/[esx_addons]/esx_accessories/fxmanifest.lua b/[esx_addons]/esx_accessories/fxmanifest.lua new file mode 100644 index 00000000..62a23bbd --- /dev/null +++ b/[esx_addons]/esx_accessories/fxmanifest.lua @@ -0,0 +1,28 @@ +fx_version 'adamant' + +game 'gta5' + +description 'ESX Accessories' +lua54 'yes' +version '1.9.0' + +shared_scripts { + '@es_extended/imports.lua', + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua' +} + +server_scripts { + 'server/main.lua' +} + +client_scripts { + 'client/main.lua' +} + +dependencies { + 'es_extended', + 'esx_skin', + 'esx_datastore' +} diff --git a/[esx_addons]/esx_accessories/locales/cs.lua b/[esx_addons]/esx_accessories/locales/cs.lua new file mode 100644 index 00000000..60511d03 --- /dev/null +++ b/[esx_addons]/esx_accessories/locales/cs.lua @@ -0,0 +1,19 @@ +Locales ['cs'] = { + ['valid_purchase'] = 'ověřit nákup?', + ['yes'] = 'ano ($%s)', + ['no'] = 'ne', + ['helmet'] = 'helma / Čepice', + ['glasses'] = 'brýle', + ['mask'] = 'maska', + ['ears'] = 'doplňky na uši', + ['shop'] = '%s obchod', + ['set_unset'] = 'nasadit / Sundat', + ['not_enough_money'] = 'nemáte dostatek peněz', + ['press_access'] = 'zmáčkněte [E] pro otevření menu', + ['accessories_blip'] = 'doplňky', + ['no_ears'] = 'nemáte doplňky na uši', + ['no_glasses'] = 'nemáte brýle', + ['no_helmet'] = 'nemáte helmu', + ['no_mask'] = 'nemáte masku', + ['you_paid'] = 'zaplatili jste $%s', +} diff --git a/[esx_addons]/esx_accessories/locales/de.lua b/[esx_addons]/esx_accessories/locales/de.lua new file mode 100644 index 00000000..65f84446 --- /dev/null +++ b/[esx_addons]/esx_accessories/locales/de.lua @@ -0,0 +1,19 @@ +Locales ['de'] = { + ['valid_purchase'] = 'Diesen Kauf bestätigen?', + ['yes'] = 'Ja ($%s)', + ['no'] = 'Nein', + ['helmet'] = 'Helm / Hut', + ['glasses'] = 'Brillen', + ['mask'] = 'Maske', + ['ears'] = 'Zubehör für die Ohren', + ['shop'] = '%s Laden', + ['set_unset'] = 'Anziehen / Ausziehen', + ['not_enough_money'] = 'Du besitzt nicht genügend Geld', + ['press_access'] = 'Drücke [E] um auf das Menü zuzugreifen', + ['accessories_blip'] = 'Zubehör', + ['no_ears'] = 'Sie besitzen kein Zubehör für die Ohren', + ['no_glasses'] = 'Sie besitzen keine Brille', + ['no_helmet'] = 'Sie besitzen kein Helm', + ['no_mask'] = 'Sie besitzen keine Maske', + ['you_paid'] = 'Sie bezahlten $%s', +} \ No newline at end of file diff --git a/[esx_addons]/esx_accessories/locales/en.lua b/[esx_addons]/esx_accessories/locales/en.lua new file mode 100644 index 00000000..dddb522f --- /dev/null +++ b/[esx_addons]/esx_accessories/locales/en.lua @@ -0,0 +1,19 @@ +Locales ['en'] = { + ['valid_purchase'] = 'validate this purchase?', + ['yes'] = 'yes ($%s)', + ['no'] = 'no', + ['helmet'] = 'helmet / Hat', + ['glasses'] = 'glasses', + ['mask'] = 'mask', + ['ears'] = 'ears accessories', + ['shop'] = '%s shop', + ['set_unset'] = 'put on / Take off', + ['not_enough_money'] = 'you do not have enough money', + ['press_access'] = 'press [E] to access the menu', + ['accessories_blip'] = 'accessories', + ['no_ears'] = 'you do not have ears accessories', + ['no_glasses'] = 'you do not have glasses', + ['no_helmet'] = 'you do not have a helmet', + ['no_mask'] = 'you do not have a mask', + ['you_paid'] = 'you paid $%s', +} diff --git a/[esx_addons]/esx_accessories/locales/es.lua b/[esx_addons]/esx_accessories/locales/es.lua new file mode 100644 index 00000000..917d84a8 --- /dev/null +++ b/[esx_addons]/esx_accessories/locales/es.lua @@ -0,0 +1,19 @@ +Locales ['es'] = { + ['valid_purchase'] = '¿Validar la compra?', + ['yes'] = 'Si (%s$)', + ['no'] = 'No', + ['helmet'] = 'Casco / Gorra', + ['glasses'] = 'Gafas', + ['mask'] = 'Máscara', + ['ears'] = 'Accesorio de oreja', + ['shop'] = 'Tienda %s', + ['set_unset'] = 'Ponerse / Quitarse', + ['not_enough_money'] = '~r~No tienes suficiente dinero', + ['press_access'] = 'Pulsa [E] para acceder al menú', + ['accessories_blip'] = 'Accesorios', + ['no_ears'] = 'No tienes ningún accesorio de oreja', + ['no_glasses'] = 'No tienes ningunas gafas', + ['no_helmet'] = 'No tienes ningún casco', + ['no_mask'] = 'No tienes ninguna máscara', + ['you_paid'] = 'Pagaste %s$', +} diff --git a/[esx_addons]/esx_accessories/locales/et.lua b/[esx_addons]/esx_accessories/locales/et.lua new file mode 100644 index 00000000..734b1089 --- /dev/null +++ b/[esx_addons]/esx_accessories/locales/et.lua @@ -0,0 +1,19 @@ +Locales ['et'] = { + ['valid_purchase'] = 'Kinnita ost?', + ['yes'] = 'Jah ($%s)', + ['no'] = 'Ei', + ['helmet'] = 'Kiiver / Müts', + ['glasses'] = 'Prillid', + ['mask'] = 'Mask', + ['ears'] = 'Kõrvarõngad', + ['shop'] = '%s Pood', + ['set_unset'] = 'Pane selga / Võta seljast', + ['not_enough_money'] = 'Sul pole piisavalt raha', + ['press_access'] = 'Vajuta [E], et avada menüü', + ['accessories_blip'] = 'Aksessuaarid', + ['no_ears'] = 'Sul pole kõrvarõngaid', + ['no_glasses'] = 'Sul pole prille', + ['no_helmet'] = 'Sul pole kiivrit', + ['no_mask'] = 'Sul pole maski', + ['you_paid'] = 'Sa maksid $%s', +} diff --git a/[esx_addons]/esx_accessories/locales/fi.lua b/[esx_addons]/esx_accessories/locales/fi.lua new file mode 100644 index 00000000..12b6e897 --- /dev/null +++ b/[esx_addons]/esx_accessories/locales/fi.lua @@ -0,0 +1,19 @@ +Locales ['fi'] = { + ['valid_purchase'] = 'varmista ostos?', + ['yes'] = 'kyllä ($%s)', + ['no'] = 'ei', + ['helmet'] = 'kypärä / Hattu', + ['glasses'] = 'lasit', + ['mask'] = 'maskit', + ['ears'] = 'korva asusteet', + ['shop'] = '%s asustekauppa', + ['set_unset'] = 'laita päälle / Ota pois', + ['not_enough_money'] = 'sinulla ei ole tarpeeksi rahaa', + ['press_access'] = 'paina [E] avataksesi menu', + ['accessories_blip'] = 'asusteet', + ['no_ears'] = 'sinulla ei ole korva asusteita', + ['no_glasses'] = 'sinulla ei ole laseja', + ['no_helmet'] = 'sinulla ei ole kypäriä', + ['no_mask'] = 'sinulla ei ole maskeja', + ['you_paid'] = 'sinä maksoit $%s', +} diff --git a/[esx_addons]/esx_accessories/locales/fr.lua b/[esx_addons]/esx_accessories/locales/fr.lua new file mode 100644 index 00000000..fda53502 --- /dev/null +++ b/[esx_addons]/esx_accessories/locales/fr.lua @@ -0,0 +1,19 @@ +Locales ['fr'] = { + ['valid_purchase'] = 'valider cet achat?', + ['yes'] = 'oui ($%s)', + ['no'] = 'non', + ['helmet'] = 'casque / Chapeau', + ['glasses'] = 'lunettes', + ['mask'] = 'masque', + ['ears'] = 'accessoires d\'oreilles', + ['shop'] = ' Magasin de %s', + ['set_unset'] = 'mettre / Enlever', + ['not_enough_money'] = 'vous n\'avez pas assez d\'argent', + ['press_access'] = 'appuyez sur [E] pour accéder au menu', + ['accessories_blip'] = 'accessoires', + ['no_ears'] = 'vous n\'avez pas d\'accessoires d\'oreilles', + ['no_glasses'] = 'vous n\'avez pas de lunettes', + ['no_helmet'] = 'vous n\'avez pas de casque / chapeau', + ['no_mask'] = 'vous n\'avez pas de masque', + ['you_paid'] = 'vous avez payé $%s', +} diff --git a/[esx_addons]/esx_accessories/locales/hu.lua b/[esx_addons]/esx_accessories/locales/hu.lua new file mode 100644 index 00000000..fcc170bf --- /dev/null +++ b/[esx_addons]/esx_accessories/locales/hu.lua @@ -0,0 +1,19 @@ +Locales ['hu'] = { + ['valid_purchase'] = 'Biztosan megveszed?', + ['yes'] = 'Igen ($%s)', + ['no'] = 'Nem', + ['helmet'] = 'sisak / kalap', + ['glasses'] = 'szemüveg', + ['mask'] = 'maszk', + ['ears'] = 'fül tartozékok', + ['shop'] = '%s bolt', + ['set_unset'] = 'Felvenni / Levenni', + ['not_enough_money'] = 'Nincsen elég pénzed', + ['press_access'] = 'Nyomj [E] hogy megnyisd a kiegészítöket', + ['accessories_blip'] = 'Kiegészítők', + ['no_ears'] = 'Nincsen fülbevalód', + ['no_glasses'] = 'Nincsen szemüveged', + ['no_helmet'] = 'Nincsen sapkád', + ['no_mask'] = 'Nincsen maszkod', + ['you_paid'] = 'Fizettél $%s', +} diff --git a/[esx_addons]/esx_accessories/locales/it.lua b/[esx_addons]/esx_accessories/locales/it.lua new file mode 100644 index 00000000..f38b7e50 --- /dev/null +++ b/[esx_addons]/esx_accessories/locales/it.lua @@ -0,0 +1,19 @@ +Locales ['it'] = { + ['valid_purchase'] = 'confermare l\'acquisto?', + ['yes'] = 'si ($%s)', + ['no'] = 'no', + ['helmet'] = 'casco / cappello', + ['glasses'] = 'occhiali', + ['mask'] = 'maschera', + ['ears'] = 'accessori per le orecchie', + ['shop'] = '%s negozio', + ['set_unset'] = 'indossare / togliere', + ['not_enough_money'] = 'non hai abbastanza soldi', + ['press_access'] = 'premi [E] per accedere al menu', + ['accessories_blip'] = 'accessori', + ['no_ears'] = 'non hai accessori per le orecchie', + ['no_glasses'] = 'non hai gli occhiali', + ['no_helmet'] = 'non hai il casco', + ['no_mask'] = 'non hai una maschera', + ['you_paid'] = 'hai pagato $%s', +} diff --git a/[esx_addons]/esx_accessories/locales/nl.lua b/[esx_addons]/esx_accessories/locales/nl.lua new file mode 100644 index 00000000..0f93879c --- /dev/null +++ b/[esx_addons]/esx_accessories/locales/nl.lua @@ -0,0 +1,19 @@ +Locales ['nl'] = { + ['valid_purchase'] = 'kopen?', + ['yes'] = 'ja ($%s)', + ['no'] = 'nee', + ['helmet'] = 'Helm / Hoed', + ['glasses'] = 'Brillen', + ['mask'] = 'Masker', + ['ears'] = 'Oor accessories', + ['shop'] = '%s Winkel', + ['set_unset'] = 'Doe aan / doe uit', + ['not_enough_money'] = 'Je hebt niet genoeg geld', + ['press_access'] = 'Druk op [E] om het menu te openen', + ['accessories_blip'] = 'Accessories', + ['no_ears'] = 'Je hebt geen oor accessories', + ['no_glasses'] = 'je hebt geen brillen', + ['no_helmet'] = 'je hebt geen helm', + ['no_mask'] = 'je hebt geen masker', + ['you_paid'] = 'je betaalde $%s', +} diff --git a/[esx_addons]/esx_accessories/locales/pl.lua b/[esx_addons]/esx_accessories/locales/pl.lua new file mode 100644 index 00000000..c84e9aeb --- /dev/null +++ b/[esx_addons]/esx_accessories/locales/pl.lua @@ -0,0 +1,19 @@ +Locales ['pl'] = { + ['valid_purchase'] = 'czy napewno chcesz to zakupić?', + ['yes'] = 'tak (%s $)', + ['no'] = 'nie', + ['helmet'] = 'hełm / Czapka', + ['glasses'] = 'okulary', + ['mask'] = 'maska', + ['ears'] = 'akcesoria uszu', + ['shop'] = 'sklep %s ', + ['set_unset'] = 'załóż / Zdejmij', + ['not_enough_money'] = 'nie masz wystarczająco pieniędzy', + ['press_access'] = 'wciśnij [E] aby otworzyć menu', + ['accessories_blip'] = 'akcesoria', + ['no_ears'] = 'nie posiadasz akcesorii uszu', + ['no_glasses'] = 'nie posiadasz okularów', + ['no_helmet'] = 'nie posiadasz nakrycia głowy', + ['no_mask'] = 'nie posiadasz maski', + ['you_paid'] = 'płacisz %s $', +} diff --git a/[esx_addons]/esx_accessories/locales/ru.lua b/[esx_addons]/esx_accessories/locales/ru.lua new file mode 100644 index 00000000..a4fe7a56 --- /dev/null +++ b/[esx_addons]/esx_accessories/locales/ru.lua @@ -0,0 +1,19 @@ +Locales ['ru'] = { + ['valid_purchase'] = 'Подтверждаете покупку', + ['yes'] = 'Да ($%s)', + ['no'] = 'Нет', + ['helmet'] = 'Шлем / Шапка', + ['glasses'] = 'Очки', + ['mask'] = 'Маска', + ['ears'] = 'Аксессуары для ушей', + ['shop'] = 'Магазин %s', + ['set_unset'] = 'Положить / Снять', + ['not_enough_money'] = 'У вас не достаточно денег', + ['press_access'] = 'Нажмите [E] для доступа к меню', + ['accessories_blip'] = 'Аксессуары', + ['no_ears'] = 'У вас нет аксессуаров для ушей', + ['no_glasses'] = 'У вас нет очков', + ['no_helmet'] = 'У вас нет шлема', + ['no_mask'] = 'У вас нет маски', + ['you_paid'] = 'Вы заплатили $%s', +} diff --git a/[esx_addons]/esx_accessories/locales/si.lua b/[esx_addons]/esx_accessories/locales/si.lua new file mode 100644 index 00000000..56419907 --- /dev/null +++ b/[esx_addons]/esx_accessories/locales/si.lua @@ -0,0 +1,19 @@ +Locales ['si'] = { + ['valid_purchase'] = 'Potrdite ta nakup?', + ['yes'] = 'Da ($%s)', + ['no'] = 'Ne', + ['helmet'] = 'Celada / Kapa', + ['glasses'] = 'Ocala', + ['mask'] = 'Maska', + ['ears'] = 'Usesni dodatki', + ['shop'] = '%s trgovina', + ['set_unset'] = 'Daj gor / Vzemi dol', + ['not_enough_money'] = 'Nimas dovolj denarja', + ['press_access'] = 'Pritisni [E] za dostop do menuja', + ['accessories_blip'] = 'Dodatki', + ['no_ears'] = 'Nimas usesnih dodatkov', + ['no_glasses'] = 'Nimas ocal', + ['no_helmet'] = 'Nimas celade', + ['no_mask'] = 'Nimas maske', + ['you_paid'] = 'Placal si $%s', +} diff --git a/[esx_addons]/esx_accessories/locales/sv.lua b/[esx_addons]/esx_accessories/locales/sv.lua new file mode 100644 index 00000000..decfee36 --- /dev/null +++ b/[esx_addons]/esx_accessories/locales/sv.lua @@ -0,0 +1,19 @@ +Locales ['sv'] = { + ['valid_purchase'] = 'Bekräfta köp?', + ['yes'] = 'Ja (%s SEK)', + ['no'] = 'Nej', + ['helmet'] = 'Hjälm / hatt', + ['glasses'] = 'Glasögon', + ['mask'] = 'Mask', + ['ears'] = 'Öron tillbehör', + ['shop'] = '%s affär', + ['set_unset'] = 'Ta på / av', + ['not_enough_money'] = 'Du har inte tillräckligt med pengar', + ['press_access'] = 'Tryck [E] för att komma åt menyn', + ['accessories_blip'] = 'Tillbehör', + ['no_ears'] = 'Du har inga örontillbehör', + ['no_glasses'] = 'Du har inga glasögon', + ['no_helmet'] = 'Du har ingen hjälm', + ['no_mask'] = 'Du har ingen mask', + ['you_paid'] = 'Du betalade %s SEK', +} \ No newline at end of file diff --git a/[esx_addons]/esx_accessories/locales/tr.lua b/[esx_addons]/esx_accessories/locales/tr.lua new file mode 100644 index 00000000..d8331070 --- /dev/null +++ b/[esx_addons]/esx_accessories/locales/tr.lua @@ -0,0 +1,19 @@ +Locales ['tr'] = { + ['valid_purchase'] = 'Bunu satın almak istiyor musun?', + ['yes'] = 'evet ($%s)', + ['no'] = 'hayır', + ['helmet'] = 'kask / şapka', + ['glasses'] = 'gözlük', + ['mask'] = 'maske', + ['ears'] = 'kulak aksesuarları', + ['shop'] = '%s Dükkan', + ['set_unset'] = 'Giy / çıkar', + ['not_enough_money'] = 'yeterli paran yok', + ['press_access'] = 'menüye erişmek için [E] tuşuna basın', + ['accessories_blip'] = 'Aksesuarlar', + ['no_ears'] = 'kulak aksesuarların yok', + ['no_glasses'] = 'senin gözlüğün yok', + ['no_helmet'] = 'senin kaskın yok', + ['no_mask'] = 'senin masken yok', + ['you_paid'] = 'sen $%s ödedin', +} diff --git a/[esx_addons]/esx_accessories/server/main.lua b/[esx_addons]/esx_accessories/server/main.lua new file mode 100644 index 00000000..8f867f46 --- /dev/null +++ b/[esx_addons]/esx_accessories/server/main.lua @@ -0,0 +1,43 @@ +RegisterServerEvent('esx_accessories:pay') +AddEventHandler('esx_accessories:pay', function() + local xPlayer = ESX.GetPlayerFromId(source) + + xPlayer.removeMoney(Config.Price, "Accessory Purchase") + TriggerClientEvent('esx:showNotification', source, TranslateCap('you_paid', ESX.Math.GroupDigits(Config.Price))) +end) + +RegisterServerEvent('esx_accessories:save') +AddEventHandler('esx_accessories:save', function(skin, accessory) + local source = source + local xPlayer = ESX.GetPlayerFromId(source) + + TriggerEvent('esx_datastore:getDataStore', 'user_' .. string.lower(accessory), xPlayer.identifier, function(store) + store.set('has' .. accessory, true) + + local itemSkin = {} + local item1 = string.lower(accessory) .. '_1' + local item2 = string.lower(accessory) .. '_2' + itemSkin[item1] = skin[item1] + itemSkin[item2] = skin[item2] + + store.set('skin', itemSkin) + end) +end) + +ESX.RegisterServerCallback('esx_accessories:get', function(source, cb, accessory) + local xPlayer = ESX.GetPlayerFromId(source) + + TriggerEvent('esx_datastore:getDataStore', 'user_' .. string.lower(accessory), xPlayer.identifier, function(store) + local hasAccessory = (store.get('has' .. accessory) and store.get('has' .. accessory) or false) + local skin = (store.get('skin') and store.get('skin') or {}) + + cb(hasAccessory, skin) + end) + +end) + +ESX.RegisterServerCallback('esx_accessories:checkMoney', function(source, cb) + local xPlayer = ESX.GetPlayerFromId(source) + + cb(xPlayer.getMoney() >= Config.Price) +end) diff --git a/[esx_addons]/esx_addonaccount/.editorconfig b/[esx_addons]/esx_addonaccount/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_addonaccount/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_addonaccount/LICENSE b/[esx_addons]/esx_addonaccount/LICENSE new file mode 100644 index 00000000..b7ae27ce --- /dev/null +++ b/[esx_addons]/esx_addonaccount/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_addonaccount + Copyright (C) 2015-2023 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 . + +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_addonaccount Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_addonaccount/README.md b/[esx_addons]/esx_addonaccount/README.md new file mode 100644 index 00000000..c11c2243 --- /dev/null +++ b/[esx_addons]/esx_addonaccount/README.md @@ -0,0 +1,40 @@ +

[ESX] Addon Account

Discord - Website - Documentation + +Special Accounts System to store money. + +# Usage + +There is two types of accounts: shared and not shared. + +- Shared accounts doesn't belong to a specific user. Example: society accounts. +- None-shared accounts are created for every user in the server. They are created in db when player is loaded, Example: property black money + +## `addon_account` database information + +An addon account must be configured in the database before using it. Don't forget to run a server restart afterwards (you can alternative restart the script and relog all clients) + +| `name` | `label` | `shared` | +| -------- | ------- | -------- | +| name of the account | label of the account (not used) | is the account shared with others? (boolean either `0` or `1`) | + +```lua +TriggerEvent('esx_addonaccount:getSharedAccount', 'society_realestateagent', function(account) + account.addMoney(500) +end) + +TriggerEvent('esx_addonaccount:getAccount', 'property_black_money', 'steam:0123456789', function(account) + account.removeMoney(500) +end) +``` + +# Legal + +esx_addonaccount - addon account for ESX + +Copyright (C) 2015-2023 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/. diff --git a/[esx_addons]/esx_addonaccount/esx_addonaccount.sql b/[esx_addons]/esx_addonaccount/esx_addonaccount.sql new file mode 100644 index 00000000..8f766473 --- /dev/null +++ b/[esx_addons]/esx_addonaccount/esx_addonaccount.sql @@ -0,0 +1,22 @@ + + +CREATE TABLE `addon_account` ( + `name` VARCHAR(60) NOT NULL, + `label` VARCHAR(100) NOT NULL, + `shared` INT NOT NULL, + + PRIMARY KEY (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `addon_account_data` ( + `id` INT NOT NULL AUTO_INCREMENT, + `account_name` VARCHAR(100) DEFAULT NULL, + `money` INT NOT NULL, + `owner` VARCHAR(60) DEFAULT NULL, + + PRIMARY KEY (`id`), + UNIQUE INDEX `index_addon_account_data_account_name_owner` (`account_name`, `owner`), + INDEX `index_addon_account_data_account_name` (`account_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + diff --git a/[esx_addons]/esx_addonaccount/fxmanifest.lua b/[esx_addons]/esx_addonaccount/fxmanifest.lua new file mode 100644 index 00000000..863c314d --- /dev/null +++ b/[esx_addons]/esx_addonaccount/fxmanifest.lua @@ -0,0 +1,17 @@ +fx_version 'adamant' + +game 'gta5' + +author 'ESX-Framework' +description 'ESX Addon Account' +lua54 'yes' +version '1.9.0' + +server_scripts { + '@es_extended/imports.lua', + '@oxmysql/lib/MySQL.lua', + 'server/classes/addonaccount.lua', + 'server/main.lua' +} + +dependency 'es_extended' diff --git a/[esx_addons]/esx_addonaccount/server/classes/addonaccount.lua b/[esx_addons]/esx_addonaccount/server/classes/addonaccount.lua new file mode 100644 index 00000000..2364409d --- /dev/null +++ b/[esx_addons]/esx_addonaccount/server/classes/addonaccount.lua @@ -0,0 +1,36 @@ +function CreateAddonAccount(name, owner, money) + local self = {} + + self.name = name + self.owner = owner + self.money = money + + function self.addMoney(m) + self.money = self.money + m + self.save() + TriggerEvent('esx_addonaccount:addMoney', self.name, m) + end + + function self.removeMoney(m) + self.money = self.money - m + self.save() + TriggerEvent('esx_addonaccount:removeMoney', self.name, m) + end + + function self.setMoney(m) + self.money = m + self.save() + TriggerEvent('esx_addonaccount:setMoney', self.name, m) + end + + function self.save() + if self.owner == nil then + MySQL.update('UPDATE addon_account_data SET money = ? WHERE account_name = ?', {self.money, self.name}) + else + MySQL.update('UPDATE addon_account_data SET money = ? WHERE account_name = ? AND owner = ?', {self.money, self.name, self.owner}) + end + TriggerClientEvent('esx_addonaccount:setMoney', -1, self.name, self.money) + end + + return self +end diff --git a/[esx_addons]/esx_addonaccount/server/main.lua b/[esx_addons]/esx_addonaccount/server/main.lua new file mode 100644 index 00000000..39a580fe --- /dev/null +++ b/[esx_addons]/esx_addonaccount/server/main.lua @@ -0,0 +1,73 @@ +local AccountsIndex, Accounts, SharedAccounts = {}, {}, {} + +AddEventHandler('onResourceStart', function(resourceName) + if resourceName == GetCurrentResourceName() then + local accounts = MySQL.query.await('SELECT * FROM addon_account LEFT JOIN addon_account_data ON addon_account.name = addon_account_data.account_name UNION SELECT * FROM addon_account RIGHT JOIN addon_account_data ON addon_account.name = addon_account_data.account_name') + + local newAccounts = {} + for i = 1, #accounts do + local account = accounts[i] + if account.shared == 0 then + if not Accounts[account.name] then + AccountsIndex[#AccountsIndex + 1] = account.name + Accounts[account.name] = {} + end + Accounts[account.name][#Accounts[account.name] + 1] = CreateAddonAccount(account.name, account.owner, account.money) + else + if account.money then + SharedAccounts[account.name] = CreateAddonAccount(account.name, nil, account.money) + else + newAccounts[#newAccounts + 1] = {account.name, 0} + end + end + end + + if next(newAccounts) then + MySQL.prepare('INSERT INTO addon_account_data (account_name, money) VALUES (?, ?)', newAccounts) + for i = 1, #newAccounts do + local newAccount = newAccounts[i] + SharedAccounts[newAccount[1]] = CreateAddonAccount(newAccount[1], nil, 0) + end + end + end +end) + +function GetAccount(name, owner) + for i=1, #Accounts[name], 1 do + if Accounts[name][i].owner == owner then + return Accounts[name][i] + end + end +end + +function GetSharedAccount(name) + return SharedAccounts[name] +end + +AddEventHandler('esx_addonaccount:getAccount', function(name, owner, cb) + cb(GetAccount(name, owner)) +end) + +AddEventHandler('esx_addonaccount:getSharedAccount', function(name, cb) + cb(GetSharedAccount(name)) +end) + +AddEventHandler('esx:playerLoaded', function(playerId, xPlayer) + local addonAccounts = {} + + for i=1, #AccountsIndex, 1 do + local name = AccountsIndex[i] + local account = GetAccount(name, xPlayer.identifier) + + if account == nil then + MySQL.insert('INSERT INTO addon_account_data (account_name, money, owner) VALUES (?, ?, ?)', {name, 0, xPlayer.identifier}) + + account = CreateAddonAccount(name, xPlayer.identifier, 0) + Accounts[name][#Accounts[name] + 1] = account + end + + addonAccounts[#addonAccounts + 1] = account + end + + xPlayer.set('addonAccounts', addonAccounts) +end) diff --git a/[esx_addons]/esx_addoninventory/.editorconfig b/[esx_addons]/esx_addoninventory/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_addoninventory/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_addoninventory/LICENSE b/[esx_addons]/esx_addoninventory/LICENSE new file mode 100644 index 00000000..20f597d2 --- /dev/null +++ b/[esx_addons]/esx_addoninventory/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_addoninventory + Copyright (C) 2015-2023 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 . + +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_addoninventory Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_addoninventory/README.md b/[esx_addons]/esx_addoninventory/README.md new file mode 100644 index 00000000..f3ecab51 --- /dev/null +++ b/[esx_addons]/esx_addoninventory/README.md @@ -0,0 +1,61 @@ +# esx_addoninventory + +## Download & Installation + +### Using [fvm](https://github.com/qlaffont/fvm-installer) +``` +fvm install --save --folder=esx esx-org/esx_addoninventory +``` + +### Using Git +``` +cd resources +git clone https://github.com/ESX-Org/esx_addoninventory [esx]/esx_addoninventory +``` + +### Manually +- Download https://github.com/ESX-Org/esx_addoninventory/archive/master.zip +- Put it in the `[esx]` directory + +## Installation +- Import `esx_addoninventory.sql` in your database +- Add this in your `server.cfg`: + +``` +start esx_addoninventory +``` + +## Usage +There are two types of inventories: shared and not shared. + +- Shared inventories don't belong to a specific user. Example: foodstore items. +- None-shared inventories are created for every user in the server. They are created in db when player is loaded, Example: property items + +### `addon_inventory` database information +An addon inventory must be configured in the database before using it. Don't forget to run a server restart afterwards (you can alternative restart the script and relog all clients) + +| `name` | `label` | `shared` | +| -------- | ------- | -------- | +| name of the inventory | label of the inventory (not used) | is the inventory shared with others? (boolean either `0` or `1`) | + +```lua +TriggerEvent('esx_addoninventory:getSharedInventory', 'society_police', function(inventory) + inventory.addItem('bread', 1) +end) + +TriggerEvent('esx_addoninventory:getInventory', 'property', 'steam:0123456789', function(inventory) + inventory.removeItem('water', 1) +end) + +``` +# Legal +### License +esx_addoninventory - inventories! + +Copyright (C) 2015-2023 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/. \ No newline at end of file diff --git a/[esx_addons]/esx_addoninventory/esx_addoninventory.sql b/[esx_addons]/esx_addoninventory/esx_addoninventory.sql new file mode 100644 index 00000000..ed102240 --- /dev/null +++ b/[esx_addons]/esx_addoninventory/esx_addoninventory.sql @@ -0,0 +1,24 @@ + + +CREATE TABLE `addon_inventory` ( + `name` VARCHAR(60) NOT NULL, + `label` VARCHAR(100) NOT NULL, + `shared` INT NOT NULL, + + PRIMARY KEY (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `addon_inventory_items` ( + `id` INT NOT NULL AUTO_INCREMENT, + `inventory_name` VARCHAR(100) NOT NULL, + `name` VARCHAR(100) NOT NULL, + `count` INT NOT NULL, + `owner` VARCHAR(60) DEFAULT NULL, + + PRIMARY KEY (`id`), + INDEX `index_addon_inventory_items_inventory_name_name` (`inventory_name`, `name`), + INDEX `index_addon_inventory_items_inventory_name_name_owner` (`inventory_name`, `name`, `owner`), + INDEX `index_addon_inventory_inventory_name` (`inventory_name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + diff --git a/[esx_addons]/esx_addoninventory/fxmanifest.lua b/[esx_addons]/esx_addoninventory/fxmanifest.lua new file mode 100644 index 00000000..a2dc2fdf --- /dev/null +++ b/[esx_addons]/esx_addoninventory/fxmanifest.lua @@ -0,0 +1,16 @@ +fx_version 'adamant' + +game 'gta5' + +description 'ESX Addon Inventory' +lua54 'yes' +version '1.9.0' + +server_scripts { + '@es_extended/imports.lua', + '@oxmysql/lib/MySQL.lua', + 'server/classes/addoninventory.lua', + 'server/main.lua' +} + +dependency 'es_extended' diff --git a/[esx_addons]/esx_addoninventory/server/classes/addoninventory.lua b/[esx_addons]/esx_addoninventory/server/classes/addoninventory.lua new file mode 100644 index 00000000..d5148f40 --- /dev/null +++ b/[esx_addons]/esx_addoninventory/server/classes/addoninventory.lua @@ -0,0 +1,83 @@ +function CreateAddonInventory(name, owner, items) + local self = {} + + self.name = name + self.owner = owner + self.items = items + + function self.addItem(name, count) + local item = self.getItem(name) + item.count = item.count + count + Wait(100) + self.saveItem(name, item.count) + end + + function self.removeItem(name, count) + local item = self.getItem(name) + item.count = item.count - count + + self.saveItem(name, item.count) + end + + function self.setItem(name, count) + local item = self.getItem(name) + item.count = count + + self.saveItem(name, item.count) + end + + function self.getItem(name) + for i=1, #self.items, 1 do + if self.items[i].name == name then + return self.items[i] + end + end + + item = { + name = name, + count = 0, + label = Items[name] + } + + table.insert(self.items, item) + + if self.owner == nil then + MySQL.update('INSERT INTO addon_inventory_items (inventory_name, name, count) VALUES (@inventory_name, @item_name, @count)', + { + ['@inventory_name'] = self.name, + ['@item_name'] = name, + ['@count'] = 0 + }) + else + MySQL.update('INSERT INTO addon_inventory_items (inventory_name, name, count, owner) VALUES (@inventory_name, @item_name, @count, @owner)', + { + ['@inventory_name'] = self.name, + ['@item_name'] = name, + ['@count'] = 0, + ['@owner'] = self.owner + }) + end + + return item + end + + function self.saveItem(name, count) + if self.owner == nil then + MySQL.update('UPDATE addon_inventory_items SET count = @count WHERE inventory_name = @inventory_name AND name = @item_name', { + ['@inventory_name'] = self.name, + ['@item_name'] = name, + ['@count'] = count + }) + else + MySQL.update('UPDATE addon_inventory_items SET count = @count WHERE inventory_name = @inventory_name AND name = @item_name AND owner = @owner', { + ['@inventory_name'] = self.name, + ['@item_name'] = name, + ['@count'] = count, + ['@owner'] = self.owner + }) + end + end + + return self +end + diff --git a/[esx_addons]/esx_addoninventory/server/main.lua b/[esx_addons]/esx_addoninventory/server/main.lua new file mode 100644 index 00000000..3ed154f0 --- /dev/null +++ b/[esx_addons]/esx_addoninventory/server/main.lua @@ -0,0 +1,119 @@ +if ESX.GetConfig().OxInventory then + AddEventHandler('onServerResourceStart', function(resourceName) + if resourceName == 'ox_inventory' or resourceName == GetCurrentResourceName() then + local stashes = MySQL.query.await('SELECT * FROM addon_inventory') + + for i=1, #stashes do + local stash = stashes[i] + local jobStash = stash.name:find('society') and string.sub(stash.name, 9) + exports.ox_inventory:RegisterStash(stash.name, stash.label, 100, 200000, stash.shared == 0 and true or false, jobStash) + end + end + end) + + return +end + +Items = {} +local InventoriesIndex, Inventories, SharedInventories = {}, {}, {} + +MySQL.ready(function() + local items = MySQL.query.await('SELECT * FROM items') + + for i=1, #items, 1 do + Items[items[i].name] = items[i].label + end + + local result = MySQL.query.await('SELECT * FROM addon_inventory') + + for i=1, #result, 1 do + local name = result[i].name + local label = result[i].label + local shared = result[i].shared + + local result2 = MySQL.query.await('SELECT * FROM addon_inventory_items WHERE inventory_name = @inventory_name', { + ['@inventory_name'] = name + }) + + if shared == 0 then + + table.insert(InventoriesIndex, name) + + Inventories[name] = {} + local items = {} + + for j=1, #result2, 1 do + local itemName = result2[j].name + local itemCount = result2[j].count + local itemOwner = result2[j].owner + + if items[itemOwner] == nil then + items[itemOwner] = {} + end + + table.insert(items[itemOwner], { + name = itemName, + count = itemCount, + label = Items[itemName] + }) + end + + for k,v in pairs(items) do + local addonInventory = CreateAddonInventory(name, k, v) + table.insert(Inventories[name], addonInventory) + end + + else + local items = {} + + for j=1, #result2, 1 do + table.insert(items, { + name = result2[j].name, + count = result2[j].count, + label = Items[result2[j].name] + }) + end + + local addonInventory = CreateAddonInventory(name, nil, items) + SharedInventories[name] = addonInventory + end + end +end) + +function GetInventory(name, owner) + for i=1, #Inventories[name], 1 do + if Inventories[name][i].owner == owner then + return Inventories[name][i] + end + end +end + +function GetSharedInventory(name) + return SharedInventories[name] +end + +AddEventHandler('esx_addoninventory:getInventory', function(name, owner, cb) + cb(GetInventory(name, owner)) +end) + +AddEventHandler('esx_addoninventory:getSharedInventory', function(name, cb) + cb(GetSharedInventory(name)) +end) + +AddEventHandler('esx:playerLoaded', function(playerId, xPlayer) + local addonInventories = {} + + for i=1, #InventoriesIndex, 1 do + local name = InventoriesIndex[i] + local inventory = GetInventory(name, xPlayer.identifier) + + if inventory == nil then + inventory = CreateAddonInventory(name, xPlayer.identifier, {}) + table.insert(Inventories[name], inventory) + end + + table.insert(addonInventories, inventory) + end + + xPlayer.set('addonInventories', addonInventories) +end) diff --git a/[esx_addons]/esx_allowlist/LICENSE b/[esx_addons]/esx_allowlist/LICENSE new file mode 100644 index 00000000..22da85db --- /dev/null +++ b/[esx_addons]/esx_allowlist/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_whitelist + Copyright (C) 2015-2023 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 . + +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_whitelist Copyright (C) 2015-2023 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 +. + + 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 +. diff --git a/[esx_addons]/esx_allowlist/README.md b/[esx_addons]/esx_allowlist/README.md new file mode 100644 index 00000000..c8dc7c27 --- /dev/null +++ b/[esx_addons]/esx_allowlist/README.md @@ -0,0 +1,16 @@ +

[ESX] Allowlist

Discord - Website - Documentation + +block those evil intruders with ESX Allowlist! +This Script allows you to block all players from joining and specify the only players who can join! + +## Legal + +esx_allowlist- block those evil intruders! + +Copyright (C) 2023 ESX-Framework + +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 . diff --git a/[esx_addons]/esx_allowlist/config.lua b/[esx_addons]/esx_allowlist/config.lua new file mode 100644 index 00000000..2dadfb4e --- /dev/null +++ b/[esx_addons]/esx_allowlist/config.lua @@ -0,0 +1,4 @@ +Config = {} + +Config.Locale = GetConvar('esx:locale', 'en') +Config.MinPlayer = 10 --Set how many players need to be connect before whitelist start, 0-32 diff --git a/[esx_addons]/esx_allowlist/fxmanifest.lua b/[esx_addons]/esx_allowlist/fxmanifest.lua new file mode 100644 index 00000000..d852b300 --- /dev/null +++ b/[esx_addons]/esx_allowlist/fxmanifest.lua @@ -0,0 +1,18 @@ +fx_version 'adamant' + +game 'gta5' + +author 'ESX-Framework' +description 'Offical AllowList script for ESX' + +version '1.9.0' +lua54 'yes' +server_only 'yes' + +server_scripts { + '@es_extended/imports.lua', + '@es_extended/locale.lua', + 'config.lua', + 'locales/*.lua', + 'server/main.lua' +} diff --git a/[esx_addons]/esx_allowlist/locales/br.lua b/[esx_addons]/esx_allowlist/locales/br.lua new file mode 100644 index 00000000..caa853f8 --- /dev/null +++ b/[esx_addons]/esx_allowlist/locales/br.lua @@ -0,0 +1,9 @@ +Locales['br'] = { + ['allowlist_check'] = 'certificando-se de que você está na lista de permitidos(allowlist) neste servidor. . .', + ['not_allowlisted'] = 'você não está na lista de permitidos(allowlist) neste servidor', + ['steamid_error'] = 'seu ID do Steam não foi encontrado, o Steam está aberto?', + ['allowlist_empty'] = 'a lista de permitidos(allowlist) ainda não foi carregada ou ninguém foi incluído!', + ['help_allowlist_add'] = 'adicionar alguém à lista de permitidos(allowlist) no servidor', + ['help_allowlist_load'] = 'recarregar a lista de permitidos(allowlist)', +} + diff --git a/[esx_addons]/esx_allowlist/locales/de.lua b/[esx_addons]/esx_allowlist/locales/de.lua new file mode 100644 index 00000000..794607d1 --- /dev/null +++ b/[esx_addons]/esx_allowlist/locales/de.lua @@ -0,0 +1,9 @@ +Locales['de'] = { + ['allowlist_check'] = 'Überprüfe ob sie auf der Allowlist sind...', + ['not_allowlisted'] = 'Sie müssen auf der Allowlist sein, um diesem Server beizutreten!', + ['allowlist_empty'] = 'Für diesen Server sind keine allowlists gespeichert.', + ['license_missing'] = 'Error: Ihr Identifier fehlt.', + ['help_allowlist_add'] = 'jemanden zur Allowlist hinzufügen', + ['help_allowlist_load'] = 'lade die Allowlist neu', + } + \ No newline at end of file diff --git a/[esx_addons]/esx_allowlist/locales/en.lua b/[esx_addons]/esx_allowlist/locales/en.lua new file mode 100644 index 00000000..96281f8d --- /dev/null +++ b/[esx_addons]/esx_allowlist/locales/en.lua @@ -0,0 +1,8 @@ +Locales['en'] = { + ['allowlist_check'] = 'Checking if you are Allowlisted.', + ['not_allowlisted'] = 'You Must be Allowlisted to join this server!', + ['allowlist_empty'] = 'There Are no allowlists saved for this server.', + ['license_missing'] = 'Error: Your Identifier is missing!', + ['help_allowlist_add'] = 'add someone to the allowlist', + ['help_allowlist_load'] = 'reload the allowlist', +} diff --git a/[esx_addons]/esx_allowlist/locales/es.lua b/[esx_addons]/esx_allowlist/locales/es.lua new file mode 100644 index 00000000..cb95a64b --- /dev/null +++ b/[esx_addons]/esx_allowlist/locales/es.lua @@ -0,0 +1,8 @@ +Locales['es'] = { + ['allowlist_check'] = 'revisando si tienes la allowlist . . .', + ['not_allowlisted'] = 'no tenes la allowlist en este servidor', + ['allowlist_empty'] = 'La allowlist todavia no cargo, o alternativamente nadie la tiene', + ['license_missing'] = 'no se pudo encontrar tu licencia', + ['help_allowlist_add'] = 'agregar a la allowlist', + ['help_allowlist_load'] = 'recargar allowlist', +} diff --git a/[esx_addons]/esx_allowlist/locales/et.lua b/[esx_addons]/esx_allowlist/locales/et.lua new file mode 100644 index 00000000..2ddadf89 --- /dev/null +++ b/[esx_addons]/esx_allowlist/locales/et.lua @@ -0,0 +1,8 @@ +Locales['et'] = { + ['allowlist_check'] = 'Kontrollime, kas te olete allowlistis.', + ['not_allowlisted'] = 'Sa pead olema Allowlistis, et ühineda serveriga!', + ['allowlist_empty'] = 'Ühtegi inimest pole allowlistis.', + ['license_missing'] = 'Viga: Sul puudub identifier!', + ['help_allowlist_add'] = 'Lisa inimene allowlisti', + ['help_allowlist_load'] = 'Lae allowlist uuesti', +} diff --git a/[esx_addons]/esx_allowlist/locales/fr.lua b/[esx_addons]/esx_allowlist/locales/fr.lua new file mode 100644 index 00000000..ddf36727 --- /dev/null +++ b/[esx_addons]/esx_allowlist/locales/fr.lua @@ -0,0 +1,8 @@ +Locales['fr'] = { + ['allowlist_check'] = 'Etes vous sûr d\'être allowlisté sur ce serveur ...', + ['not_allowlisted'] = 'Ce serveur utilise une allowlist', + ['allowlist_empty'] = 'La allowlist n\'a pas été rechargé ou vous n\'avez pas été allowlisté', + ['license_missing'] = 'Votre license est introuvable', + ['help_allowlist_add'] = 'Ajouter un joueur à la Whitelist', + ['help_allowlist_load'] = 'Recharger la Whitelist', +} diff --git a/[esx_addons]/esx_allowlist/locales/hu.lua b/[esx_addons]/esx_allowlist/locales/hu.lua new file mode 100644 index 00000000..7bd30405 --- /dev/null +++ b/[esx_addons]/esx_allowlist/locales/hu.lua @@ -0,0 +1,8 @@ +Locales['hu'] = { + ['allowlist_check'] = 'Ellenőrizzük fent vagy-e a menők listáján.', + ['not_allowlisted'] = 'Engedélyezettnek kell lenned ahhoz, hogy csatlakozz ehhez a szerverhez!', + ['allowlist_empty'] = 'Ehhez a szerverhez nincsenek mentett engedélyezési lista.', + ['license_missing'] = 'Hiba: Te azonosítód hiányzik!', + ['help_allowlist_add'] = 'játékos felvétele az engedélyezettek listájára', + ['help_allowlist_load'] = 'engedélyezési lista újratöltése', +} diff --git a/[esx_addons]/esx_allowlist/locales/it.lua b/[esx_addons]/esx_allowlist/locales/it.lua new file mode 100644 index 00000000..a0ec9366 --- /dev/null +++ b/[esx_addons]/esx_allowlist/locales/it.lua @@ -0,0 +1,8 @@ +Locales['it'] = { + ['allowlist_check'] = 'verifica Allowlisted.', + ['not_allowlisted'] = 'devi essere nella Allowlisted per unirti a questo server!', + ['allowlist_empty'] = 'non ci sono allowlists salvate per questo server.', + ['license_missing'] = 'Errore: il tuo identificatore è mancante!', + ['help_allowlist_add'] = 'aggiungi qualcuno alla allowlist', + ['help_allowlist_load'] = 'ricarica la allowlist', +} diff --git a/[esx_addons]/esx_allowlist/locales/nl.lua b/[esx_addons]/esx_allowlist/locales/nl.lua new file mode 100644 index 00000000..bb435ff7 --- /dev/null +++ b/[esx_addons]/esx_allowlist/locales/nl.lua @@ -0,0 +1,8 @@ +Locales['nl'] = { + ['allowlist_check'] = 'Je toegangspas aan het controleren.', + ['not_allowlisted'] = 'Je moet een toegangspas hebben om op deze server te spelen!', + ['allowlist_empty'] = 'Er zijn geen toegangspassen uitgegeven.', + ['license_missing'] = 'Error: Je Identifier mist!', + ['help_allowlist_add'] = 'geef iemand een toegangspas', + ['help_allowlist_load'] = 'herlaad de toegangspassen', +} diff --git a/[esx_addons]/esx_allowlist/locales/pl.lua b/[esx_addons]/esx_allowlist/locales/pl.lua new file mode 100644 index 00000000..686f6661 --- /dev/null +++ b/[esx_addons]/esx_allowlist/locales/pl.lua @@ -0,0 +1,8 @@ +Locales['pl'] = { + ['allowlist_check'] = 'Sprawdzamy, czy jesteś na Allowlist.', + ['not_allowlisted'] = 'Aby dołączyć do tego serwera, musisz być na Allowlist!', + ['allowlist_empty'] = 'Brak zapisanych list Allowlist dla tego serwera.', + ['license_missing'] = 'Błąd: Brak ID!', + ['help_allowlist_add'] = 'dodaj do allowlist', + ['help_allowlist_load'] = 'przeładuj allowlist', +} diff --git a/[esx_addons]/esx_allowlist/locales/si.lua b/[esx_addons]/esx_allowlist/locales/si.lua new file mode 100644 index 00000000..64c7620b --- /dev/null +++ b/[esx_addons]/esx_allowlist/locales/si.lua @@ -0,0 +1,8 @@ +Locales['si'] = { + ['allowlist_check'] = 'Preverja se, ali ste na seznamu dovoljenj.', + ['not_allowlisted'] = 'Če se želite pridružiti temu strežniku, morate biti uvrščeni na seznam dovoljenj!', + ['allowlist_empty'] = 'Za ta strežnik ni shranjenih belih seznamov.', + ['license_missing'] = 'Napaka: Manjka vaš identifikator!', + ['help_allowlist_add'] = 'Dodaj nekoga na beli seznam', + ['help_allowlist_load'] = 'ponovno naložite belo listo', +} diff --git a/[esx_addons]/esx_allowlist/locales/sv.lua b/[esx_addons]/esx_allowlist/locales/sv.lua new file mode 100644 index 00000000..b41874e6 --- /dev/null +++ b/[esx_addons]/esx_allowlist/locales/sv.lua @@ -0,0 +1,8 @@ +Locales['sv'] = { + ['allowlist_check'] = 'Ser till att du är vitlistad på den här servern. . .', + ['not_allowlisted'] = 'Du är inte vitlistad på den här servern', + ['allowlist_empty'] = 'Vitlistan har inte laddats ännu, eller alternativt har ingen blivit vitlistad!', + ['license_missing'] = 'Din licens kunde inte hittas', + ['help_allowlist_add'] = 'Lägg till någon på vitlistan', + ['help_allowlist_load'] = 'Ladda om vitlistan', +} diff --git a/[esx_addons]/esx_allowlist/locales/tr.lua b/[esx_addons]/esx_allowlist/locales/tr.lua new file mode 100644 index 00000000..67aa0769 --- /dev/null +++ b/[esx_addons]/esx_allowlist/locales/tr.lua @@ -0,0 +1,8 @@ +Locales['tr'] = { + ['allowlist_check'] = 'bu sunucuda beyaz listede olduğunuzdan emin olunuluyor . . .', + ['not_allowlisted'] = 'bu sunucuda beyaz listede değilsiniz', + ['allowlist_empty'] = 'beyaz liste henüz yüklenmedi yada beyaz listede kimse bulunmuyor', + ['license_missing'] = 'lisansınız bulunamadı', + ['help_allowlist_add'] = 'beyaz listeye birini ekle', + ['help_allowlist_load'] = 'beyaz listeyi tekrardan yükle', +} diff --git a/[esx_addons]/esx_allowlist/players.json b/[esx_addons]/esx_allowlist/players.json new file mode 100644 index 00000000..0637a088 --- /dev/null +++ b/[esx_addons]/esx_allowlist/players.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/[esx_addons]/esx_allowlist/server/main.lua b/[esx_addons]/esx_allowlist/server/main.lua new file mode 100644 index 00000000..8a2bf799 --- /dev/null +++ b/[esx_addons]/esx_allowlist/server/main.lua @@ -0,0 +1,78 @@ +local AllowList = {} + +function loadAllowList() + AllowList = nil + + local List = LoadResourceFile(GetCurrentResourceName(),'players.json') + if List then + AllowList = json.decode(List) + end +end + +loadAllowList() + +AddEventHandler('playerConnecting', function(name, setCallback, deferrals) + if #(GetPlayers()) < Config.MinPlayer then + deferrals.done() + else + -- Mark this connection as deferred, this is to prevent problems while checking player identifiers. + deferrals.defer() + + local playerId, kickReason = source, "There Was An Error, Please Contact the server owner!" + + -- Letting the user know what's going on. + deferrals.update(TranslateCap('allowlist_check')) + + -- Needed, not sure why. + Wait(100) + + local identifier = ESX.GetIdentifier(playerId) + + if ESX.Table.SizeOf(AllowList) == 0 then + kickReason = "[ESX] " .. TranslateCap('allowlist_empty') + elseif not identifier then + kickReason = "[ESX] " .. TranslateCap('license_missing') + elseif not AllowList[identifier] then + kickReason = "[ESX] " .. TranslateCap('not_allowlist') + end + + if kickReason then + deferrals.done(kickReason) + else + deferrals.done() + end + end +end) + +ESX.RegisterCommand('alrefresh', 'admin', function(xPlayer, args) + loadAllowList() + print('[^2INFO^7] Allowlist ^5Refreshed^7!') +end, true, {help = TranslateCap('help_allowlist_load')}) + +ESX.RegisterCommand('aladd', 'admin', function(xPlayer, args, showError) + args.license = args.license:lower() + + if AllowList[args.license] then + showError('The player is already allowlisted on this server!') + else + AllowList[args.license] = true + SaveResourceFile(GetCurrentResourceName(), 'players.json', json.encode(AllowList)) + loadAllowList() + end +end, true, {help = TranslateCap('help_allowlist_add'), validate = true, arguments = { + {name = 'license', help = 'the player license', type = 'string'} +}}) + +ESX.RegisterCommand('alremove', 'admin', function(xPlayer, args, showError) + args.license = args.license:lower() + + if AllowList[args.license] then + AllowList[args.license] = nil + SaveResourceFile(GetCurrentResourceName(), 'players.json', json.encode(AllowList)) + loadAllowList() + else + showError('Identifier is not Allowlisted on this server!') + end +end, true, {help = TranslateCap('help_allowlist_add'), validate = true, arguments = { + {name = 'license', help = 'the player license', type = 'string'} +}}) diff --git a/[esx_addons]/esx_ambulancejob/.editorconfig b/[esx_addons]/esx_ambulancejob/.editorconfig new file mode 100644 index 00000000..321687e6 --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 1 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_ambulancejob/LICENSE b/[esx_addons]/esx_ambulancejob/LICENSE new file mode 100644 index 00000000..e80d4d2d --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_ambulancejob + Copyright (C) 2015-2023 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 . + +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_ambulancejob Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_ambulancejob/README.md b/[esx_addons]/esx_ambulancejob/README.md new file mode 100644 index 00000000..05cce532 --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/README.md @@ -0,0 +1,31 @@ +# esx_ambulancejob + +ESX Ambulance Job is an plugin for ESX with features: + +- Adds death screen, with early respawn timer and bleed out timer +- Vehicle garages, revive menu and more for on duty EMS + +## Requirements + +`Required`: + +- [esx_skin](https://github.com/esx-framework/esx-legacy/tree/main/%5Besx%5D/esx_skin) +- [esx_vehicleshop](https://github.com/esx-framework/esx-legacy/tree/main/%5Besx_addons%5D/esx_vehicleshop) + +`Optional`: + +- [esx_society](https://github.com/esx-framework/esx-legacy/tree/main/%5Besx_addons%5D/esx_society) + +## Legal + +### License + +esx_ambulancejob - ambulance script for fivem + +Copyright (C) 2015-2023 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/. diff --git a/[esx_addons]/esx_ambulancejob/client/job.lua b/[esx_addons]/esx_ambulancejob/client/job.lua new file mode 100644 index 00000000..68c16e78 --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/client/job.lua @@ -0,0 +1,597 @@ +local CurrentAction, CurrentActionMsg, CurrentActionData = nil, '', {} +local HasAlreadyEnteredMarker, LastHospital, LastPart, LastPartNum +local isBusy, deadPlayers, deadPlayerBlips, isOnDuty = false, {}, {}, false +isInShopMenu = false + +RegisterNetEvent('esx:playerLoaded') +AddEventHandler('esx:playerLoaded', function(xPlayer) + ESX.PlayerData = xPlayer + ESX.PlayerLoaded = true +end) + + +function OpenAmbulanceActionsMenu() + local elements = { + {unselectable = true, icon = "fas fa-shirt", title = "Ambulance Actions"}, + {icon = "fas fa-shirt", title = TranslateCap('cloakroom'), value = 'cloakroom'} + } + + if Config.EnablePlayerManagement and ESX.PlayerData.job.grade_name == 'boss' then + elements[#elements+1] = { + icon = "fas fa-ambulance", + title = TranslateCap('boss_actions'), + value = 'boss_actions' + } + end + + ESX.OpenContext("right", elements, function(menu,element) + if element.value == 'cloakroom' then + OpenCloakroomMenu() + elseif element.value == 'boss_actions' then + TriggerEvent('esx_society:openBossMenu', 'ambulance', function(data, menu) + menu.close() + end, {wash = false}) + end + end) +end + +function OpenMobileAmbulanceActionsMenu() + local elements = { + {unselectable = true, icon = "fas fa-ambulance", title = TranslateCap('ambulance')}, + {icon = "fas fa-ambulance", title = TranslateCap('ems_menu'), value = "citizen_interaction"} + } + + ESX.OpenContext("right", elements, function(menu,element) + if element.value == "citizen_interaction" then + local elements2 = { + {unselectable = true, icon = "fas fa-ambulance", title = element.title}, + {icon = "fas fa-syringe", title = TranslateCap('ems_menu_revive'), value = "revive"}, + {icon = "fas fa-bandage", title = TranslateCap('ems_menu_small'), value = "small"}, + {icon = "fas fa-bandage", title = TranslateCap('ems_menu_big'), value = "big"}, + {icon = "fas fa-car", title = TranslateCap('ems_menu_putincar'), value = "put_in_vehicle"}, + {icon = "fas fa-syringe", title = TranslateCap('ems_menu_search'), value = "search"}, + } + + ESX.OpenContext("right", elements2, function(menu2,element2) + if isBusy then return end + local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer() + + if element2.value == 'search' then + TriggerServerEvent('esx_ambulancejob:svsearch') + elseif closestPlayer == -1 or closestDistance > 1.0 then + ESX.ShowNotification(TranslateCap('no_players')) + else + if element2.value == 'revive' then + revivePlayer(closestPlayer) + elseif element2.value == 'small' then + ESX.TriggerServerCallback('esx_ambulancejob:getItemAmount', function(quantity) + if quantity > 0 then + local closestPlayerPed = GetPlayerPed(closestPlayer) + local health = GetEntityHealth(closestPlayerPed) + + if health > 0 then + local playerPed = PlayerPedId() + + isBusy = true + ESX.ShowNotification(TranslateCap('heal_inprogress')) + TaskStartScenarioInPlace(playerPed, 'CODE_HUMAN_MEDIC_TEND_TO_DEAD', 0, true) + Wait(10000) + ClearPedTasks(playerPed) + + TriggerServerEvent('esx_ambulancejob:removeItem', 'bandage') + TriggerServerEvent('esx_ambulancejob:heal', GetPlayerServerId(closestPlayer), 'small') + ESX.ShowNotification(TranslateCap('heal_complete', GetPlayerName(closestPlayer))) + isBusy = false + else + ESX.ShowNotification(TranslateCap('player_not_conscious')) + end + else + ESX.ShowNotification(TranslateCap('not_enough_bandage')) + end + end, 'bandage') + + elseif element2.value == 'big' then + ESX.TriggerServerCallback('esx_ambulancejob:getItemAmount', function(quantity) + if quantity > 0 then + local closestPlayerPed = GetPlayerPed(closestPlayer) + local health = GetEntityHealth(closestPlayerPed) + + if health > 0 then + local playerPed = PlayerPedId() + + isBusy = true + ESX.ShowNotification(TranslateCap('heal_inprogress')) + TaskStartScenarioInPlace(playerPed, 'CODE_HUMAN_MEDIC_TEND_TO_DEAD', 0, true) + Wait(10000) + ClearPedTasks(playerPed) + + TriggerServerEvent('esx_ambulancejob:removeItem', 'medikit') + TriggerServerEvent('esx_ambulancejob:heal', GetPlayerServerId(closestPlayer), 'big') + ESX.ShowNotification(TranslateCap('heal_complete', GetPlayerName(closestPlayer))) + isBusy = false + else + ESX.ShowNotification(TranslateCap('player_not_conscious')) + end + else + ESX.ShowNotification(TranslateCap('not_enough_medikit')) + end + end, 'medikit') + elseif element2.value == 'put_in_vehicle' then + TriggerServerEvent('esx_ambulancejob:putInVehicle', GetPlayerServerId(closestPlayer)) + end + end + end) + end + end) +end + +function revivePlayer(closestPlayer) + isBusy = true + + ESX.TriggerServerCallback('esx_ambulancejob:getItemAmount', function(quantity) + if quantity > 0 then + local closestPlayerPed = GetPlayerPed(closestPlayer) + + if IsPedDeadOrDying(closestPlayerPed, 1) then + local playerPed = PlayerPedId() + local lib, anim = 'mini@cpr@char_a@cpr_str', 'cpr_pumpchest' + ESX.ShowNotification(TranslateCap('revive_inprogress')) + + for i=1, 15 do + Wait(900) + + ESX.Streaming.RequestAnimDict(lib, function() + TaskPlayAnim(playerPed, lib, anim, 8.0, -8.0, -1, 0, 0.0, false, false, false) + RemoveAnimDict(lib) + end) + end + + TriggerServerEvent('esx_ambulancejob:removeItem', 'medikit') + TriggerServerEvent('esx_ambulancejob:revive', GetPlayerServerId(closestPlayer)) + else + ESX.ShowNotification(TranslateCap('player_not_unconscious')) + end + else + ESX.ShowNotification(TranslateCap('not_enough_medikit')) + end + isBusy = false + end, 'medikit') +end + +function FastTravel(coords, heading) + local playerPed = PlayerPedId() + + DoScreenFadeOut(800) + + while not IsScreenFadedOut() do + Wait(500) + end + + ESX.Game.Teleport(playerPed, coords, function() + DoScreenFadeIn(800) + + if heading then + SetEntityHeading(playerPed, heading) + end + end) +end + +-- Draw markers & Marker logic +CreateThread(function() + while true do + local sleep = 1500 + + if ESX.PlayerData.job and ESX.PlayerData.job.name == 'ambulance' then + local playerCoords = GetEntityCoords(PlayerPedId()) + local isInMarker, hasExited = false, false + local currentHospital, currentPart, currentPartNum + + for hospitalNum,hospital in pairs(Config.Hospitals) do + -- Ambulance Actions + for k,v in ipairs(hospital.AmbulanceActions) do + local distance = #(playerCoords - v) + + if distance < Config.DrawDistance then + sleep = 0 + DrawMarker(Config.Marker.type, v, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Config.Marker.x, Config.Marker.y, Config.Marker.z, Config.Marker.r, Config.Marker.g, Config.Marker.b, Config.Marker.a, false, false, 2, Config.Marker.rotate, nil, nil, false) + + + if distance < Config.Marker.x then + isInMarker, currentHospital, currentPart, currentPartNum = true, hospitalNum, 'AmbulanceActions', k + end + end + end + + -- Pharmacies + for k,v in ipairs(hospital.Pharmacies) do + local distance = #(playerCoords - v) + + if distance < Config.DrawDistance then + sleep = 0 + DrawMarker(Config.Marker.type, v, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Config.Marker.x, Config.Marker.y, Config.Marker.z, Config.Marker.r, Config.Marker.g, Config.Marker.b, Config.Marker.a, false, false, 2, Config.Marker.rotate, nil, nil, false) + + + if distance < Config.Marker.x then + isInMarker, currentHospital, currentPart, currentPartNum = true, hospitalNum, 'Pharmacy', k + end + end + end + + -- Vehicle Spawners + for k,v in ipairs(hospital.Vehicles) do + local distance = #(playerCoords - v.Spawner) + + if distance < Config.DrawDistance then + sleep = 0 + DrawMarker(v.Marker.type, v.Spawner, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, v.Marker.x, v.Marker.y, v.Marker.z, v.Marker.r, v.Marker.g, v.Marker.b, v.Marker.a, false, false, 2, v.Marker.rotate, nil, nil, false) + + + if distance < v.Marker.x then + isInMarker, currentHospital, currentPart, currentPartNum = true, hospitalNum, 'Vehicles', k + end + end + end + + -- Helicopter Spawners + for k,v in ipairs(hospital.Helicopters) do + local distance = #(playerCoords - v.Spawner) + + if distance < Config.DrawDistance then + sleep = 0 + DrawMarker(v.Marker.type, v.Spawner, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, v.Marker.x, v.Marker.y, v.Marker.z, v.Marker.r, v.Marker.g, v.Marker.b, v.Marker.a, false, false, 2, v.Marker.rotate, nil, nil, false) + + + if distance < v.Marker.x then + isInMarker, currentHospital, currentPart, currentPartNum = true, hospitalNum, 'Helicopters', k + end + end + end + + -- Fast Travels (Prompt) + for k,v in ipairs(hospital.FastTravelsPrompt) do + local distance = #(playerCoords - v.From) + + if distance < Config.DrawDistance then + sleep = 0 + DrawMarker(v.Marker.type, v.From, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, v.Marker.x, v.Marker.y, v.Marker.z, v.Marker.r, v.Marker.g, v.Marker.b, v.Marker.a, false, false, 2, v.Marker.rotate, nil, nil, false) + + + if distance < v.Marker.x then + isInMarker, currentHospital, currentPart, currentPartNum = true, hospitalNum, 'FastTravelsPrompt', k + end + end + end + end + + -- Logic for exiting & entering markers + if isInMarker and not HasAlreadyEnteredMarker or (isInMarker and (LastHospital ~= currentHospital or LastPart ~= currentPart or LastPartNum ~= currentPartNum)) then + if + (LastHospital ~= nil and LastPart ~= nil and LastPartNum ~= nil) and + (LastHospital ~= currentHospital or LastPart ~= currentPart or LastPartNum ~= currentPartNum) + then + TriggerEvent('esx_ambulancejob:hasExitedMarker', LastHospital, LastPart, LastPartNum) + hasExited = true + end + + HasAlreadyEnteredMarker, LastHospital, LastPart, LastPartNum = true, currentHospital, currentPart, currentPartNum + + TriggerEvent('esx_ambulancejob:hasEnteredMarker', currentHospital, currentPart, currentPartNum) + end + + if not hasExited and not isInMarker and HasAlreadyEnteredMarker then + HasAlreadyEnteredMarker = false + TriggerEvent('esx_ambulancejob:hasExitedMarker', LastHospital, LastPart, LastPartNum) + end + end + Wait(sleep) + end +end) + +AddEventHandler('esx_ambulancejob:hasEnteredMarker', function(hospital, part, partNum) + if part == 'AmbulanceActions' then + CurrentAction = part + CurrentActionMsg = TranslateCap('actions_prompt') + CurrentActionData = {} + elseif part == 'Pharmacy' then + CurrentAction = part + CurrentActionMsg = TranslateCap('open_pharmacy') + CurrentActionData = {} + elseif part == 'Vehicles' then + CurrentAction = part + CurrentActionMsg = TranslateCap('garage_prompt') + CurrentActionData = {hospital = hospital, partNum = partNum} + elseif part == 'Helicopters' then + CurrentAction = part + CurrentActionMsg = TranslateCap('helicopter_prompt') + CurrentActionData = {hospital = hospital, partNum = partNum} + elseif part == 'FastTravelsPrompt' then + local travelItem = Config.Hospitals[hospital][part][partNum] + + CurrentAction = part + CurrentActionMsg = travelItem.Prompt + CurrentActionData = {to = travelItem.To.coords, heading = travelItem.To.heading} + end + + ESX.TextUI(CurrentActionMsg) +end) + +AddEventHandler('esx_ambulancejob:hasExitedMarker', function(hospital, part, partNum) + if not isInShopMenu then + ESX.CloseContext() + end + ESX.HideUI() + CurrentAction = nil +end) + +-- Key Controls +CreateThread(function() + while true do + local sleep = 1500 + + if CurrentAction then + sleep = 0 + + if IsControlJustReleased(0, 38) then + if CurrentAction == 'AmbulanceActions' then + OpenAmbulanceActionsMenu() + elseif CurrentAction == 'Pharmacy' then + OpenPharmacyMenu() + elseif CurrentAction == 'Vehicles' then + OpenVehicleSpawnerMenu('car', CurrentActionData.hospital, CurrentAction, CurrentActionData.partNum) + elseif CurrentAction == 'Helicopters' then + OpenVehicleSpawnerMenu('helicopter', CurrentActionData.hospital, CurrentAction, CurrentActionData.partNum) + elseif CurrentAction == 'FastTravelsPrompt' then + FastTravel(CurrentActionData.to, CurrentActionData.heading) + end + + CurrentAction = nil + end + end + + local playerCoords, letSleep = GetEntityCoords(PlayerPedId()), true + + for hospitalNum,hospital in pairs(Config.Hospitals) do + -- Fast Travels + for k,v in ipairs(hospital.FastTravels) do + local distance = #(playerCoords - v.From) + + if distance < Config.DrawDistance then + sleep = 0 + DrawMarker(v.Marker.type, v.From, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, v.Marker.x, v.Marker.y, v.Marker.z, v.Marker.r, v.Marker.g, v.Marker.b, v.Marker.a, false, false, 2, v.Marker.rotate, nil, nil, false) + + + if distance < v.Marker.x then + FastTravel(v.To.coords, v.To.heading) + end + end + end + end + Wait(sleep) + end +end) + +RegisterCommand("ambulance", function(src) + if ESX.PlayerData.job and ESX.PlayerData.job.name == 'ambulance' and not ESX.PlayerData.dead then + OpenMobileAmbulanceActionsMenu() + end +end) + +RegisterKeyMapping("ambulance", "Open Ambulance Actions Menu", "keyboard", "F6") + +RegisterNetEvent('esx_ambulancejob:putInVehicle') +AddEventHandler('esx_ambulancejob:putInVehicle', function() + local playerPed = PlayerPedId() + local vehicle, distance = ESX.Game.GetClosestVehicle() + + if vehicle and distance < 5 then + local maxSeats, freeSeat = GetVehicleMaxNumberOfPassengers(vehicle) + + for i=maxSeats - 1, 0, -1 do + if IsVehicleSeatFree(vehicle, i) then + freeSeat = i + break + end + end + + if freeSeat then + TaskWarpPedIntoVehicle(playerPed, vehicle, freeSeat) + end + end +end) + +function OpenCloakroomMenu() + local elements = { + {unselectable = true, icon = "fas fa-shirt", title = TranslateCap('cloakroom')}, + {icon = "fas fa-shirt", title = TranslateCap('ems_clothes_civil'), value = "citizen_wear"}, + {icon = "fas fa-shirt", title = TranslateCap('ems_clothes_ems'), value = "ambulance_wear"}, + } + + ESX.OpenContext("right", elements, function(menu,element) + if element.value == "citizen_wear" then + ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin, jobSkin) + TriggerEvent('skinchanger:loadSkin', skin) + isOnDuty = false + + for playerId,v in pairs(deadPlayerBlips) do + RemoveBlip(v) + deadPlayerBlips[playerId] = nil + end + deadPlayers = {} + if Config.Debug then + print("[^2INFO^7] Off Duty") + end + end) + elseif element.value == "ambulance_wear" then + ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin, jobSkin) + if skin.sex == 0 then + TriggerEvent('skinchanger:loadClothes', skin, jobSkin.skin_male) + else + TriggerEvent('skinchanger:loadClothes', skin, jobSkin.skin_female) + end + + isOnDuty = true + ESX.TriggerServerCallback('esx_ambulancejob:getDeadPlayers', function(_deadPlayers) + TriggerEvent('esx_ambulancejob:setDeadPlayers', _deadPlayers) + end) + if Config.Debug then + print("[^2INFO^7] Player Sex |^5" .. tostring(skin.sex).."^7") + print("[^2INFO^7] On Duty") + end + end) + end + end) +end + +function OpenPharmacyMenu() + local elements = { + {unselectable = true, icon = "fas fa-pills", title = TranslateCap('pharmacy_menu_title')} + } + + for k,v in pairs(Config.PharmacyItems) do + elements[#elements+1] = { + icon = "fas fa-pills", + title = v.title, + item = v.item + } + end + + ESX.OpenContext("right", elements, function(menu,element) + local elements2 = { + {unselectable = true, icon = "fas fa-pills", title = element.title}, + {title = "Amount", input = true, inputType = "number", inputMin = 1, inputMax = 100, inputPlaceholder = "Amount to buy.."}, + {icon = "fas fa-check-double", title = "Confirm", val = "confirm"} + } + + ESX.OpenContext("right", elements2, function(menu2,element2) + local amount = menu2.eles[2].inputValue + if Config.Debug then + print("[^2INFO^7] Attempting to Give Item - ^5" .. tostring(element.item) .. "^7") + end + TriggerServerEvent('esx_ambulancejob:giveItem', element.item, amount) + end, function(menu) + OpenPharmacyMenu() + end) + end) +end + +RegisterNetEvent('esx_ambulancejob:heal') +AddEventHandler('esx_ambulancejob:heal', function(healType, quiet) + local playerPed = PlayerPedId() + local maxHealth = GetEntityMaxHealth(playerPed) + + if healType == 'small' then + local health = GetEntityHealth(playerPed) + local newHealth = math.min(maxHealth, math.floor(health + maxHealth / 8)) + SetEntityHealth(playerPed, newHealth) + elseif healType == 'big' then + SetEntityHealth(playerPed, maxHealth) + end + + if Config.Debug then + print("[^2INFO^7] Healing Player - ^5" .. tostring(healType).. "^7") + end + if not quiet then + ESX.ShowNotification(TranslateCap('healed')) + end +end) + +RegisterNetEvent('esx:setJob') +AddEventHandler('esx:setJob', function(job) + if isOnDuty and job.name ~= 'ambulance' then + for playerId,v in pairs(deadPlayerBlips) do + if Config.Debug then + print("[^2INFO^7] Removing dead blip - ^5" .. tostring(playerId).. "^7") + end + RemoveBlip(v) + deadPlayerBlips[playerId] = nil + end + + isOnDuty = false + end +end) + +RegisterNetEvent('esx_ambulancejob:PlayerDead') +AddEventHandler('esx_ambulancejob:PlayerDead', function(Player) + if Config.Debug then + print("[^2INFO^7] Player Dead | ^5" .. tostring(Player) .. "^7") + end + deadPlayers[Player] = "dead" +end) + +RegisterNetEvent('esx_ambulancejob:PlayerNotDead') +AddEventHandler('esx_ambulancejob:PlayerNotDead', function(Player) + if deadPlayerBlips[Player] then + RemoveBlip(deadPlayerBlips[Player]) + deadPlayerBlips[Player] = nil + end + if Config.Debug then + print("[^2INFO^7] Player Alive | ^5" .. tostring(Player) .. "^7") + end + deadPlayers[Player] = nil +end) + +RegisterNetEvent('esx_ambulancejob:setDeadPlayers') +AddEventHandler('esx_ambulancejob:setDeadPlayers', function(_deadPlayers) + deadPlayers = _deadPlayers + + if isOnDuty then + for playerId,v in pairs(deadPlayerBlips) do + RemoveBlip(v) + deadPlayerBlips[playerId] = nil + end + + for playerId,status in pairs(deadPlayers) do + if Config.Debug then + print("[^2INFO^7] Player Dead | ^5" .. tostring(playerId) .. "^7") + end + if status == 'distress' then + if Config.Debug then + print("[^2INFO^7] Creating Distress Blip for Player - ^5" .. tostring(playerId) .. "^7") + end + local player = GetPlayerFromServerId(playerId) + local playerPed = GetPlayerPed(player) + local blip = AddBlipForEntity(playerPed) + + SetBlipSprite(blip, 303) + SetBlipColour(blip, 1) + SetBlipFlashes(blip, true) + SetBlipCategory(blip, 7) + + BeginTextCommandSetBlipName('STRING') + AddTextComponentSubstringPlayerName(TranslateCap('blip_dead')) + EndTextCommandSetBlipName(blip) + + deadPlayerBlips[playerId] = blip + end + end + end +end) + + +RegisterNetEvent('esx_ambulancejob:PlayerDistressed') +AddEventHandler('esx_ambulancejob:PlayerDistressed', function(Player) + deadPlayers[Player] = 'distress' + + if isOnDuty then + if Config.Debug then + print("[^2INFO^7] Player Distress Recived - ID:^5" .. tostring(Player) .. "^7") + end + ESX.ShowNotification("[DISPATCH]: An Unconscious Person Has Been Reported", "error", 10000) + deadPlayerBlips[Player] = nil + local player = GetPlayerFromServerId(Player) + local playerPed = GetPlayerPed(player) + local blip = AddBlipForEntity(playerPed) + + SetBlipSprite(blip, Config.DistressBlip.Sprite) + SetBlipColour(blip, Config.DistressBlip.Color) + SetBlipScale(blip, Config.DistressBlip.Scale) + SetBlipFlashes(blip, true) + + BeginTextCommandSetBlipName('STRING') + AddTextComponentSubstringPlayerName(TranslateCap('blip_dead')) + EndTextCommandSetBlipName(blip) + + deadPlayerBlips[Player] = blip + end +end) + diff --git a/[esx_addons]/esx_ambulancejob/client/main.lua b/[esx_addons]/esx_ambulancejob/client/main.lua new file mode 100644 index 00000000..95e90c9f --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/client/main.lua @@ -0,0 +1,473 @@ +local firstSpawn = true + +isDead, isSearched, medic = false, false, 0 + +RegisterNetEvent('esx:playerLoaded') +AddEventHandler('esx:playerLoaded', function(xPlayer) + ESX.PlayerLoaded = true +end) + +RegisterNetEvent('esx:onPlayerLogout') +AddEventHandler('esx:onPlayerLogout', function() + ESX.PlayerLoaded = false + firstSpawn = true +end) + +AddEventHandler('esx:onPlayerSpawn', function() + isDead = false + ClearTimecycleModifier() + SetPedMotionBlur(PlayerPedId(), false) + ClearExtraTimecycleModifier() + EndDeathCam() + if firstSpawn then + firstSpawn = false + + if Config.SaveDeathStatus then + while not ESX.PlayerLoaded do + Wait(1000) + end + + ESX.TriggerServerCallback('esx_ambulancejob:getDeathStatus', function(shouldDie) + if shouldDie then + Wait(1000) + SetEntityHealth(PlayerPedId(), 0) + end + end) + end + end +end) + +-- Create blips +CreateThread(function() + for k, v in pairs(Config.Hospitals) do + local blip = AddBlipForCoord(v.Blip.coords) + + SetBlipSprite(blip, v.Blip.sprite) + SetBlipScale(blip, v.Blip.scale) + SetBlipColour(blip, v.Blip.color) + SetBlipAsShortRange(blip, true) + + BeginTextCommandSetBlipName('STRING') + AddTextComponentSubstringPlayerName(TranslateCap('blip_hospital')) + EndTextCommandSetBlipName(blip) + end + + while true do + local Sleep = 1500 + + if isDead then + Sleep = 0 + DisableAllControlActions(0) + EnableControlAction(0, 47, true) -- G + EnableControlAction(0, 245, true) -- T + EnableControlAction(0, 38, true) -- E + + ProcessCamControls() + if isSearched then + local playerPed = PlayerPedId() + local ped = GetPlayerPed(GetPlayerFromServerId(medic)) + isSearched = false + + AttachEntityToEntity(playerPed, ped, 11816, 0.54, 0.54, 0.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true) + Wait(1000) + DetachEntity(playerPed, true, false) + ClearPedTasksImmediately(playerPed) + end + end + + Wait(Sleep) + end +end) + +RegisterNetEvent('esx_ambulancejob:clsearch') +AddEventHandler('esx_ambulancejob:clsearch', function(medicId) + local playerPed = PlayerPedId() + + if isDead then + local coords = GetEntityCoords(playerPed) + local playersInArea = ESX.Game.GetPlayersInArea(coords, 50.0) + + for i = 1, #playersInArea, 1 do + local player = playersInArea[i] + if player == GetPlayerFromServerId(medicId) then + medic = tonumber(medicId) + isSearched = true + break + end + end + end +end) + +function OnPlayerDeath() + isDead = true + ESX.CloseContext() + ClearTimecycleModifier() + SetTimecycleModifier("REDMIST_blend") + SetTimecycleModifierStrength(0.7) + SetExtraTimecycleModifier("fp_vig_red") + SetExtraTimecycleModifierStrength(1.0) + SetPedMotionBlur(PlayerPedId(), true) + TriggerServerEvent('esx_ambulancejob:setDeathStatus', true) + StartDeathTimer() + StartDeathCam() + StartDistressSignal() +end + +RegisterNetEvent('esx_ambulancejob:useItem') +AddEventHandler('esx_ambulancejob:useItem', function(itemName) + ESX.CloseContext() + + if itemName == 'medikit' then + local lib, anim = 'anim@heists@narcotics@funding@gang_idle', 'gang_chatting_idle01' -- TODO better animations + local playerPed = PlayerPedId() + + ESX.Streaming.RequestAnimDict(lib, function() + TaskPlayAnim(playerPed, lib, anim, 8.0, -8.0, -1, 0, 0, false, false, false) + RemoveAnimDict(lib) + + Wait(500) + while IsEntityPlayingAnim(playerPed, lib, anim, 3) do + Wait(0) + DisableAllControlActions(0) + end + + TriggerEvent('esx_ambulancejob:heal', 'big', true) + ESX.ShowNotification(TranslateCap('used_medikit')) + end) + + elseif itemName == 'bandage' then + local lib, anim = 'anim@heists@narcotics@funding@gang_idle', 'gang_chatting_idle01' -- TODO better animations + local playerPed = PlayerPedId() + + ESX.Streaming.RequestAnimDict(lib, function() + TaskPlayAnim(playerPed, lib, anim, 8.0, -8.0, -1, 0, 0, false, false, false) + RemoveAnimDict(lib) + + Wait(500) + while IsEntityPlayingAnim(playerPed, lib, anim, 3) do + Wait(0) + DisableAllControlActions(0) + end + + TriggerEvent('esx_ambulancejob:heal', 'small', true) + ESX.ShowNotification(TranslateCap('used_bandage')) + end) + end +end) + +function StartDistressSignal() + CreateThread(function() + local timer = Config.BleedoutTimer + + while timer > 0 and isDead do + Wait(0) + timer = timer - 30 + + SetTextFont(4) + SetTextScale(0.5, 0.5) + SetTextColour(200, 50, 50, 255) + SetTextDropshadow(0.1, 3, 27, 27, 255) + BeginTextCommandDisplayText('STRING') + AddTextComponentSubstringPlayerName(TranslateCap('distress_send')) + EndTextCommandDisplayText(0.43, 0.77) + + if IsControlJustReleased(0, 47) then + SendDistressSignal() + break + end + end + end) +end + +function SendDistressSignal() + local playerPed = PlayerPedId() + local coords = GetEntityCoords(playerPed) + + ESX.ShowNotification(TranslateCap('distress_sent')) + TriggerServerEvent('esx_ambulancejob:onPlayerDistress') +end + +function DrawGenericTextThisFrame() + SetTextFont(4) + SetTextScale(0.0, 0.5) + SetTextColour(255, 255, 255, 255) + SetTextDropshadow(0, 0, 0, 0, 255) + SetTextDropShadow() + SetTextOutline() + SetTextCentre(true) +end + +function secondsToClock(seconds) + local seconds, hours, mins, secs = tonumber(seconds), 0, 0, 0 + + if seconds <= 0 then + return 0, 0 + else + local hours = string.format('%02.f', math.floor(seconds / 3600)) + local mins = string.format('%02.f', math.floor(seconds / 60 - (hours * 60))) + local secs = string.format('%02.f', math.floor(seconds - hours * 3600 - mins * 60)) + + return mins, secs + end +end + +function StartDeathTimer() + local canPayFine = false + + if Config.EarlyRespawnFine then + ESX.TriggerServerCallback('esx_ambulancejob:checkBalance', function(canPay) + canPayFine = canPay + end) + end + + local earlySpawnTimer = ESX.Math.Round(Config.EarlyRespawnTimer / 1000) + local bleedoutTimer = ESX.Math.Round(Config.BleedoutTimer / 1000) + + CreateThread(function() + -- early respawn timer + while earlySpawnTimer > 0 and isDead do + Wait(1000) + + if earlySpawnTimer > 0 then + earlySpawnTimer = earlySpawnTimer - 1 + end + end + + -- bleedout timer + while bleedoutTimer > 0 and isDead do + Wait(1000) + + if bleedoutTimer > 0 then + bleedoutTimer = bleedoutTimer - 1 + end + end + end) + + CreateThread(function() + local text, timeHeld + + -- early respawn timer + while earlySpawnTimer > 0 and isDead do + Wait(0) + text = TranslateCap('respawn_available_in', secondsToClock(earlySpawnTimer)) + + DrawGenericTextThisFrame() + BeginTextCommandDisplayText('STRING') + AddTextComponentSubstringPlayerName(text) + EndTextCommandDisplayText(0.5, 0.8) + end + + -- bleedout timer + while bleedoutTimer > 0 and isDead do + Wait(0) + text = TranslateCap('respawn_bleedout_in', secondsToClock(bleedoutTimer)) + + if not Config.EarlyRespawnFine then + text = text .. TranslateCap('respawn_bleedout_prompt') + + if IsControlPressed(0, 38) and timeHeld > 120 then + RemoveItemsAfterRPDeath() + break + end + elseif Config.EarlyRespawnFine and canPayFine then + text = text .. TranslateCap('respawn_bleedout_fine', ESX.Math.GroupDigits(Config.EarlyRespawnFineAmount)) + + if IsControlPressed(0, 38) and timeHeld > 120 then + TriggerServerEvent('esx_ambulancejob:payFine') + RemoveItemsAfterRPDeath() + break + end + end + + if IsControlPressed(0, 38) then + timeHeld += 1 + else + timeHeld = 0 + end + + DrawGenericTextThisFrame() + + BeginTextCommandDisplayText('STRING') + AddTextComponentSubstringPlayerName(text) + EndTextCommandDisplayText(0.5, 0.8) + end + + if bleedoutTimer < 1 and isDead then + RemoveItemsAfterRPDeath() + end + end) +end + +function GetClosestRespawnPoint() + local PlyCoords = GetEntityCoords(PlayerPedId()) + local ClosestDist, ClosestHospital, ClosestCoord = 10000, {}, nil + + for k, v in pairs(Config.RespawnPoints) do + local Distance = #(PlyCoords - vector3(v.coords.x, v.coords.y, v.coords.z)) + if Distance <= ClosestDist then + ClosestDist = Distance + ClosestHospital = v + ClosestCoord = vector3(v.coords.x, v.coords.y, v.coords.z) + end + end + + return ClosestCoord, ClosestHospital +end + +function RemoveItemsAfterRPDeath() + TriggerServerEvent('esx_ambulancejob:setDeathStatus', false) + + CreateThread(function() + ESX.TriggerServerCallback('esx_ambulancejob:removeItemsAfterRPDeath', function() + local RespawnCoords, ClosestHospital = GetClosestRespawnPoint() + + ESX.SetPlayerData('loadout', {}) + + DoScreenFadeOut(800) + RespawnPed(PlayerPedId(), RespawnCoords, ClosestHospital.heading) + while not IsScreenFadedOut() do + Wait(0) + end + DoScreenFadeIn(800) + end) + end) +end + +function RespawnPed(ped, coords, heading) + SetEntityCoordsNoOffset(ped, coords.x, coords.y, coords.z, false, false, false) + NetworkResurrectLocalPlayer(coords.x, coords.y, coords.z, heading, true, false) + SetPlayerInvincible(ped, false) + ClearPedBloodDamage(ped) + + TriggerServerEvent('esx:onPlayerSpawn') + TriggerEvent('esx:onPlayerSpawn') + TriggerEvent('playerSpawned') -- compatibility with old scripts, will be removed soon +end + +AddEventHandler('esx:onPlayerDeath', function(data) + OnPlayerDeath() +end) + +RegisterNetEvent('esx_ambulancejob:revive') +AddEventHandler('esx_ambulancejob:revive', function() + local playerPed = PlayerPedId() + local coords = GetEntityCoords(playerPed) + TriggerServerEvent('esx_ambulancejob:setDeathStatus', false) + + DoScreenFadeOut(800) + + while not IsScreenFadedOut() do + Wait(50) + end + + local formattedCoords = {x = ESX.Math.Round(coords.x, 1), y = ESX.Math.Round(coords.y, 1), z = ESX.Math.Round(coords.z, 1)} + + RespawnPed(playerPed, formattedCoords, 0.0) + isDead = false + ClearTimecycleModifier() + SetPedMotionBlur(playerPed, false) + ClearExtraTimecycleModifier() + EndDeathCam() + DoScreenFadeIn(800) +end) + +-- Load unloaded IPLs +if Config.LoadIpl then + RequestIpl('Coroner_Int_on') -- Morgue +end + +local cam = nil + +local isDead = false + +local angleY = 0.0 + +local angleZ = 0.0 + +------------------------------------------------------- + +-----------------DEATH CAMERA FUNCTIONS --------------- + +-------------------------------------------------------- + +-- initialize camera + +function StartDeathCam() + ClearFocus() + local playerPed = PlayerPedId() + cam = CreateCamWithParams("DEFAULT_SCRIPTED_CAMERA", GetEntityCoords(playerPed), 0, 0, 0, GetGameplayCamFov()) + SetCamActive(cam, true) + RenderScriptCams(true, true, 1000, true, false) +end + +-- destroy camera + +function EndDeathCam() + ClearFocus() + RenderScriptCams(false, false, 0, true, false) + DestroyCam(cam, false) + cam = nil +end +-- process camera controls +function ProcessCamControls() + local playerPed = PlayerPedId() + local playerCoords = GetEntityCoords(playerPed) + -- disable 1st person as the 1st person camera can cause some glitches + DisableFirstPersonCamThisFrame() + -- calculate new position + local newPos = ProcessNewPosition() + SetFocusArea(newPos.x, newPos.y, newPos.z, 0.0, 0.0, 0.0) + -- set coords of cam + SetCamCoord(cam, newPos.x, newPos.y, newPos.z) + -- set rotation + PointCamAtCoord(cam, playerCoords.x, playerCoords.y, playerCoords.z + 0.5) +end + +function ProcessNewPosition() + local mouseX = 0.0 + local mouseY = 0.0 + -- keyboard + if (IsInputDisabled(0)) then + -- rotation + mouseX = GetDisabledControlNormal(1, 1) * 8.0 + + mouseY = GetDisabledControlNormal(1, 2) * 8.0 + -- controller + else + mouseX = GetDisabledControlNormal(1, 1) * 1.5 + + mouseY = GetDisabledControlNormal(1, 2) * 1.5 + end + + angleZ = angleZ - mouseX -- around Z axis (left / right) + + angleY = angleY + mouseY -- up / down + -- limit up / down angle to 90° + + if (angleY > 89.0) then + angleY = 89.0 + elseif (angleY < -89.0) then + angleY = -89.0 + end + local pCoords = GetEntityCoords(PlayerPedId()) + local behindCam = {x = pCoords.x + ((Cos(angleZ) * Cos(angleY)) + (Cos(angleY) * Cos(angleZ))) / 2 * (5.5 + 0.5), + + y = pCoords.y + ((Sin(angleZ) * Cos(angleY)) + (Cos(angleY) * Sin(angleZ))) / 2 * (5.5 + 0.5), + + z = pCoords.z + ((Sin(angleY))) * (5.5 + 0.5)} + local rayHandle = StartShapeTestRay(pCoords.x, pCoords.y, pCoords.z + 0.5, behindCam.x, behindCam.y, behindCam.z, -1, PlayerPedId(), 0) + + local a, hitBool, hitCoords, surfaceNormal, entityHit = GetShapeTestResult(rayHandle) + + local maxRadius = 1.9 + if (hitBool and Vdist(pCoords.x, pCoords.y, pCoords.z + 0.5, hitCoords) < 5.5 + 0.5) then + maxRadius = Vdist(pCoords.x, pCoords.y, pCoords.z + 0.5, hitCoords) + end + + local offset = {x = ((Cos(angleZ) * Cos(angleY)) + (Cos(angleY) * Cos(angleZ))) / 2 * maxRadius, + y = ((Sin(angleZ) * Cos(angleY)) + (Cos(angleY) * Sin(angleZ))) / 2 * maxRadius, z = ((Sin(angleY))) * maxRadius} + + local pos = {x = pCoords.x + offset.x, y = pCoords.y + offset.y, z = pCoords.z + offset.z} + + return pos +end diff --git a/[esx_addons]/esx_ambulancejob/client/vehicle.lua b/[esx_addons]/esx_ambulancejob/client/vehicle.lua new file mode 100644 index 00000000..b2edd04a --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/client/vehicle.lua @@ -0,0 +1,305 @@ +local spawnedVehicles = {} + +function OpenVehicleSpawnerMenu(type, hospital, part, partNum) + local playerCoords = GetEntityCoords(PlayerPedId()) + local elements = { + {unselectable = true, icon = "fas fa-car", title = TranslateCap('garage_title')}, + {icon = "fas fa-car", title = TranslateCap('garage_storeditem'), action = 'garage'}, + {icon = "fas fa-car", title = TranslateCap('garage_storeitem'), action = 'store_garage'}, + {icon = "fas fa-car", title = TranslateCap('garage_buyitem'), action = 'buy_vehicle'} + } + + ESX.OpenContext("right", elements, function(menu,element) + if element.action == "buy_vehicle" then + local shopElements = {} + local authorizedVehicles = Config.AuthorizedVehicles[type][ESX.PlayerData.job.grade_name] + local shopCoords = Config.Hospitals[hospital][part][partNum].InsideShop + + if #authorizedVehicles > 0 then + for k,vehicle in ipairs(authorizedVehicles) do + if IsModelInCdimage(vehicle.model) then + local vehicleLabel = GetLabelText(GetDisplayNameFromVehicleModel(vehicle.model)) + + shopElements[#shopElements+1] = { + icon = 'fas fa-car', + title = ('%s - %s'):format(vehicleLabel, TranslateCap('shop_item', ESX.Math.GroupDigits(vehicle.price))), + name = vehicleLabel, + model = vehicle.model, + price = vehicle.price, + props = vehicle.props, + type = type + } + end + end + + if #shopElements > 0 then + OpenShopMenu(shopElements, playerCoords, shopCoords) + else + ESX.ShowNotification(TranslateCap('garage_notauthorized')) + end + else + ESX.ShowNotification(TranslateCap('garage_notauthorized')) + end + elseif element.action == "garage" then + local garage = { + {unselectable = true, icon = "fas fa-car", title = "Garage"} + } + + ESX.TriggerServerCallback('esx_vehicleshop:retrieveJobVehicles', function(jobVehicles) + if #jobVehicles > 0 then + local allVehicleProps = {} + + for k,v in ipairs(jobVehicles) do + local props = json.decode(v.vehicle) + + if IsModelInCdimage(props.model) then + local vehicleName = GetLabelText(GetDisplayNameFromVehicleModel(props.model)) + local label = ('%s - %s: '):format(vehicleName, props.plate) + + if v.stored == 1 then + label = label .. ('%s'):format(TranslateCap('garage_stored')) + elseif v.stored == 0 then + label = label .. ('%s'):format(TranslateCap('garage_notstored')) + end + + garage[#garage+1] = { + icon = 'fas fa-car', + title = label, + stored = v.stored, + model = props.model, + plate = props.plate + } + + allVehicleProps[props.plate] = props + end + end + + if #garage > 0 then + ESX.OpenContext("right", garage, function(menuG,elementG) + if elementG.stored == 1 then + local foundSpawn, spawnPoint = GetAvailableVehicleSpawnPoint(hospital, part, partNum) + + if foundSpawn then + ESX.CloseContext() + + ESX.Game.SpawnVehicle(elementG.model, spawnPoint.coords, spawnPoint.heading, function(vehicle) + local vehicleProps = allVehicleProps[elementG.plate] + ESX.Game.SetVehicleProperties(vehicle, vehicleProps) + + TriggerServerEvent('esx_vehicleshop:setJobVehicleState', elementG.plate, false) + ESX.ShowNotification(TranslateCap('garage_released')) + end) + end + else + ESX.ShowNotification(TranslateCap('garage_notavailable')) + end + end) + else + ESX.ShowNotification(TranslateCap('garage_empty')) + end + else + ESX.ShowNotification(TranslateCap('garage_empty')) + end + end, type) + elseif element.action == "store_garage" then + StoreNearbyVehicle(playerCoords) + end + end) +end + +function StoreNearbyVehicle(playerCoords) + local vehicles, plates, index = ESX.Game.GetVehiclesInArea(playerCoords, 30.0), {}, {} + + if next(vehicles) then + for i = 1, #vehicles do + local vehicle = vehicles[i] + + -- Make sure the vehicle we're saving is empty, or else it won't be deleted + if GetVehicleNumberOfPassengers(vehicle) == 0 and IsVehicleSeatFree(vehicle, -1) then + local plate = ESX.Math.Trim(GetVehicleNumberPlateText(vehicle)) + plates[#plates + 1] = plate + index[plate] = vehicle + end + end + else + ESX.ShowNotification(TranslateCap('garage_store_nearby')) + return + end + + ESX.TriggerServerCallback('esx_ambulancejob:storeNearbyVehicle', function(plate) + if plate then + local vehicleId = index[plate] + local attempts = 0 + ESX.Game.DeleteVehicle(vehicleId) + isBusy = true + + CreateThread(function() + BeginTextCommandBusyspinnerOn('STRING') + AddTextComponentSubstringPlayerName(TranslateCap('garage_storing')) + EndTextCommandBusyspinnerOn(4) + + while isBusy do + Wait(100) + end + + BusyspinnerOff() + end) + + -- Workaround for vehicle not deleting when other players are near it. + while DoesEntityExist(vehicleId) do + Wait(500) + attempts = attempts + 1 + + -- Give up + if attempts > 30 then + break + end + + vehicles = ESX.Game.GetVehiclesInArea(playerCoords, 30.0) + if #vehicles > 0 then + for i = 1, #vehicles do + local vehicle = vehicles[i] + if ESX.Math.Trim(GetVehicleNumberPlateText(vehicle)) == plate then + ESX.Game.DeleteVehicle(vehicle) + break + end + end + end + end + + isBusy = false + ESX.ShowNotification(TranslateCap('garage_has_stored')) + else + ESX.ShowNotification(TranslateCap('garage_has_notstored')) + end + end, plates) +end + +function GetAvailableVehicleSpawnPoint(hospital, part, partNum) + local spawnPoints = Config.Hospitals[hospital][part][partNum].SpawnPoints + local found, foundSpawnPoint = false, nil + + for i=1, #spawnPoints, 1 do + if ESX.Game.IsSpawnPointClear(spawnPoints[i].coords, spawnPoints[i].radius) then + found, foundSpawnPoint = true, spawnPoints[i] + break + end + end + + if found then + return true, foundSpawnPoint + else + ESX.ShowNotification(TranslateCap('garage_blocked')) + return false + end +end + +function OpenShopMenu(elements, restoreCoords, shopCoords) + local playerPed = PlayerPedId() + isInShopMenu = true + ESX.OpenContext("right", elements, function(menu,element) + local elements2 = { + {unselectable = true, icon = "fas fa-car", title = element.title}, + {icon = "fas fa-eye", title = "View", value = "view"} + } + + ESX.OpenContext("right", elements2, function(menu2,element2) + if element2.value == "view" then + DeleteSpawnedVehicles() + WaitForVehicleToLoad(element.model) + + ESX.Game.SpawnLocalVehicle(element.model, shopCoords, 0.0, function(vehicle) + table.insert(spawnedVehicles, vehicle) + TaskWarpPedIntoVehicle(playerPed, vehicle, -1) + FreezeEntityPosition(vehicle, true) + SetModelAsNoLongerNeeded(element.model) + + if element.props then + ESX.Game.SetVehicleProperties(vehicle, element.props) + end + end) + + local elements3 = { + {unselectable = true, icon = "fas fa-car", title = element.title}, + {icon = "fas fa-check-double", title = "Buy", value = "buy"}, + {icon = "fas fa-eye", title = "Stop Viewing", value = "stop"} + } + + ESX.OpenContext("right", elements3, function(menu3,element3) + if element3.value == 'stop' then + isInShopMenu = false + ESX.CloseContext() + + DeleteSpawnedVehicles() + FreezeEntityPosition(playerPed, false) + SetEntityVisible(playerPed, true) + + ESX.Game.Teleport(playerPed, restoreCoords) + elseif element3.value == "buy" then + local newPlate = exports['esx_vehicleshop']:GeneratePlate() + local vehicle = GetVehiclePedIsIn(playerPed, false) + local props = ESX.Game.GetVehicleProperties(vehicle) + props.plate = newPlate + + ESX.TriggerServerCallback('esx_ambulancejob:buyJobVehicle', function (bought) + if bought then + ESX.ShowNotification(TranslateCap('vehicleshop_bought', element.name, ESX.Math.GroupDigits(element.price))) + + isInShopMenu = false + ESX.CloseContext() + DeleteSpawnedVehicles() + FreezeEntityPosition(playerPed, false) + SetEntityVisible(playerPed, true) + + ESX.Game.Teleport(playerPed, restoreCoords) + else + ESX.ShowNotification(TranslateCap('vehicleshop_money')) + ESX.CloseContext() + end + end, props, element.type) + end + end) + end + end) + end) +end + +CreateThread(function() + while true do + sleep = 1500 + + if isInShopMenu then + sleep = 0 + DisableControlAction(0, 75, true) -- Disable exit vehicle + DisableControlAction(27, 75, true) -- Disable exit vehicle + end + Wait(sleep) + end +end) + +function DeleteSpawnedVehicles() + while #spawnedVehicles > 0 do + local vehicle = spawnedVehicles[1] + ESX.Game.DeleteVehicle(vehicle) + table.remove(spawnedVehicles, 1) + end +end + +function WaitForVehicleToLoad(modelHash) + modelHash = (type(modelHash) == 'number' and modelHash or joaat(modelHash)) + + if not HasModelLoaded(modelHash) then + RequestModel(modelHash) + + BeginTextCommandBusyspinnerOn('STRING') + AddTextComponentSubstringPlayerName(TranslateCap('vehicleshop_awaiting_model')) + EndTextCommandBusyspinnerOn(4) + + while not HasModelLoaded(modelHash) do + Wait(0) + DisableAllControlActions(0) + end + + BusyspinnerOff() + end +end diff --git a/[esx_addons]/esx_ambulancejob/config.lua b/[esx_addons]/esx_ambulancejob/config.lua new file mode 100644 index 00000000..833983e3 --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/config.lua @@ -0,0 +1,186 @@ +Config = {} + +Config.DrawDistance = 10.0 -- How close do you need to be in order for the markers to be drawn (in GTA units). +Config.Debug = ESX.GetConfig().EnableDebug +Config.Marker = {type = 1, x = 1.5, y = 1.5, z = 0.5, r = 102, g = 0, b = 102, a = 100, rotate = false} + +Config.ReviveReward = 700 -- Revive reward, set to 0 if you don't want it enabled +Config.SaveDeathStatus = true -- Save Death Status? +Config.LoadIpl = true -- Disable if you're using fivem-ipl or other IPL loaders + +Config.Locale = GetConvar('esx:locale', 'en') + +Config.DistressBlip = { + Sprite = 310, + Color = 48, + Scale = 2.0 +} + +Config.EarlyRespawnTimer = 60000 * 1 -- time til respawn is available +Config.BleedoutTimer = 60000 * 10 -- time til the player bleeds out + +Config.EnablePlayerManagement = false -- Enable society managing (If you are using esx_society). + +Config.RemoveWeaponsAfterRPDeath = true +Config.RemoveCashAfterRPDeath = true +Config.RemoveItemsAfterRPDeath = true + +-- Let the player pay for respawning early, only if he can afford it. +Config.EarlyRespawnFine = false +Config.EarlyRespawnFineAmount = 5000 + +Config.OxInventory = ESX.GetConfig().OxInventory +Config.RespawnPoints = { + {coords = vector3(341.0, -1397.3, 32.5), heading = 48.5}, -- Central Los Santos + {coords = vector3(1836.03, 3670.99, 34.28), heading = 296.06} -- Sandy Shores +} + +Config.PharmacyItems = { + { + title = "Medikit", + item = "medikit" + }, + { + title = "Bandage", + item = "bandage" + }, +} + +Config.Hospitals = { + + CentralLosSantos = { + + Blip = { + coords = vector3(307.7, -1433.4, 28.9), + sprite = 61, + scale = 1.2, + color = 2 + }, + + AmbulanceActions = { + vector3(270.5, -1363.0, 23.5) + }, + + Pharmacies = { + vector3(230.1, -1366.1, 38.5) + }, + + Vehicles = { + { + Spawner = vector3(307.7, -1433.4, 30.0), + InsideShop = vector3(446.7, -1355.6, 43.5), + Marker = {type = 36, x = 1.0, y = 1.0, z = 1.0, r = 100, g = 50, b = 200, a = 100, rotate = true}, + SpawnPoints = { + {coords = vector3(297.2, -1429.5, 29.8), heading = 227.6, radius = 4.0}, + {coords = vector3(294.0, -1433.1, 29.8), heading = 227.6, radius = 4.0}, + {coords = vector3(309.4, -1442.5, 29.8), heading = 227.6, radius = 6.0} + } + } + }, + + Helicopters = { + { + Spawner = vector3(317.5, -1449.5, 46.5), + InsideShop = vector3(305.6, -1419.7, 41.5), + Marker = {type = 34, x = 1.5, y = 1.5, z = 1.5, r = 100, g = 150, b = 150, a = 100, rotate = true}, + SpawnPoints = { + {coords = vector3(313.5, -1465.1, 46.5), heading = 142.7, radius = 10.0}, + {coords = vector3(299.5, -1453.2, 46.5), heading = 142.7, radius = 10.0} + } + } + }, + + FastTravels = { + { + From = vector3(294.7, -1448.1, 29.0), + To = {coords = vector3(272.8, -1358.8, 23.5), heading = 0.0}, + Marker = {type = 1, x = 2.0, y = 2.0, z = 0.5, r = 102, g = 0, b = 102, a = 100, rotate = false} + }, + + { + From = vector3(275.3, -1361, 23.5), + To = {coords = vector3(295.8, -1446.5, 28.9), heading = 0.0}, + Marker = {type = 1, x = 2.0, y = 2.0, z = 0.5, r = 102, g = 0, b = 102, a = 100, rotate = false} + }, + + { + From = vector3(247.3, -1371.5, 23.5), + To = {coords = vector3(333.1, -1434.9, 45.5), heading = 138.6}, + Marker = {type = 1, x = 1.5, y = 1.5, z = 0.5, r = 102, g = 0, b = 102, a = 100, rotate = false} + }, + + { + From = vector3(335.5, -1432.0, 45.50), + To = {coords = vector3(249.1, -1369.6, 23.5), heading = 0.0}, + Marker = {type = 1, x = 2.0, y = 2.0, z = 0.5, r = 102, g = 0, b = 102, a = 100, rotate = false} + }, + + { + From = vector3(234.5, -1373.7, 20.9), + To = {coords = vector3(320.9, -1478.6, 28.8), heading = 0.0}, + Marker = {type = 1, x = 1.5, y = 1.5, z = 1.0, r = 102, g = 0, b = 102, a = 100, rotate = false} + }, + + { + From = vector3(317.9, -1476.1, 28.9), + To = {coords = vector3(238.6, -1368.4, 23.5), heading = 0.0}, + Marker = {type = 1, x = 1.5, y = 1.5, z = 1.0, r = 102, g = 0, b = 102, a = 100, rotate = false} + } + }, + + FastTravelsPrompt = { + { + From = vector3(237.4, -1373.8, 26.0), + To = {coords = vector3(251.9, -1363.3, 38.5), heading = 0.0}, + Marker = {type = 1, x = 1.5, y = 1.5, z = 0.5, r = 102, g = 0, b = 102, a = 100, rotate = false}, + Prompt = TranslateCap('fast_travel') + }, + + { + From = vector3(256.5, -1357.7, 36.0), + To = {coords = vector3(235.4, -1372.8, 26.3), heading = 0.0}, + Marker = {type = 1, x = 1.5, y = 1.5, z = 0.5, r = 102, g = 0, b = 102, a = 100, rotate = false}, + Prompt = TranslateCap('fast_travel') + } + } + + } +} + +Config.AuthorizedVehicles = { + car = { + ambulance = { + {model = 'ambulance', price = 5000} + }, + + doctor = { + {model = 'ambulance', price = 4500} + }, + + chief_doctor = { + {model = 'ambulance', price = 3000} + }, + + boss = { + {model = 'ambulance', price = 2000} + } + }, + + helicopter = { + ambulance = {}, + + doctor = { + {model = 'buzzard2', price = 150000} + }, + + chief_doctor = { + {model = 'buzzard2', price = 150000}, + {model = 'seasparrow', price = 300000} + }, + + boss = { + {model = 'buzzard2', price = 10000}, + {model = 'seasparrow', price = 250000} + } + } +} diff --git a/[esx_addons]/esx_ambulancejob/esx_ambulancejob.sql b/[esx_addons]/esx_ambulancejob/esx_ambulancejob.sql new file mode 100644 index 00000000..15709b6d --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/esx_ambulancejob.sql @@ -0,0 +1,31 @@ +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_ambulance', 'Ambulance', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_ambulance', 'Ambulance', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_ambulance', 'Ambulance', 1) +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('ambulance',0,'ambulance','Ambulancier',20,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}'), + ('ambulance',1,'doctor','Medecin',40,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}'), + ('ambulance',2,'chief_doctor','Medecin-chef',60,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}'), + ('ambulance',3,'boss','Chirurgien',80,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}') +; + +INSERT INTO `jobs` (name, label) VALUES + ('ambulance','Ambulance') +; + +INSERT INTO `items` (name, label, weight) VALUES + ('bandage','Bandage', 2), + ('medikit','Medikit', 2) +; + +ALTER TABLE `users` + ADD `is_dead` TINYINT(1) NULL DEFAULT '0' +; diff --git a/[esx_addons]/esx_ambulancejob/fxmanifest.lua b/[esx_addons]/esx_ambulancejob/fxmanifest.lua new file mode 100644 index 00000000..9800bf24 --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/fxmanifest.lua @@ -0,0 +1,34 @@ +fx_version 'adamant' + +game 'gta5' + +description 'ESX Ambulance Job' + +lua54 'yes' +version '1.9.0' + +shared_scripts { + '@es_extended/imports.lua', + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua' +} + + +server_scripts { + '@oxmysql/lib/MySQL.lua', + 'server/main.lua' +} + +client_scripts { + 'client/main.lua', + 'client/job.lua', + 'client/vehicle.lua', +} + +dependencies { + 'es_extended', + 'esx_skin', + 'esx_society', + 'esx_vehicleshop' +} diff --git a/[esx_addons]/esx_ambulancejob/locales/br.lua b/[esx_addons]/esx_ambulancejob/locales/br.lua new file mode 100644 index 00000000..efa6a58c --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/locales/br.lua @@ -0,0 +1,84 @@ +Locales['br'] = { + -- Cloakroom + ['cloakroom'] = 'guarda roupa', + ['ems_clothes_civil'] = 'roupa normal', + ['ems_clothes_ems'] = 'entrar como socorrista', + -- Vehicles + ['ambulance'] = 'ambulancia', + ['helicopter_prompt'] = 'pressione [E] para acessar a Helicopter Actions.', + ['garage_prompt'] = 'pressione [E] para entra no Vehicle Actions.', + ['garage_title'] = 'ações do veiculo', + ['garage_stored'] = 'guardado', + ['garage_notstored'] = 'não foi guardado', + ['garage_storing'] = 'estamos tentando guardar o veículo, verifique se não há cidadões ao seu redor.', + ['garage_has_stored'] = 'o veículo foi guardado na sua garagem', + ['garage_has_notstored'] = 'nem um dos seus veiculos foi encontrado proximo', + ['garage_notavailable'] = 'o seu veículo não está guardado na garagem.', + ['garage_blocked'] = 'não há pontos de spawn disponíveis!', + ['garage_empty'] = 'você não tem veículos na sua garagem.', + ['garage_released'] = 'seu veículo foi liberado da garagem.', + ['garage_store_nearby'] = 'não há veículos próximos.', + ['garage_storeditem'] = 'abrir garagem', + ['garage_storeitem'] = 'veículo da loja na garagem', + ['garage_buyitem'] = 'loja de veículos', + ['shop_item'] = '$%s', + ['vehicleshop_title'] = 'loja de veículos', + ['vehicleshop_confirm'] = 'você quer comprar este veículo?', + ['vehicleshop_bought'] = 'você comprou %s para $%s', + ['vehicleshop_money'] = 'você não pode pagar esse veículo', + ['vehicleshop_awaiting_model'] = 'o veículo está atualmente DOWNLOADING & LOADING, por favor aguarde', + ['confirm_no'] = 'não', + ['confirm_yes'] = 'sim', + -- Action Menu + ['revive_inprogress'] = 'reanimação em andamento', + ['revive_complete'] = 'você ressuscitou %s', + ['revive_complete_award'] = 'você ressuscitou %s, $%s', + ['revive_fail_offline'] = 'esse cidadão não está mais na cidade', + ['heal_inprogress'] = 'você está curando!', + ['heal_complete'] = 'você curou %s', + ['no_players'] = 'nenhum cidadão nas proximidades', + ['player_not_unconscious'] = 'não está inconsciente', + ['player_not_conscious'] = 'esse cidadão não está consciente!', + -- Boss Menu + ['boss_actions'] = 'menu administração', + -- Misc + ['invalid_amount'] = ' dade inválida', + ['actions_prompt'] = 'aperte [E] para entra Ambulance Actions.', + ['deposit_amount'] = 'quantidade inválida para deposito', + ['money_withdraw'] = 'quantidade a ser retirada', + ['fast_travel'] = 'aperte [E] para mover-se rapidamente.', + ['open_pharmacy'] = 'aperte [E] para abrir a farmácia.', + ['pharmacy_menu_title'] = 'farmácia', + ['pharmacy_take'] = 'tomar %s', + ['medikit'] = 'seringa', + ['bandage'] = 'vendagem', + ['max_item'] = 'você não pode carregar mais', + -- F6 Menu + ['ems_menu'] = 'interação com cidadão', + ['ems_menu_title'] = 'ambulância - Interação com cidadão', + ['ems_menu_revive'] = 'reanimar', + ['ems_menu_putincar'] = 'colocar no veiculo', + ['ems_menu_small'] = 'curar pequenas feridas', + ['ems_menu_big'] = 'tratando lesões graves', + ['ems_menu_search'] = 'paciente não encontrado', + -- Death + ['respawn_available_in'] = 'você irar reviver em %s minutos %s segundos', + ['respawn_bleedout_in'] = 'você vai sangrar %s minutos %s segundos\n', + ['respawn_bleedout_prompt'] = 'aguarde [E] para reviver', + ['respawn_bleedout_fine'] = 'aguarde [E] para reviver por $%s', + ['respawn_bleedout_fine_msg'] = 'você precisa pagar $%s para reviver', + ['distress_send'] = 'pressione [G] enviar sinal de socorro', + ['distress_sent'] = 'sinal de socorro foi enviado para as unidades disponíveis!', + + -- Revive + ['revive_help'] = 'reviver um cidadão', + -- Item + ['used_medikit'] = 'você usou 1x Seringa', + ['used_bandage'] = 'você usou 1x Vendagem', + ['not_enough_medikit'] = 'você não tem seringa.', + ['not_enough_bandage'] = 'você não tem vendagem.', + ['healed'] = 'você foi tratado.', + -- Blips + ['blip_hospital'] = 'hospital', + ['blip_dead'] = 'cidadão inconsciente', +} diff --git a/[esx_addons]/esx_ambulancejob/locales/cs.lua b/[esx_addons]/esx_ambulancejob/locales/cs.lua new file mode 100644 index 00000000..fcebdcfd --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/locales/cs.lua @@ -0,0 +1,83 @@ +Locales['cs'] = { + -- Cloakroom + ['cloakroom'] = 'šatna', + ['ems_clothes_civil'] = 'civilní oblečení', + ['ems_clothes_ems'] = 'zdravotnické oblečení', + -- Vehicles + ['ambulance'] = 'ambulance', + ['helicopter_prompt'] = 'press [E] to access the Helicopter Actions.', + ['garage_prompt'] = 'press [E] to access the Vehicle Actions.', + ['garage_title'] = 'vehicle Actions', + ['garage_stored'] = 'stored', + ['garage_notstored'] = 'not in garage', + ['garage_storing'] = 'we\'re attempting to remove the vehicle, make sure no players are around it.', + ['garage_has_stored'] = 'the vehicle has been stored in your garage', + ['garage_has_notstored'] = 'no nearby owned vehicles were found', + ['garage_notavailable'] = 'your vehicle is not stored in the garage.', + ['garage_blocked'] = 'there\'s no available spawn points!', + ['garage_empty'] = 'you don\'t have any vehicles in your garage.', + ['garage_released'] = 'your vehicle has been released from the garage.', + ['garage_store_nearby'] = 'there is no nearby vehicles.', + ['garage_storeditem'] = 'open garage', + ['garage_storeitem'] = 'store vehicle in garage', + ['garage_buyitem'] = 'vehicle shop', + ['shop_item'] = '$%s', + ['vehicleshop_title'] = 'vehicle Shop', + ['vehicleshop_confirm'] = 'do you want to buy this vehicle?', + ['vehicleshop_bought'] = 'you have bought %s for $%s', + ['vehicleshop_money'] = 'you cannot afford that vehicle', + ['vehicleshop_awaiting_model'] = 'the vehicle is currently DOWNLOADING & LOADING please wait', + ['confirm_no'] = 'no', + ['confirm_yes'] = 'yes', + -- Action Menu + ['revive_inprogress'] = 'probíhá oživení!', + ['revive_complete'] = 'oživili jste %s', + ['revive_complete_award'] = 'oživili jste %s a dostali jste $%s!', + ['revive_fail_offline'] = 'that player is no longer online', + ['heal_inprogress'] = 'uzdravujete!', + ['heal_complete'] = 'uzdravili jste %s', + ['no_players'] = 'v okolí není žádný hráč!', + ['player_not_unconscious'] = 'hráč není v bezvědomí!', + ['player_not_conscious'] = 'hráč je v bezvědomí!', + -- Boss Menu + ['boss_actions'] = 'akce šéfa', + -- Misc + ['invalid_amount'] = ' ná částka', + ['actions_prompt'] = 'press [E] access the Ambulance Actions.', + ['deposit_amount'] = 'částka vkladu', + ['money_withdraw'] = 'částka výběru', + ['fast_travel'] = 'stiskněte [E] k rychlému odcestování.', + ['open_pharmacy'] = 'stiskněte [E] k otevření lékárny.', + ['pharmacy_menu_title'] = 'lékárna', + ['pharmacy_take'] = 'vzít %s', + ['medikit'] = 'lékarnička', + ['bandage'] = 'obvaz', + ['max_item'] = 'již nesete dostatek věcí.', + -- F6 Menu + ['ems_menu'] = 'Zdravotnické menu', + ['ems_menu_title'] = 'záchranka - Zdravotnické menu', + ['ems_menu_revive'] = 'oživit hráče', + ['ems_menu_putincar'] = 'naložit do vozidla', + ['ems_menu_small'] = 'ošetřit malé zranění', + ['ems_menu_big'] = 'ošetřit vážné zranění', + ['ems_menu_search'] = 'pacient nebyl nalezen', + -- Death + ['respawn_available_in'] = 'oživení dostupné za %s minut a %s sekund\n', + ['respawn_bleedout_in'] = 'vykrvácíte za %s minut a %s sekund\n', + ['respawn_bleedout_prompt'] = 'držte [E] pro respawn.', + ['respawn_now_fine'] = 'držte [E] pro oživení za $%s', + ['respawn_bleedout_fine_msg'] = 'zaplatili jste $%s za respawn.', + ['distress_send'] = 'stiskněte [G] pro vyslání tísňového signálu', + ['distress_sent'] = 'tísňový signál byl vyslán dostupným jednotkám!', + -- Revive + ['revive_help'] = 'oživit hráče', + -- Item + ['used_medikit'] = 'použili jste 1x lékarničku', + ['used_bandage'] = 'použili jste 1x obvaz', + ['not_enough_medikit'] = 'nemáte medikit.', + ['not_enough_bandage'] = 'nemáte bandage.', + ['healed'] = 'byli jste ošetřeni.', + -- Blips + ['blip_hospital'] = 'nemocnice', + ['blip_dead'] = 'unconscious player', +} diff --git a/[esx_addons]/esx_ambulancejob/locales/de.lua b/[esx_addons]/esx_ambulancejob/locales/de.lua new file mode 100644 index 00000000..c05028ba --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/locales/de.lua @@ -0,0 +1,82 @@ +Locales['de'] = { + -- Cloakroom + ['cloakroom'] = 'Umkleide', + ['ems_clothes_civil'] = 'Zivil', + ['ems_clothes_ems'] = 'Uniform', + -- Vehicles + ['ambulance'] = 'Rettungsdienst', + ['helicopter_prompt'] = 'Drücke [E] um auf das Helikopter-Menüzugreifen.', + ['garage_prompt'] = 'Drücke [E] um auf das Fahrzeug-Menüzugreifen.', + ['garage_title'] = 'Fahrzeugmenü', + ['garage_stored'] = 'gelagert', + ['garage_notstored'] = 'nicht in der Garage', + ['garage_storing'] = 'Wir versuchen das Fahrzeug einzulagern. Bitte stelle sicher, dass sich kein Spieler in der Nähe des Fahrzeugs befindet.', + ['garage_has_stored'] = 'Das Fahrzeug wurde in deiner Garage eingelagert.', + ['garage_has_notstored'] = 'Es wurde kein Fahrzeug in der Nähe gefunden, dass dir gehört.', + ['garage_notavailable'] = 'Dein Fahrzeug ist nicht in der Garage.', + ['garage_blocked'] = 'Es existieren keine verfügbaren Spawnpoints!', + ['garage_empty'] = 'Du hast keine Fahrzeuge in deiner Garage.', + ['garage_released'] = 'Dein Fahrzeug wurde aus der Garage gefahren.', + ['garage_store_nearby'] = 'Es sind keine Fahrzeuge in der Nähe.', + ['garage_storeditem'] = 'Öffne Garage', + ['garage_storeitem'] = 'Fahrzeug in der Garage einlagern', + ['garage_buyitem'] = 'Fahrzeug-Shop', + ['shop_item'] = '$%s', + ['vehicleshop_title'] = 'Fahrzeug-Shop', + ['vehicleshop_confirm'] = 'Du möchstest dieses Fahrzeug kaufen?', + ['vehicleshop_bought'] = 'Du hast dir einen %s für $%s gekauft!', + ['vehicleshop_money'] = 'Du kannst dir dieses Fahrzeug nicht leisten!', + ['vehicleshop_awaiting_model'] = 'Dieses Fahrzeug lädt bitte warte', + ['confirm_no'] = 'Nein', + ['confirm_yes'] = 'Ja', + -- Action Menu + ['revive_inprogress'] = 'Eine Wiederbelebung findet statt!', + ['revive_complete'] = 'Du hast %s wiederbelebt', + ['revive_complete_award'] = 'Du hast %s wiederbelebt und dabei $%s erten!', + ['revive_fail_offline'] = 'Dieser Spieler ist nicht länger online', + ['heal_inprogress'] = 'Du heilst!', + ['heal_complete'] = 'Du hast %s geheilt!', + ['no_players'] = 'Keine Spieler in der Nähe', + ['player_not_unconscious'] = 'Diese Spieler ist nicht bewusstlos!', + ['player_not_conscious'] = 'Dieser Spieler ist nicht bei Bewusstsein!', + -- Boss Menu + ['boss_actions'] = 'Chef-Aktionen', + -- Misc + ['invalid_amount'] = 'Ungültige Menge', + ['actions_prompt'] = 'Drücke [E] um das Rettungsdienst-Menü öffnen.', + ['deposit_amount'] = 'Menge deponieren', + ['money_withdraw'] = 'Menge abheben', + ['fast_travel'] = 'Drücke [E] um schnellzureisen.', + ['open_pharmacy'] = 'Drücke [E] um die Apotheke zu öffnen.', + ['pharmacy_menu_title'] = 'Apotheke', + ['pharmacy_take'] = 'Nimm %s', + ['medikit'] = 'Medikit', + ['bandage'] = 'Verbände', + ['max_item'] = 'Du kannst nicht mehr tragen.', + -- F6 Menu + ['ems_menu'] = 'Rettungsdienst-Menü', + ['ems_menu_title'] = 'Rettungsdienst-Menü', + ['ems_menu_revive'] = 'Spieler wiederbeleben', + ['ems_menu_putincar'] = 'In Fahrzeug stecken', + ['ems_menu_small'] = 'Kleine Wunden behandeln', + ['ems_menu_big'] = 'Ernsthafte Verletzungen behandeln', + -- Death + ['respawn_available_in'] = 'Respawn in %s Minuten %s Sekundenrfügbar', + ['respawn_bleedout_in'] = 'Du wirst in %s Minuten %s Sekundensbluten\n', + ['respawn_bleedout_prompt'] = 'Drücke [E] zu respawnen', + ['respawn_bleedout_fine'] = 'Drücke [E] um für $%s zu respawnen', + ['respawn_bleedout_fine_msg'] = 'Du hast $%s bezahlt, um zu respawnen.', + ['distress_send'] = 'Drücke [G] um ein Notsignal zu senden', + ['distress_sent'] = 'Notsignal wurde an den Rettungsdienst übermittelt!', + -- Revive + ['revive_help'] = 'Belebe einen Spieler wieder', + -- Item + ['used_medikit'] = 'Du hast Medikit verwendet', + ['used_bandage'] = 'Du hast Verband verwendet', + ['not_enough_medikit'] = 'Du hast keine Medikits', + ['not_enough_bandage'] = 'Du hast keine Verbände', + ['healed'] = 'Du wurdest behandelt.', + -- Blips + ['blip_hospital'] = 'Krankenhaus', + ['blip_dead'] = 'Bewusstloser Spieler', +} diff --git a/[esx_addons]/esx_ambulancejob/locales/en.lua b/[esx_addons]/esx_ambulancejob/locales/en.lua new file mode 100644 index 00000000..4f7831d9 --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/locales/en.lua @@ -0,0 +1,83 @@ +Locales['en'] = { + -- Cloakroom + ['cloakroom'] = 'Locker Room', + ['ems_clothes_civil'] = 'Civilian Clothes', + ['ems_clothes_ems'] = 'EMS Clothes', + -- Vehicles + ['ambulance'] = 'Ambulance', + ['helicopter_prompt'] = 'Press [E] to access the Helicopter Actions.', + ['garage_prompt'] = 'Press [E] to access the Vehicle Actions.', + ['garage_title'] = 'Vehicle Actions', + ['garage_stored'] = 'Stored', + ['garage_notstored'] = 'Not in garage', + ['garage_storing'] = 'We\'re attempting to remove the vehicle, make sure no players are around it.', + ['garage_has_stored'] = 'The vehicle has been stored in your garage', + ['garage_has_notstored'] = 'No nearby owned vehicles were found', + ['garage_notavailable'] = 'Your vehicle is not stored in the garage.', + ['garage_blocked'] = 'There\'s no available spawn points!', + ['garage_empty'] = 'You don\'t have any vehicles in your garage.', + ['garage_released'] = 'Your vehicle has been released from the garage.', + ['garage_store_nearby'] = 'There is no nearby vehicles.', + ['garage_storeditem'] = 'Open garage', + ['garage_storeitem'] = 'Store vehicle in garage', + ['garage_buyitem'] = 'Vehicle shop', + ['shop_item'] = '$%s', + ['vehicleshop_title'] = 'Yehicle Shop', + ['vehicleshop_confirm'] = 'Yo you want to buy this vehicle?', + ['vehicleshop_bought'] = 'You have bought %s for $%s', + ['vehicleshop_money'] = 'You cannot afford that vehicle', + ['vehicleshop_awaiting_model'] = 'The vehicle is currently DOWNLOADING & LOADING please wait', + ['confirm_no'] = 'No', + ['confirm_yes'] = 'Yes', + -- Action Menu + ['revive_inprogress'] = 'A revive is in progress!', + ['revive_complete'] = 'You have revived %s', + ['revive_complete_award'] = 'You have revived %s and earned $%s!', + ['revive_fail_offline'] = 'That player is no longer online', + ['heal_inprogress'] = 'You are healing!', + ['heal_complete'] = 'You have healed %s', + ['no_players'] = 'No players nearby', + ['player_not_unconscious'] = 'That player is not unconscious!', + ['player_not_conscious'] = 'That player is not conscious!', + -- Boss Menu + ['boss_actions'] = 'Boss Actions', + -- Misc + ['invalid_amount'] = 'Invalid amount', + ['actions_prompt'] = 'Press [E] access the Ambulance Actions.', + ['deposit_amount'] = 'Deposit Amount', + ['money_withdraw'] = 'Amount withdrawn', + ['fast_travel'] = 'press [E] to fast travel.', + ['open_pharmacy'] = 'Press [E] to open the pharmacy.', + ['pharmacy_menu_title'] = 'Pharmacy', + ['pharmacy_take'] = 'Take %s', + ['medikit'] = 'Medikit', + ['bandage'] = 'Bandage', + ['max_item'] = 'You are already carrying enough.', + -- F6 Menu + ['ems_menu'] = 'EMS Menu', + ['ems_menu_title'] = 'Ambulance - EMS Menu', + ['ems_menu_revive'] = 'Revive Player', + ['ems_menu_putincar'] = 'Put in Vehicle', + ['ems_menu_small'] = 'Heal small wounds', + ['ems_menu_big'] = 'Treat serious injuries', + ['ems_menu_search'] = 'Patient not found', + -- Death + ['respawn_available_in'] = 'Respawn available in %s minutes %s seconds', + ['respawn_bleedout_in'] = 'You will bleed out in %s minutes %s seconds\n', + ['respawn_bleedout_prompt'] = 'Hold [E] to respawn', + ['respawn_bleedout_fine'] = 'Hold [E] to respawn for $%s', + ['respawn_bleedout_fine_msg'] = 'You paid $%s to respawn.', + ['distress_send'] = 'Press [G] to send distress signal', + ['distress_sent'] = 'Distress signal has been sent to available units!', + -- Revive + ['revive_help'] = 'revive a player', + -- Item + ['used_medikit'] = 'You have used 1x medikit', + ['used_bandage'] = 'You have used 1x bandage', + ['not_enough_medikit'] = 'You do not have medikit.', + ['not_enough_bandage'] = 'You do not have bandage.', + ['healed'] = 'You have been treated.', + -- Blips + ['blip_hospital'] = 'Hospital', + ['blip_dead'] = 'Dying Player', +} diff --git a/[esx_addons]/esx_ambulancejob/locales/es.lua b/[esx_addons]/esx_ambulancejob/locales/es.lua new file mode 100644 index 00000000..5e3d3235 --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/locales/es.lua @@ -0,0 +1,86 @@ +-- Traducción by https://github.com/ItsManueh + +Locales['es'] = { + -- Cloakroom + ['cloakroom'] = 'Guardarropa', + ['ems_clothes_civil'] = 'Camiseta', + ['ems_clothes_ems'] = 'Equipo de ambulancia', + -- Vehicles + ['ambulance'] = 'Ambulancia', + ['helicopter_prompt'] = 'Presiona [E] para acceder al Acciones de helicópteros.', + ['garage_prompt'] = 'Presiona [E] para acceder al Acciones de vehículos.', + ['garage_title'] = 'Acciones de vehículos', + ['garage_stored'] = 'Almacenado', + ['garage_notstored'] = 'No en el garaje', + ['garage_storing'] = 'Estamos intentando retirar el vehículo, asegúrese de que no haya jugadores a su alrededor.', + ['garage_has_stored'] = 'El vehículo se ha guardado en su garaje', + ['garage_has_notstored'] = 'No se encontraron vehículos de propiedad cercana', + ['garage_notavailable'] = 'Su vehículo no está guardado en el garaje.', + ['garage_blocked'] = '¡No hay puntos de generación disponibles!', + ['garage_empty'] = 'No tiene ningún vehículo en su garaje.', + ['garage_released'] = 'Su vehículo ha sido sacado del garaje.', + ['garage_store_nearby'] = 'No hay vehículos cercanos.', + ['garage_storeditem'] = 'Garaje abierto', + ['garage_storeitem'] = 'Almacenar vehículo en garaje', + ['garage_buyitem'] = 'Tienda de vehículos', + ['shop_item'] = '$%s', + ['vehicleshop_title'] = 'Tienda de vehículos', + ['vehicleshop_confirm'] = '¿Quieres comprar este vehículo?', + ['vehicleshop_bought'] = 'Usted ha comprado %s para $%s', + ['vehicleshop_money'] = 'No puedes pagar ese vehículo', + ['vehicleshop_awaiting_model'] = 'El vehículo está actualmente DESCARGANDO & CARGANDO por favor espere.', + ['confirm_no'] = 'No', + ['confirm_yes'] = 'Si', + -- Action Menu + ['revive_inprogress'] = 'Reanimación en curso', + ['revive_complete'] = 'Has sido reanimado %s', + ['revive_complete_award'] = 'Has sido reanimado %s, $%s', + ['revive_fail_offline'] = 'Ese jugador ya no está en línea', + ['heal_inprogress'] = '!Te estas curando!', + ['heal_complete'] = 'Te has curado %s', + ['no_players'] = 'Ningún jugador cerca', + ['player_not_unconscious'] = 'n\'Estás inconsciente', + ['player_not_conscious'] = '¡Ese jugador no está consciente!', + -- Boss Menu + ['boss_actions'] = 'Acciones del jefe', + -- Misc + ['invalid_amount'] = 'Cantidad no válida', + ['actions_prompt'] = 'Presiona [E] acceder al Acciones de ambulancia.', + ['deposit_amount'] = 'Cantidad de fianza depositada', + ['money_withdraw'] = 'Cantidad de fianza retirada', + ['fast_travel'] = 'Presiona [E] para viajar rápido.', + ['open_pharmacy'] = 'Presiona [E] para abrir la farmacia.', + ['pharmacy_menu_title'] = 'Farmacia', + ['pharmacy_take'] = 'tomar %s', + ['medikit'] = 'Kit médico', + ['bandage'] = 'Vendas', + ['max_item'] = 'Ya has ocupado el máximo número de items disponibles.', + -- F6 Menu + ['ems_menu'] = 'ayuda ciudadana', + ['ems_menu_title'] = 'ambulancia - Ayuda Ciudadana', + ['ems_menu_revive'] = 'reanimar', + ['ems_menu_putincar'] = 'meter en el vehículo', + ['ems_menu_small'] = 'Curar pequeñas heridas', + ['ems_menu_big'] = 'Tratar lesiones graves', + ['ems_menu_search'] = 'Paciente no encontrado', + -- Death + ['respawn_available_in'] = 'Reaparición disponible en %s minutes %s seconds', + ['respawn_bleedout_in'] = 'te desangrarás en %s minutes %s seconds\n', + ['respawn_bleedout_prompt'] = 'Mantén [E] reaparecer', + ['respawn_bleedout_fine'] = 'Mantén [E] para reaparecer $%s', + ['respawn_bleedout_fine_msg'] = 'Tu pagaste $%s para reaparecer.', + ['distress_send'] = 'Presiona [G] para enviar señal de socorro', + ['distress_sent'] = 'Se ha enviado una señal de socorro a las unidades disponibles.', + + -- Revive + ['revive_help'] = 'Revivir un jugador', + -- Item + ['used_medikit'] = 'Has usado 1x Kit médico', + ['used_bandage'] = 'Has usado 1x Vendas', + ['not_enough_medikit'] = 'Usted no tiene kit médico.', + ['not_enough_bandage'] = 'Usted no tiene vendas.', + ['healed'] = 'Has sido tratado.', + -- Blips + ['blip_hospital'] = 'Hospital', + ['blip_dead'] = 'Jugador inconsciente', +} diff --git a/[esx_addons]/esx_ambulancejob/locales/et.lua b/[esx_addons]/esx_ambulancejob/locales/et.lua new file mode 100644 index 00000000..a596173f --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/locales/et.lua @@ -0,0 +1,83 @@ +Locales['et'] = { + -- Cloakroom + ['cloakroom'] = 'Riidekapp', + ['ems_clothes_civil'] = 'Tsiviili riided', + ['ems_clothes_ems'] = 'Kiirabi riided', + -- Vehicles + ['ambulance'] = 'Kiirabi', + ['helicopter_prompt'] = 'Vajuta [E], et avada helikopteri garaaž.', + ['garage_prompt'] = 'Vajuta [E], et vaadata sõiduki tegevusi.', + ['garage_title'] = 'Sõiduki tegevus', + ['garage_stored'] = 'Pargitud', + ['garage_notstored'] = 'Pole garaažis', + ['garage_storing'] = 'Proovime eemaldada sõidukit, veenduge, et kedagi poleks ligiduses.', + ['garage_has_stored'] = 'Sõiduk on pargitud teie garaaži', + ['garage_has_notstored'] = 'Teie ligiduses pole ühtegi teie sõidukit', + ['garage_notavailable'] = 'Teie sõiduk pole garaažis.', + ['garage_blocked'] = 'Sõiduki jaoks pole siin ruumi!', + ['garage_empty'] = 'Sul pole ühtegi sõidukit garaažis.', + ['garage_released'] = 'Teie sõiduk on juba garaažist välja võetud.', + ['garage_store_nearby'] = 'Ühtegi sõidukit pole ligiduses.', + ['garage_storeditem'] = 'Ava garaaž', + ['garage_storeitem'] = 'Pargi sõiduk garaaži', + ['garage_buyitem'] = 'Auto pood', + ['shop_item'] = '$%s', + ['vehicleshop_title'] = 'Auto pood', + ['vehicleshop_confirm'] = 'Soovid osta seda sõidukit?', + ['vehicleshop_bought'] = 'Sa ostsid %s $%s eest', + ['vehicleshop_money'] = 'Sa ei saa lubada seda sõidukit endale', + ['vehicleshop_awaiting_model'] = 'Sõidukit hetkel laetakse', + ['confirm_no'] = 'Ei', + ['confirm_yes'] = 'Jah', + -- Action Menu + ['revive_inprogress'] = 'Elustamine pooleli!', + ['revive_complete'] = 'Sa elustasid %s', + ['revive_complete_award'] = 'Sa elustasid %s ja teenisid $%s!', + ['revive_fail_offline'] = 'Isik pole enam linnas', + ['heal_inprogress'] = 'Sa paraned!', + ['heal_complete'] = 'Sa ravisid %s', + ['no_players'] = 'Isikuid pole läheduses', + ['player_not_unconscious'] = 'See isik pole teadvuseta!', + ['player_not_conscious'] = 'See isik pole teadvusel!', + -- Boss Menu + ['boss_actions'] = 'Boss menüü', + -- Misc + ['invalid_amount'] = 'Vale kogus', + ['actions_prompt'] = 'Vajuta [E], et avada kiirabi tegevused.', + ['deposit_amount'] = 'Pane firmaarvele raha', + ['money_withdraw'] = 'Võta firmaarvelt raha', + ['fast_travel'] = 'press [E] to fast travel.', + ['open_pharmacy'] = 'Vajuta [E], et avada apteek.', + ['pharmacy_menu_title'] = 'Apteek', + ['pharmacy_take'] = 'Võta %s', + ['medikit'] = 'Esmaabikarp', + ['bandage'] = 'Sidemed', + ['max_item'] = 'Sa kannad piisavalt juba.', + -- F6 Menu + ['ems_menu'] = 'Kiirabi', + ['ems_menu_title'] = 'Kiirabi', + ['ems_menu_revive'] = 'Elusta isikut', + ['ems_menu_putincar'] = 'Pane sõidukisse', + ['ems_menu_small'] = 'Ravi väikseid haavi', + ['ems_menu_big'] = 'Ravi tõsiseid haavu', + ['ems_menu_search'] = 'Patsienti ei leitud', + -- Death + ['respawn_available_in'] = 'Sul on võimalik haiglas ärgata %s minuti ka %s sekundi pärast', + ['respawn_bleedout_in'] = 'Sa jooksed verest tühjak %s minuti ja %s sekundi pärast\n', + ['respawn_bleedout_prompt'] = 'Hoia [E] tähte all, et ärgata haiglas', + ['respawn_bleedout_fine'] = 'Hoia [E] tähte all, et ärgata haiglas $%s eest', + ['respawn_bleedout_fine_msg'] = 'Sa maksid $%s, et ärgata haiglas.', + ['distress_send'] = 'Vajuta [G] et saata abikutse kiirabile', + ['distress_sent'] = 'Abikutse on saadetud kõikidele kiirabidele kes on linnas!', + -- Revive + ['revive_help'] = 'Elusta isikut', + -- Item + ['used_medikit'] = 'Sa kasutasid ära 1x esmaabikarbi', + ['used_bandage'] = 'Sa kasutasid ära 1x sideme', + ['not_enough_medikit'] = 'Sul pole esmaabikarpe.', + ['not_enough_bandage'] = 'Sul pole sidemeid.', + ['healed'] = 'Teid on ravitud.', + -- Blips + ['blip_hospital'] = 'Haigla', + ['blip_dead'] = 'Vigastatud isik', +} diff --git a/[esx_addons]/esx_ambulancejob/locales/fi.lua b/[esx_addons]/esx_ambulancejob/locales/fi.lua new file mode 100644 index 00000000..b7b20d3a --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/locales/fi.lua @@ -0,0 +1,83 @@ +Locales['fi'] = { + -- Cloakroom + ['cloakroom'] = 'vaatelokero', + ['ems_clothes_civil'] = 'siviilikamppeet', + ['ems_clothes_ems'] = 'työkamppeet', + -- Vehicles + ['ambulance'] = 'ambulance', + ['helicopter_prompt'] = 'press [E] to access the Helicopter Actions.', + ['garage_prompt'] = 'press [E] to access the Vehicle Actions.', + ['garage_title'] = 'vehicle Actions', + ['garage_stored'] = 'stored', + ['garage_notstored'] = 'not in garage', + ['garage_storing'] = 'we\'re attempting to remove the vehicle, make sure no players are around it.', + ['garage_has_stored'] = 'the vehicle has been stored in your garage', + ['garage_has_notstored'] = 'no nearby owned vehicles were found', + ['garage_notavailable'] = 'your vehicle is not stored in the garage.', + ['garage_blocked'] = 'there\'s no available spawn points!', + ['garage_empty'] = 'you don\'t have any vehicles in your garage.', + ['garage_released'] = 'your vehicle has been released from the garage.', + ['garage_store_nearby'] = 'there is no nearby vehicles.', + ['garage_storeditem'] = 'open garage', + ['garage_storeitem'] = 'store vehicle in garage', + ['garage_buyitem'] = 'vehicle shop', + ['shop_item'] = '$%s', + ['vehicleshop_title'] = 'vehicle Shop', + ['vehicleshop_confirm'] = 'do you want to buy this vehicle?', + ['vehicleshop_bought'] = 'you have bought %s for $%s', + ['vehicleshop_money'] = 'you cannot afford that vehicle', + ['vehicleshop_awaiting_model'] = 'the vehicle is currently DOWNLOADING & LOADING please wait', + ['confirm_no'] = 'no', + ['confirm_yes'] = 'yes', + -- Action Menu + ['revive_inprogress'] = 'elvytys on menossa!', + ['revive_complete'] = 'sinä elvytit henkilön %s', + ['revive_complete_award'] = 'sinä elvytit henkilön %s ja tienasit $%s!', + ['revive_fail_offline'] = 'that player is no longer online', + ['heal_inprogress'] = 'sinä olet parantamassa!', + ['heal_complete'] = 'sinä paransit henkilön %s', + ['no_players'] = 'ei pelaajia lähettyvillä', + ['player_not_unconscious'] = 'tämä pelaaja ei ole tajuton!', + ['player_not_conscious'] = 'tämä pelaaja ei ole tajuissaan!', + -- Boss Menu + ['boss_actions'] = 'pomovalikko', + -- Misc + ['invalid_amount'] = ' llinen summa', + ['actions_prompt'] = 'press [E] access the Ambulance Actions.', + ['deposit_amount'] = 'talletettava summa', + ['money_withdraw'] = 'nostettava summa', + ['fast_travel'] = 'paina [E] liikkuaksesi nopeasti kerrosten välillä', + ['open_pharmacy'] = 'paina [E] avataksesi lääkekaappi', + ['pharmacy_menu_title'] = 'lääkekaappi', + ['pharmacy_take'] = 'ota %s', + ['medikit'] = 'ensiapupakkauksia', + ['bandage'] = 'sideharsoja', + ['max_item'] = 'sinulla on jo tarpeeksi mukana', + -- F6 Menu + ['ems_menu'] = 'ensihoito menu', + ['ems_menu_title'] = 'ensihoito - Siviilin kanssakäyminen', + ['ems_menu_revive'] = 'elvytä', + ['ems_menu_putincar'] = 'Laita ajoneuvoon', + ['ems_menu_small'] = 'hoida pieniä haavoja', + ['ems_menu_big'] = 'hoida isoja haavoja', + ['ems_menu_search'] = 'potilasta ei löydy', + -- Death + ['respawn_available_in'] = 'respawn available in %s minutes %s seconds', + ['respawn_bleedout_in'] = 'you will bleed out in %s minutes %s seconds\n', + ['respawn_bleedout_prompt'] = 'hold [E] to respawn', + ['respawn_bleedout_fine'] = 'hold [E] to respawn for $%s', + ['respawn_bleedout_fine_msg'] = 'you paid $%s to respawn.', + ['distress_send'] = 'press [G] to send distress signal', + ['distress_sent'] = 'distress signal has been sent to available units!', + -- Revive + ['revive_help'] = 'elvytä pelaaja', + -- Item + ['used_medikit'] = 'sinä käytit ensiapupakkauksen', + ['used_bandage'] = 'sinä käytit sideharsoja', + ['not_enough_medikit'] = 'ei tarpeeksi ensiapupakkauksia.', + ['not_enough_bandage'] = 'ei tarpeeksi sideharsoja.', + ['healed'] = 'sinua parannettiin', + -- Blips + ['blip_hospital'] = 'sairaala', + ['blip_dead'] = 'unconscious player', +} diff --git a/[esx_addons]/esx_ambulancejob/locales/fr.lua b/[esx_addons]/esx_ambulancejob/locales/fr.lua new file mode 100644 index 00000000..08a741ab --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/locales/fr.lua @@ -0,0 +1,83 @@ +Locales['fr'] = { + -- Cloakroom + ['cloakroom'] = 'vestiaire', + ['ems_clothes_civil'] = 'tenue Civil', + ['ems_clothes_ems'] = 'tenue Ambulancier', + -- Vehicles + ['ambulance'] = 'ambulance', + ['helicopter_prompt'] = 'appuyez sur [E] pour accéder aux Actions de l\'hélicoptère.', + ['garage_prompt'] = 'appuyez sur [E] pour accéder aux Actions des véhciules.', + ['garage_title'] = 'actions véhicules', + ['garage_stored'] = 'rangé', + ['garage_notstored'] = 'en dehors du garage', + ['garage_storing'] = 'tentative de suppression du véhicule, assurez-vous que personne ne soit autour.', + ['garage_has_stored'] = 'le véhicule a bien été rangé dans le garage', + ['garage_has_notstored'] = 'aucun véhicule dans le garage', + ['garage_notavailable'] = 'votre véhicule n\'est pas rangé dans le garage.', + ['garage_blocked'] = 'la sortie du garage est obstruée!', + ['garage_empty'] = 'vous n\'avez aucun véhicule dans le garage.', + ['garage_released'] = 'votre véhicule a été sorti.', + ['garage_store_nearby'] = 'aucun véhicule a proximité.', + ['garage_storeditem'] = 'ouvrir le garage', + ['garage_storeitem'] = 'ranger le véhicule', + ['garage_buyitem'] = 'magasin véhicule', + ['shop_item'] = '$%s', + ['vehicleshop_title'] = 'magasin véhicule', + ['vehicleshop_confirm'] = 'voulez-vous acheter ce véhicule?', + ['vehicleshop_bought'] = 'vous avez acheté %s pour $%s', + ['vehicleshop_money'] = 'vous ne pouvez pas acheter ce véhicule', + ['vehicleshop_awaiting_model'] = 'le véhicule est actuellement en PRÉPARATION veuillez patienter', + ['confirm_no'] = 'non', + ['confirm_yes'] = 'oui', + -- Action Menu + ['revive_inprogress'] = 'réanimation en cours', + ['revive_complete'] = 'vous avez réanimé %s', + ['revive_complete_award'] = 'vous avez réanimé %s, $%s', + ['revive_fail_offline'] = 'ce joueur n\'est plus en ligne', + ['heal_inprogress'] = 'vous soignez...', + ['heal_complete'] = 'vous avez soigné %s', + ['no_players'] = 'aucun joueur à proximité', + ['player_not_unconscious'] = 'n\'est pas inconscient', + ['player_not_conscious'] = 'Cette personne est inconsciente!', + -- Boss Menu + ['boss_actions'] = 'action Patron', + -- Misc + ['invalid_amount'] = 'quantité invalide', + ['actions_prompt'] = 'appuyez sur [E] accédez aux Actions d\'Ambulance.', + ['deposit_amount'] = 'montant du dépôt', + ['money_withdraw'] = 'montant du retrait', + ['fast_travel'] = 'appuyez sur [E] pour vous déplacer rapidement.', + ['open_pharmacy'] = 'appuyez sur [E] pour ouvrir la pharmacie.', + ['pharmacy_menu_title'] = 'Pharmacie', + ['pharmacy_take'] = 'prendre %s', + ['medikit'] = 'kit de soin', + ['bandage'] = 'bandage', + ['max_item'] = 'vous en portez déjà assez sur vous.', + -- F6 Menu + ['ems_menu'] = 'interaction citoyen', + ['ems_menu_title'] = 'ambulance - Interactions Citoyen', + ['ems_menu_revive'] = 'réanimer', + ['ems_menu_putincar'] = 'mettre dans véhicule', + ['ems_menu_small'] = 'soigner petites blessures', + ['ems_menu_big'] = 'soigner blessures graves', + ['ems_menu_search'] = 'patient introuvable', + -- Death + ['respawn_available_in'] = 'réanimation possible dans %s minutes %s secondes', + ['respawn_bleedout_in'] = 'vous allez souffrir d\'une hémorragie dans %s minutes %s secondes\n', + ['respawn_bleedout_prompt'] = 'maintenez [E] pour être réanimé', + ['respawn_bleedout_fine'] = 'maintenez [E] pour être réanimé pour $%s', + ['respawn_bleedout_fine_msg'] = 'vous avez payé $%s pour être réanimer.', + ['distress_send'] = 'appuyez sur [G] pour envoyer un signal de détresse', + ['distress_sent'] = 'un signal a été envoyé à toutes les unités disponibles!', + -- Revive + ['revive_help'] = 'relancer un joueur', + -- Item + ['used_medikit'] = 'vous avez utilisé 1x kit de soin', + ['used_bandage'] = 'vous avez utilisé 1x bandage', + ['not_enough_medikit'] = 'vous n\'avez pas de kit de soin.', + ['not_enough_bandage'] = 'vous n\'avez pas de bandage.', + ['healed'] = 'vous avez été soigné.', + -- Blips + ['blip_hospital'] = 'hôpital', + ['blip_dead'] = 'joueur inconscient', +} diff --git a/[esx_addons]/esx_ambulancejob/locales/hu.lua b/[esx_addons]/esx_ambulancejob/locales/hu.lua new file mode 100644 index 00000000..558097cf --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/locales/hu.lua @@ -0,0 +1,83 @@ +Locales['hu'] = { + -- Cloakroom + ['cloakroom'] = 'Öltöző', + ['ems_clothes_civil'] = 'Civil ruházat', + ['ems_clothes_ems'] = 'Munkaruha', + -- Vehicles + ['ambulance'] = 'Mentőautó', + ['helicopter_prompt'] = 'Nyomd meg az [E] gombot a helikopter listához.', + ['garage_prompt'] = 'Nyomd meg az [E] gombot a kocsi listához.', + ['garage_title'] = 'Autó funkciók', + ['garage_stored'] = 'Garázsba', + ['garage_notstored'] = 'Ismeretlen helyen', + ['garage_storing'] = 'Próbáljuk betteni a kocsid a garázsodba, de előtte nézz körül, hogy biztos nincs melletted senki', + ['garage_has_stored'] = ' Sikeresen tároltad a garázsba!', + ['garage_has_notstored'] = 'Nincs a közeledben semmi!', + ['garage_notavailable'] = 'Nemm tárolhatod a garázsba!', + ['garage_blocked'] = 'Valami gátolja a kocsi lehívását!', + ['garage_empty'] = 'Nem teheted a garázsba!', + ['garage_released'] = 'Sikeresen kivetted!', + ['garage_store_nearby'] = 'Nincs a közeledben semmi!', + ['garage_storeditem'] = 'Garázs megnyitása', + ['garage_storeitem'] = 'Kocsi berakása a garázsba', + ['garage_buyitem'] = 'Kocsi igénylés', + ['shop_item'] = '$%s', + ['vehicleshop_title'] = 'Autókereskedés', + ['vehicleshop_confirm'] = 'Megszeretnéd venni ezt a járművet?', + ['vehicleshop_bought'] = 'Sikeresen igényeltél egy %s ennyiért: ', + ['vehicleshop_money'] = 'Ezt most nem tudod megtenni!', + ['vehicleshop_awaiting_model'] = 'Betöltés..', + ['confirm_no'] = 'Vissza', + ['confirm_yes'] = 'Igényel', + -- Action Menu + ['revive_inprogress'] = 'Elkezdted az újraélesztést!', + ['revive_complete'] = 'Újraélesztetted: %s', + ['revive_complete_award'] = 'Újraélesztetted: %s játékost.', + ['revive_fail_offline'] = 'A játékos nem elérhető', + ['heal_inprogress'] = 'Elkezdted a gyógyítást!', + ['heal_complete'] = 'Meggyógyítottad: %s játékost.', + ['no_players'] = 'Nincs a közeledben senki!', + ['player_not_unconscious'] = 'A játékos nincs öntudatánál!', + ['player_not_conscious'] = 'A játékos nincs öntudatánál!', + -- Boss Menu + ['boss_actions'] = 'Leader panel', + -- Misc + ['invalid_amount'] = 'Érvénytelen mennyiség', + ['actions_prompt'] = 'Nyomd meg az [E] gombot a panel megnyitásához.', + ['deposit_amount'] = 'Összeg betétele', + ['money_withdraw'] = 'Összeg kivétele', + ['fast_travel'] = 'Nyomj [E] hogy használd a liftet', + ['open_pharmacy'] = 'Nyomd meg az [E] gombot a gyógyszer kivételéhez.', + ['pharmacy_menu_title'] = 'Kellékek', + ['pharmacy_take'] = 'Kivétel: %s', + ['medikit'] = 'Elsősegély készlet', + ['bandage'] = 'Kötszer', + ['max_item'] = 'Nem fér már el nálad!', + -- F6 Menu + ['ems_menu'] = 'EMS menü', + ['ems_menu_title'] = 'EMS Menu', + ['ems_menu_revive'] = 'Újraélesztés', + ['ems_menu_putincar'] = 'Jármübe rakás', + ['ems_menu_small'] = 'Kis sebek meggyógyítása', + ['ems_menu_big'] = 'Súlyos sérülések kezelése', + ['ems_menu_search'] = 'Civil megkeresése', + -- Death + ['respawn_available_in'] = 'Újraéledés: %s', + ['respawn_bleedout_in'] = 'Elfogsz vérezni %s perc %s másodperc múlva...\n', + ['respawn_bleedout_prompt'] = 'Nyomd meg az [E] gombot az újraéledéshez', + ['respawn_bleedout_fine'] = 'Újraéledéshez: [E]', + ['respawn_bleedout_fine_msg'] = 'Ennyit fizettél, hogy újraéledj', + ['distress_send'] = 'Nyomd meg a G gombot a segítségkéréshez', + ['distress_sent'] = 'Egy civil értesítette az illetékes szervezetet!', + -- Revive + ['revive_help'] = 'újraéleszteni egy játékost', + -- Item + ['used_medikit'] = 'Elhasználtál 1x segélytáskát.', + ['used_bandage'] = 'Elhasználtál 1x kötszert.', + ['not_enough_medikit'] = 'Nincs nálad: Defibrillátor.', + ['not_enough_bandage'] = 'Nincs nálad: Kötszer.', + ['healed'] = 'Meggyógyítottak!', + -- Blips + ['blip_hospital'] = 'Korház', + ['blip_dead'] = 'Eszméletlen játékos', +} diff --git a/[esx_addons]/esx_ambulancejob/locales/nl.lua b/[esx_addons]/esx_ambulancejob/locales/nl.lua new file mode 100644 index 00000000..01c40aff --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/locales/nl.lua @@ -0,0 +1,82 @@ +Locales['nl'] = { + -- Cloakroom + ['cloakroom'] = 'Kleedkamer', + ['ems_clothes_civil'] = 'Burgerkleding', + ['ems_clothes_ems'] = 'Ambulance Kleding', + -- Vehicles + ['ambulance'] = 'Ambulance', + ['helicopter_prompt'] = 'Druk op [E] om de Lifeliners te beheren.', + ['garage_prompt'] = 'Druk op [E] om de Garage te openen.', + ['garage_title'] = 'Garage', + ['garage_stored'] = 'In Garage', + ['garage_notstored'] = 'Niet In Garage', + ['garage_storing'] = 'We proberen je voertuig op te bergen, zorg dat er niemand in de buurt is.', + ['garage_has_stored'] = 'Je voertuig is in de garage gezet', + ['garage_has_notstored'] = 'Er zijn geen voertuigen in de buurt gevonden die van jou zijn', + ['garage_notavailable'] = 'Je voertuig staat niet in de garage.', + ['garage_blocked'] = 'Er is geen spawnplek beschikbaar!', + ['garage_empty'] = 'Er staat geen voertuig in je garage.', + ['garage_released'] = 'Je voertuig is uit de garage gehaald.', + ['garage_store_nearby'] = 'Er zijn geen voertuigen in de buurt.', + ['garage_storeditem'] = 'Open garage', + ['garage_storeitem'] = 'Zet voertuig in de garage', + ['garage_buyitem'] = 'Voertuigwinkel', + ['shop_item'] = '€%s', + ['vehicleshop_title'] = 'Voertuigwinkel', + ['vehicleshop_confirm'] = 'Wil je dit voertuig kopen?', + ['vehicleshop_bought'] = 'Je hebt een %s gekocht voor €%s', + ['vehicleshop_money'] = 'Je kan dit voertuig niet betalen', + ['vehicleshop_awaiting_model'] = 'Het voertuig is aan het DOWNLOADEN & LADEN, even geduld', + ['confirm_no'] = 'Nee', + ['confirm_yes'] = 'Ja', + -- Action Menu + ['revive_inprogress'] = 'Reanimatie is in gang gezet!', + ['revive_complete'] = 'Je hebt %s gereanimeerd', + ['revive_complete_award'] = 'Je hebt %s gereanimeerd en €%s verdient!', + ['revive_fail_offline'] = 'Deze speler is niet langer online', + ['heal_inprogress'] = 'Je wordt genezen!', + ['heal_complete'] = 'Je hebt %s genezen', + ['no_players'] = 'Geen spelers in de buurt', + ['player_not_unconscious'] = 'Deze persoon is niet bewusteloos!', + ['player_not_conscious'] = 'Deze persoon is bewusteloos!', + -- Boss Menu + ['boss_actions'] = 'Manager Acties', + -- Misc + ['invalid_amount'] = ' ig aantal', + ['actions_prompt'] = 'Druk op [E] om de Ambulance Acties te bekijken.', + ['deposit_amount'] = 'Bedrag om te storten', + ['money_withdraw'] = 'Bedrag om op te nemen', + ['fast_travel'] = 'Druk op [E] om snel te reizen.', + ['open_pharmacy'] = 'Druk op [E] om de apotheek te openen.', + ['pharmacy_menu_title'] = 'Apotheek', + ['pharmacy_take'] = 'Pak %s', + ['medikit'] = 'Spoedkoffer', + ['bandage'] = 'Verbanddoos', + ['max_item'] = 'Je draagt al genoeg bij je.', + -- F6 Menu + ['ems_menu'] = 'Ambulance Menu', + ['ems_menu_title'] = 'Ambulance - Menu', + ['ems_menu_revive'] = 'Reanimeer speler', + ['ems_menu_putincar'] = 'Zet in voertuig', + ['ems_menu_small'] = 'Behandel kleine verwondingen', + ['ems_menu_big'] = 'Behandel grote verwondingen', + -- Death + ['respawn_available_in'] = 'Respawn beschikbaar in %s minuten en %s seconden', + ['respawn_bleedout_in'] = 'Je zal doodbloeden in %s minuten %s seconden\n', + ['respawn_bleedout_prompt'] = 'Houd [E] ingedrukt om te respawnen', + ['respawn_bleedout_fine'] = 'Houd [E] ingedrukt om te respawnen voor €%s', + ['respawn_bleedout_fine_msg'] = 'Je hebt €%s betaald om te respawnen.', + ['distress_send'] = 'Druk op [G] om een noodsignaal te verzenden', + ['distress_sent'] = 'Noodsignaal verzonden naar alle beschikbare eenheden!', + -- Revive + ['revive_help'] = 'Revive een speler', + -- Item + ['used_medikit'] = 'Je hebt 1 spoedkoffer gebruikt', + ['used_bandage'] = 'Je hebt 1 verbandkoffer gebruikt', + ['not_enough_medikit'] = 'Je hebt geen spoedkoffer bij.', + ['not_enough_bandage'] = 'Je hebt geen verbandkoffer bij.', + ['healed'] = 'Je bent behandeld.', + -- Blips + ['blip_hospital'] = 'Ziekenhuis', + ['blip_dead'] = 'Bewusteloze speler', +} diff --git a/[esx_addons]/esx_ambulancejob/locales/pl.lua b/[esx_addons]/esx_ambulancejob/locales/pl.lua new file mode 100644 index 00000000..a9b9df68 --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/locales/pl.lua @@ -0,0 +1,83 @@ +Locales['pl'] = { + -- Cloakroom + ['cloakroom'] = 'szatnia', + ['ems_clothes_civil'] = 'ubrania cywilne', + ['ems_clothes_ems'] = 'ubrania EMS', + -- Vehicles + ['ambulance'] = 'ambulance', + ['helicopter_prompt'] = 'press [E] to access the Helicopter Actions.', + ['garage_prompt'] = 'press [E] to access the Vehicle Actions.', + ['garage_title'] = 'vehicle Actions', + ['garage_stored'] = 'stored', + ['garage_notstored'] = 'not in garage', + ['garage_storing'] = 'we\'re attempting to remove the vehicle, make sure no players are around it.', + ['garage_has_stored'] = 'the vehicle has been stored in your garage', + ['garage_has_notstored'] = 'no nearby owned vehicles were found', + ['garage_notavailable'] = 'your vehicle is not stored in the garage.', + ['garage_blocked'] = 'there\'s no available spawn points!', + ['garage_empty'] = 'you don\'t have any vehicles in your garage.', + ['garage_released'] = 'your vehicle has been released from the garage.', + ['garage_store_nearby'] = 'there is no nearby vehicles.', + ['garage_storeditem'] = 'open garage', + ['garage_storeitem'] = 'store vehicle in garage', + ['garage_buyitem'] = 'vehicle shop', + ['shop_item'] = '$%s', + ['vehicleshop_title'] = 'vehicle Shop', + ['vehicleshop_confirm'] = 'do you want to buy this vehicle?', + ['vehicleshop_bought'] = 'you have bought %s for $%s', + ['vehicleshop_money'] = 'you cannot afford that vehicle', + ['vehicleshop_awaiting_model'] = 'the vehicle is currently DOWNLOADING & LOADING please wait', + ['confirm_no'] = 'no', + ['confirm_yes'] = 'yes', + -- Action Menu + ['revive_inprogress'] = 'trwa wskrzeszenie', + ['revive_complete'] = 'zostałeś wskrzeszony %s', + ['revive_complete_award'] = 'zostałeś wskrzeszony %s i zarobiono $%s!', + ['revive_fail_offline'] = 'that player is no longer online', + ['heal_inprogress'] = 'leczysz!', + ['heal_complete'] = 'zostałeś uleczony %s', + ['no_players'] = 'brak graczy w pobliżu', + ['player_not_unconscious'] = 'ten gracz nie jest nieprzytomny!', + ['player_not_conscious'] = 'ten gracz nie jest świadomy!', + -- Boss Menu + ['boss_actions'] = 'akcje szefa', + -- Misc + ['invalid_amount'] = ' widłowa kwota', + ['actions_prompt'] = 'press [E] access the Ambulance Actions.', + ['deposit_amount'] = 'kwota depozytu', + ['money_withdraw'] = 'wycofana kwota', + ['fast_travel'] = 'naciśnij na [E] do szybkiej podróży.', + ['open_pharmacy'] = 'naciśnij na [E] aby otworzyć aptekę', + ['pharmacy_menu_title'] = 'apteka', + ['pharmacy_take'] = 'weź %s', + ['medikit'] = 'apteczka', + ['bandage'] = 'bandaż', + ['max_item'] = 'już masz na sobie dość.', + -- F6 Menu + ['ems_menu'] = 'menu EMS', + ['ems_menu_title'] = 'eMS Menu - Ambulans', + ['ems_menu_revive'] = 'ożyw gracza', + ['ems_menu_putincar'] = 'umieścić w pojeździe', + ['ems_menu_small'] = 'ulecz małe rany', + ['ems_menu_big'] = 'ulecz poważne obrażenia', + ['ems_menu_search'] = 'nie znaleziono pacjenta', + -- Death + ['respawn_available_in'] = 'respawn available in %s minutes %s seconds', + ['respawn_bleedout_in'] = 'you will bleed out in %s minutes %s seconds\n', + ['respawn_bleedout_prompt'] = 'hold [E] to respawn', + ['respawn_bleedout_fine'] = 'hold [E] to respawn for $%s', + ['respawn_bleedout_fine_msg'] = 'you paid $%s to respawn.', + ['distress_send'] = 'press [G] to send distress signal', + ['distress_sent'] = 'distress signal has been sent to available units!', + -- Revive + ['revive_help'] = 'ożyw gracza', + -- Item + ['used_medikit'] = 'użyłeś 1x apteczki', + ['used_bandage'] = 'użyłeś 1x bandaża', + ['not_enough_medikit'] = 'nie posiadasz apteczki.', + ['not_enough_bandage'] = 'nie posiadasz bandaża.', + ['healed'] = 'zostałeś potraktowany', + -- Blips + ['blip_hospital'] = 'szpital', + ['blip_dead'] = 'unconscious player', +} diff --git a/[esx_addons]/esx_ambulancejob/locales/si.lua b/[esx_addons]/esx_ambulancejob/locales/si.lua new file mode 100644 index 00000000..95687b48 --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/locales/si.lua @@ -0,0 +1,83 @@ +Locales['si'] = { + -- Cloakroom + ['cloakroom'] = 'Garderoba', + ['ems_clothes_civil'] = 'Civilna oblačila', + ['ems_clothes_ems'] = 'oblačila EMS', + -- vozila + ['ambulance'] = 'Ambulanca', + ['helicopter_prompt'] = 'Pritisnite [E] za dostop do akcij helikopterja.', + ['garage_prompt'] = 'Pritisnite [E] za dostop do akcij vozila.', + ['garage_title'] = 'Vehicle Actions', + ['garage_stored'] = 'Shranjeno', + ['garage_notstored'] = 'Ni v garaži', + ['garage_storing'] = 'Poskušamo odstraniti vozilo, poskrbite, da v njegovi bližini ni igralcev.', + ['garage_has_stored'] = 'Vozilo je bilo shranjeno v vaši garaži', + ['garage_has_notstored'] = 'V bližini nismo našli nobenega vozila v lasti', + ['garage_notavailable'] = 'Vaše vozilo ni shranjeno v garaži.', + ['garage_blocked'] = 'Ni razpoložljivih točk za porod!', + ['garage_empty'] = 'V garaži nimate nobenega vozila.', + ['garage_released'] = 'Vaše vozilo je bilo izpuščeno iz garaže.', + ['garage_store_nearby'] = 'V bližini ni vozil.', + ['garage_storeditem'] = 'Odprta garaža', + ['garage_storeitem'] = 'Vozilo shranite v garažo', + ['garage_buyitem'] = 'Trgovina z vozili', + ['shop_item'] = '$%s', + ['vehicleshop_title'] = 'Yehicle Shop', + ['vehicleshop_confirm'] = 'Yo you want to buy this vehicle?', + ['vehicleshop_bought'] = "Kupili ste %s za $%s", + ['vehicleshop_money'] = 'Tega vozila si ne morete privoščiti', + ['vehicleshop_awaiting_model'] = 'Vozilo se trenutno PRENOSI in nalaga, počakajte', + ['confirm_no'] = 'Ne', + ['confirm_yes'] = 'Yes', + -- Akcijski meni + ['revive_inprogress'] = 'Oživljanje je v teku!', + ['revive_complete'] = 'Oživili ste %s', + ['revive_complete_award'] = 'Oživil si %s in zaslužil $%s!', + ['revive_fail_offline'] = 'Ta igralec ni več na spletu', + ['heal_inprogress'] = 'Zdraviš se!', + ['heal_complete'] = 'Ozdravil si %s', + ['no_players'] = 'V bližini ni igralcev', + ['player_not_unconscious'] = 'Ta igralec ni nezavesten!', + ['player_not_conscious'] = 'Ta igralec ni pri zavesti!', + -- Boss Menu + ['boss_actions'] = 'Boss Actions', + -- Misc + ['invalid_amount'] = 'Invalid amount', + ['actions_prompt'] = 'Press [E] access the Ambulance Actions.', + ['deposit_amount'] = 'Deposit Amount', + ['money_withdraw'] = 'Amount withdrawn', + ['fast_travel'] = 'press [E] to fast travel.', + ['open_pharmacy'] = 'Press [E] to open the pharmacy.', + ['pharmacy_menu_title'] = 'Pharmacy', + ['pharmacy_take'] = 'Take %s', + ['medikit'] = 'Medikit', + ['bandage'] = 'Bandage', + ['max_item'] = 'You are already carrying enough.', + -- F6 Menu + ['ems_menu'] = 'EMS Menu', + ['ems_menu_title'] = 'Ambulance - EMS Menu', + ['ems_menu_revive'] = 'Revive Player', + ['ems_menu_putincar'] = 'Put in Vehicle', + ['ems_menu_small'] = 'Heal small wounds', + ['ems_menu_big'] = 'Treat serious injuries', + ['ems_menu_search'] = 'Patient not found', + -- Smrt + ['respawn_available_in'] = 'Ponovna obnova je na voljo čez %s minut %s sekund', + ['respawn_bleedout_in'] = 'Izkrvavel boš v %s minutah %s sekundah\n', + ['respawn_bleedout_prompt'] = "Držite [E], da se ponovno poženete", + ['respawn_bleedout_fine'] = 'Držite [E], da se ponovno pojavite za $%s', + ['respawn_bleedout_fine_msg'] = 'Plačali ste $%s za ponovni zagon.', + ['distress_send'] = 'Pritisnite [G] za pošiljanje signala za pomoč', + ['distress_sent'] = 'Signal v stiski je bil poslan razpoložljivim enotam!', + -- Oživitev + ['revive_help'] = 'oživi igralca', + -- predmet + ['used_medikit'] = 'Uporabili ste 1x medikit', + ['used_bandage'] = 'Uporabili ste 1x povoj', + ['not_enough_medikit'] = 'Nimate medikita.', + ['not_enough_bandage'] = 'Nimate povoja.', + ['healed'] = 'Bili ste zdravljeni.', + -- Blips + ['blip_hospital'] = 'Bolnišnica', + ['blip_dead'] = 'Nezavestni igralec', +} diff --git a/[esx_addons]/esx_ambulancejob/locales/sv.lua b/[esx_addons]/esx_ambulancejob/locales/sv.lua new file mode 100644 index 00000000..cb1f4958 --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/locales/sv.lua @@ -0,0 +1,83 @@ +Locales['sv'] = { + -- Cloakroom + ['cloakroom'] = 'omklädnignsrum', + ['ems_clothes_civil'] = 'civilkläder', + ['ems_clothes_ems'] = 'ambulanskläder', + -- Vehicles + ['ambulance'] = 'ambulans', + ['helicopter_prompt'] = 'tryck [E] för att komma åt helikoptergaraget.', + ['garage_prompt'] = 'tryck [E] för att komma åt garaget.', + ['garage_title'] = 'garage', + ['garage_stored'] = 'inställt', + ['garage_notstored'] = 'uttaget', + ['garage_storing'] = 'vi håller på att ställa in ditt fordon, se till att ingen är i närheten.', + ['garage_has_stored'] = 'fordonet har ställts in i garaget', + ['garage_has_notstored'] = 'inget ägt fordon finns i närheten', + ['garage_notavailable'] = 'ditt fordon är inte inställt i ditt garage.', + ['garage_blocked'] = 'det finns ingen tillgänglig plats att ställa ut fordonet på!', + ['garage_empty'] = 'du har inga fordon i ditt garage.', + ['garage_released'] = 'ditt fordon har tagits ut från garaget.', + ['garage_store_nearby'] = 'det finns inget fordon i närheten.', + ['garage_storeditem'] = 'öppna garage', + ['garage_storeitem'] = 'ställ in fordon', + ['garage_buyitem'] = 'fordonshandel', + ['shop_item'] = '%s SEK', + ['vehicleshop_title'] = 'fordonshandel', + ['vehicleshop_confirm'] = 'vill du köpa detta fordon?', + ['vehicleshop_bought'] = 'du köpte %s för %s SEK', + ['vehicleshop_money'] = 'du har inte råd med detta fordon', + ['vehicleshop_awaiting_model'] = 'fordonet LADDAS NED OCH LADDAS IN var god vänta', + ['confirm_no'] = 'nej', + ['confirm_yes'] = 'ja', + -- Action Menu + ['revive_inprogress'] = 'en återupplivning har börjats', + ['revive_complete'] = 'du har återupplivat %s, bra jobbat!', + ['revive_complete_award'] = 'du har återupplivat %s och tjänat %s SEK för dina tjänster, bra jobbat!', + ['revive_fail_offline'] = 'den spelaren har lämnat servern', + ['heal_inprogress'] = 'du behandlar patienten!', + ['heal_complete'] = 'du har behandlat %s', + ['no_players'] = 'det finns inga spelare i närheten!', + ['player_not_unconscious'] = 'spelaren är inte medvetslös!', + ['player_not_conscious'] = 'spelaren är inte vid medvetande!', + -- Boss Menu + ['boss_actions'] = 'chefsmeny', + -- Misc + ['invalid_amount'] = ' g mängd', + ['actions_prompt'] = 'tryck [E] för att öppna menyn.', + ['deposit_amount'] = 'mängd att sätta in', + ['money_withdraw'] = 'mängd att ta ut', + ['fast_travel'] = 'tryck på [E] för att snabbresa.', + ['open_pharmacy'] = 'tryck på [E] för att öppna apoteket.', + ['pharmacy_menu_title'] = 'apotek', + ['pharmacy_take'] = 'ta %s', + ['medikit'] = 'akutväska', + ['bandage'] = 'bandage', + ['max_item'] = 'du har redan tillräckligt mycket på dig.', + -- F6 Menu + ['ems_menu'] = 'ambulansmeny', + ['ems_menu_title'] = 'ambulansmeny', + ['ems_menu_revive'] = 'återuppliva spelare', + ['ems_menu_putincar'] = 'sätt i fordon', + ['ems_menu_small'] = 'behandla mindre skador', + ['ems_menu_big'] = 'behandla svåra skador', + ['ems_menu_search'] = 'patienten hittades inte', + -- Death + ['respawn_available_in'] = 'respawn tillgänglig om %s:%s', + ['respawn_bleedout_in'] = 'du kommer att förblöda om %s:%s\n', + ['respawn_bleedout_prompt'] = 'håll [E] för att respawna', + ['respawn_bleedout_fine'] = 'håll [E] för att respawna, kostar %s SEK', + ['respawn_bleedout_fine_msg'] = 'du betalade %s för att respawna.', + ['distress_send'] = 'tryck [G] för att skicka nödsignal', + ['distress_sent'] = 'nödsignal har skickats till samtliga enheter!', + -- Revive + ['revive_help'] = 'återuppliva en spelare', + -- Item + ['used_medikit'] = 'du har använt 1x akutväska', + ['used_bandage'] = 'du har använt 1x bandage', + ['not_enough_medikit'] = 'du har ingen akutväska.', + ['not_enough_bandage'] = 'du har inget bandage.', + ['healed'] = 'dina skador har blivit behandlade.', + -- Blips + ['blip_hospital'] = 'sjukhus', + ['blip_dead'] = 'medvetslös människa', +} diff --git a/[esx_addons]/esx_ambulancejob/locales/tr.lua b/[esx_addons]/esx_ambulancejob/locales/tr.lua new file mode 100644 index 00000000..9137daee --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/locales/tr.lua @@ -0,0 +1,81 @@ +Locales['tr'] = { + -- Cloakroom + ['cloakroom'] = 'soyunma Odası', + ['ems_clothes_civil'] = 'sivil Kıyafetler', + ['ems_clothes_ems'] = 'acil Servis Kıyafetleri', + -- Vehicles + ['ambulance'] = 'medikal', + ['helicopter_prompt'] = 'Helikopter için [E] tuşuna basın.', + ['garage_prompt'] = 'Araba Garajı için [E] tuşuna basın', + ['garage_title'] = 'araba Garajı', + ['garage_stored'] = 'garaja koyuldu', + ['garage_notstored'] = 'garajda değil', + ['garage_storing'] = 'arabayı çıkarmaya çalışıyoruz, etrafta oyuncu olmadığından emin olun.', + ['garage_has_stored'] = 'araba garaja koyuldu', + ['garage_has_notstored'] = 'yakında sahibi olunan araba yok', + ['garage_notavailable'] = 'araba garajda değil', + ['garage_blocked'] = 'kullanılabilir spawn noktası yok!', + ['garage_empty'] = 'garajda araba yok', + ['garage_released'] = 'arabanız garajdan çıkarıldı.', + ['garage_store_nearby'] = 'yakınlarda araba yok', + ['garage_storeditem'] = 'garajdaki arabalar', + ['garage_storeitem'] = 'arabayı garaja koy', + ['garage_buyitem'] = 'araba galerisi', + ['shop_item'] = '%s TL', + ['vehicleshop_title'] = 'araba Galerisi', + ['vehicleshop_confirm'] = 'bu arabayı almak istiyor musun?', + ['vehicleshop_bought'] = '%s liraya %s alındı', + ['vehicleshop_money'] = 'bu araca paranız yetmiyor', + ['vehicleshop_awaiting_model'] = 'bu araba şuanda İNDİRME & YÜKLEME yapıyor', + ['confirm_no'] = 'hayır', + ['confirm_yes'] = 'evet', + -- Action Menu + ['revive_inprogress'] = 'Canlanma sürüyor!', + ['revive_complete'] = '%s canlandırıldı', + ['revive_complete_award'] = '%s canlandırıldın ve $%s kazandın!', + ['revive_fail_offline'] = 'bu oyuncu artık online değil', + ['heal_inprogress'] = 'iyileştiriliyorsun!', + ['heal_complete'] = '%s iyileştirildi', + ['no_players'] = 'yakınlarda oyuncu yok', + ['player_not_unconscious'] = 'bu oyuncunun bilinci yerinde!', + ['player_not_conscious'] = 'bu oyuncunun bilinci yerinde değil!', + -- Boss Menu + ['boss_actions'] = 'baş Hekim', + -- Misc + ['invalid_amount'] = ' miktar', + ['actions_prompt'] = 'Kıyafet Değiştirmek için [E] tuşuna basın.', + ['deposit_amount'] = 'bırakılacak miktar', + ['money_withdraw'] = 'alınacak miktar', + ['fast_travel'] = '[E] tuşuna basarak hızlı yolculuk edebilirsiniz.', + ['open_pharmacy'] = 'Eczane için [E] tuşuna basın.', + ['pharmacy_menu_title'] = 'eczane', + ['pharmacy_take'] = 'al %s', + ['medikit'] = 'sağlık kiti', + ['bandage'] = 'bandaj', + ['max_item'] = 'zaten yeterince üzerinde var', + -- F6 Menu + ['ems_menu'] = 'EMS Menu', + ['ems_menu_title'] = 'medikal - EMS Menu', + ['ems_menu_revive'] = 'oyuncuyu Canlandır', + ['ems_menu_putincar'] = 'araca koy', + ['ems_menu_small'] = 'küçük yaraları tedavi et', + ['ems_menu_big'] = 'ciddi yaraları tedavi et', + -- Death + ['respawn_available_in'] = 'yeniden canlanmana %s dakika %s saniye kaldı', + ['respawn_bleedout_in'] = 'kanama %s dakika %s saniye boyunca devam edecek\n', + ['respawn_bleedout_prompt'] = 'yeniden canlanma için [E] basılı tut', + ['respawn_bleedout_fine'] = '%s lira karşılığında canlanma için [E] basılı tut', + ['respawn_bleedout_fine_msg'] = 'yeniden doğmak için %s ödediniz.', + ['distress_send'] = 'acile sinyal göndermek için [G] basın', + ['distress_sent'] = 'acil durum sinyali gönderildi!', + ['revive_help'] = 'oyuncuyu canlandır', + -- Item + ['used_medikit'] = '1x sağlık kiti kullanıldı.', + ['used_bandage'] = '1x bandaj kullanıldı.', + ['not_enough_medikit'] = ' sağlık kiti yok.', + ['not_enough_bandage'] = ' bandaj. yok', + ['healed'] = 'tedavi görüldü.', + -- Blips + ['blip_hospital'] = 'hastane', + ['blip_dead'] = 'bilinci kapalı oyuncu', + } diff --git a/[esx_addons]/esx_ambulancejob/localization/br_esx_ambulancejob.sql b/[esx_addons]/esx_ambulancejob/localization/br_esx_ambulancejob.sql new file mode 100644 index 00000000..128468f2 --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/localization/br_esx_ambulancejob.sql @@ -0,0 +1,33 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_ambulance', 'EMS', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_ambulance', 'EMS', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_ambulance', 'EMS', 1) +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('ambulance',0,'ambulância','Jr. EMT',20,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}'), + ('ambulance',1,'medico','EMT',40,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}'), + ('ambulance',2,'medico chefe','Sr. EMT',60,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}'), + ('ambulance',3,'boss','EMT Supervisor',80,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}') +; + +INSERT INTO `jobs` (name, label) VALUES + ('ambulance','EMS') +; + +INSERT INTO `items` (name, label, weight) VALUES + ('bandage','curativo', 2), + ('medikit','kit medico', 2) +; + +ALTER TABLE `users` + ADD `is_dead` TINYINT(1) NULL DEFAULT '0' +; diff --git a/[esx_addons]/esx_ambulancejob/localization/cs_esx_ambulancejob.sql b/[esx_addons]/esx_ambulancejob/localization/cs_esx_ambulancejob.sql new file mode 100644 index 00000000..823a0f1c --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/localization/cs_esx_ambulancejob.sql @@ -0,0 +1,33 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_ambulance', 'Záchranka', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_ambulance', 'Záchranka', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_ambulance', 'Záchranka', 1) +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('ambulance',0,'ambulance','Zdravotník',20,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}'), + ('ambulance',1,'doctor','Doktor',40,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}'), + ('ambulance',2,'chief_doctor','Primář',60,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}'), + ('ambulance',3,'boss','Chirurg',80,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}') +; + +INSERT INTO `jobs` (name, label) VALUES + ('ambulance','Záchranka') +; + +INSERT INTO `items` (name, label, weight) VALUES + ('bandage','Obvaz', 2), + ('medikit','Lékarnička', 2) +; + +ALTER TABLE `users` + ADD `is_dead` TINYINT(1) NULL DEFAULT '0' +; diff --git a/[esx_addons]/esx_ambulancejob/localization/de_esx_ambulancejob.sql b/[esx_addons]/esx_ambulancejob/localization/de_esx_ambulancejob.sql new file mode 100644 index 00000000..f929a52a --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/localization/de_esx_ambulancejob.sql @@ -0,0 +1,33 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_ambulance', 'Notdienst', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_ambulance', 'Ambulance', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_ambulance', 'Ambulance', 1) +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('ambulance',0,'ambulance','Sanitäter',20,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}'), + ('ambulance',1,'doctor','Arzt',40,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}'), + ('ambulance',2,'chief_doctor','Chefarzt',60,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}'), + ('ambulance',3,'boss','Chirurg',80,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}') +; + +INSERT INTO `jobs` (name, label) VALUES + ('ambulance','Notdienst') +; + +INSERT INTO `items` (name, label, weight) VALUES + ('bandage','Bandage', 2), + ('medikit','Medikit', 2) +; + +ALTER TABLE `users` + ADD `is_dead` TINYINT(1) NULL DEFAULT '0' +; diff --git a/[esx_addons]/esx_ambulancejob/localization/en_esx_ambulancejob.sql b/[esx_addons]/esx_ambulancejob/localization/en_esx_ambulancejob.sql new file mode 100644 index 00000000..dc9c5ea4 --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/localization/en_esx_ambulancejob.sql @@ -0,0 +1,33 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_ambulance', 'EMS', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_ambulance', 'EMS', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_ambulance', 'EMS', 1) +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('ambulance',0,'ambulance','Jr. EMT',20,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}'), + ('ambulance',1,'doctor','EMT',40,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}'), + ('ambulance',2,'chief_doctor','Sr. EMT',60,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}'), + ('ambulance',3,'boss','EMT Supervisor',80,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}') +; + +INSERT INTO `jobs` (name, label) VALUES + ('ambulance','EMS') +; + +INSERT INTO `items` (name, label, weight) VALUES + ('bandage','Bandage', 2), + ('medikit','Medikit', 2) +; + +ALTER TABLE `users` + ADD `is_dead` TINYINT(1) NULL DEFAULT '0' +; diff --git a/[esx_addons]/esx_ambulancejob/localization/fi_esx_ambulancejob.sql b/[esx_addons]/esx_ambulancejob/localization/fi_esx_ambulancejob.sql new file mode 100644 index 00000000..0ca2997b --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/localization/fi_esx_ambulancejob.sql @@ -0,0 +1,33 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_ambulance', 'Ensihoito', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_ambulance', 'Ensihoito', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_ambulance', 'Ensihoito', 1) +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('ambulance',0,'ambulance','Ensihoitaja',20,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}'), + ('ambulance',1,'doctor','Lääkäri',40,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}'), + ('ambulance',2,'chief_doctor','Yli-lääkäri',60,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}'), + ('ambulance',3,'boss','Kirurgi',80,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}') +; + +INSERT INTO `jobs` (name, label) VALUES + ('ambulance','Ensihoito') +; + +INSERT INTO `items` (name, label, weight) VALUES + ('bandage','Sideharso', 2), + ('medikit','Ensiapupakkaus', 2) +; + +ALTER TABLE `users` + ADD `is_dead` TINYINT(1) NULL DEFAULT '0' +; diff --git a/[esx_addons]/esx_ambulancejob/localization/pl_esx_ambulancejob.sql b/[esx_addons]/esx_ambulancejob/localization/pl_esx_ambulancejob.sql new file mode 100644 index 00000000..2d84d9e2 --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/localization/pl_esx_ambulancejob.sql @@ -0,0 +1,33 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_ambulance', 'Ambulance', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_ambulance', 'Ambulance', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_ambulance', 'Pogotowie ratunkowe', 1) +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('ambulance',0,'ambulance','Ratownik',20,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}'), + ('ambulance',1,'doctor','Lekarz',40,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}'), + ('ambulance',2,'chief_doctor','Chirurg',60,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}'), + ('ambulance',3,'boss','Ordynator',80,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}') +; + +INSERT INTO `jobs` (name, label) VALUES + ('ambulance','Pogotowie ratunkowe') +; + +INSERT INTO `items` (name, label, weight) VALUES + ('bandage','Bandaż', 2), + ('medikit','Defibrylator', 2) +; + +ALTER TABLE `users` + ADD `is_dead` TINYINT(1) NULL DEFAULT '0' +; diff --git a/[esx_addons]/esx_ambulancejob/localization/sv_esx_ambulancejob.sql b/[esx_addons]/esx_ambulancejob/localization/sv_esx_ambulancejob.sql new file mode 100644 index 00000000..3eb37d10 --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/localization/sv_esx_ambulancejob.sql @@ -0,0 +1,33 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_ambulance', 'Sjukvård', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_ambulance', 'Sjukvård', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_ambulance', 'Sjukvård', 1) +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('ambulance',0,'ambulance','Undersköterska',20,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}'), + ('ambulance',1,'doctor','Ambulanssjuksköterska',40,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}'), + ('ambulance',2,'chief_doctor','Läkare',60,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}'), + ('ambulance',3,'boss','Överläkare',80,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}') +; + +INSERT INTO `jobs` (name, label) VALUES + ('ambulance','Sjukvårdare') +; + +INSERT INTO `items` (name, label, weight) VALUES + ('bandage','Bandage', 2), + ('medikit','Akutväska', 2) +; + +ALTER TABLE `users` + ADD `is_dead` TINYINT(1) NULL DEFAULT '0' +; diff --git a/[esx_addons]/esx_ambulancejob/localization/tr_esx_ambulancejob.sql b/[esx_addons]/esx_ambulancejob/localization/tr_esx_ambulancejob.sql new file mode 100644 index 00000000..40e839d6 --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/localization/tr_esx_ambulancejob.sql @@ -0,0 +1,33 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_ambulance', 'EMS', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_ambulance', 'EMS', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_ambulance', 'EMS', 1) +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('ambulance',0,'ambulance','Acil Tıp Teknisyeni',20,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}'), + ('ambulance',1,'doctor','Doktor',40,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}'), + ('ambulance',2,'chief_doctor','Kdemli Doktor',60,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}'), + ('ambulance',3,'boss','Baş Hekim',80,'{\"tshirt_2\":0,\"hair_color_1\":5,\"glasses_2\":3,\"shoes\":9,\"torso_2\":3,\"hair_color_2\":0,\"pants_1\":24,\"glasses_1\":4,\"hair_1\":2,\"sex\":0,\"decals_2\":0,\"tshirt_1\":15,\"helmet_1\":8,\"helmet_2\":0,\"arms\":92,\"face\":19,\"decals_1\":60,\"torso_1\":13,\"hair_2\":0,\"skin\":34,\"pants_2\":5}','{\"tshirt_2\":3,\"decals_2\":0,\"glasses\":0,\"hair_1\":2,\"torso_1\":73,\"shoes\":1,\"hair_color_2\":0,\"glasses_1\":19,\"skin\":13,\"face\":6,\"pants_2\":5,\"tshirt_1\":75,\"pants_1\":37,\"helmet_1\":57,\"torso_2\":0,\"arms\":14,\"sex\":1,\"glasses_2\":0,\"decals_1\":0,\"hair_2\":0,\"helmet_2\":0,\"hair_color_1\":0}') +; + +INSERT INTO `jobs` (name, label) VALUES + ('ambulance','EMS') +; + +INSERT INTO `items` (name, label, weight) VALUES + ('bandage','Bandaj', 2), + ('medikit','Sağlık Kiti', 2) +; + +ALTER TABLE `users` + ADD `is_dead` TINYINT(1) NULL DEFAULT '0' +; diff --git a/[esx_addons]/esx_ambulancejob/server/main.lua b/[esx_addons]/esx_ambulancejob/server/main.lua new file mode 100644 index 00000000..8fb273f9 --- /dev/null +++ b/[esx_addons]/esx_ambulancejob/server/main.lua @@ -0,0 +1,357 @@ +local playersHealing, deadPlayers = {}, {} + +CreateThread(function() + exports["esx_society"]:registerSociety('ambulance', 'Ambulance', 'society_ambulance', 'society_ambulance', 'society_ambulance', {type = 'public'}) +end) + +RegisterNetEvent('esx_ambulancejob:revive') +AddEventHandler('esx_ambulancejob:revive', function(playerId) + playerId = tonumber(playerId) + local xPlayer = source and ESX.GetPlayerFromId(source) + + if xPlayer and xPlayer.job.name == 'ambulance' then + local xTarget = ESX.GetPlayerFromId(playerId) + if xTarget then + if deadPlayers[playerId] then + if Config.ReviveReward > 0 then + xPlayer.showNotification(TranslateCap('revive_complete_award', xTarget.name, Config.ReviveReward)) + xPlayer.addMoney(Config.ReviveReward, "Revive Reward") + xTarget.triggerEvent('esx_ambulancejob:revive') + else + xPlayer.showNotification(TranslateCap('revive_complete', xTarget.name)) + xTarget.triggerEvent('esx_ambulancejob:revive') + end + local Ambulance = ESX.GetExtendedPlayers("job", "ambulance") + + for _, xPlayer in pairs(Ambulance) do + if xPlayer.job.name == 'ambulance' then + xPlayer.triggerEvent('esx_ambulancejob:PlayerNotDead', playerId) + end + end + deadPlayers[playerId] = nil + else + xPlayer.showNotification(TranslateCap('player_not_unconscious')) + end + else + xPlayer.showNotification(TranslateCap('revive_fail_offline')) + end + end +end) + +AddEventHandler('txAdmin:events:healedPlayer', function(eventData) + if GetInvokingResource() ~= "monitor" or type(eventData) ~= "table" or type(eventData.id) ~= "number" then + return + end + if deadPlayers[eventData.id] then + TriggerClientEvent('esx_ambulancejob:revive', eventData.id) + local Ambulance = ESX.GetExtendedPlayers("job", "ambulance") + + for _, xPlayer in pairs(Ambulance) do + if xPlayer.job.name == 'ambulance' then + xPlayer.triggerEvent('esx_ambulancejob:PlayerNotDead', eventData.id) + end + end + deadPlayers[eventData.id] = nil + end +end) + +RegisterNetEvent('esx:onPlayerDeath') +AddEventHandler('esx:onPlayerDeath', function(data) + local source = source + deadPlayers[source] = 'dead' + local Ambulance = ESX.GetExtendedPlayers("job", "ambulance") + + for _, xPlayer in pairs(Ambulance) do + xPlayer.triggerEvent('esx_ambulancejob:PlayerDead', source) + end +end) + +RegisterServerEvent('esx_ambulancejob:svsearch') +AddEventHandler('esx_ambulancejob:svsearch', function() + TriggerClientEvent('esx_ambulancejob:clsearch', -1, source) +end) + +RegisterNetEvent('esx_ambulancejob:onPlayerDistress') +AddEventHandler('esx_ambulancejob:onPlayerDistress', function() + local source = source + if deadPlayers[source] then + deadPlayers[source] = 'distress' + local Ambulance = ESX.GetExtendedPlayers("job", "ambulance") + + for _, xPlayer in pairs(Ambulance) do + TriggerClientEvent('esx_ambulancejob:PlayerDistressed', xPlayer.source, source) + end + end +end) + +RegisterNetEvent('esx:onPlayerSpawn') +AddEventHandler('esx:onPlayerSpawn', function() + local source = source + if deadPlayers[source] then + deadPlayers[source] = nil + local Ambulance = ESX.GetExtendedPlayers("job", "ambulance") + + for _, xPlayer in pairs(Ambulance) do + xPlayer.triggerEvent('esx_ambulancejob:PlayerNotDead', source) + end + end +end) + +AddEventHandler('esx:playerDropped', function(playerId, reason) + if deadPlayers[playerId] then + deadPlayers[playerId] = nil + local Ambulance = ESX.GetExtendedPlayers("job", "ambulance") + + for _, xPlayer in pairs(Ambulance) do + if xPlayer.job.name == 'ambulance' then + xPlayer.triggerEvent('esx_ambulancejob:PlayerNotDead', playerId) + end + end + end +end) + +RegisterNetEvent('esx_ambulancejob:heal') +AddEventHandler('esx_ambulancejob:heal', function(target, type) + local xPlayer = ESX.GetPlayerFromId(source) + + if xPlayer.job.name == 'ambulance' then + TriggerClientEvent('esx_ambulancejob:heal', target, type) + end +end) + +RegisterNetEvent('esx_ambulancejob:putInVehicle') +AddEventHandler('esx_ambulancejob:putInVehicle', function(target) + local xPlayer = ESX.GetPlayerFromId(source) + + if xPlayer.job.name == 'ambulance' then + TriggerClientEvent('esx_ambulancejob:putInVehicle', target) + end +end) + +ESX.RegisterServerCallback('esx_ambulancejob:removeItemsAfterRPDeath', function(source, cb) + local xPlayer = ESX.GetPlayerFromId(source) + + if Config.OxInventory and Config.RemoveItemsAfterRPDeath then + exports.ox_inventory:ClearInventory(xPlayer.source) + return cb() + end + + if Config.RemoveCashAfterRPDeath then + if xPlayer.getMoney() > 0 then + xPlayer.removeMoney(xPlayer.getMoney(), "Death") + end + + if xPlayer.getAccount('black_money').money > 0 then + xPlayer.setAccountMoney('black_money', 0, "Death") + end + end + + if Config.RemoveItemsAfterRPDeath then + for i=1, #xPlayer.inventory, 1 do + if xPlayer.inventory[i].count > 0 then + xPlayer.setInventoryItem(xPlayer.inventory[i].name, 0) + end + end + end + + if Config.OxInventory then return cb() end + + local playerLoadout = {} + if Config.RemoveWeaponsAfterRPDeath then + for i=1, #xPlayer.loadout, 1 do + xPlayer.removeWeapon(xPlayer.loadout[i].name) + end + else -- save weapons & restore em' since spawnmanager removes them + for i=1, #xPlayer.loadout, 1 do + table.insert(playerLoadout, xPlayer.loadout[i]) + end + + -- give back wepaons after a couple of seconds + CreateThread(function() + Wait(5000) + for i=1, #playerLoadout, 1 do + if playerLoadout[i].label ~= nil then + xPlayer.addWeapon(playerLoadout[i].name, playerLoadout[i].ammo) + end + end + end) + end + + cb() +end) + +if Config.EarlyRespawnFine then + ESX.RegisterServerCallback('esx_ambulancejob:checkBalance', function(source, cb) + local xPlayer = ESX.GetPlayerFromId(source) + local bankBalance = xPlayer.getAccount('bank').money + + cb(bankBalance >= Config.EarlyRespawnFineAmount) + end) + + RegisterNetEvent('esx_ambulancejob:payFine') + AddEventHandler('esx_ambulancejob:payFine', function() + local xPlayer = ESX.GetPlayerFromId(source) + local fineAmount = Config.EarlyRespawnFineAmount + + xPlayer.showNotification(TranslateCap('respawn_bleedout_fine_msg', ESX.Math.GroupDigits(fineAmount))) + xPlayer.removeAccountMoney('bank', fineAmount, "Respawn Fine") + end) +end + +ESX.RegisterServerCallback('esx_ambulancejob:getItemAmount', function(source, cb, item) + local xPlayer = ESX.GetPlayerFromId(source) + local quantity = xPlayer.getInventoryItem(item).count + + cb(quantity) +end) + +ESX.RegisterServerCallback('esx_ambulancejob:buyJobVehicle', function(source, cb, vehicleProps, type) + local xPlayer = ESX.GetPlayerFromId(source) + local price = getPriceFromHash(vehicleProps.model, xPlayer.job.grade_name, type) + + -- vehicle model not found + if price == 0 then + cb(false) + else + if xPlayer.getMoney() >= price then + xPlayer.removeMoney(price, "Job Vehicle Purchase") + + MySQL.insert('INSERT INTO owned_vehicles (owner, vehicle, plate, type, job, `stored`) VALUES (?, ?, ?, ?, ?, ?)', {xPlayer.identifier, json.encode(vehicleProps), vehicleProps.plate, type, xPlayer.job.name, true}, + function (rowsChanged) + cb(true) + end) + else + cb(false) + end + end +end) + +ESX.RegisterServerCallback('esx_ambulancejob:storeNearbyVehicle', function(source, cb, plates) + local xPlayer = ESX.GetPlayerFromId(source) + + local plate = MySQL.scalar.await('SELECT plate FROM owned_vehicles WHERE owner = ? AND plate IN (?) AND job = ?', {xPlayer.identifier, plates, xPlayer.job.name}) + + if plate then + MySQL.update('UPDATE owned_vehicles SET `stored` = true WHERE owner = ? AND plate = ? AND job = ?', {xPlayer.identifier, plate, xPlayer.job.name}, + function(rowsChanged) + if rowsChanged == 0 then + cb(false) + else + cb(plate) + end + end) + else + cb(false) + end +end) + +function getPriceFromHash(vehicleHash, jobGrade, type) + local vehicles = Config.AuthorizedVehicles[type][jobGrade] + + for i = 1, #vehicles do + local vehicle = vehicles[i] + if joaat(vehicle.model) == vehicleHash then + return vehicle.price + end + end + + return 0 +end + +RegisterNetEvent('esx_ambulancejob:removeItem') +AddEventHandler('esx_ambulancejob:removeItem', function(item) + local xPlayer = ESX.GetPlayerFromId(source) + xPlayer.removeInventoryItem(item, 1) + + if item == 'bandage' then + xPlayer.showNotification(TranslateCap('used_bandage')) + elseif item == 'medikit' then + xPlayer.showNotification(TranslateCap('used_medikit')) + end +end) + +RegisterNetEvent('esx_ambulancejob:giveItem') +AddEventHandler('esx_ambulancejob:giveItem', function(itemName, amount) + local xPlayer = ESX.GetPlayerFromId(source) + + if xPlayer.job.name ~= 'ambulance' then + print(('[^2WARNING^7] Player ^5%s^7 Tried Giving Themselves -> ^5' .. itemName ..'^7!'):format(xPlayer.source)) + return + elseif (itemName ~= 'medikit' and itemName ~= 'bandage') then + print(('[^2WARNING^7] Player ^5%s^7 Tried Giving Themselves -> ^5' .. itemName ..'^7!'):format(xPlayer.source)) + return + end + + if xPlayer.canCarryItem(itemName, amount) then + xPlayer.addInventoryItem(itemName, amount) + else + xPlayer.showNotification(TranslateCap('max_item')) + end +end) + +ESX.RegisterCommand('revive', 'admin', function(xPlayer, args, showError) + args.playerId.triggerEvent('esx_ambulancejob:revive') +end, true, {help = TranslateCap('revive_help'), validate = true, arguments = { + {name = 'playerId', help = 'The player id', type = 'player'} +}}) + +ESX.RegisterCommand('reviveall', "admin", function(xPlayer, args, showError) + TriggerClientEvent('esx_ambulancejob:revive', -1) +end, false) + +ESX.RegisterUsableItem('medikit', function(source) + if not playersHealing[source] then + local xPlayer = ESX.GetPlayerFromId(source) + xPlayer.removeInventoryItem('medikit', 1) + + playersHealing[source] = true + TriggerClientEvent('esx_ambulancejob:useItem', source, 'medikit') + + Wait(10000) + playersHealing[source] = nil + end +end) + +ESX.RegisterUsableItem('bandage', function(source) + if not playersHealing[source] then + local xPlayer = ESX.GetPlayerFromId(source) + xPlayer.removeInventoryItem('bandage', 1) + + playersHealing[source] = true + TriggerClientEvent('esx_ambulancejob:useItem', source, 'bandage') + + Wait(10000) + playersHealing[source] = nil + end +end) + +ESX.RegisterServerCallback('esx_ambulancejob:getDeadPlayers', function(source, cb) + local xPlayer = ESX.GetPlayerFromId(source) + if xPlayer.job.name == "ambulance" then + cb(deadPlayers) + end +end) + +ESX.RegisterServerCallback('esx_ambulancejob:getDeathStatus', function(source, cb) + local xPlayer = ESX.GetPlayerFromId(source) + MySQL.scalar('SELECT is_dead FROM users WHERE identifier = ?', {xPlayer.identifier}, function(isDead) + cb(isDead) + end) +end) + +RegisterNetEvent('esx_ambulancejob:setDeathStatus') +AddEventHandler('esx_ambulancejob:setDeathStatus', function(isDead) + local xPlayer = ESX.GetPlayerFromId(source) + + if type(isDead) == 'boolean' then + MySQL.update('UPDATE users SET is_dead = ? WHERE identifier = ?', {isDead, xPlayer.identifier}) + + if not isDead then + local Ambulance = ESX.GetExtendedPlayers("job", "ambulance") + for _, xPlayer in pairs(Ambulance) do + xPlayer.triggerEvent('esx_ambulancejob:PlayerNotDead', source) + end + end + end + +end) diff --git a/[esx_addons]/esx_animations/.editorconfig b/[esx_addons]/esx_animations/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_animations/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_animations/LICENSE b/[esx_addons]/esx_animations/LICENSE new file mode 100644 index 00000000..b96291b4 --- /dev/null +++ b/[esx_addons]/esx_animations/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_animations + Copyright (C) 2015-2023 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 . + +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_animations Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_animations/README.md b/[esx_addons]/esx_animations/README.md new file mode 100644 index 00000000..2aa85189 --- /dev/null +++ b/[esx_addons]/esx_animations/README.md @@ -0,0 +1,37 @@ +# esx_animations + +## Download & Installation + +### Using [fvm](https://github.com/qlaffont/fvm-installer) +``` +fvm install --save --folder=esx esx-org/esx_animations +``` + +### Using Git +``` +cd resources +git clone https://github.com/ESX-Org/esx_animations [esx]/esx_animations +``` + +### Manually +- Download https://github.com/ESX-Org/esx_animations/archive/master.zip +- Put it in the `[esx]` directory + +## Installation +- Add this in your `server.cfg`: + +``` +start esx_animations +``` + +# Legal +### License +esx_animations - play anims! + +Copyright (C) 2015-2023 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/. \ No newline at end of file diff --git a/[esx_addons]/esx_animations/client/main.lua b/[esx_addons]/esx_animations/client/main.lua new file mode 100644 index 00000000..5f8e1715 --- /dev/null +++ b/[esx_addons]/esx_animations/client/main.lua @@ -0,0 +1,91 @@ +local inAnim = false + +function startAttitude(lib, anim) + ESX.Streaming.RequestAnimSet(lib, function() + SetPedMovementClipset(PlayerPedId(), anim, true) + end) +end + +function startAnim(lib, anim) + ESX.Streaming.RequestAnimDict(lib, function() + TaskPlayAnim(PlayerPedId(), lib, anim, 8.0, -8.0, -1, 0, 0.0, false, false, false) + RemoveAnimDict(lib) + end) +end + +function startScenario(anim) + TaskStartScenarioInPlace(PlayerPedId(), anim, 0, false) +end + +function OpenAnimationsMenu() + local elements = { + {unselectable = true, icon = "fas fa-smile", title = "Animations"} + } + + for i=1, #Config.Animations, 1 do + elements[#elements+1] = { + icon = "fas fa-smile", + title = Config.Animations[i].label, + value = Config.Animations[i].name + } + end + + ESX.OpenContext("right", elements, function(menu,element) + OpenAnimationsSubMenu(element.value) + end) +end + +function OpenAnimationsSubMenu(menu) + local title = nil + local elements = {} + + for i=1, #Config.Animations, 1 do + elements = { + {unselectable = true, icon = "fas fa-smile", title = Config.Animations[i].label} + } + + if Config.Animations[i].name == menu then + title = Config.Animations[i].label + + for j=1, #Config.Animations[i].items, 1 do + elements[#elements+1] = { + icon = "fas fa-smile", + title = Config.Animations[i].items[j].label, + type = Config.Animations[i].items[j].type, + value = Config.Animations[i].items[j].data + } + end + break + end + end + + ESX.OpenContext("right", elements, function(menu,element) + local type = element.type + local lib = element.value.lib + local anim = element.value.anim + + if type == 'scenario' then + startScenario(anim) + elseif type == 'attitude' then + startAttitude(lib, anim) + elseif type == 'anim' then + startAnim(lib, anim) + end + end) +end + +-- Key Controls +RegisterCommand('animmenu', function() + if not ESX.PlayerData.dead then + OpenAnimationsMenu() + end +end, false) + +RegisterCommand('cleartasks', function() + if not ESX.PlayerData.dead then + ClearPedTasks(PlayerPedId()) + end +end, false) + +RegisterKeyMapping('animmenu', 'Open Animations Menu', 'keyboard', 'f3') +RegisterKeyMapping('cleartasks', 'Stop Anmimation', 'keyboard', 'z') diff --git a/[esx_addons]/esx_animations/config.lua b/[esx_addons]/esx_animations/config.lua new file mode 100644 index 00000000..d729ae98 --- /dev/null +++ b/[esx_addons]/esx_animations/config.lua @@ -0,0 +1,161 @@ +Config = {} + +Config.Animations = { + + { + name = 'festives', + label = 'Festives', + items = { + {label = "Fumer une cigarette", type = "scenario", data = {anim = "WORLD_HUMAN_SMOKING"}}, + {label = "Jouer de la musique", type = "scenario", data = {anim = "WORLD_HUMAN_MUSICIAN"}}, + {label = "Dj", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@dj", anim = "dj"}}, + {label = "Boire une biere", type = "scenario", data = {anim = "WORLD_HUMAN_DRINKING"}}, + {label = "Bière en zik", type = "scenario", data = {anim = "WORLD_HUMAN_PARTYING"}}, + {label = "Air Guitar", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@air_guitar", anim = "air_guitar"}}, + {label = "Air Shagging", type = "anim", data = {lib = "anim@mp_player_intcelebrationfemale@air_shagging", anim = "air_shagging"}}, + {label = "Rock'n'roll", type = "anim", data = {lib = "mp_player_int_upperrock", anim = "mp_player_int_rock"}}, + -- {label = "Fumer un joint", type = "scenario", data = {anim = "WORLD_HUMAN_SMOKING_POT"}}, + {label = "Bourré sur place", type = "anim", data = {lib = "amb@world_human_bum_standing@drunk@idle_a", anim = "idle_a"}}, + {label = "Vomir en voiture", type = "anim", data = {lib = "oddjobs@taxi@tie", anim = "vomit_outside"}}, + } + }, + + { + name = 'greetings', + label = 'Salutations', + items = { + {label = "Saluer", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_hello"}}, + {label = "Serrer la main", type = "anim", data = {lib = "mp_common", anim = "givetake1_a"}}, + {label = "Tchek", type = "anim", data = {lib = "mp_ped_interaction", anim = "handshake_guy_a"}}, + {label = "Salut bandit", type = "anim", data = {lib = "mp_ped_interaction", anim = "hugs_guy_a"}}, + {label = "Salut Militaire", type = "anim", data = {lib = "mp_player_int_uppersalute", anim = "mp_player_int_salute"}}, + } + }, + + { + name = 'work', + label = 'Travail', + items = { + {label = "Suspect : se rendre à la police", type = "anim", data = {lib = "random@arrests@busted", anim = "idle_c"}}, + {label = "Pêcheur", type = "scenario", data = {anim = "world_human_stand_fishing"}}, + {label = "Police : enquêter", type = "anim", data = {lib = "amb@code_human_police_investigate@idle_b", anim = "idle_f"}}, + {label = "Police : parler à la radio", type = "anim", data = {lib = "random@arrests", anim = "generic_radio_chatter"}}, + {label = "Police : circulation", type = "scenario", data = {anim = "WORLD_HUMAN_CAR_PARK_ATTENDANT"}}, + {label = "Police : jumelles", type = "scenario", data = {anim = "WORLD_HUMAN_BINOCULARS"}}, + {label = "Agriculture : récolter", type = "scenario", data = {anim = "world_human_gardener_plant"}}, + {label = "Dépanneur : réparer le moteur", type = "anim", data = {lib = "mini@repair", anim = "fixing_a_ped"}}, + {label = "Médecin : observer", type = "scenario", data = {anim = "CODE_HUMAN_MEDIC_KNEEL"}}, + {label = "Taxi : parler au client", type = "anim", data = {lib = "oddjobs@taxi@driver", anim = "leanover_idle"}}, + {label = "Taxi : donner la facture", type = "anim", data = {lib = "oddjobs@taxi@cyi", anim = "std_hand_off_ps_passenger"}}, + {label = "Epicier : donner les courses", type = "anim", data = {lib = "mp_am_hold_up", anim = "purchase_beerbox_shopkeeper"}}, + {label = "Barman : servir un shot", type = "anim", data = {lib = "mini@drinking", anim = "shots_barman_b"}}, + {label = "Journaliste : Prendre une photo", type = "scenario", data = {anim = "WORLD_HUMAN_PAPARAZZI"}}, + {label = "Tout métiers : Prendre des notes", type = "scenario", data = {anim = "WORLD_HUMAN_CLIPBOARD"}}, + {label = "Tout métiers : Coup de marteau", type = "scenario", data = {anim = "WORLD_HUMAN_HAMMERING"}}, + {label = "Clochard : Faire la manche", type = "scenario", data = {anim = "WORLD_HUMAN_BUM_FREEWAY"}}, + {label = "Clochard : Faire la statue", type = "scenario", data = {anim = "WORLD_HUMAN_HUMAN_STATUE"}}, + } + }, + + { + name = 'humors', + label = 'Humeurs', + items = { + {label = "Féliciter", type = "scenario", data = {anim = "WORLD_HUMAN_CHEERING"}}, + {label = "Super", type = "anim", data = {lib = "mp_action", anim = "thanks_male_06"}}, + {label = "Toi", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_point"}}, + {label = "Viens", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_come_here_soft"}}, + {label = "Keskya ?", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_bring_it_on"}}, + {label = "A moi", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_me"}}, + {label = "Je le savais, putain", type = "anim", data = {lib = "anim@am_hold_up@male", anim = "shoplift_high"}}, + {label = "Etre épuisé", type = "scenario", data = {lib = "amb@world_human_jog_standing@male@idle_b", anim = "idle_d"}}, + {label = "Je suis dans la merde", type = "scenario", data = {lib = "amb@world_human_bum_standing@depressed@idle_a", anim = "idle_a"}}, + {label = "Facepalm", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@face_palm", anim = "face_palm"}}, + {label = "Calme-toi ", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_easy_now"}}, + {label = "Qu'est ce que j'ai fait ?", type = "anim", data = {lib = "oddjobs@assassinate@multi@", anim = "react_big_variations_a"}}, + {label = "Avoir peur", type = "anim", data = {lib = "amb@code_human_cower_stand@male@react_cowering", anim = "base_right"}}, + {label = "Fight ?", type = "anim", data = {lib = "anim@deathmatch_intros@unarmed", anim = "intro_male_unarmed_e"}}, + {label = "C'est pas Possible !", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_damn"}}, + {label = "Enlacer", type = "anim", data = {lib = "mp_ped_interaction", anim = "kisses_guy_a"}}, + {label = "Doigt d'honneur", type = "anim", data = {lib = "mp_player_int_upperfinger", anim = "mp_player_int_finger_01_enter"}}, + {label = "Branleur", type = "anim", data = {lib = "mp_player_int_upperwank", anim = "mp_player_int_wank_01"}}, + {label = "Balle dans la tete", type = "anim", data = {lib = "mp_suicide", anim = "pistol"}}, + } + }, + + { + name = 'sports', + label = 'Sports', + items = { + {label = "Montrer ses muscles", type = "anim", data = {lib = "amb@world_human_muscle_flex@arms_at_side@base", anim = "base"}}, + {label = "Barre de musculation", type = "anim", data = {lib = "amb@world_human_muscle_free_weights@male@barbell@base", anim = "base"}}, + {label = "Faire des pompes", type = "anim", data = {lib = "amb@world_human_push_ups@male@base", anim = "base"}}, + {label = "Faire des abdos", type = "anim", data = {lib = "amb@world_human_sit_ups@male@base", anim = "base"}}, + {label = "Faire du yoga", type = "anim", data = {lib = "amb@world_human_yoga@male@base", anim = "base_a"}}, + } + }, + + { + name = 'misc', + label = 'Divers', + items = { + {label = "Boire un café", type = "anim", data = {lib = "amb@world_human_aa_coffee@idle_a", anim = "idle_a"}}, + {label = "S'asseoir", type = "anim", data = {lib = "anim@heists@prison_heistunfinished_biztarget_idle", anim = "target_idle"}}, + {label = "Attendre contre un mur", type = "scenario", data = {anim = "world_human_leaning"}}, + {label = "Couché sur le dos", type = "scenario", data = {anim = "WORLD_HUMAN_SUNBATHE_BACK"}}, + {label = "Couché sur le ventre", type = "scenario", data = {anim = "WORLD_HUMAN_SUNBATHE"}}, + {label = "Nettoyer quelque chose", type = "scenario", data = {anim = "world_human_maid_clean"}}, + {label = "Préparer à manger", type = "scenario", data = {anim = "PROP_HUMAN_BBQ"}}, + {label = "Position de Fouille", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_bj_to_prop_female"}}, + {label = "Prendre un selfie", type = "scenario", data = {anim = "world_human_tourist_mobile"}}, + {label = "Ecouter à une porte", type = "anim", data = {lib = "mini@safe_cracking", anim = "idle_base"}}, + } + }, + + { + name = 'attitudem', + label = 'Attitudes', + items = { + {label = "Normal M", type = "attitude", data = {lib = "move_m@confident", anim = "move_m@confident"}}, + {label = "Normal F", type = "attitude", data = {lib = "move_f@heels@c", anim = "move_f@heels@c"}}, + {label = "Depressif", type = "attitude", data = {lib = "move_m@depressed@a", anim = "move_m@depressed@a"}}, + {label = "Depressif F", type = "attitude", data = {lib = "move_f@depressed@a", anim = "move_f@depressed@a"}}, + {label = "Business", type = "attitude", data = {lib = "move_m@business@a", anim = "move_m@business@a"}}, + {label = "Determine", type = "attitude", data = {lib = "move_m@brave@a", anim = "move_m@brave@a"}}, + {label = "Casual", type = "attitude", data = {lib = "move_m@casual@a", anim = "move_m@casual@a"}}, + {label = "Trop mange", type = "attitude", data = {lib = "move_m@fat@a", anim = "move_m@fat@a"}}, + {label = "Hipster", type = "attitude", data = {lib = "move_m@hipster@a", anim = "move_m@hipster@a"}}, + {label = "Blesse", type = "attitude", data = {lib = "move_m@injured", anim = "move_m@injured"}}, + {label = "Intimide", type = "attitude", data = {lib = "move_m@hurry@a", anim = "move_m@hurry@a"}}, + {label = "Hobo", type = "attitude", data = {lib = "move_m@hobo@a", anim = "move_m@hobo@a"}}, + {label = "Malheureux", type = "attitude", data = {lib = "move_m@sad@a", anim = "move_m@sad@a"}}, + {label = "Muscle", type = "attitude", data = {lib = "move_m@muscle@a", anim = "move_m@muscle@a"}}, + {label = "Choc", type = "attitude", data = {lib = "move_m@shocked@a", anim = "move_m@shocked@a"}}, + {label = "Sombre", type = "attitude", data = {lib = "move_m@shadyped@a", anim = "move_m@shadyped@a"}}, + {label = "Fatigue", type = "attitude", data = {lib = "move_m@buzzed", anim = "move_m@buzzed"}}, + {label = "Pressee", type = "attitude", data = {lib = "move_m@hurry_butch@a", anim = "move_m@hurry_butch@a"}}, + {label = "Fier", type = "attitude", data = {lib = "move_m@money", anim = "move_m@money"}}, + {label = "Petite course", type = "attitude", data = {lib = "move_m@quick", anim = "move_m@quick"}}, + {label = "Mangeuse d'homme", type = "attitude", data = {lib = "move_f@maneater", anim = "move_f@maneater"}}, + {label = "Impertinent", type = "attitude", data = {lib = "move_f@sassy", anim = "move_f@sassy"}}, + {label = "Arrogante", type = "attitude", data = {lib = "move_f@arrogant@a", anim = "move_f@arrogant@a"}}, + } + }, + { + name = 'porn', + label = 'PEGI 21', + items = { + {label = "Homme se faire su*** en voiture", type = "anim", data = {lib = "oddjobs@towing", anim = "m_blow_job_loop"}}, + {label = "Femme faire une gaterie en voiture", type = "anim", data = {lib = "oddjobs@towing", anim = "f_blow_job_loop"}}, + {label = "Homme bais** en voiture", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_sex_loop_player"}}, + {label = "Femme bais** en voiture", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_sex_loop_female"}}, + {label = "Se gratter les couilles", type = "anim", data = {lib = "mp_player_int_uppergrab_crotch", anim = "mp_player_int_grab_crotch"}}, + {label = "Faire du charme", type = "anim", data = {lib = "mini@strip_club@idles@stripper", anim = "stripper_idle_02"}}, + {label = "Pose michto", type = "scenario", data = {anim = "WORLD_HUMAN_PROSTITUTE_HIGH_CLASS"}}, + {label = "Montrer sa poitrine", type = "anim", data = {lib = "mini@strip_club@backroom@", anim = "stripper_b_backroom_idle_b"}}, + {label = "Strip Tease 1", type = "anim", data = {lib = "mini@strip_club@lap_dance@ld_girl_a_song_a_p1", anim = "ld_girl_a_song_a_p1_f"}}, + {label = "Strip Tease 2", type = "anim", data = {lib = "mini@strip_club@private_dance@part2", anim = "priv_dance_p2"}}, + {label = "Stip Tease au sol", type = "anim", data = {lib = "mini@strip_club@private_dance@part3", anim = "priv_dance_p3"}}, + } + } +} \ No newline at end of file diff --git a/[esx_addons]/esx_animations/fxmanifest.lua b/[esx_addons]/esx_animations/fxmanifest.lua new file mode 100644 index 00000000..37f03715 --- /dev/null +++ b/[esx_addons]/esx_animations/fxmanifest.lua @@ -0,0 +1,15 @@ +fx_version 'adamant' + +game 'gta5' + +description 'ESX Animations' +lua54 'yes' +version '1.9.0' + +client_scripts { + '@es_extended/imports.lua', + 'config.lua', + 'client/main.lua' +} + +dependency 'es_extended' diff --git a/[esx_addons]/esx_animations/localization/br_config.lua b/[esx_addons]/esx_animations/localization/br_config.lua new file mode 100644 index 00000000..64cff785 --- /dev/null +++ b/[esx_addons]/esx_animations/localization/br_config.lua @@ -0,0 +1,161 @@ +Config = {} + +Config.Animations = { + + { + name = 'festives', + label = 'Festivo', + items = { + {label = "Fumar cigarros", type = "scenario", data = {anim = "WORLD_HUMAN_SMOKING"}}, + {label = "Tocar um instrumento musical", type = "scenario", data = {anim = "WORLD_HUMAN_MUSICIAN"}}, + {label = "DJ", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@dj", anim = "dj"}}, + {label = "Beber", type = "scenario", data = {anim = "WORLD_HUMAN_DRINKING"}}, + {label = "Festa", type = "scenario", data = {anim = "WORLD_HUMAN_PARTYING"}}, + {label = "Tocando um violão imaginário", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@air_guitar", anim = "air_guitar"}}, + {label = "Celebrando", type = "anim", data = {lib = "anim@mp_player_intcelebrationfemale@air_shagging", anim = "air_shagging"}}, + {label = "rock and roll ", type = "anim", data = {lib = "mp_player_int_upperrock", anim = "mp_player_int_rock"}}, + -- {label = "Kouření jointu", type = "scenario", data = {anim = "WORLD_HUMAN_SMOKING_POT"}}, + {label = "Bêbados", type = "anim", data = {lib = "amb@world_human_bum_standing@drunk@idle_a", anim = "idle_a"}}, + {label = "Vômitos no carro", type = "anim", data = {lib = "oddjobs@taxi@tie", anim = "vomit_outside"}}, + } + }, + + { + name = 'greetings', + label = 'Saudações', + items = { + {label = "Saudação", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_hello"}}, + {label = "Aperto de mão", type = "anim", data = {lib = "mp_common", anim = "givetake1_a"}}, + {label = "Aperto de mão 2", type = "anim", data = {lib = "mp_ped_interaction", anim = "handshake_guy_a"}}, + {label = "Abraço gangster", type = "anim", data = {lib = "mp_ped_interaction", anim = "hugs_guy_a"}}, + {label = "Comprimentar", type = "anim", data = {lib = "mp_player_int_uppersalute", anim = "mp_player_int_salute"}}, + } + }, + + { + name = 'work', + label = 'Trabalho', + items = { + {label = "Suspeito: rendição à polícia", type = "anim", data = {lib = "random@arrests@busted", anim = "idle_c"}}, + {label = "Pesca", type = "scenario", data = {anim = "world_human_stand_fishing"}}, + {label = "Polícia: investigação", type = "anim", data = {lib = "amb@code_human_police_investigate@idle_b", anim = "idle_f"}}, + {label = "Polícia: falando no rádio", type = "anim", data = {lib = "random@arrests", anim = "generic_radio_chatter"}}, + {label = "Polícia: gerenciamento de tráfego", type = "scenario", data = {anim = "WORLD_HUMAN_CAR_PARK_ATTENDANT"}}, + {label = "Polícia: binóculos", type = "scenario", data = {anim = "WORLD_HUMAN_BINOCULARS"}}, + {label = "Agricultura: coleta", type = "scenario", data = {anim = "world_human_gardener_plant"}}, + {label = "Mecânico: reparação de motores", type = "anim", data = {lib = "mini@repair", anim = "fixing_a_ped"}}, + {label = "Médico: exame", type = "scenario", data = {anim = "CODE_HUMAN_MEDIC_KNEEL"}}, + {label = "Táxi: conversando com o cliente", type = "anim", data = {lib = "oddjobs@taxi@driver", anim = "leanover_idle"}}, + {label = "Táxi: entregando uma fatura", type = "anim", data = {lib = "oddjobs@taxi@cyi", anim = "std_hand_off_ps_passenger"}}, + {label = "Vendedor: bens de alimentação", type = "anim", data = {lib = "mp_am_hold_up", anim = "purchase_beerbox_shopkeeper"}}, + {label = "Barman: Derramando uma bebida", type = "anim", data = {lib = "mini@drinking", anim = "shots_barman_b"}}, + {label = "Jornalista: sessão de fotos", type = "scenario", data = {anim = "WORLD_HUMAN_PAPARAZZI"}}, + {label = "Outro trabalho: anotando", type = "scenario", data = {anim = "WORLD_HUMAN_CLIPBOARD"}}, + {label = "Outros trabalhos: rosqueamento de martelo", type = "scenario", data = {anim = "WORLD_HUMAN_HAMMERING"}}, + {label = "Hobo: segurando cartazes", type = "scenario", data = {anim = "WORLD_HUMAN_BUM_FREEWAY"}}, + {label = "Hobo: estátuas de imitação", type = "scenario", data = {anim = "WORLD_HUMAN_HUMAN_STATUE"}}, + } + }, + + { + name = 'humors', + label = 'Humor', + items = { + {label = "Aplausos", type = "scenario", data = {anim = "WORLD_HUMAN_CHEERING"}}, + {label = "Super", type = "anim", data = {lib = "mp_action", anim = "thanks_male_06"}}, + {label = "Apontando com o dedo", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_point"}}, + {label = "Vem cá", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_come_here_soft"}}, + {label = "Então, o que houve?", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_bring_it_on"}}, + {label = "Já?", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_me"}}, + {label = "Eu sabia, o inferno", type = "anim", data = {lib = "anim@am_hold_up@male", anim = "shoplift_high"}}, + {label = "Pendurado", type = "scenario", data = {lib = "amb@world_human_jog_standing@male@idle_b", anim = "idle_d"}}, + {label = "Está ferrado", type = "scenario", data = {lib = "amb@world_human_bum_standing@depressed@idle_a", anim = "idle_a"}}, + {label = "Tapa na cara", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@face_palm", anim = "face_palm"}}, + {label = "Acalme-se", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_easy_now"}}, + {label = "O que eu fiz?", type = "anim", data = {lib = "oddjobs@assassinate@multi@", anim = "react_big_variations_a"}}, + {label = "Oh não", type = "anim", data = {lib = "amb@code_human_cower_stand@male@react_cowering", anim = "base_right"}}, + {label = "Batalha?", type = "anim", data = {lib = "anim@deathmatch_intros@unarmed", anim = "intro_male_unarmed_e"}}, + {label = "Isso não é possível!", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_damn"}}, + {label = "Beijo", type = "anim", data = {lib = "mp_ped_interaction", anim = "kisses_guy_a"}}, + {label = "Dar dedo", type = "anim", data = {lib = "mp_player_int_upperfinger", anim = "mp_player_int_finger_01_enter"}}, + {label = "Masturbando", type = "anim", data = {lib = "mp_player_int_upperwank", anim = "mp_player_int_wank_01"}}, + {label = "Bala na cabeça", type = "anim", data = {lib = "mp_suicide", anim = "pistol"}}, + } + }, + + { + name = 'sports', + label = 'Esportes', + items = { + {label = "Mostrando músculos", type = "anim", data = {lib = "amb@world_human_muscle_flex@arms_at_side@base", anim = "base"}}, + {label = "Fortalecimento", type = "anim", data = {lib = "amb@world_human_muscle_free_weights@male@barbell@base", anim = "base"}}, + {label = "Clicando", type = "anim", data = {lib = "amb@world_human_push_ups@male@base", anim = "base"}}, + {label = "Sentar", type = "anim", data = {lib = "amb@world_human_sit_ups@male@base", anim = "base"}}, + {label = "Yoga", type = "anim", data = {lib = "amb@world_human_yoga@male@base", anim = "base_a"}}, + } + }, + + { + name = 'misc', + label = 'Outros', + items = { + {label = "Bebendo café", type = "anim", data = {lib = "amb@world_human_aa_coffee@idle_a", anim = "idle_a"}}, + {label = "Sentado", type = "anim", data = {lib = "anim@heists@prison_heistunfinished_biztarget_idle", anim = "target_idle"}}, + {label = "Encostado em uma parede", type = "scenario", data = {anim = "world_human_leaning"}}, + {label = "Deitado de costas", type = "scenario", data = {anim = "WORLD_HUMAN_SUNBATHE_BACK"}}, + {label = "Deitado de bruços", type = "scenario", data = {anim = "WORLD_HUMAN_SUNBATHE"}}, + {label = "Limpeza", type = "scenario", data = {anim = "world_human_maid_clean"}}, + {label = "Churrasco", type = "scenario", data = {anim = "PROP_HUMAN_BBQ"}}, + {label = "Tour pessoal", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_bj_to_prop_female"}}, + {label = "Tirando uma selfie", type = "scenario", data = {anim = "world_human_tourist_mobile"}}, + {label = "Ouvindo atras da porta", type = "anim", data = {lib = "mini@safe_cracking", anim = "idle_base"}}, + } + }, + + { + name = 'attitudem', + label = 'Atitudes', + items = { + {label = "Homem normal", type = "attitude", data = {lib = "move_m@confident", anim = "move_m@confident"}}, + {label = "Mulher normal", type = "attitude", data = {lib = "move_f@heels@c", anim = "move_f@heels@c"}}, + {label = "Homem deprimido", type = "attitude", data = {lib = "move_m@depressed@a", anim = "move_m@depressed@a"}}, + {label = "Mulher deprimida", type = "attitude", data = {lib = "move_f@depressed@a", anim = "move_f@depressed@a"}}, + {label = "Negócios", type = "attitude", data = {lib = "move_m@business@a", anim = "move_m@business@a"}}, + {label = "Determinado", type = "attitude", data = {lib = "move_m@brave@a", anim = "move_m@brave@a"}}, + {label = "Comum", type = "attitude", data = {lib = "move_m@casual@a", anim = "move_m@casual@a"}}, + {label = "Travessia", type = "attitude", data = {lib = "move_m@fat@a", anim = "move_m@fat@a"}}, + {label = "Hipster", type = "attitude", data = {lib = "move_m@hipster@a", anim = "move_m@hipster@a"}}, + {label = "Lesões", type = "attitude", data = {lib = "move_m@injured", anim = "move_m@injured"}}, + {label = "Pressa", type = "attitude", data = {lib = "move_m@hurry@a", anim = "move_m@hurry@a"}}, + {label = "Sem abrigo", type = "attitude", data = {lib = "move_m@hobo@a", anim = "move_m@hobo@a"}}, + {label = "Triste", type = "attitude", data = {lib = "move_m@sad@a", anim = "move_m@sad@a"}}, + {label = "Muscularidade", type = "attitude", data = {lib = "move_m@muscle@a", anim = "move_m@muscle@a"}}, + {label = "Chocado", type = "attitude", data = {lib = "move_m@shocked@a", anim = "move_m@shocked@a"}}, + {label = "Suspeito", type = "attitude", data = {lib = "move_m@shadyped@a", anim = "move_m@shadyped@a"}}, + {label = "Fadiga", type = "attitude", data = {lib = "move_m@buzzed", anim = "move_m@buzzed"}}, + {label = "Êxito", type = "attitude", data = {lib = "move_m@hurry_butch@a", anim = "move_m@hurry_butch@a"}}, + {label = "Orgulhoso", type = "attitude", data = {lib = "move_m@money", anim = "move_m@money"}}, + {label = "Arrancado", type = "attitude", data = {lib = "move_m@quick", anim = "move_m@quick"}}, + {label = "Gay", type = "attitude", data = {lib = "move_f@maneater", anim = "move_f@maneater"}}, + {label = "Insolência", type = "attitude", data = {lib = "move_f@sassy", anim = "move_f@sassy"}}, + {label = "Arrogância", type = "attitude", data = {lib = "move_f@arrogant@a", anim = "move_f@arrogant@a"}}, + } + }, + { + name = 'porn', + label = 'Sex', + items = { + {label = "Fumar no carro - homem", type = "anim", data = {lib = "oddjobs@towing", anim = "m_blow_job_loop"}}, + {label = "Fumar no carro - mulher", type = "anim", data = {lib = "oddjobs@towing", anim = "f_blow_job_loop"}}, + {label = "Sexo no carro - homem", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_sex_loop_player"}}, + {label = "Sexo no carro - mulher", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_sex_loop_female"}}, + {label = "Raspagem na virilha", type = "anim", data = {lib = "mp_player_int_uppergrab_crotch", anim = "mp_player_int_grab_crotch"}}, + {label = "Prostitutas em pé", type = "anim", data = {lib = "mini@strip_club@idles@stripper", anim = "stripper_idle_02"}}, + {label = "Pose de prostituta", type = "scenario", data = {anim = "WORLD_HUMAN_PROSTITUTE_HIGH_CLASS"}}, + {label = "mostrando o peito", type = "anim", data = {lib = "mini@strip_club@backroom@", anim = "stripper_b_backroom_idle_b"}}, + {label = "Striptease", type = "anim", data = {lib = "mini@strip_club@lap_dance@ld_girl_a_song_a_p1", anim = "ld_girl_a_song_a_p1_f"}}, + {label = "Striptease 2", type = "anim", data = {lib = "mini@strip_club@private_dance@part2", anim = "priv_dance_p2"}}, + {label = "Striptease 3", type = "anim", data = {lib = "mini@strip_club@private_dance@part3", anim = "priv_dance_p3"}}, + } + } +} \ No newline at end of file diff --git a/[esx_addons]/esx_animations/localization/cs_config.lua b/[esx_addons]/esx_animations/localization/cs_config.lua new file mode 100644 index 00000000..74b8e76e --- /dev/null +++ b/[esx_addons]/esx_animations/localization/cs_config.lua @@ -0,0 +1,161 @@ +Config = {} + +Config.Animations = { + + { + name = 'festives', + label = 'Slavnostní', + items = { + {label = "Kouření cigarety", type = "scenario", data = {anim = "WORLD_HUMAN_SMOKING"}}, + {label = "Hraní na hudební nástroj", type = "scenario", data = {anim = "WORLD_HUMAN_MUSICIAN"}}, + {label = "DJ", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@dj", anim = "dj"}}, + {label = "Pití", type = "scenario", data = {anim = "WORLD_HUMAN_DRINKING"}}, + {label = "Párty", type = "scenario", data = {anim = "WORLD_HUMAN_PARTYING"}}, + {label = "Hraní na imaginární kytaru", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@air_guitar", anim = "air_guitar"}}, + {label = "Oslavování", type = "anim", data = {lib = "anim@mp_player_intcelebrationfemale@air_shagging", anim = "air_shagging"}}, + {label = "Rock'n'roll", type = "anim", data = {lib = "mp_player_int_upperrock", anim = "mp_player_int_rock"}}, + -- {label = "Kouření jointu", type = "scenario", data = {anim = "WORLD_HUMAN_SMOKING_POT"}}, + {label = "Ožralecké balancování", type = "anim", data = {lib = "amb@world_human_bum_standing@drunk@idle_a", anim = "idle_a"}}, + {label = "Zvracení v autě", type = "anim", data = {lib = "oddjobs@taxi@tie", anim = "vomit_outside"}}, + } + }, + + { + name = 'greetings', + label = 'Pozdravy', + items = { + {label = "Pozdrav", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_hello"}}, + {label = "Podání ruky", type = "anim", data = {lib = "mp_common", anim = "givetake1_a"}}, + {label = "Podání ruky 2", type = "anim", data = {lib = "mp_ped_interaction", anim = "handshake_guy_a"}}, + {label = "Gangsterské objetí", type = "anim", data = {lib = "mp_ped_interaction", anim = "hugs_guy_a"}}, + {label = "Salutování", type = "anim", data = {lib = "mp_player_int_uppersalute", anim = "mp_player_int_salute"}}, + } + }, + + { + name = 'work', + label = 'Práce', + items = { + {label = "Podezřelý: vzdání se policii", type = "anim", data = {lib = "random@arrests@busted", anim = "idle_c"}}, + {label = "Rybaření", type = "scenario", data = {anim = "world_human_stand_fishing"}}, + {label = "Policie: vyšetřování", type = "anim", data = {lib = "amb@code_human_police_investigate@idle_b", anim = "idle_f"}}, + {label = "Policie: mluvení do vysílačky", type = "anim", data = {lib = "random@arrests", anim = "generic_radio_chatter"}}, + {label = "Policie: řízení dopravy", type = "scenario", data = {anim = "WORLD_HUMAN_CAR_PARK_ATTENDANT"}}, + {label = "Policie: dalekohled", type = "scenario", data = {anim = "WORLD_HUMAN_BINOCULARS"}}, + {label = "Zemědělství: sbírání", type = "scenario", data = {anim = "world_human_gardener_plant"}}, + {label = "Mechanik: oprava motoru", type = "anim", data = {lib = "mini@repair", anim = "fixing_a_ped"}}, + {label = "Lékař: prohlídka", type = "scenario", data = {anim = "CODE_HUMAN_MEDIC_KNEEL"}}, + {label = "Taxi: mluvení k zákazníkovi", type = "anim", data = {lib = "oddjobs@taxi@driver", anim = "leanover_idle"}}, + {label = "Taxi: dávání faktury", type = "anim", data = {lib = "oddjobs@taxi@cyi", anim = "std_hand_off_ps_passenger"}}, + {label = "Prodavač: podávání zboží", type = "anim", data = {lib = "mp_am_hold_up", anim = "purchase_beerbox_shopkeeper"}}, + {label = "Barman: nalití panáka", type = "anim", data = {lib = "mini@drinking", anim = "shots_barman_b"}}, + {label = "Novinář: focení", type = "scenario", data = {anim = "WORLD_HUMAN_PAPARAZZI"}}, + {label = "Jiná práce: zapisování poznámek", type = "scenario", data = {anim = "WORLD_HUMAN_CLIPBOARD"}}, + {label = "Jiná práce: ťukání kladivem", type = "scenario", data = {anim = "WORLD_HUMAN_HAMMERING"}}, + {label = "Tulák: držení cedule", type = "scenario", data = {anim = "WORLD_HUMAN_BUM_FREEWAY"}}, + {label = "Tulák: imitace sochy", type = "scenario", data = {anim = "WORLD_HUMAN_HUMAN_STATUE"}}, + } + }, + + { + name = 'humors', + label = 'Nálady', + items = { + {label = "Potlesk", type = "scenario", data = {anim = "WORLD_HUMAN_CHEERING"}}, + {label = "Super", type = "anim", data = {lib = "mp_action", anim = "thanks_male_06"}}, + {label = "Ukázání prstem", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_point"}}, + {label = "Pojď sem", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_come_here_soft"}}, + {label = "Tak co je?", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_bring_it_on"}}, + {label = "Já?", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_me"}}, + {label = "Já to věděl sakra", type = "anim", data = {lib = "anim@am_hold_up@male", anim = "shoplift_high"}}, + {label = "Postávání", type = "scenario", data = {lib = "amb@world_human_jog_standing@male@idle_b", anim = "idle_d"}}, + {label = "Je to v háji", type = "scenario", data = {lib = "amb@world_human_bum_standing@depressed@idle_a", anim = "idle_a"}}, + {label = "Facepalm", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@face_palm", anim = "face_palm"}}, + {label = "Klídek", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_easy_now"}}, + {label = "Co jsem to udělal?", type = "anim", data = {lib = "oddjobs@assassinate@multi@", anim = "react_big_variations_a"}}, + {label = "Oh ne", type = "anim", data = {lib = "amb@code_human_cower_stand@male@react_cowering", anim = "base_right"}}, + {label = "Bitka?", type = "anim", data = {lib = "anim@deathmatch_intros@unarmed", anim = "intro_male_unarmed_e"}}, + {label = "To snad není možné!", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_damn"}}, + {label = "Polibek", type = "anim", data = {lib = "mp_ped_interaction", anim = "kisses_guy_a"}}, + {label = "Fakování", type = "anim", data = {lib = "mp_player_int_upperfinger", anim = "mp_player_int_finger_01_enter"}}, + {label = "Onanování", type = "anim", data = {lib = "mp_player_int_upperwank", anim = "mp_player_int_wank_01"}}, + {label = "Kulka do hlavy", type = "anim", data = {lib = "mp_suicide", anim = "pistol"}}, + } + }, + + { + name = 'sports', + label = 'Sporty', + items = { + {label = "Ukázání svalů", type = "anim", data = {lib = "amb@world_human_muscle_flex@arms_at_side@base", anim = "base"}}, + {label = "Posilování", type = "anim", data = {lib = "amb@world_human_muscle_free_weights@male@barbell@base", anim = "base"}}, + {label = "Klikování", type = "anim", data = {lib = "amb@world_human_push_ups@male@base", anim = "base"}}, + {label = "Sedy lehy", type = "anim", data = {lib = "amb@world_human_sit_ups@male@base", anim = "base"}}, + {label = "Jóga", type = "anim", data = {lib = "amb@world_human_yoga@male@base", anim = "base_a"}}, + } + }, + + { + name = 'misc', + label = 'Ostatní', + items = { + {label = "Pití kávy", type = "anim", data = {lib = "amb@world_human_aa_coffee@idle_a", anim = "idle_a"}}, + {label = "Sedění", type = "anim", data = {lib = "anim@heists@prison_heistunfinished_biztarget_idle", anim = "target_idle"}}, + {label = "Opření o zeď", type = "scenario", data = {anim = "world_human_leaning"}}, + {label = "Ležení na zádech", type = "scenario", data = {anim = "WORLD_HUMAN_SUNBATHE_BACK"}}, + {label = "Ležení na břiše", type = "scenario", data = {anim = "WORLD_HUMAN_SUNBATHE"}}, + {label = "Uklízení", type = "scenario", data = {anim = "world_human_maid_clean"}}, + {label = "Grilování", type = "scenario", data = {anim = "PROP_HUMAN_BBQ"}}, + {label = "Osobní prohlídka", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_bj_to_prop_female"}}, + {label = "Focení selfie", type = "scenario", data = {anim = "world_human_tourist_mobile"}}, + {label = "Poslouchání u dveří", type = "anim", data = {lib = "mini@safe_cracking", anim = "idle_base"}}, + } + }, + + { + name = 'attitudem', + label = 'Postoje', + items = { + {label = "Normální muž", type = "attitude", data = {lib = "move_m@confident", anim = "move_m@confident"}}, + {label = "Normální žena", type = "attitude", data = {lib = "move_f@heels@c", anim = "move_f@heels@c"}}, + {label = "Deprese muž", type = "attitude", data = {lib = "move_m@depressed@a", anim = "move_m@depressed@a"}}, + {label = "Deprese žena", type = "attitude", data = {lib = "move_f@depressed@a", anim = "move_f@depressed@a"}}, + {label = "Business", type = "attitude", data = {lib = "move_m@business@a", anim = "move_m@business@a"}}, + {label = "Odhodlaný", type = "attitude", data = {lib = "move_m@brave@a", anim = "move_m@brave@a"}}, + {label = "Běžný", type = "attitude", data = {lib = "move_m@casual@a", anim = "move_m@casual@a"}}, + {label = "Přejezení", type = "attitude", data = {lib = "move_m@fat@a", anim = "move_m@fat@a"}}, + {label = "Hipster", type = "attitude", data = {lib = "move_m@hipster@a", anim = "move_m@hipster@a"}}, + {label = "Zranění", type = "attitude", data = {lib = "move_m@injured", anim = "move_m@injured"}}, + {label = "Pospíchání", type = "attitude", data = {lib = "move_m@hurry@a", anim = "move_m@hurry@a"}}, + {label = "Bezdomovec", type = "attitude", data = {lib = "move_m@hobo@a", anim = "move_m@hobo@a"}}, + {label = "Smutný", type = "attitude", data = {lib = "move_m@sad@a", anim = "move_m@sad@a"}}, + {label = "Svalnatost", type = "attitude", data = {lib = "move_m@muscle@a", anim = "move_m@muscle@a"}}, + {label = "Šokovaný", type = "attitude", data = {lib = "move_m@shocked@a", anim = "move_m@shocked@a"}}, + {label = "Podezřelý", type = "attitude", data = {lib = "move_m@shadyped@a", anim = "move_m@shadyped@a"}}, + {label = "Únava", type = "attitude", data = {lib = "move_m@buzzed", anim = "move_m@buzzed"}}, + {label = "Uspěchanost", type = "attitude", data = {lib = "move_m@hurry_butch@a", anim = "move_m@hurry_butch@a"}}, + {label = "Pyšný", type = "attitude", data = {lib = "move_m@money", anim = "move_m@money"}}, + {label = "Sprint", type = "attitude", data = {lib = "move_m@quick", anim = "move_m@quick"}}, + {label = "Gay", type = "attitude", data = {lib = "move_f@maneater", anim = "move_f@maneater"}}, + {label = "Drzost", type = "attitude", data = {lib = "move_f@sassy", anim = "move_f@sassy"}}, + {label = "Arogance", type = "attitude", data = {lib = "move_f@arrogant@a", anim = "move_f@arrogant@a"}}, + } + }, + { + name = 'porn', + label = 'Sex', + items = { + {label = "Kouření v autě - muž", type = "anim", data = {lib = "oddjobs@towing", anim = "m_blow_job_loop"}}, + {label = "Kouření v autě - žena", type = "anim", data = {lib = "oddjobs@towing", anim = "f_blow_job_loop"}}, + {label = "Sex v autě - muž", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_sex_loop_player"}}, + {label = "Sex v autě - žena", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_sex_loop_female"}}, + {label = "Škrabání v rozkroku", type = "anim", data = {lib = "mp_player_int_uppergrab_crotch", anim = "mp_player_int_grab_crotch"}}, + {label = "Stání prostitutky", type = "anim", data = {lib = "mini@strip_club@idles@stripper", anim = "stripper_idle_02"}}, + {label = "Póza prostitutky", type = "scenario", data = {anim = "WORLD_HUMAN_PROSTITUTE_HIGH_CLASS"}}, + {label = "Ukázání prsou", type = "anim", data = {lib = "mini@strip_club@backroom@", anim = "stripper_b_backroom_idle_b"}}, + {label = "Striptýz", type = "anim", data = {lib = "mini@strip_club@lap_dance@ld_girl_a_song_a_p1", anim = "ld_girl_a_song_a_p1_f"}}, + {label = "Striptýz 2", type = "anim", data = {lib = "mini@strip_club@private_dance@part2", anim = "priv_dance_p2"}}, + {label = "Striptýz 3", type = "anim", data = {lib = "mini@strip_club@private_dance@part3", anim = "priv_dance_p3"}}, + } + } +} \ No newline at end of file diff --git a/[esx_addons]/esx_animations/localization/en_config.lua b/[esx_addons]/esx_animations/localization/en_config.lua new file mode 100644 index 00000000..34f3019a --- /dev/null +++ b/[esx_addons]/esx_animations/localization/en_config.lua @@ -0,0 +1,162 @@ +Config = {} + +Config.Animations = { + + { + name = 'festives', + label = 'Festive', + items = { + {label = "Smoke", type = "scenario", data = {anim = "WORLD_HUMAN_SMOKING"}}, + {label = "Musician", type = "scenario", data = {anim = "WORLD_HUMAN_MUSICIAN"}}, + {label = "Dj", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@dj", anim = "dj"}}, + {label = "Coffee", type = "scenario", data = {anim = "WORLD_HUMAN_DRINKING"}}, + {label = "Beer", type = "scenario", data = {anim = "WORLD_HUMAN_PARTYING"}}, + {label = "Air Guitar", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@air_guitar", anim = "air_guitar"}}, + {label = "Air Shagging", type = "anim", data = {lib = "anim@mp_player_intcelebrationfemale@air_shagging", anim = "air_shagging"}}, + {label = "Rock'n'roll", type = "anim", data = {lib = "mp_player_int_upperrock", anim = "mp_player_int_rock"}}, + -- {label = "Fumer un joint", type = "scenario", data = {anim = "WORLD_HUMAN_SMOKING_POT"}}, + {label = "Drunk Standing", type = "anim", data = {lib = "amb@world_human_bum_standing@drunk@idle_a", anim = "idle_a"}}, + {label = "Vomiting", type = "anim", data = {lib = "oddjobs@taxi@tie", anim = "vomit_outside"}}, + } + }, + + { + name = 'greetings', + label = 'Greetings', + items = { + {label = "Hello", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_hello"}}, + {label = "Wave", type = "anim", data = {lib = "mp_common", anim = "givetake1_a"}}, + {label = "Handshake", type = "anim", data = {lib = "mp_ped_interaction", anim = "handshake_guy_a"}}, + {label = "Hugging", type = "anim", data = {lib = "mp_ped_interaction", anim = "hugs_guy_a"}}, + {label = "Salute", type = "anim", data = {lib = "mp_player_int_uppersalute", anim = "mp_player_int_salute"}}, + } + }, + + { + name = 'work', + label = 'Job', + items = { + {label = "Suspect : Surrender", type = "anim", data = {lib = "random@arrests@busted", anim = "idle_c"}}, + {label = "Fishing", type = "scenario", data = {anim = "world_human_stand_fishing"}}, + {label = "Police : Investigate", type = "anim", data = {lib = "amb@code_human_police_investigate@idle_b", anim = "idle_f"}}, + {label = "Police : Use Radio", type = "anim", data = {lib = "random@arrests", anim = "generic_radio_chatter"}}, + {label = "Police : Traffic", type = "scenario", data = {anim = "WORLD_HUMAN_CAR_PARK_ATTENDANT"}}, + {label = "Police : Binoculars", type = "scenario", data = {anim = "WORLD_HUMAN_BINOCULARS"}}, + {label = "Agriculture : Planting", type = "scenario", data = {anim = "world_human_gardener_plant"}}, + {label = "Mechanic : Fixing Motor", type = "anim", data = {lib = "mini@repair", anim = "fixing_a_ped"}}, + {label = "Medic : Kneel", type = "scenario", data = {anim = "CODE_HUMAN_MEDIC_KNEEL"}}, + {label = "Taxi : Talk to customer", type = "anim", data = {lib = "oddjobs@taxi@driver", anim = "leanover_idle"}}, + {label = "Taxi : Give bill", type = "anim", data = {lib = "oddjobs@taxi@cyi", anim = "std_hand_off_ps_passenger"}}, + {label = "Grocer : Give", type = "anim", data = {lib = "mp_am_hold_up", anim = "purchase_beerbox_shopkeeper"}}, + {label = "Barman : Serve Shot", type = "anim", data = {lib = "mini@drinking", anim = "shots_barman_b"}}, + {label = "Journalist : Take Photos", type = "scenario", data = {anim = "WORLD_HUMAN_PAPARAZZI"}}, + {label = "All Jobs : Clipboard", type = "scenario", data = {anim = "WORLD_HUMAN_CLIPBOARD"}}, + {label = "All Jobs : Hammering", type = "scenario", data = {anim = "WORLD_HUMAN_HAMMERING"}}, + {label = "Bum : Holding Sign", type = "scenario", data = {anim = "WORLD_HUMAN_BUM_FREEWAY"}}, + {label = "Bum : Human Statue", type = "scenario", data = {anim = "WORLD_HUMAN_HUMAN_STATUE"}}, + } + }, + + { + name = 'humors', + label = 'Fun', + items = { + {label = "Cheering", type = "scenario", data = {anim = "WORLD_HUMAN_CHEERING"}}, + {label = "Super", type = "anim", data = {lib = "mp_action", anim = "thanks_male_06"}}, + {label = "Point", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_point"}}, + {label = "Come here", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_come_here_soft"}}, + {label = "Bring it on", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_bring_it_on"}}, + {label = "Me", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_me"}}, + {label = "I knew it", type = "anim", data = {lib = "anim@am_hold_up@male", anim = "shoplift_high"}}, + {label = "Exhausted", type = "scenario", data = {lib = "amb@world_human_jog_standing@male@idle_b", anim = "idle_d"}}, + {label = "I'm the shit", type = "scenario", data = {lib = "amb@world_human_bum_standing@depressed@idle_a", anim = "idle_a"}}, + {label = "Facepalm", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@face_palm", anim = "face_palm"}}, + {label = "Calm down ", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_easy_now"}}, + {label = "What did I do?", type = "anim", data = {lib = "oddjobs@assassinate@multi@", anim = "react_big_variations_a"}}, + {label = "Fear", type = "anim", data = {lib = "amb@code_human_cower_stand@male@react_cowering", anim = "base_right"}}, + {label = "Fight ?", type = "anim", data = {lib = "anim@deathmatch_intros@unarmed", anim = "intro_male_unarmed_e"}}, + {label = "It's not possible !", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_damn"}}, + {label = "Embrace", type = "anim", data = {lib = "mp_ped_interaction", anim = "kisses_guy_a"}}, + {label = "Finger of honor", type = "anim", data = {lib = "mp_player_int_upperfinger", anim = "mp_player_int_finger_01_enter"}}, + {label = "You wanker", type = "anim", data = {lib = "mp_player_int_upperwank", anim = "mp_player_int_wank_01"}}, + {label = "Bullet in the head", type = "anim", data = {lib = "mp_suicide", anim = "pistol"}}, + } + }, + + { + name = 'sports', + label = 'Sports', + items = { + {label = "Flex muscles", type = "anim", data = {lib = "amb@world_human_muscle_flex@arms_at_side@base", anim = "base"}}, + {label = "Lift weights", type = "anim", data = {lib = "amb@world_human_muscle_free_weights@male@barbell@base", anim = "base"}}, + {label = "Do push ups", type = "anim", data = {lib = "amb@world_human_push_ups@male@base", anim = "base"}}, + {label = "Do sit ups", type = "anim", data = {lib = "amb@world_human_sit_ups@male@base", anim = "base"}}, + {label = "Do yoga", type = "anim", data = {lib = "amb@world_human_yoga@male@base", anim = "base_a"}}, + } + }, + + { + name = 'misc', + label = 'Divers', + items = { + {label = "Drink coffee", type = "anim", data = {lib = "amb@world_human_aa_coffee@idle_a", anim = "idle_a"}}, + {label = "Sit", type = "anim", data = {lib = "anim@heists@prison_heistunfinished_biztarget_idle", anim = "target_idle"}}, + {label = "Lean against wall", type = "scenario", data = {anim = "world_human_leaning"}}, + {label = "Sunbathe Back", type = "scenario", data = {anim = "WORLD_HUMAN_SUNBATHE_BACK"}}, + {label = "Sunbathe Front", type = "scenario", data = {anim = "WORLD_HUMAN_SUNBATHE"}}, + {label = "Clean", type = "scenario", data = {anim = "world_human_maid_clean"}}, + {label = "BBQ", type = "scenario", data = {anim = "PROP_HUMAN_BBQ"}}, + {label = "Search", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_bj_to_prop_female"}}, + {label = "Take selfie", type = "scenario", data = {anim = "world_human_tourist_mobile"}}, + {label = "Listen to wall/door", type = "anim", data = {lib = "mini@safe_cracking", anim = "idle_base"}}, + } + }, + + { + name = 'attitudem', + label = 'Walking Styles', + items = { + {label = "Normal M", type = "attitude", data = {lib = "move_m@confident", anim = "move_m@confident"}}, + {label = "Normal F", type = "attitude", data = {lib = "move_f@heels@c", anim = "move_f@heels@c"}}, + {label = "Depressed male", type = "attitude", data = {lib = "move_m@depressed@a", anim = "move_m@depressed@a"}}, + {label = "Depressed female", type = "attitude", data = {lib = "move_f@depressed@a", anim = "move_f@depressed@a"}}, + {label = "Business", type = "attitude", data = {lib = "move_m@business@a", anim = "move_m@business@a"}}, + {label = "Determined", type = "attitude", data = {lib = "move_m@brave@a", anim = "move_m@brave@a"}}, + {label = "Casual", type = "attitude", data = {lib = "move_m@casual@a", anim = "move_m@casual@a"}}, + {label = "Ate too much", type = "attitude", data = {lib = "move_m@fat@a", anim = "move_m@fat@a"}}, + {label = "Hipster", type = "attitude", data = {lib = "move_m@hipster@a", anim = "move_m@hipster@a"}}, + {label = "Injured", type = "attitude", data = {lib = "move_m@injured", anim = "move_m@injured"}}, + {label = "In a hurry", type = "attitude", data = {lib = "move_m@hurry@a", anim = "move_m@hurry@a"}}, + {label = "Hobo", type = "attitude", data = {lib = "move_m@hobo@a", anim = "move_m@hobo@a"}}, + {label = "sad", type = "attitude", data = {lib = "move_m@sad@a", anim = "move_m@sad@a"}}, + {label = "Muscle", type = "attitude", data = {lib = "move_m@muscle@a", anim = "move_m@muscle@a"}}, + {label = "Shocked", type = "attitude", data = {lib = "move_m@shocked@a", anim = "move_m@shocked@a"}}, + {label = "Being shady", type = "attitude", data = {lib = "move_m@shadyped@a", anim = "move_m@shadyped@a"}}, + {label = "Buzzed", type = "attitude", data = {lib = "move_m@buzzed", anim = "move_m@buzzed"}}, + {label = "Hurry", type = "attitude", data = {lib = "move_m@hurry_butch@a", anim = "move_m@hurry_butch@a"}}, + {label = "Proud", type = "attitude", data = {lib = "move_m@money", anim = "move_m@money"}}, + {label = "Short race", type = "attitude", data = {lib = "move_m@quick", anim = "move_m@quick"}}, + {label = "Man eater", type = "attitude", data = {lib = "move_f@maneater", anim = "move_f@maneater"}}, + {label = "Sassy", type = "attitude", data = {lib = "move_f@sassy", anim = "move_f@sassy"}}, + {label = "Arrogant", type = "attitude", data = {lib = "move_f@arrogant@a", anim = "move_f@arrogant@a"}}, + } + }, + { + name = 'porn', + label = 'NSFW', + items = { + {label = "Man receiving in car", type = "anim", data = {lib = "oddjobs@towing", anim = "m_blow_job_loop"}}, + {label = "Woman giving in car", type = "anim", data = {lib = "oddjobs@towing", anim = "f_blow_job_loop"}}, + {label = "Man on bottom in car", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_sex_loop_player"}}, + {label = "Woman on top in car", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_sex_loop_female"}}, + {label = "Scratch nuts", type = "anim", data = {lib = "mp_player_int_uppergrab_crotch", anim = "mp_player_int_grab_crotch"}}, + {label = "Hooker 1", type = "anim", data = {lib = "mini@strip_club@idles@stripper", anim = "stripper_idle_02"}}, + {label = "Hooker 2", type = "scenario", data = {anim = "WORLD_HUMAN_PROSTITUTE_HIGH_CLASS"}}, + {label = "Hooker 3", type = "anim", data = {lib = "mini@strip_club@backroom@", anim = "stripper_b_backroom_idle_b"}}, + {label = "Strip Tease 1", type = "anim", data = {lib = "mini@strip_club@lap_dance@ld_girl_a_song_a_p1", anim = "ld_girl_a_song_a_p1_f"}}, + {label = "Strip Tease 2", type = "anim", data = {lib = "mini@strip_club@private_dance@part2", anim = "priv_dance_p2"}}, + {label = "Stip Tease On Knees", type = "anim", data = {lib = "mini@strip_club@private_dance@part3", anim = "priv_dance_p3"}}, + } + }, + +} \ No newline at end of file diff --git a/[esx_addons]/esx_animations/localization/fi_config.lua b/[esx_addons]/esx_animations/localization/fi_config.lua new file mode 100644 index 00000000..84cdada3 --- /dev/null +++ b/[esx_addons]/esx_animations/localization/fi_config.lua @@ -0,0 +1,164 @@ +Config = {} + +Config.Animations = { + + { + name = 'festives', + label = 'Juhlalliset', + items = { + --{label = "Polta tupakkia", type = "scenario", data = {anim = "WORLD_HUMAN_SMOKING"}}, + {label = "Soita musiikkia", type = "scenario", data = {anim = "WORLD_HUMAN_MUSICIAN"}}, + {label = "Tiskijukka", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@dj", anim = "dj"}}, + {label = "Juo olutta", type = "scenario", data = {anim = "WORLD_HUMAN_DRINKING"}}, + {label = "Biletä", type = "scenario", data = {anim = "WORLD_HUMAN_PARTYING"}}, + {label = "Ilmakitara", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@air_guitar", anim = "air_guitar"}}, + {label = "Humppaa ilmaa", type = "anim", data = {lib = "anim@mp_player_intcelebrationfemale@air_shagging", anim = "air_shagging"}}, + {label = "Rock'n'roll", type = "anim", data = {lib = "mp_player_int_upperrock", anim = "mp_player_int_rock"}}, + -- {label = "Polta pilveä", type = "scenario", data = {anim = "WORLD_HUMAN_SMOKING_POT"}}, + {label = "Humala idle", type = "anim", data = {lib = "amb@world_human_bum_standing@drunk@idle_a", anim = "idle_a"}}, + {label = "Oksenna ulos(auto,vänkäri)", type = "anim", data = {lib = "oddjobs@taxi@tie", anim = "vomit_outside"}}, + {label = "Herää darrasta ja oksenna", type = "anim", data = {lib = "missfam5_blackout", anim = "vomit"}}, + {label = "Oksenna seisoalteen(nojaten)", type = "anim", data = {lib = "missheistpaletoscore1leadinout", anim = "trv_puking_leadout"}}, + } + }, + + { + name = 'greetings', + label = 'Tervehdykset', + items = { + {label = "Tervehdi", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_hello"}}, + {label = "Kättele", type = "anim", data = {lib = "mp_common", anim = "givetake1_a"}}, + {label = "Kättele 2", type = "anim", data = {lib = "mp_ped_interaction", anim = "handshake_guy_a"}}, + {label = "Gangi tervehdys", type = "anim", data = {lib = "mp_ped_interaction", anim = "hugs_guy_a"}}, + {label = "Käsi lipalle", type = "anim", data = {lib = "mp_player_int_uppersalute", anim = "mp_player_int_salute"}}, + } + }, + + { + name = 'work', + label = 'Työ', + items = { + {label = "Epäilty : mene polville", type = "anim", data = {lib = "random@arrests@busted", anim = "idle_c"}}, + {label = "Kalasta", type = "scenario", data = {anim = "world_human_stand_fishing"}}, + {label = "Poliisi : tutki rikospaikkaa", type = "anim", data = {lib = "amb@code_human_police_investigate@idle_b", anim = "idle_f"}}, + {label = "Poliisi : puhu radioon", type = "anim", data = {lib = "random@arrests", anim = "generic_radio_chatter"}}, + {label = "Poliisi : ohjaa liikenettä", type = "scenario", data = {anim = "WORLD_HUMAN_CAR_PARK_ATTENDANT"}}, + {label = "Poliisi : kiikaroi", type = "scenario", data = {anim = "WORLD_HUMAN_BINOCULARS"}}, + {label = "Istuta", type = "scenario", data = {anim = "world_human_gardener_plant"}}, + {label = "Mekaanikko : Korjaa moottoria", type = "anim", data = {lib = "mini@repair", anim = "fixing_a_ped"}}, + {label = "Mekaanikko : Hitsaa", type = "scenario", data = {anim = "WORLD_HUMAN_WELDING"}}, + {label = "EMS : tutki", type = "scenario", data = {anim = "CODE_HUMAN_MEDIC_KNEEL"}}, + {label = "Taxi : Puhu asiakkalle", type = "anim", data = {lib = "oddjobs@taxi@driver", anim = "leanover_idle"}}, + {label = "Taxi : Anna lasku", type = "anim", data = {lib = "oddjobs@taxi@cyi", anim = "std_hand_off_ps_passenger"}}, + {label = "Myyjä : Siirrä laatikoita", type = "anim", data = {lib = "mp_am_hold_up", anim = "purchase_beerbox_shopkeeper"}}, + {label = "Baarimikko : Kaada shotti", type = "anim", data = {lib = "mini@drinking", anim = "shots_barman_b"}}, + {label = "Journalisti : Ota valokuvia", type = "scenario", data = {anim = "WORLD_HUMAN_PAPARAZZI"}}, + {label = "Muut työt : Katsele muistiinpanoja", type = "scenario", data = {anim = "WORLD_HUMAN_CLIPBOARD"}}, + {label = "Muut Työt : Vasaroi", type = "scenario", data = {anim = "WORLD_HUMAN_HAMMERING"}}, + {label = "Pummi : Näytä kylttiä", type = "scenario", data = {anim = "WORLD_HUMAN_BUM_FREEWAY"}}, + {label = "Pummi : Ole patsas", type = "scenario", data = {anim = "WORLD_HUMAN_HUMAN_STATUE"}}, + } + }, + + { + name = 'humors', + label = 'Humoristiset', + items = { + {label = "Taputa", type = "scenario", data = {anim = "WORLD_HUMAN_CHEERING"}}, + {label = "Peukut", type = "anim", data = {lib = "mp_action", anim = "thanks_male_06"}}, + {label = "Osota", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_point"}}, + {label = "Tuu tänne", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_come_here_soft"}}, + {label = "Haasta riitaa", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_bring_it_on"}}, + {label = "minä", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_me"}}, + {label = "varasta, ylähylly", type = "anim", data = {lib = "anim@am_hold_up@male", anim = "shoplift_high"}}, + {label = "Hengästynyt", type = "scenario", data = {lib = "amb@world_human_jog_standing@male@idle_b", anim = "idle_d"}}, + {label = "Facepalm", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@face_palm", anim = "face_palm"}}, + {label = "Rauhoittele", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_easy_now"}}, + {label = "Pelästy", type = "anim", data = {lib = "oddjobs@assassinate@multi@", anim = "react_big_variations_a"}}, + {label = "Pelkää", type = "anim", data = {lib = "amb@code_human_cower_stand@male@react_cowering", anim = "base_right"}}, + {label = "Valmistu tappelluun", type = "anim", data = {lib = "anim@deathmatch_intros@unarmed", anim = "intro_male_unarmed_e"}}, + {label = "Voi rähmä!", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_damn"}}, + {label = "Suutele", type = "anim", data = {lib = "mp_ped_interaction", anim = "kisses_guy_a"}}, + {label = "Keskisormet", type = "anim", data = {lib = "mp_player_int_upperfinger", anim = "mp_player_int_finger_01_enter"}}, + {label = "Runkkaa", type = "anim", data = {lib = "mp_player_int_upperwank", anim = "mp_player_int_wank_01"}}, + {label = "Ammu itseä päähän", type = "anim", data = {lib = "mp_suicide", anim = "pistol"}}, + } + }, + + { + name = 'sports', + label = 'Sporttiset', + items = { + {label = "Esittele lihaksia", type = "anim", data = {lib = "amb@world_human_muscle_flex@arms_at_side@base", anim = "base"}}, + {label = "Nostele painoja", type = "anim", data = {lib = "amb@world_human_muscle_free_weights@male@barbell@base", anim = "base"}}, + {label = "Punnerra", type = "anim", data = {lib = "amb@world_human_push_ups@male@base", anim = "base"}}, + {label = "Tee vatsalihaksia", type = "anim", data = {lib = "amb@world_human_sit_ups@male@base", anim = "base"}}, + {label = "Yoogaa", type = "anim", data = {lib = "amb@world_human_yoga@male@base", anim = "base_a"}}, + } + }, + + { + name = 'misc', + label = 'Muut', + items = { + {label = "Juo kahvia", type = "anim", data = {lib = "amb@world_human_aa_coffee@idle_a", anim = "idle_a"}}, + {label = "Istua", type = "anim", data = {lib = "anim@heists@prison_heistunfinished_biztarget_idle", anim = "target_idle"}}, + {label = "Nojaa taakse", type = "scenario", data = {anim = "world_human_leaning"}}, + {label = "Ota aurinkoa selällään", type = "scenario", data = {anim = "WORLD_HUMAN_SUNBATHE_BACK"}}, + {label = "Ota aurinkoa mahallaan", type = "scenario", data = {anim = "WORLD_HUMAN_SUNBATHE"}}, + {label = "Pese", type = "scenario", data = {anim = "world_human_maid_clean"}}, + {label = "Grillaa", type = "scenario", data = {anim = "PROP_HUMAN_BBQ"}}, + {label = "T-pose", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_bj_to_prop_female"}}, + {label = "Ota selfie", type = "scenario", data = {anim = "world_human_tourist_mobile"}}, + {label = "Kuuntele ovea", type = "anim", data = {lib = "mini@safe_cracking", anim = "idle_base"}}, + } + }, + + { + name = 'attitudem', + label = 'Asenteet', + items = { + {label = "Normaali M", type = "attitude", data = {lib = "move_m@confident", anim = "move_m@confident"}}, + {label = "Normaali N", type = "attitude", data = {lib = "move_f@heels@c", anim = "move_f@heels@c"}}, + {label = "Masentunut M", type = "attitude", data = {lib = "move_m@depressed@a", anim = "move_m@depressed@a"}}, + {label = "Masentunut N", type = "attitude", data = {lib = "move_f@depressed@a", anim = "move_f@depressed@a"}}, + {label = "Varakas", type = "attitude", data = {lib = "move_m@business@a", anim = "move_m@business@a"}}, + {label = "Rohkea", type = "attitude", data = {lib = "move_m@brave@a", anim = "move_m@brave@a"}}, + {label = "Filthy Kasuaali", type = "attitude", data = {lib = "move_m@casual@a", anim = "move_m@casual@a"}}, + {label = "Vitun Läski", type = "attitude", data = {lib = "move_m@fat@a", anim = "move_m@fat@a"}}, + {label = "Hipsteri", type = "attitude", data = {lib = "move_m@hipster@a", anim = "move_m@hipster@a"}}, + {label = "Loukkaantunut", type = "attitude", data = {lib = "move_m@injured", anim = "move_m@injured"}}, + {label = "Kiireinen", type = "attitude", data = {lib = "move_m@hurry@a", anim = "move_m@hurry@a"}}, + {label = "Pummi", type = "attitude", data = {lib = "move_m@hobo@a", anim = "move_m@hobo@a"}}, + {label = "Surullinen", type = "attitude", data = {lib = "move_m@sad@a", anim = "move_m@sad@a"}}, + {label = "Lihaksikas", type = "attitude", data = {lib = "move_m@muscle@a", anim = "move_m@muscle@a"}}, + {label = "Järkyttynyt", type = "attitude", data = {lib = "move_m@shocked@a", anim = "move_m@shocked@a"}}, + {label = "Kovis", type = "attitude", data = {lib = "move_m@shadyped@a", anim = "move_m@shadyped@a"}}, + {label = "Väsynyt", type = "attitude", data = {lib = "move_m@buzzed", anim = "move_m@buzzed"}}, + {label = "Kiirreellisempi", type = "attitude", data = {lib = "move_m@hurry_butch@a", anim = "move_m@hurry_butch@a"}}, + {label = "Ylpeä", type = "attitude", data = {lib = "move_m@money", anim = "move_m@money"}}, + {label = "Lyhyen kilpailun juoksija", type = "attitude", data = {lib = "move_m@quick", anim = "move_m@quick"}}, + {label = "Miesten hurmaaja", type = "attitude", data = {lib = "move_f@maneater", anim = "move_f@maneater"}}, + {label = "Nenäkäs", type = "attitude", data = {lib = "move_f@sassy", anim = "move_f@sassy"}}, + {label = "Ylimielinen", type = "attitude", data = {lib = "move_f@arrogant@a", anim = "move_f@arrogant@a"}}, + } + }, + + { + name = 'porn', + label = 'Härski K-18', + items = { + {label = "Kuski (poskihoito)", type = "anim", data = {lib = "oddjobs@towing", anim = "m_blow_job_loop"}}, + {label = "Vänkäri (poskihoito)", type = "anim", data = {lib = "oddjobs@towing", anim = "f_blow_job_loop"}}, + {label = "Kuski (panee)", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_sex_loop_player"}}, + {label = "Vänkäri (panee)", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_sex_loop_female"}}, + {label = "Korjaa pallien sijaintia", type = "anim", data = {lib = "mp_player_int_uppergrab_crotch", anim = "mp_player_int_grab_crotch"}}, + {label = "Strippari idle", type = "anim", data = {lib = "mini@strip_club@idles@stripper", anim = "stripper_idle_02"}}, + {label = "Strippari rööki", type = "scenario", data = {anim = "WORLD_HUMAN_PROSTITUTE_HIGH_CLASS"}}, + {label = "Heruta tissejä", type = "anim", data = {lib = "mini@strip_club@backroom@", anim = "stripper_b_backroom_idle_b"}}, + {label = "Strippi tanssi 1", type = "anim", data = {lib = "mini@strip_club@lap_dance@ld_girl_a_song_a_p1", anim = "ld_girl_a_song_a_p1_f"}}, + {label = "Strippi tanssi 2", type = "anim", data = {lib = "mini@strip_club@private_dance@part2", anim = "priv_dance_p2"}}, + {label = "Twerkkaa", type = "anim", data = {lib = "mini@strip_club@private_dance@part3", anim = "priv_dance_p3"}}, + } + } +} \ No newline at end of file diff --git a/[esx_addons]/esx_animations/localization/nl_config.lua b/[esx_addons]/esx_animations/localization/nl_config.lua new file mode 100644 index 00000000..d61e38d1 --- /dev/null +++ b/[esx_addons]/esx_animations/localization/nl_config.lua @@ -0,0 +1,162 @@ +Config = {} + +Config.Animations = { + + { + name = 'festives', + label = 'Feestelijk', + items = { + {label = "Roken", type = "scenario", data = {anim = "WORLD_HUMAN_SMOKING"}}, + {label = "Muzikant", type = "scenario", data = {anim = "WORLD_HUMAN_MUSICIAN"}}, + {label = "Dj", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@dj", anim = "dj"}}, + {label = "Koffie", type = "scenario", data = {anim = "WORLD_HUMAN_DRINKING"}}, + {label = "Bier", type = "scenario", data = {anim = "WORLD_HUMAN_PARTYING"}}, + {label = "Lucht Gitaar", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@air_guitar", anim = "air_guitar"}}, + {label = "Lucht Shagging", type = "anim", data = {lib = "anim@mp_player_intcelebrationfemale@air_shagging", anim = "air_shagging"}}, + {label = "Rock'n'roll", type = "anim", data = {lib = "mp_player_int_upperrock", anim = "mp_player_int_rock"}}, + -- {label = "Fumer un joint", type = "scenario", data = {anim = "WORLD_HUMAN_SMOKING_POT"}}, + {label = "Dronken houding", type = "anim", data = {lib = "amb@world_human_bum_standing@drunk@idle_a", anim = "idle_a"}}, + {label = "Overgevem", type = "anim", data = {lib = "oddjobs@taxi@tie", anim = "vomit_outside"}}, + } + }, + + { + name = 'greetings', + label = 'Ontmoetingen', + items = { + {label = "Hallo", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_hello"}}, + {label = "Zwaai", type = "anim", data = {lib = "mp_common", anim = "givetake1_a"}}, + {label = "Schud hand", type = "anim", data = {lib = "mp_ped_interaction", anim = "handshake_guy_a"}}, + {label = "Knuffel", type = "anim", data = {lib = "mp_ped_interaction", anim = "hugs_guy_a"}}, + {label = "Saluteer", type = "anim", data = {lib = "mp_player_int_uppersalute", anim = "mp_player_int_salute"}}, + } + }, + + { + name = 'work', + label = 'Werkzaamheden', + items = { + {label = "Verdachte : Geef over", type = "anim", data = {lib = "random@arrests@busted", anim = "idle_c"}}, + {label = "Vissen", type = "scenario", data = {anim = "world_human_stand_fishing"}}, + {label = "Politie : Onderzoek", type = "anim", data = {lib = "amb@code_human_police_investigate@idle_b", anim = "idle_f"}}, + {label = "Politie : Gebruik radio", type = "anim", data = {lib = "random@arrests", anim = "generic_radio_chatter"}}, + {label = "Politie : Verkeer", type = "scenario", data = {anim = "WORLD_HUMAN_CAR_PARK_ATTENDANT"}}, + {label = "Politie : Verrekijker", type = "scenario", data = {anim = "WORLD_HUMAN_BINOCULARS"}}, + {label = "Boer : Planten", type = "scenario", data = {anim = "world_human_gardener_plant"}}, + {label = "Monteur : Repareer motor", type = "anim", data = {lib = "mini@repair", anim = "fixing_a_ped"}}, + {label = "Arts : Kniel", type = "scenario", data = {anim = "CODE_HUMAN_MEDIC_KNEEL"}}, + {label = "Taxi : Praat met klant", type = "anim", data = {lib = "oddjobs@taxi@driver", anim = "leanover_idle"}}, + {label = "Taxi : Geef factuur", type = "anim", data = {lib = "oddjobs@taxi@cyi", anim = "std_hand_off_ps_passenger"}}, + {label = "Cashier : Geef", type = "anim", data = {lib = "mp_am_hold_up", anim = "purchase_beerbox_shopkeeper"}}, + {label = "Barman : Geef een shot", type = "anim", data = {lib = "mini@drinking", anim = "shots_barman_b"}}, + {label = "Journalist : Neem fotos", type = "scenario", data = {anim = "WORLD_HUMAN_PAPARAZZI"}}, + {label = "Klembord", type = "scenario", data = {anim = "WORLD_HUMAN_CLIPBOARD"}}, + {label = "Hamer", type = "scenario", data = {anim = "WORLD_HUMAN_HAMMERING"}}, + {label = "Zwerver : Houd bord vast", type = "scenario", data = {anim = "WORLD_HUMAN_BUM_FREEWAY"}}, + {label = "Zwerver : Menselijk beeld", type = "scenario", data = {anim = "WORLD_HUMAN_HUMAN_STATUE"}}, + } + }, + + { + name = 'humors', + label = 'Humor', + items = { + {label = "Juichen", type = "scenario", data = {anim = "WORLD_HUMAN_CHEERING"}}, + {label = "Super", type = "anim", data = {lib = "mp_action", anim = "thanks_male_06"}}, + {label = "Wijs", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_point"}}, + {label = "Kom hier", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_come_here_soft"}}, + {label = "Kom maar op", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_bring_it_on"}}, + {label = "Ik", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_me"}}, + {label = "Ik wist het", type = "anim", data = {lib = "anim@am_hold_up@male", anim = "shoplift_high"}}, + {label = "Uitgeput", type = "scenario", data = {lib = "amb@world_human_jog_standing@male@idle_b", anim = "idle_d"}}, + {label = "Ik ben de shit", type = "scenario", data = {lib = "amb@world_human_bum_standing@depressed@idle_a", anim = "idle_a"}}, + {label = "Facepalm", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@face_palm", anim = "face_palm"}}, + {label = "Doe rustig", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_easy_now"}}, + {label = "Wat heb ik gedaan?", type = "anim", data = {lib = "oddjobs@assassinate@multi@", anim = "react_big_variations_a"}}, + {label = "Bang", type = "anim", data = {lib = "amb@code_human_cower_stand@male@react_cowering", anim = "base_right"}}, + {label = "Vechten?", type = "anim", data = {lib = "anim@deathmatch_intros@unarmed", anim = "intro_male_unarmed_e"}}, + {label = "Dat is onmogelijk!", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_damn"}}, + {label = "Omhels", type = "anim", data = {lib = "mp_ped_interaction", anim = "kisses_guy_a"}}, + {label = "Middelvinger", type = "anim", data = {lib = "mp_player_int_upperfinger", anim = "mp_player_int_finger_01_enter"}}, + {label = "Jij rukker", type = "anim", data = {lib = "mp_player_int_upperwank", anim = "mp_player_int_wank_01"}}, + {label = "Doodsbedreiging", type = "anim", data = {lib = "mp_suicide", anim = "pistol"}}, + } + }, + + { + name = 'sports', + label = 'Sport', + items = { + {label = "Flex spieren", type = "anim", data = {lib = "amb@world_human_muscle_flex@arms_at_side@base", anim = "base"}}, + {label = "Gewichten heffen", type = "anim", data = {lib = "amb@world_human_muscle_free_weights@male@barbell@base", anim = "base"}}, + {label = "Push ups", type = "anim", data = {lib = "amb@world_human_push_ups@male@base", anim = "base"}}, + {label = "Sit ups", type = "anim", data = {lib = "amb@world_human_sit_ups@male@base", anim = "base"}}, + {label = "Yoga", type = "anim", data = {lib = "amb@world_human_yoga@male@base", anim = "base_a"}}, + } + }, + + { + name = 'misc', + label = 'Diverse', + items = { + {label = "Drink koffie", type = "anim", data = {lib = "amb@world_human_aa_coffee@idle_a", anim = "idle_a"}}, + {label = "Zit", type = "anim", data = {lib = "anim@heists@prison_heistunfinished_biztarget_idle", anim = "target_idle"}}, + {label = "Leun tegen muur", type = "scenario", data = {anim = "world_human_leaning"}}, + {label = "Op je buik zonnen", type = "scenario", data = {anim = "WORLD_HUMAN_SUNBATHE_BACK"}}, + {label = "Op je rug zonnen", type = "scenario", data = {anim = "WORLD_HUMAN_SUNBATHE"}}, + {label = "Maak schoon", type = "scenario", data = {anim = "world_human_maid_clean"}}, + {label = "Barbeque", type = "scenario", data = {anim = "PROP_HUMAN_BBQ"}}, + {label = "Zoek", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_bj_to_prop_female"}}, + {label = "Neem selfie", type = "scenario", data = {anim = "world_human_tourist_mobile"}}, + {label = "Luister aan muur/deur", type = "anim", data = {lib = "mini@safe_cracking", anim = "idle_base"}}, + } + }, + + { + name = 'attitudem', + label = 'Loop stijlen', + items = { + {label = "Normaal M", type = "attitude", data = {lib = "move_m@confident", anim = "move_m@confident"}}, + {label = "Normaal V", type = "attitude", data = {lib = "move_f@heels@c", anim = "move_f@heels@c"}}, + {label = "Depressieve man", type = "attitude", data = {lib = "move_m@depressed@a", anim = "move_m@depressed@a"}}, + {label = "Depressieve vrouw", type = "attitude", data = {lib = "move_f@depressed@a", anim = "move_f@depressed@a"}}, + {label = "Zakelijk", type = "attitude", data = {lib = "move_m@business@a", anim = "move_m@business@a"}}, + {label = "Vastberaden", type = "attitude", data = {lib = "move_m@brave@a", anim = "move_m@brave@a"}}, + {label = "Normaal", type = "attitude", data = {lib = "move_m@casual@a", anim = "move_m@casual@a"}}, + {label = "Te veel gegeten", type = "attitude", data = {lib = "move_m@fat@a", anim = "move_m@fat@a"}}, + {label = "Hipster", type = "attitude", data = {lib = "move_m@hipster@a", anim = "move_m@hipster@a"}}, + {label = "Gewond", type = "attitude", data = {lib = "move_m@injured", anim = "move_m@injured"}}, + {label = "In een haast", type = "attitude", data = {lib = "move_m@hurry@a", anim = "move_m@hurry@a"}}, + {label = "Zwerver", type = "attitude", data = {lib = "move_m@hobo@a", anim = "move_m@hobo@a"}}, + {label = "Verdrietig", type = "attitude", data = {lib = "move_m@sad@a", anim = "move_m@sad@a"}}, + {label = "Patser", type = "attitude", data = {lib = "move_m@muscle@a", anim = "move_m@muscle@a"}}, + {label = "Geschokkeerd", type = "attitude", data = {lib = "move_m@shocked@a", anim = "move_m@shocked@a"}}, + {label = "Verdacht", type = "attitude", data = {lib = "move_m@shadyped@a", anim = "move_m@shadyped@a"}}, + {label = "Gespannen", type = "attitude", data = {lib = "move_m@buzzed", anim = "move_m@buzzed"}}, + {label = "Haast", type = "attitude", data = {lib = "move_m@hurry_butch@a", anim = "move_m@hurry_butch@a"}}, + {label = "Trots", type = "attitude", data = {lib = "move_m@money", anim = "move_m@money"}}, + {label = "Korte race", type = "attitude", data = {lib = "move_m@quick", anim = "move_m@quick"}}, + {label = "Mannen verslinder", type = "attitude", data = {lib = "move_f@maneater", anim = "move_f@maneater"}}, + {label = "Onbeschaamd", type = "attitude", data = {lib = "move_f@sassy", anim = "move_f@sassy"}}, + {label = "Arrogant", type = "attitude", data = {lib = "move_f@arrogant@a", anim = "move_f@arrogant@a"}}, + } + }, + { + name = 'porn', + label = 'NSFW', + items = { + {label = "Man krijgt in de auto", type = "anim", data = {lib = "oddjobs@towing", anim = "m_blow_job_loop"}}, + {label = "Vrouw geeft in de auto", type = "anim", data = {lib = "oddjobs@towing", anim = "f_blow_job_loop"}}, + {label = "Man onder op in de auto", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_sex_loop_player"}}, + {label = "Vrouw boven op in de auto", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_sex_loop_female"}}, + {label = "Krab balzak", type = "anim", data = {lib = "mp_player_int_uppergrab_crotch", anim = "mp_player_int_grab_crotch"}}, + {label = "Prostituée 1", type = "anim", data = {lib = "mini@strip_club@idles@stripper", anim = "stripper_idle_02"}}, + {label = "Prostituée 2", type = "scenario", data = {anim = "WORLD_HUMAN_PROSTITUTE_HIGH_CLASS"}}, + {label = "Prostituée 3", type = "anim", data = {lib = "mini@strip_club@backroom@", anim = "stripper_b_backroom_idle_b"}}, + {label = "Strip Tease 1", type = "anim", data = {lib = "mini@strip_club@lap_dance@ld_girl_a_song_a_p1", anim = "ld_girl_a_song_a_p1_f"}}, + {label = "Strip Tease 2", type = "anim", data = {lib = "mini@strip_club@private_dance@part2", anim = "priv_dance_p2"}}, + {label = "Stip Tease op knieën", type = "anim", data = {lib = "mini@strip_club@private_dance@part3", anim = "priv_dance_p3"}}, + } + }, + +} diff --git a/[esx_addons]/esx_animations/localization/pl_config.lua b/[esx_addons]/esx_animations/localization/pl_config.lua new file mode 100644 index 00000000..03243794 --- /dev/null +++ b/[esx_addons]/esx_animations/localization/pl_config.lua @@ -0,0 +1,161 @@ +Config = {} + +Config.Animations = { + + { + name = 'festives', + label = 'Imprezowe', + items = { + {label = "Graj na gitarze", type = "scenario", data = {anim = "WORLD_HUMAN_MUSICIAN"}}, + {label = "Dj", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@dj", anim = "dj"}}, + {label = "Picie piwa 'LEGALNIE'", type = "scenario", data = {anim = "WORLD_HUMAN_DRINKING"}}, + {label = "Picie piwa", type = "scenario", data = {anim = "WORLD_HUMAN_PARTYING"}}, + {label = "Udawanie gry na gitarze", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@air_guitar", anim = "air_guitar"}}, + {label = "Dokowanie", type = "anim", data = {lib = "anim@mp_player_intcelebrationfemale@air_shagging", anim = "air_shagging"}}, + {label = "Rock'n'roll", type = "anim", data = {lib = "mp_player_int_upperrock", anim = "mp_player_int_rock"}}, + -- {label = "Fumer un jo int", type = "scenario", data = {anim = "WORLD_HUMAN_SMOKING_POT"}}, + {label = "Pijany", type = "anim", data = {lib = "amb@world_human_bum_standing@drunk@idle_a", anim = "idle_a"}}, + {label = "Wymiotowanie z auta", type = "anim", data = {lib = "oddjobs@taxi@tie", anim = "vomit_outside"}}, + } + }, + + { + name = 'greetings', + label = 'Przywitania', + items = { + {label = "Witaj", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_hello"}}, + {label = "Cześć", type = "anim", data = {lib = "mp_common", anim = "givetake1_a"}}, + {label = "Podaj reke", type = "anim", data = {lib = "mp_ped_interaction", anim = "handshake_guy_a"}}, + {label = "Gangsterskie", type = "anim", data = {lib = "mp_ped_interaction", anim = "hugs_guy_a"}}, + {label = "Saluuut", type = "anim", data = {lib = "mp_player_int_uppersalute", anim = "mp_player_int_salute"}}, + } + }, + + { + name = 'work', + label = 'Prace', + items = { + {label = "Na kolana", type = "anim", data = {lib = "random@arrests@busted", anim = "idle_c"}}, + {label = "Łow ryby", type = "scenario", data = {anim = "world_human_stand_fishing"}}, + {label = "Policja: sprawdź dowody", type = "anim", data = {lib = "amb@code_human_police_investigate@idle_b", anim = "idle_f"}}, + {label = "Policja: rozmowaij przez radio", type = "anim", data = {lib = "random@arrests", anim = "generic_radio_chatter"}}, + {label = "Policja: kieruj ruchem", type = "scenario", data = {anim = "WORLD_HUMAN_CAR_PARK_ATTENDANT"}}, + {label = "Użyj lornetki", type = "scenario", data = {anim = "WORLD_HUMAN_BINOCULARS"}}, + {label = "Wykopki", type = "scenario", data = {anim = "world_human_gardener_plant"}}, + {label = "Mechanik: sprawdź/napraw silnik", type = "anim", data = {lib = "mini@repair", anim = "fixing_a_ped"}}, + {label = "Medyk: sprawdź stan", type = "scenario", data = {anim = "CODE_HUMAN_MEDIC_KNEEL"}}, + {label = "Taxi: rozmawiaj z klientem", type = "anim", data = {lib = "oddjobs@taxi@driver", anim = "leanover_idle"}}, + {label = "Taxi : wystaw rachunek", type = "anim", data = {lib = "oddjobs@taxi@cyi", anim = "std_hand_off_ps_passenger"}}, + {label = "Załaduj towar", type = "anim", data = {lib = "mp_am_hold_up", anim = "purchase_beerbox_shopkeeper"}}, + {label = "Barman: polej kolejke", type = "anim", data = {lib = "mini@drinking", anim = "shots_barman_b"}}, + {label = "Redaktor: rób zdjęcia", type = "scenario", data = {anim = "WORLD_HUMAN_PAPARAZZI"}}, + {label = "Patrz w notatki", type = "scenario", data = {anim = "WORLD_HUMAN_CLIPBOARD"}}, + {label = "Jebaj młotkiem", type = "scenario", data = {anim = "WORLD_HUMAN_HAMMERING"}}, + {label = "Trzymaj kartke", type = "scenario", data = {anim = "WORLD_HUMAN_BUM_FREEWAY"}}, + {label = "Pozuj", type = "scenario", data = {anim = "WORLD_HUMAN_HUMAN_STATUE"}}, + } + }, + + { + name = 'humors', + label = 'Humor', + items = { + {label = "Klaskaj", type = "scenario", data = {anim = "WORLD_HUMAN_CHEERING"}}, + {label = "OK", type = "anim", data = {lib = "mp_action", anim = "thanks_male_06"}}, + {label = "Ty", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_point"}}, + {label = "Zawolaj", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_come_here_soft"}}, + {label = "O co cho??", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_bring_it_on"}}, + {label = "A moi", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_me"}}, + {label = "Mam to", type = "anim", data = {lib = "anim@am_hold_up@male", anim = "shoplift_high"}}, + {label = "BRAK!!!!!", type = "scenario", data = {lib = "amb@world_human_jog_standing@male@idle_b", anim = "idle_d"}}, + {label = "BRAK!!!!!", type = "scenario", data = {lib = "amb@world_human_bum_standing@depressed@idle_a", anim = "idle_a"}}, + {label = "Facepalm", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@face_palm", anim = "face_palm"}}, + {label = "Spokojnie ", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_easy_now"}}, + {label = "Zdziwienie", type = "anim", data = {lib = "oddjobs@assassinate@multi@", anim = "react_big_variations_a"}}, + {label = "Poddaj się", type = "anim", data = {lib = "amb@code_human_cower_stand@male@react_cowering", anim = "base_right"}}, + {label = "Przygotuj się do walki", type = "anim", data = {lib = "anim@deathmatch_intros@unarmed", anim = "intro_male_unarmed_e"}}, + {label = "Nie m ch**a", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_damn"}}, + {label = "Przytul", type = "anim", data = {lib = "mp_ped_interaction", anim = "kisses_guy_a"}}, + {label = "Zajeb fakera", type = "anim", data = {lib = "mp_player_int_upperfinger", anim = "mp_player_int_finger_01_enter"}}, + {label = "Marszcz freda", type = "anim", data = {lib = "mp_player_int_upperwank", anim = "mp_player_int_wank_01"}}, + {label = "Strzel sobie w głowe", type = "anim", data = {lib = "mp_suicide", anim = "pistol"}}, + } + }, + + { + name = 'sports', + label = 'Sport', + items = { + {label = "Napinaj miesnie", type = "anim", data = {lib = "amb@world_human_muscle_flex@arms_at_side@base", anim = "base"}}, + {label = "Wyciskaj sztange", type = "anim", data = {lib = "amb@world_human_muscle_free_weights@male@barbell@base", anim = "base"}}, + {label = "Pompuj", type = "anim", data = {lib = "amb@world_human_push_ups@male@base", anim = "base"}}, + {label = "Rob Brzuszki", type = "anim", data = {lib = "amb@world_human_sit_ups@male@base", anim = "base"}}, + {label = "Yoga", type = "anim", data = {lib = "amb@world_human_yoga@male@base", anim = "base_a"}}, + } + }, + + { + name = 'misc', + label = 'Inne', + items = { + {label = "Pij kawe", type = "anim", data = {lib = "amb@world_human_aa_coffee@idle_a", anim = "idle_a"}}, + {label = "Usiadz na krzesle", type = "anim", data = {lib = "anim@heists@prison_heistunfinished_biztarget_idle", anim = "target_idle"}}, + {label = "Przegladaj smartfon", type = "scenario", data = {anim = "world_human_leaning"}}, + {label = "Polóż się na ziemi", type = "scenario", data = {anim = "WORLD_HUMAN_SUNBATHE_BACK"}}, + {label = "Polóż się na ziemi na brzuchu", type = "scenario", data = {anim = "WORLD_HUMAN_SUNBATHE"}}, + {label = "Umyj", type = "scenario", data = {anim = "world_human_maid_clean"}}, + {label = "Smaż na grillu", type = "scenario", data = {anim = "PROP_HUMAN_BBQ"}}, + {label = "Pozuj: samolot", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_bj_to_prop_female"}}, + {label = "Rób selfie", type = "scenario", data = {anim = "world_human_tourist_mobile"}}, + {label = "Otwieraj sejf", type = "anim", data = {lib = "mini@safe_cracking", anim = "idle_base"}}, + } + }, + + { + name = 'attitudem', + label = 'Zachowania', + items = { + {label = "Pewniak M", type = "attitude", data = {lib = "move_m@confident", anim = "move_m@confident"}}, + {label = "Pewniak K", type = "attitude", data = {lib = "move_f@heels@c", anim = "move_f@heels@c"}}, + {label = "Smutas M", type = "attitude", data = {lib = "move_m@depressed@a", anim = "move_m@depressed@a"}}, + {label = "Smutas K", type = "attitude", data = {lib = "move_f@depressed@a", anim = "move_f@depressed@a"}}, + {label = "Biznesman", type = "attitude", data = {lib = "move_m@business@a", anim = "move_m@business@a"}}, + {label = "Odważny", type = "attitude", data = {lib = "move_m@brave@a", anim = "move_m@brave@a"}}, + {label = "Luzak", type = "attitude", data = {lib = "move_m@casual@a", anim = "move_m@casual@a"}}, + {label = "Gruby", type = "attitude", data = {lib = "move_m@fat@a", anim = "move_m@fat@a"}}, + {label = "Hipster", type = "attitude", data = {lib = "move_m@hipster@a", anim = "move_m@hipster@a"}}, + {label = "Poszkodowany", type = "attitude", data = {lib = "move_m@injured", anim = "move_m@injured"}}, + {label = "W pośpiechu", type = "attitude", data = {lib = "move_m@hurry@a", anim = "move_m@hurry@a"}}, + {label = "Bezdomny", type = "attitude", data = {lib = "move_m@hobo@a", anim = "move_m@hobo@a"}}, + {label = "Smutny", type = "attitude", data = {lib = "move_m@sad@a", anim = "move_m@sad@a"}}, + {label = "Siłacz", type = "attitude", data = {lib = "move_m@muscle@a", anim = "move_m@muscle@a"}}, + {label = "Zszokowany", type = "attitude", data = {lib = "move_m@shocked@a", anim = "move_m@shocked@a"}}, + {label = "Podejrzany", type = "attitude", data = {lib = "move_m@shadyped@a", anim = "move_m@shadyped@a"}}, + {label = "Nabuzowany", type = "attitude", data = {lib = "move_m@buzzed", anim = "move_m@buzzed"}}, + {label = "W pośpiechu 2", type = "attitude", data = {lib = "move_m@hurry_butch@a", anim = "move_m@hurry_butch@a"}}, + {label = "Pieniądze", type = "attitude", data = {lib = "move_m@money", anim = "move_m@money"}}, + {label = "Szybki", type = "attitude", data = {lib = "move_m@quick", anim = "move_m@quick"}}, + {label = "Zjadacz", type = "attitude", data = {lib = "move_f@maneater", anim = "move_f@maneater"}}, + {label = "Impertynencki", type = "attitude", data = {lib = "move_f@sassy", anim = "move_f@sassy"}}, + {label = "Arogancki", type = "attitude", data = {lib = "move_f@arrogant@a", anim = "move_f@arrogant@a"}}, + } + }, + + { + name = 'porn', + label = 'Wulgarne', + items = { + {label = "Głebokie gardlo", type = "anim", data = {lib = "oddjobs@towing", anim = "m_blow_job_loop"}}, + {label = "Rób loda", type = "anim", data = {lib = "oddjobs@towing", anim = "f_blow_job_loop"}}, + {label = "Zimny lokiec", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_sex_loop_player"}}, + {label = "Siadaj na berło", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_sex_loop_female"}}, + {label = "Drap sie po jajach", type = "anim", data = {lib = "mp_player_int_uppergrab_crotch", anim = "mp_player_int_grab_crotch"}}, + {label = "Uwodź", type = "anim", data = {lib = "mini@strip_club@idles@stripper", anim = "stripper_idle_02"}}, + {label = "Dziwka pali szluga", type = "scenario", data = {anim = "WORLD_HUMAN_PROSTITUTE_HIGH_CLASS"}}, + {label = "Machaj cyckami", type = "anim", data = {lib = "mini@strip_club@backroom@", anim = "stripper_b_backroom_idle_b"}}, + {label = "Strptiz", type = "anim", data = {lib = "mini@strip_club@lap_dance@ld_girl_a_song_a_p1", anim = "ld_girl_a_song_a_p1_f"}}, + {label = "Strptiz 2", type = "anim", data = {lib = "mini@strip_club@private_dance@part2", anim = "priv_dance_p2"}}, + {label = "Taniec erotyczny", type = "anim", data = {lib = "mini@strip_club@private_dance@part3", anim = "priv_dance_p3"}}, + } + }, +} diff --git a/[esx_addons]/esx_animations/localization/ru_config.lua b/[esx_addons]/esx_animations/localization/ru_config.lua new file mode 100644 index 00000000..0cc8516a --- /dev/null +++ b/[esx_addons]/esx_animations/localization/ru_config.lua @@ -0,0 +1,161 @@ +Config = {} + +Config.Animations = { + + { + name = 'festives', + label = 'Действия', + items = { + {label = "Курнуть", type = "scenario", data = {anim = "WORLD_HUMAN_SMOKING"}}, + --{label = "Jouer de la musique", type = "scenario", data = {anim = "WORLD_HUMAN_MUSICIAN"}}, + {label = "Dj", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@dj", anim = "dj"}}, + {label = "Пить", type = "scenario", data = {anim = "WORLD_HUMAN_DRINKING"}}, + {label = "Веселиться с пивасом", type = "scenario", data = {anim = "WORLD_HUMAN_PARTYING"}}, + {label = "Воздушная гитара", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@air_guitar", anim = "air_guitar"}}, + {label = "Воздушный перепихон", type = "anim", data = {lib = "anim@mp_player_intcelebrationfemale@air_shagging", anim = "air_shagging"}}, + {label = "Rock'n'roll", type = "anim", data = {lib = "mp_player_int_upperrock", anim = "mp_player_int_rock"}}, + {label = "Курить как профи", type = "scenario", data = {anim = "WORLD_HUMAN_SMOKING_POT"}}, + {label = "Изоброжать пьянь", type = "anim", data = {lib = "amb@world_human_bum_standing@drunk@idle_a", anim = "idle_a"}}, + --{label = "Vomir en voiture", type = "anim", data = {lib = "oddjobs@taxi@tie", anim = "vomit_outside"}}, + } + }, + + { + name = 'greetings', + label = 'Приветствия', + items = { + {label = "Салют", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_hello"}}, + {label = "Рукопожатие", type = "anim", data = {lib = "mp_common", anim = "givetake1_a"}}, + {label = "Крутое Рукопожатие", type = "anim", data = {lib = "mp_ped_interaction", anim = "handshake_guy_a"}}, + {label = "Рука-обнимашка", type = "anim", data = {lib = "mp_ped_interaction", anim = "hugs_guy_a"}}, + {label = "Отдать честь", type = "anim", data = {lib = "mp_player_int_uppersalute", anim = "mp_player_int_salute"}}, + } + }, + + { + name = 'work', + label = 'Работа', + items = { + {label = "На колени, руки за голову", type = "anim", data = {lib = "random@arrests@busted", anim = "idle_c"}}, + {label = "Рыбачить", type = "scenario", data = {anim = "world_human_stand_fishing"}}, + {label = "Police : Осматривать", type = "anim", data = {lib = "amb@code_human_police_investigate@idle_b", anim = "idle_f"}}, + {label = "Police : Проверять рацию", type = "anim", data = {lib = "random@arrests", anim = "generic_radio_chatter"}}, + {label = "Police : Махать палкой", type = "scenario", data = {anim = "WORLD_HUMAN_CAR_PARK_ATTENDANT"}}, + {label = "Police : Глядеть вдаль биноклем", type = "scenario", data = {anim = "WORLD_HUMAN_BINOCULARS"}}, + {label = "Капать лопаткой", type = "scenario", data = {anim = "world_human_gardener_plant"}}, + {label = "Ремонтировать что-то", type = "anim", data = {lib = "mini@repair", anim = "fixing_a_ped"}}, + {label = "Медик : Осморт лежачего", type = "scenario", data = {anim = "CODE_HUMAN_MEDIC_KNEEL"}}, + --{label = "Taxi : parler au client", type = "anim", data = {lib = "oddjobs@taxi@driver", anim = "leanover_idle"}}, + --{label = "Taxi : donner la facture", type = "anim", data = {lib = "oddjobs@taxi@cyi", anim = "std_hand_off_ps_passenger"}}, + {label = "Достать, положитьб перед собой", type = "anim", data = {lib = "mp_am_hold_up", anim = "purchase_beerbox_shopkeeper"}}, + {label = "Бармен : Налить рюмку", type = "anim", data = {lib = "mini@drinking", anim = "shots_barman_b"}}, + {label = "Фотографировать", type = "scenario", data = {anim = "WORLD_HUMAN_PAPARAZZI"}}, + {label = "Работать с блокнотом", type = "scenario", data = {anim = "WORLD_HUMAN_CLIPBOARD"}}, + {label = "Молотить", type = "scenario", data = {anim = "WORLD_HUMAN_HAMMERING"}}, + {label = "Попрошайничать", type = "scenario", data = {anim = "WORLD_HUMAN_BUM_FREEWAY"}}, + {label = "Изображать статую", type = "scenario", data = {anim = "WORLD_HUMAN_HUMAN_STATUE"}}, + } + }, + + { + name = 'humors', + label = 'Эмоции', + items = { + {label = "Ура! Заебись", type = "scenario", data = {anim = "WORLD_HUMAN_CHEERING"}}, + {label = "Супер", type = "anim", data = {lib = "mp_action", anim = "thanks_male_06"}}, + {label = "Показать пальцем", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_point"}}, + {label = "Сюда иди", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_come_here_soft"}}, + {label = "Че нах ?", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_bring_it_on"}}, + {label = "А я?", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_me"}}, + --{label = "Je le savais, putain", type = "anim", data = {lib = "anim@am_hold_up@male", anim = "shoplift_high"}}, + --{label = "Etre épuisé", type = "scenario", data = {lib = "amb@world_human_jog_standing@male@idle_b", anim = "idle_d"}}, + --{label = "Je suis dans la merde", type = "scenario", data = {lib = "amb@world_human_bum_standing@depressed@idle_a", anim = "idle_a"}}, + {label = "Facepalm", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@face_palm", anim = "face_palm"}}, + {label = "Тихо - тихо", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_easy_now"}}, + {label = "Шо там ебать?", type = "anim", data = {lib = "oddjobs@assassinate@multi@", anim = "react_big_variations_a"}}, + {label = "Страшно", type = "anim", data = {lib = "amb@code_human_cower_stand@male@react_cowering", anim = "base_right"}}, + {label = "Разминаться", type = "anim", data = {lib = "anim@deathmatch_intros@unarmed", anim = "intro_male_unarmed_e"}}, + {label = "Черт!", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_damn"}}, + {label = "Обьятия с поцелуем", type = "anim", data = {lib = "mp_ped_interaction", anim = "kisses_guy_a"}}, + {label = "Два фака", type = "anim", data = {lib = "mp_player_int_upperfinger", anim = "mp_player_int_finger_01_enter"}}, + {label = "Мастурбация", type = "anim", data = {lib = "mp_player_int_upperwank", anim = "mp_player_int_wank_01"}}, + {label = "Застрелиться", type = "anim", data = {lib = "mp_suicide", anim = "pistol"}}, + } + }, + + { + name = 'sports', + label = 'Спорт', + items = { + {label = "Выебываться мускулами", type = "anim", data = {lib = "amb@world_human_muscle_flex@arms_at_side@base", anim = "base"}}, + {label = "Поднимать штангу", type = "anim", data = {lib = "amb@world_human_muscle_free_weights@male@barbell@base", anim = "base"}}, + {label = "Отжимание", type = "anim", data = {lib = "amb@world_human_push_ups@male@base", anim = "base"}}, + {label = "Пресс", type = "anim", data = {lib = "amb@world_human_sit_ups@male@base", anim = "base"}}, + {label = "Йога", type = "anim", data = {lib = "amb@world_human_yoga@male@base", anim = "base_a"}}, + } + }, + + { + name = 'misc', + label = 'Разное', + items = { + --{label = "Boire un café", type = "anim", data = {lib = "amb@world_human_aa_coffee@idle_a", anim = "idle_a"}}, + --{label = "S'asseoir", type = "anim", data = {lib = "anim@heists@prison_heistunfinished_biztarget_idle", anim = "target_idle"}}, + {label = "Курить у стенки", type = "scenario", data = {anim = "world_human_leaning"}}, + {label = "Лежать", type = "scenario", data = {anim = "WORLD_HUMAN_SUNBATHE_BACK"}}, + {label = "Лежать на животе", type = "scenario", data = {anim = "WORLD_HUMAN_SUNBATHE"}}, + {label = "Протирать", type = "scenario", data = {anim = "world_human_maid_clean"}}, + {label = "Жарить на грилле", type = "scenario", data = {anim = "PROP_HUMAN_BBQ"}}, + --{label = "Position de Fouille", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_bj_to_prop_female"}}, + {label = "Селфи", type = "scenario", data = {anim = "world_human_tourist_mobile"}}, + {label = "Подслушивать", type = "anim", data = {lib = "mini@safe_cracking", anim = "idle_base"}}, + } + }, + + { + name = 'attitudem', + label = 'Походка', + items = { + {label = "Normal M", type = "attitude", data = {lib = "move_m@confident", anim = "move_m@confident"}}, + {label = "Normal F", type = "attitude", data = {lib = "move_f@heels@c", anim = "move_f@heels@c"}}, + {label = "Depressif", type = "attitude", data = {lib = "move_m@depressed@a", anim = "move_m@depressed@a"}}, + {label = "Depressif F", type = "attitude", data = {lib = "move_f@depressed@a", anim = "move_f@depressed@a"}}, + {label = "Business", type = "attitude", data = {lib = "move_m@business@a", anim = "move_m@business@a"}}, + {label = "Determine", type = "attitude", data = {lib = "move_m@brave@a", anim = "move_m@brave@a"}}, + {label = "Casual", type = "attitude", data = {lib = "move_m@casual@a", anim = "move_m@casual@a"}}, + {label = "Trop mange", type = "attitude", data = {lib = "move_m@fat@a", anim = "move_m@fat@a"}}, + {label = "Hipster", type = "attitude", data = {lib = "move_m@hipster@a", anim = "move_m@hipster@a"}}, + {label = "Blesse", type = "attitude", data = {lib = "move_m@injured", anim = "move_m@injured"}}, + {label = "Intimide", type = "attitude", data = {lib = "move_m@hurry@a", anim = "move_m@hurry@a"}}, + {label = "Hobo", type = "attitude", data = {lib = "move_m@hobo@a", anim = "move_m@hobo@a"}}, + {label = "Malheureux", type = "attitude", data = {lib = "move_m@sad@a", anim = "move_m@sad@a"}}, + {label = "Muscle", type = "attitude", data = {lib = "move_m@muscle@a", anim = "move_m@muscle@a"}}, + {label = "Choc", type = "attitude", data = {lib = "move_m@shocked@a", anim = "move_m@shocked@a"}}, + {label = "Sombre", type = "attitude", data = {lib = "move_m@shadyped@a", anim = "move_m@shadyped@a"}}, + {label = "Fatigue", type = "attitude", data = {lib = "move_m@buzzed", anim = "move_m@buzzed"}}, + {label = "Pressee", type = "attitude", data = {lib = "move_m@hurry_butch@a", anim = "move_m@hurry_butch@a"}}, + {label = "Fier", type = "attitude", data = {lib = "move_m@money", anim = "move_m@money"}}, + {label = "Petite course", type = "attitude", data = {lib = "move_m@quick", anim = "move_m@quick"}}, + {label = "Mangeuse d'homme", type = "attitude", data = {lib = "move_f@maneater", anim = "move_f@maneater"}}, + {label = "Impertinent", type = "attitude", data = {lib = "move_f@sassy", anim = "move_f@sassy"}}, + {label = "Arrogante", type = "attitude", data = {lib = "move_f@arrogant@a", anim = "move_f@arrogant@a"}}, + } + }, + { + name = 'porn', + label = '18+ БЛЯТЬ', + items = { + {label = "Тебе сосут (сидя) в машине", type = "anim", data = {lib = "oddjobs@towing", anim = "m_blow_job_loop"}}, + {label = "Ты сосешь (сидя) в машине", type = "anim", data = {lib = "oddjobs@towing", anim = "f_blow_job_loop"}}, + {label = "Тебе сосут в машине, оч приятно", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_sex_loop_player"}}, + {label = "Трах в машине", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_sex_loop_female"}}, + {label = "Зачесались яйца", type = "anim", data = {lib = "mp_player_int_uppergrab_crotch", anim = "mp_player_int_grab_crotch"}}, + {label = "Аура шлюхи", type = "anim", data = {lib = "mini@strip_club@idles@stripper", anim = "stripper_idle_02"}}, + {label = "Поза шлюхи", type = "scenario", data = {anim = "WORLD_HUMAN_PROSTITUTE_HIGH_CLASS"}}, + {label = "Титькотрясение", type = "anim", data = {lib = "mini@strip_club@backroom@", anim = "stripper_b_backroom_idle_b"}}, + {label = "Стрип 1", type = "anim", data = {lib = "mini@strip_club@lap_dance@ld_girl_a_song_a_p1", anim = "ld_girl_a_song_a_p1_f"}}, + {label = "Стрип 2", type = "anim", data = {lib = "mini@strip_club@private_dance@part2", anim = "priv_dance_p2"}}, + {label = "Стрип 3", type = "anim", data = {lib = "mini@strip_club@private_dance@part3", anim = "priv_dance_p3"}}, + } + } +} diff --git a/[esx_addons]/esx_animations/localization/si_config.lua b/[esx_addons]/esx_animations/localization/si_config.lua new file mode 100644 index 00000000..da4005f8 --- /dev/null +++ b/[esx_addons]/esx_animations/localization/si_config.lua @@ -0,0 +1,162 @@ +Config = {} + +Config.Animations = { + + { + name = 'festives', + label = 'Prazniki', + items = { + {label = "Smoke", type = "scenario", data = {anim = "WORLD_HUMAN_SMOKING"}}, + {label = "Musician", type = "scenario", data = {anim = "WORLD_HUMAN_MUSICIAN"}}, + {label = "Dj", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@dj", anim = "dj"}}, + {label = "Coffee", type = "scenario", data = {anim = "WORLD_HUMAN_DRINKING"}}, + {label = "Beer", type = "scenario", data = {anim = "WORLD_HUMAN_PARTYING"}}, + {label = "Air Guitar", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@air_guitar", anim = "air_guitar"}}, + {label = "Air Shagging", type = "anim", data = {lib = "anim@mp_player_intcelebrationfemale@air_shagging", anim = "air_shagging"}}, + {label = "Rock'n'roll", type = "anim", data = {lib = "mp_player_int_upperrock", anim = "mp_player_int_rock"}}, + -- {label = "Fumer un joint", type = "scenario", data = {anim = "WORLD_HUMAN_SMOKING_POT"}}, + {label = "Drunk Standing", type = "anim", data = {lib = "amb@world_human_bum_standing@drunk@idle_a", anim = "idle_a"}}, + {label = "Vomiting", type = "anim", data = {lib = "oddjobs@taxi@tie", anim = "vomit_outside"}}, + } + }, + + { + name = 'greetings', + label = 'Pozdravi', + items = { + {label = "Hello", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_hello"}}, + {label = "Wave", type = "anim", data = {lib = "mp_common", anim = "givetake1_a"}}, + {label = "Handshake", type = "anim", data = {lib = "mp_ped_interaction", anim = "handshake_guy_a"}}, + {label = "Hugging", type = "anim", data = {lib = "mp_ped_interaction", anim = "hugs_guy_a"}}, + {label = "Salute", type = "anim", data = {lib = "mp_player_int_uppersalute", anim = "mp_player_int_salute"}}, + } + }, + + { + name = 'work', + label = 'Sluzba', + items = { + {label = "Suspect : Surrender", type = "anim", data = {lib = "random@arrests@busted", anim = "idle_c"}}, + {label = "Fishing", type = "scenario", data = {anim = "world_human_stand_fishing"}}, + {label = "Police : Investigate", type = "anim", data = {lib = "amb@code_human_police_investigate@idle_b", anim = "idle_f"}}, + {label = "Police : Use Radio", type = "anim", data = {lib = "random@arrests", anim = "generic_radio_chatter"}}, + {label = "Police : Traffic", type = "scenario", data = {anim = "WORLD_HUMAN_CAR_PARK_ATTENDANT"}}, + {label = "Police : Binoculars", type = "scenario", data = {anim = "WORLD_HUMAN_BINOCULARS"}}, + {label = "Agriculture : Planting", type = "scenario", data = {anim = "world_human_gardener_plant"}}, + {label = "Mechanic : Fixing Motor", type = "anim", data = {lib = "mini@repair", anim = "fixing_a_ped"}}, + {label = "Medic : Kneel", type = "scenario", data = {anim = "CODE_HUMAN_MEDIC_KNEEL"}}, + {label = "Taxi : Talk to customer", type = "anim", data = {lib = "oddjobs@taxi@driver", anim = "leanover_idle"}}, + {label = "Taxi : Give bill", type = "anim", data = {lib = "oddjobs@taxi@cyi", anim = "std_hand_off_ps_passenger"}}, + {label = "Grocer : Give", type = "anim", data = {lib = "mp_am_hold_up", anim = "purchase_beerbox_shopkeeper"}}, + {label = "Barman : Serve Shot", type = "anim", data = {lib = "mini@drinking", anim = "shots_barman_b"}}, + {label = "Journalist : Take Photos", type = "scenario", data = {anim = "WORLD_HUMAN_PAPARAZZI"}}, + {label = "All Jobs : Clipboard", type = "scenario", data = {anim = "WORLD_HUMAN_CLIPBOARD"}}, + {label = "All Jobs : Hammering", type = "scenario", data = {anim = "WORLD_HUMAN_HAMMERING"}}, + {label = "Bum : Holding Sign", type = "scenario", data = {anim = "WORLD_HUMAN_BUM_FREEWAY"}}, + {label = "Bum : Human Statue", type = "scenario", data = {anim = "WORLD_HUMAN_HUMAN_STATUE"}}, + } + }, + + { + name = 'humors', + label = 'Zabava', + items = { + {label = "Cheering", type = "scenario", data = {anim = "WORLD_HUMAN_CHEERING"}}, + {label = "Super", type = "anim", data = {lib = "mp_action", anim = "thanks_male_06"}}, + {label = "Point", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_point"}}, + {label = "Come here", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_come_here_soft"}}, + {label = "Bring it on", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_bring_it_on"}}, + {label = "Me", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_me"}}, + {label = "I knew it", type = "anim", data = {lib = "anim@am_hold_up@male", anim = "shoplift_high"}}, + {label = "Exhausted", type = "scenario", data = {lib = "amb@world_human_jog_standing@male@idle_b", anim = "idle_d"}}, + {label = "I'm the shit", type = "scenario", data = {lib = "amb@world_human_bum_standing@depressed@idle_a", anim = "idle_a"}}, + {label = "Facepalm", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@face_palm", anim = "face_palm"}}, + {label = "Calm down ", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_easy_now"}}, + {label = "What did I do?", type = "anim", data = {lib = "oddjobs@assassinate@multi@", anim = "react_big_variations_a"}}, + {label = "Fear", type = "anim", data = {lib = "amb@code_human_cower_stand@male@react_cowering", anim = "base_right"}}, + {label = "Fight ?", type = "anim", data = {lib = "anim@deathmatch_intros@unarmed", anim = "intro_male_unarmed_e"}}, + {label = "It's not possible !", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_damn"}}, + {label = "Embrace", type = "anim", data = {lib = "mp_ped_interaction", anim = "kisses_guy_a"}}, + {label = "Finger of honor", type = "anim", data = {lib = "mp_player_int_upperfinger", anim = "mp_player_int_finger_01_enter"}}, + {label = "You wanker", type = "anim", data = {lib = "mp_player_int_upperwank", anim = "mp_player_int_wank_01"}}, + {label = "Bullet in the head", type = "anim", data = {lib = "mp_suicide", anim = "pistol"}}, + } + }, + + { + name = 'sports', + label = 'Sporti', + items = { + {label = "Flex muscles", type = "anim", data = {lib = "amb@world_human_muscle_flex@arms_at_side@base", anim = "base"}}, + {label = "Lift weights", type = "anim", data = {lib = "amb@world_human_muscle_free_weights@male@barbell@base", anim = "base"}}, + {label = "Do push ups", type = "anim", data = {lib = "amb@world_human_push_ups@male@base", anim = "base"}}, + {label = "Do sit ups", type = "anim", data = {lib = "amb@world_human_sit_ups@male@base", anim = "base"}}, + {label = "Do yoga", type = "anim", data = {lib = "amb@world_human_yoga@male@base", anim = "base_a"}}, + } + }, + + { + name = 'misc', + label = 'Razno', + items = { + {label = "Drink coffee", type = "anim", data = {lib = "amb@world_human_aa_coffee@idle_a", anim = "idle_a"}}, + {label = "Sit", type = "anim", data = {lib = "anim@heists@prison_heistunfinished_biztarget_idle", anim = "target_idle"}}, + {label = "Lean against wall", type = "scenario", data = {anim = "world_human_leaning"}}, + {label = "Sunbathe Back", type = "scenario", data = {anim = "WORLD_HUMAN_SUNBATHE_BACK"}}, + {label = "Sunbathe Front", type = "scenario", data = {anim = "WORLD_HUMAN_SUNBATHE"}}, + {label = "Clean", type = "scenario", data = {anim = "world_human_maid_clean"}}, + {label = "BBQ", type = "scenario", data = {anim = "PROP_HUMAN_BBQ"}}, + {label = "Search", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_bj_to_prop_female"}}, + {label = "Take selfie", type = "scenario", data = {anim = "world_human_tourist_mobile"}}, + {label = "Listen to wall/door", type = "anim", data = {lib = "mini@safe_cracking", anim = "idle_base"}}, + } + }, + + { + name = 'attitudem', + label = 'Stili hoje', + items = { + {label = "Normal M", type = "attitude", data = {lib = "move_m@confident", anim = "move_m@confident"}}, + {label = "Normal F", type = "attitude", data = {lib = "move_f@heels@c", anim = "move_f@heels@c"}}, + {label = "Depressed male", type = "attitude", data = {lib = "move_m@depressed@a", anim = "move_m@depressed@a"}}, + {label = "Depressed female", type = "attitude", data = {lib = "move_f@depressed@a", anim = "move_f@depressed@a"}}, + {label = "Business", type = "attitude", data = {lib = "move_m@business@a", anim = "move_m@business@a"}}, + {label = "Determined", type = "attitude", data = {lib = "move_m@brave@a", anim = "move_m@brave@a"}}, + {label = "Casual", type = "attitude", data = {lib = "move_m@casual@a", anim = "move_m@casual@a"}}, + {label = "Ate too much", type = "attitude", data = {lib = "move_m@fat@a", anim = "move_m@fat@a"}}, + {label = "Hipster", type = "attitude", data = {lib = "move_m@hipster@a", anim = "move_m@hipster@a"}}, + {label = "Injured", type = "attitude", data = {lib = "move_m@injured", anim = "move_m@injured"}}, + {label = "In a hurry", type = "attitude", data = {lib = "move_m@hurry@a", anim = "move_m@hurry@a"}}, + {label = "Hobo", type = "attitude", data = {lib = "move_m@hobo@a", anim = "move_m@hobo@a"}}, + {label = "sad", type = "attitude", data = {lib = "move_m@sad@a", anim = "move_m@sad@a"}}, + {label = "Muscle", type = "attitude", data = {lib = "move_m@muscle@a", anim = "move_m@muscle@a"}}, + {label = "Shocked", type = "attitude", data = {lib = "move_m@shocked@a", anim = "move_m@shocked@a"}}, + {label = "Being shady", type = "attitude", data = {lib = "move_m@shadyped@a", anim = "move_m@shadyped@a"}}, + {label = "Buzzed", type = "attitude", data = {lib = "move_m@buzzed", anim = "move_m@buzzed"}}, + {label = "Hurry", type = "attitude", data = {lib = "move_m@hurry_butch@a", anim = "move_m@hurry_butch@a"}}, + {label = "Proud", type = "attitude", data = {lib = "move_m@money", anim = "move_m@money"}}, + {label = "Short race", type = "attitude", data = {lib = "move_m@quick", anim = "move_m@quick"}}, + {label = "Man eater", type = "attitude", data = {lib = "move_f@maneater", anim = "move_f@maneater"}}, + {label = "Sassy", type = "attitude", data = {lib = "move_f@sassy", anim = "move_f@sassy"}}, + {label = "Arrogant", type = "attitude", data = {lib = "move_f@arrogant@a", anim = "move_f@arrogant@a"}}, + } + }, + { + name = 'porn', + label = 'NSFW', + items = { + {label = "Man receiving in car", type = "anim", data = {lib = "oddjobs@towing", anim = "m_blow_job_loop"}}, + {label = "Woman giving in car", type = "anim", data = {lib = "oddjobs@towing", anim = "f_blow_job_loop"}}, + {label = "Man on bottom in car", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_sex_loop_player"}}, + {label = "Woman on top in car", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_sex_loop_female"}}, + {label = "Scratch nuts", type = "anim", data = {lib = "mp_player_int_uppergrab_crotch", anim = "mp_player_int_grab_crotch"}}, + {label = "Hooker 1", type = "anim", data = {lib = "mini@strip_club@idles@stripper", anim = "stripper_idle_02"}}, + {label = "Hooker 2", type = "scenario", data = {anim = "WORLD_HUMAN_PROSTITUTE_HIGH_CLASS"}}, + {label = "Hooker 3", type = "anim", data = {lib = "mini@strip_club@backroom@", anim = "stripper_b_backroom_idle_b"}}, + {label = "Strip Tease 1", type = "anim", data = {lib = "mini@strip_club@lap_dance@ld_girl_a_song_a_p1", anim = "ld_girl_a_song_a_p1_f"}}, + {label = "Strip Tease 2", type = "anim", data = {lib = "mini@strip_club@private_dance@part2", anim = "priv_dance_p2"}}, + {label = "Stip Tease On Knees", type = "anim", data = {lib = "mini@strip_club@private_dance@part3", anim = "priv_dance_p3"}}, + } + }, + +} \ No newline at end of file diff --git a/[esx_addons]/esx_animations/localization/sv_config.lua b/[esx_addons]/esx_animations/localization/sv_config.lua new file mode 100644 index 00000000..547d63f8 --- /dev/null +++ b/[esx_addons]/esx_animations/localization/sv_config.lua @@ -0,0 +1,162 @@ +Config = {} + +Config.Animations = { + + { + name = 'festives', + label = 'Festliga', + items = { + {label = "Rök en cigarett", type = "scenario", data = {anim = "WORLD_HUMAN_SMOKING"}}, + {label = "Spela musik", type = "scenario", data = {anim = "WORLD_HUMAN_MUSICIAN"}}, + {label = "DJ", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@dj", anim = "dj"}}, + {label = "Drick en öl", type = "scenario", data = {anim = "WORLD_HUMAN_DRINKING"}}, + {label = "Party", type = "scenario", data = {anim = "WORLD_HUMAN_PARTYING"}}, + {label = "Luftgitarr", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@air_guitar", anim = "air_guitar"}}, + {label = "Dansa", type = "anim", data = {lib = "anim@mp_player_intcelebrationfemale@air_shagging", anim = "air_shagging"}}, + {label = "Rock'n'roll", type = "anim", data = {lib = "mp_player_int_upperrock", anim = "mp_player_int_rock"}}, + -- {label = "Mekka en joint", type = "scenario", data = {anim = "WORLD_HUMAN_SMOKING_POT"}}, + {label = "Fylld på platsen", type = "anim", data = {lib = "amb@world_human_bum_standing@drunk@idle_a", anim = "idle_a"}}, + {label = "Spy", type = "anim", data = {lib = "oddjobs@taxi@tie", anim = "vomit_outside"}}, + } + }, + + { + name = 'greetings', + label = 'Hälsningar', + items = { + {label = "Hälsa", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_hello"}}, + {label = "Skaka hand", type = "anim", data = {lib = "mp_common", anim = "givetake1_a"}}, + {label = "Skaka hand 2", type = "anim", data = {lib = "mp_ped_interaction", anim = "handshake_guy_a"}}, + {label = "Gangsterhälsning", type = "anim", data = {lib = "mp_ped_interaction", anim = "hugs_guy_a"}}, + {label = "Militärhälsning", type = "anim", data = {lib = "mp_player_int_uppersalute", anim = "mp_player_int_salute"}}, + } + }, + + { + name = 'work', + label = 'Jobb', + items = { + {label = "Misstänkt: gå till polisen", type = "anim", data = {lib = "random@arrests@busted", anim = "idle_c"}}, + {label = "FIskare", type = "scenario", data = {anim = "world_human_stand_fishing"}}, + {label = "Polis utreda", type = "anim", data = {lib = "amb@code_human_police_investigate@idle_b", anim = "idle_f"}}, + {label = "Polis: prata på radion", type = "anim", data = {lib = "random@arrests", anim = "generic_radio_chatter"}}, + {label = "Polis: trafik", type = "scenario", data = {anim = "WORLD_HUMAN_CAR_PARK_ATTENDANT"}}, + {label = "Polis: kikare", type = "scenario", data = {anim = "WORLD_HUMAN_BINOCULARS"}}, + {label = "Jordbruk: skörd", type = "scenario", data = {anim = "world_human_gardener_plant"}}, + {label = "Mekaniker: reparera motorn", type = "anim", data = {lib = "mini@repair", anim = "fixing_a_ped"}}, + {label = "Läkare: observera", type = "scenario", data = {anim = "CODE_HUMAN_MEDIC_KNEEL"}}, + {label = "Taxi: prata med kunden", type = "anim", data = {lib = "oddjobs@taxi@driver", anim = "leanover_idle"}}, + {label = "Taxi: ge räkning", type = "anim", data = {lib = "oddjobs@taxi@cyi", anim = "std_hand_off_ps_passenger"}}, + {label = "Livsmedel: ge handla", type = "anim", data = {lib = "mp_am_hold_up", anim = "purchase_beerbox_shopkeeper"}}, + {label = "Bartender: tjäna en shot", type = "anim", data = {lib = "mini@drinking", anim = "shots_barman_b"}}, + {label = "Reporter: Ta en bild", type = "scenario", data = {anim = "WORLD_HUMAN_PAPARAZZI"}}, + {label = "Ta noteringar", type = "scenario", data = {anim = "WORLD_HUMAN_CLIPBOARD"}}, + {label = "Använd hammare", type = "scenario", data = {anim = "WORLD_HUMAN_HAMMERING"}}, + {label = "Gör rundan", type = "scenario", data = {anim = "WORLD_HUMAN_BUM_FREEWAY"}}, + {label = "Statyn", type = "scenario", data = {anim = "WORLD_HUMAN_HUMAN_STATUE"}}, + } + }, + + { + name = 'humors', + label = 'Humor', + items = { + {label = "Gratulera", type = "scenario", data = {anim = "WORLD_HUMAN_CHEERING"}}, + {label = "Stor", type = "anim", data = {lib = "mp_action", anim = "thanks_male_06"}}, + {label = "Peka", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_point"}}, + {label = "Kom hit", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_come_here_soft"}}, + {label = "Kom an", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_bring_it_on"}}, + {label = "Till mig", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_me"}}, + {label = "Jag visste det, skit", type = "anim", data = {lib = "anim@am_hold_up@male", anim = "shoplift_high"}}, + {label = "Utmattad", type = "scenario", data = {lib = "amb@world_human_jog_standing@male@idle_b", anim = "idle_d"}}, + {label = "Jag är i skiten", type = "scenario", data = {lib = "amb@world_human_bum_standing@depressed@idle_a", anim = "idle_a"}}, + {label = "Facepalm", type = "anim", data = {lib = "anim@mp_player_intcelebrationmale@face_palm", anim = "face_palm"}}, + {label = "Lugna ner ", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_easy_now"}}, + {label = "Vad gjorde jag?", type = "anim", data = {lib = "oddjobs@assassinate@multi@", anim = "react_big_variations_a"}}, + {label = "Att vara rädd", type = "anim", data = {lib = "amb@code_human_cower_stand@male@react_cowering", anim = "base_right"}}, + {label = "Slåss?", type = "anim", data = {lib = "anim@deathmatch_intros@unarmed", anim = "intro_male_unarmed_e"}}, + {label = "Det är inte möjligt!", type = "anim", data = {lib = "gestures@m@standing@casual", anim = "gesture_damn"}}, + {label = "Omfamna", type = "anim", data = {lib = "mp_ped_interaction", anim = "kisses_guy_a"}}, + {label = "Finger av ära", type = "anim", data = {lib = "mp_player_int_upperfinger", anim = "mp_player_int_finger_01_enter"}}, + {label = "Vinka", type = "anim", data = {lib = "mp_player_int_upperwank", anim = "mp_player_int_wank_01"}}, + {label = "Begå självmord", type = "anim", data = {lib = "mp_suicide", anim = "pistol"}}, + } + }, + + { + name = 'sports', + label = 'Sporter', + items = { + {label = "Flexa muskler", type = "anim", data = {lib = "amb@world_human_muscle_flex@arms_at_side@base", anim = "base"}}, + {label = "Viktstång", type = "anim", data = {lib = "amb@world_human_muscle_free_weights@male@barbell@base", anim = "base"}}, + {label = "Armhävningar", type = "anim", data = {lib = "amb@world_human_push_ups@male@base", anim = "base"}}, + {label = "Gör situps", type = "anim", data = {lib = "amb@world_human_sit_ups@male@base", anim = "base"}}, + {label = "Yoga", type = "anim", data = {lib = "amb@world_human_yoga@male@base", anim = "base_a"}}, + } + }, + + { + name = 'misc', + label = 'Olika', + items = { + {label = "Drick en kaffe", type = "anim", data = {lib = "amb@world_human_aa_coffee@idle_a", anim = "idle_a"}}, + {label = "Sitta", type = "anim", data = {lib = "anim@heists@prison_heistunfinished_biztarget_idle", anim = "target_idle"}}, + {label = "Luta dig", type = "scenario", data = {anim = "world_human_leaning"}}, + {label = "Ligg på ryggen", type = "scenario", data = {anim = "WORLD_HUMAN_SUNBATHE_BACK"}}, + {label = "Ligg på magen", type = "scenario", data = {anim = "WORLD_HUMAN_SUNBATHE"}}, + {label = "Rengör något", type = "scenario", data = {anim = "world_human_maid_clean"}}, + {label = "Förbered dig för att äta", type = "scenario", data = {anim = "PROP_HUMAN_BBQ"}}, + {label = "Sex Position", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_bj_to_prop_female"}}, + {label = "Ta en selfie", type = "scenario", data = {anim = "world_human_tourist_mobile"}}, + {label = "Lyssna på en dörr", type = "anim", data = {lib = "mini@safe_cracking", anim = "idle_base"}}, + } + }, + + { + name = 'attitudem', + label = 'Attituder', + items = { + {label = "Självsäker M", type = "attitude", data = {lib = "move_m@confident", anim = "move_m@confident"}}, + {label = "Självsäker K", type = "attitude", data = {lib = "move_f@heels@c", anim = "move_f@heels@c"}}, + {label = "Deprimerad M", type = "attitude", data = {lib = "move_m@depressed@a", anim = "move_m@depressed@a"}}, + {label = "Deprimerad K", type = "attitude", data = {lib = "move_f@depressed@a", anim = "move_f@depressed@a"}}, + {label = "Business", type = "attitude", data = {lib = "move_m@business@a", anim = "move_m@business@a"}}, + {label = "Modig", type = "attitude", data = {lib = "move_m@brave@a", anim = "move_m@brave@a"}}, + {label = "Nonchalant", type = "attitude", data = {lib = "move_m@casual@a", anim = "move_m@casual@a"}}, + {label = "Fet", type = "attitude", data = {lib = "move_m@fat@a", anim = "move_m@fat@a"}}, + {label = "Hipster", type = "attitude", data = {lib = "move_m@hipster@a", anim = "move_m@hipster@a"}}, + {label = "Skadad", type = "attitude", data = {lib = "move_m@injured", anim = "move_m@injured"}}, + {label = "Bråttom", type = "attitude", data = {lib = "move_m@hurry@a", anim = "move_m@hurry@a"}}, + {label = "Hemlös", type = "attitude", data = {lib = "move_m@hobo@a", anim = "move_m@hobo@a"}}, + {label = "Ledsen", type = "attitude", data = {lib = "move_m@sad@a", anim = "move_m@sad@a"}}, + {label = "Muskler", type = "attitude", data = {lib = "move_m@muscle@a", anim = "move_m@muscle@a"}}, + {label = "Chockad", type = "attitude", data = {lib = "move_m@shocked@a", anim = "move_m@shocked@a"}}, + {label = "Shadyped", type = "attitude", data = {lib = "move_m@shadyped@a", anim = "move_m@shadyped@a"}}, + {label = "Surrande", type = "attitude", data = {lib = "move_m@buzzed", anim = "move_m@buzzed"}}, + {label = "Pressad", type = "attitude", data = {lib = "move_m@hurry_butch@a", anim = "move_m@hurry_butch@a"}}, + {label = "Pengar", type = "attitude", data = {lib = "move_m@money", anim = "move_m@money"}}, + {label = "Snabb", type = "attitude", data = {lib = "move_m@quick", anim = "move_m@quick"}}, + {label = "Man ätare", type = "attitude", data = {lib = "move_f@maneater", anim = "move_f@maneater"}}, + {label = "Oförskämd", type = "attitude", data = {lib = "move_f@sassy", anim = "move_f@sassy"}}, + {label = "Arrogant", type = "attitude", data = {lib = "move_f@arrogant@a", anim = "move_f@arrogant@a"}}, + } + }, + + { + name = 'porn', + label = 'Sexställningar', + items = { + {label = "1", type = "anim", data = {lib = "oddjobs@towing", anim = "m_blow_job_loop"}}, + {label = "2", type = "anim", data = {lib = "oddjobs@towing", anim = "f_blow_job_loop"}}, + {label = "3", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_sex_loop_player"}}, + {label = "4", type = "anim", data = {lib = "mini@prostitutes@sexlow_veh", anim = "low_car_sex_loop_female"}}, + {label = "5", type = "anim", data = {lib = "mp_player_int_uppergrab_crotch", anim = "mp_player_int_grab_crotch"}}, + {label = "6", type = "anim", data = {lib = "mini@strip_club@idles@stripper", anim = "stripper_idle_02"}}, + {label = "7", type = "scenario", data = {anim = "WORLD_HUMAN_PROSTITUTE_HIGH_CLASS"}}, + {label = "8", type = "anim", data = {lib = "mini@strip_club@backroom@", anim = "stripper_b_backroom_idle_b"}}, + {label = "9", type = "anim", data = {lib = "mini@strip_club@lap_dance@ld_girl_a_song_a_p1", anim = "ld_girl_a_song_a_p1_f"}}, + {label = "10", type = "anim", data = {lib = "mini@strip_club@private_dance@part2", anim = "priv_dance_p2"}}, + {label = "11", type = "anim", data = {lib = "mini@strip_club@private_dance@part3", anim = "priv_dance_p3"}}, + } + } +} diff --git a/[esx_addons]/esx_bankerjob/.editorconfig b/[esx_addons]/esx_bankerjob/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_bankerjob/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_bankerjob/LICENSE b/[esx_addons]/esx_bankerjob/LICENSE new file mode 100644 index 00000000..4410e5f1 --- /dev/null +++ b/[esx_addons]/esx_bankerjob/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_bankerjob + Copyright (C) 2015-2023 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 . + +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_bankerjob Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_bankerjob/README.md b/[esx_addons]/esx_bankerjob/README.md new file mode 100644 index 00000000..68250d5d --- /dev/null +++ b/[esx_addons]/esx_bankerjob/README.md @@ -0,0 +1,44 @@ +# esx_bankerjob + +## Requirements + +- [cron](https://github.com/ESX-Org/cron) +- [esx_addonaccount](https://github.com/ESX-Org/esx_addonaccount) +- [esx_society](https://github.com/ESX-Org/esx_society) + +## Download & Installation + +### Using [fvm](https://github.com/qlaffont/fvm-installer) +``` +fvm install --save --folder=esx esx-org/esx_bankerjob +``` + +### Using Git +``` +cd resources +git clone https://github.com/ESX-Org/esx_bankerjob [esx]/esx_bankerjob +``` + +### Manually +- Download https://github.com/ESX-Org/esx_bankerjob/archive/master.zip +- Put it in the `[esx]` directory + +## Installation +- Import `esx_bankerjob.sql` in your database +- Add this in your `server.cfg`: + +``` +start esx_bankerjob +``` + +# Legal +### License +esx_bankerjob - bank script + +Copyright (C) 2015-2023 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/. \ No newline at end of file diff --git a/[esx_addons]/esx_bankerjob/client/main.lua b/[esx_addons]/esx_bankerjob/client/main.lua new file mode 100644 index 00000000..eab4b623 --- /dev/null +++ b/[esx_addons]/esx_bankerjob/client/main.lua @@ -0,0 +1,256 @@ +local CurrentActionData, CurrentAction, CurrentActionMsg, hasAlreadyEnteredMarker, lastZone = {} + +RegisterNetEvent('esx:playerLoaded') +AddEventHandler('esx:playerLoaded', function (xPlayer) + ESX.PlayerData = xPlayer +end) + +RegisterNetEvent('esx:setJob') +AddEventHandler('esx:setJob', function (job) + ESX.PlayerData.job = job +end) + +function OpenBankActionsMenu() + local elements = { + {unselectable = true, icon = "fas fa-bank", title = TranslateCap("bank")}, + {icon = "fas fa-users", title = TranslateCap("customers"), value = "customers"}, + {icon = "fas fa-scroll", title = TranslateCap("billing"), value = "billing"} + } + + if ESX.PlayerData.job.grade_name == 'boss' then + elements[#elements+1] = { + icon = "fas fa-wallet", + title = TranslateCap("boss_actions"), + value = "boss_actions" + } + end + + ESX.CloseContext() + + ESX.OpenContext("right", elements, function(menu,element) + if element.value == "customers" then + OpenCustomersMenu() + elseif element.value == "billing" then + CreateBillingDialog() + elseif element.value == "boss_actions" then + TriggerEvent('esx_society:openBossMenu', 'banker', function(data, menu) + menu.close() + end, {wash = false}) + CurrentAction = 'bank_actions_menu' + CurrentActionMsg = TranslateCap('press_input_context_to_open_menu') + CurrentActionData = {} + end + end, function(menu) + CurrentAction = 'bank_actions_menu' + CurrentActionMsg = TranslateCap('press_input_context_to_open_menu') + CurrentActionData = {} + end) +end + +function OpenCustomersMenu() + ESX.TriggerServerCallback('esx_bankerjob:getCustomers', function(customers) + local elements = { + {unselectable = true, icon = "fas fa-users", title = TranslateCap('customer')} + } + + for i=1, #customers do + elements[#elements+1] = { + icon = "fas fa-user", + title = customers[i].name, + bankSavings = customers[i].bankSavings, + data = customers[i] + } + end + + ESX.OpenContext("right", elements, function(menu,element) + local elements2 = { + {unselectable = true, icon = "fas fa-user", title = element.title}, + {unselectable = true, icon = "fas fa-wallet", title = "$"..ESX.Math.GroupDigits(element.bankSavings)}, + {icon = "fas fa-wallet", title = TranslateCap('deposit'), value = "deposit"}, + {icon = "fas fa-wallet", title = TranslateCap('withdraw'), value = "withdraw"}, + } + ESX.OpenContext("right", elements2, function(menu2,element2) + local customer = element.data + if element2.value == "deposit" then + local elements = { + {unselectable = true, icon = "fas fa-scroll", title = TranslateCap('amount')}, + {title = "Amount", input = true, inputType = "number", inputMin = 1, inputMax = 250000, inputPlaceholder = "Amount to bill.."}, + {icon = "fas fa-check-double", title = "Confirm", val = "confirm"} + } + + ESX.OpenContext("right", elements, function(menu,element) + if element.val == "confirm" then + local amount = tonumber(menu.eles[2].inputValue) + + if amount == nil then + ESX.ShowNotification(TranslateCap('invalid_amount')) + else + ESX.CloseContext() + TriggerServerEvent('esx_bankerjob:customerDeposit', customer.source, amount) + ESX.ShowNotification("You have deposited $"..amount.." into "..element.title.."s account.") + OpenCustomersMenu() + end + end + end, function(menu) + CurrentAction = 'bank_actions_menu' + CurrentActionMsg = TranslateCap('press_input_context_to_open_menu') + CurrentActionData = {} + end) + elseif element2.value == "withdraw" then + local elements = { + {unselectable = true, icon = "fas fa-scroll", title = TranslateCap('amount')}, + {title = "Amount", input = true, inputType = "number", inputMin = 1, inputMax = 250000, inputPlaceholder = "Amount to bill.."}, + {icon = "fas fa-check-double", title = "Confirm", val = "confirm"} + } + + ESX.OpenContext("right", elements, function(menu,element) + if element.val == "confirm" then + local amount = tonumber(menu.eles[2].inputValue) + + if amount == nil then + ESX.ShowNotification(TranslateCap('invalid_amount')) + else + ESX.CloseContext() + TriggerServerEvent('esx_bankerjob:customerWithdraw', customer.source, amount) + ESX.ShowNotification("You have withdrawn $"..amount.." from "..element.title.."s account.") + OpenCustomersMenu() + end + end + end, function(menu) + CurrentAction = 'bank_actions_menu' + CurrentActionMsg = TranslateCap('press_input_context_to_open_menu') + CurrentActionData = {} + end) + end + end, function(menu) + CurrentAction = 'bank_actions_menu' + CurrentActionMsg = TranslateCap('press_input_context_to_open_menu') + CurrentActionData = {} + end) + end, function(menu) + CurrentAction = 'bank_actions_menu' + CurrentActionMsg = TranslateCap('press_input_context_to_open_menu') + CurrentActionData = {} + end) + end) +end + +function CreateBillingDialog() + local elements = { + {unselectable = true, icon = "fas fa-scroll", title = TranslateCap('bill_amount')}, + {title = "Amount", input = true, inputType = "number", inputMin = 1, inputMax = 250000, inputPlaceholder = "Amount to bill.."}, + {icon = "fas fa-check-double", title = "Confirm", val = "confirm"} + } + + ESX.OpenContext("right", elements, function(menu,element) + if element.val == "confirm" then + local amount = tonumber(menu.eles[2].inputValue) + + if amount == nil then + ESX.ShowNotification(TranslateCap('invalid_amount')) + else + ESX.CloseContext() + + local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer() + + if closestPlayer == -1 or closestDistance > 5.0 then + ESX.ShowNotification(TranslateCap('no_player_nearby')) + else + TriggerServerEvent('esx_billing:sendBill', GetPlayerServerId(closestPlayer), 'society_banker', 'Bank', amount) + end + end + end + end, function(menu) + CurrentAction = 'bank_actions_menu' + CurrentActionMsg = TranslateCap('press_input_context_to_open_menu') + CurrentActionData = {} + end) +end + +AddEventHandler('esx_bankerjob:hasEnteredMarker', function (zone) + if zone == 'BankActions' and ESX.PlayerData.job and ESX.PlayerData.job.name == 'banker' then + CurrentAction = 'bank_actions_menu' + CurrentActionMsg = TranslateCap('press_input_context_to_open_menu') + CurrentActionData = {} + end +end) + +AddEventHandler('esx_bankerjob:hasExitedMarker', function (zone) + CurrentAction = nil + ESX.CloseContext() +end) + +-- Create Blips +CreateThread(function() + local blip = AddBlipForCoord(Config.Zones.BankActions.Coords) + + SetBlipSprite(blip, 108) + SetBlipColour(blip, 30) + SetBlipAsShortRange(blip, true) + + BeginTextCommandSetBlipName('STRING') + AddTextComponentSubstringPlayerName(TranslateCap('bank')) + EndTextCommandSetBlipName(blip) +end) + +-- Draw marker & activate menu when player is inside marker +CreateThread(function() + while true do + Wait(0) + + if ESX.PlayerData.job and ESX.PlayerData.job.name == 'banker' then + local playerCoords = GetEntityCoords(PlayerPedId()) + local isInMarker, letSleep, currentZone = false, true + + for k,v in pairs(Config.Zones) do + local distance = #(playerCoords - v.Coords) + + if v.Type ~= -1 and distance < Config.DrawDistance then + letSleep = false + DrawMarker(v.Type, v.Coords, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, v.Size.x, v.Size.y, v.Size.z, v.Color.r, v.Color.g, v.Color.b, 100, false, true, 2, false, nil, nil, false) + end + + if distance < v.Size.x then + isInMarker, currentZone, letSleep = true, k, false + end + end + + if isInMarker and not hasAlreadyEnteredMarker then + hasAlreadyEnteredMarker, lastZone = true, currentZone + TriggerEvent('esx_bankerjob:hasEnteredMarker', currentZone) + end + + if not isInMarker and hasAlreadyEnteredMarker then + hasAlreadyEnteredMarker = false + TriggerEvent('esx_bankerjob:hasExitedMarker', lastZone) + end + + if letSleep then + Wait(500) + end + else + Wait(500) + end + end +end) + +-- Key Controls +CreateThread(function() + while true do + Wait(0) + + if CurrentAction then + ESX.ShowHelpNotification(CurrentActionMsg) + + if IsControlJustReleased(0, 38) and ESX.PlayerData.job and ESX.PlayerData.job.name == 'banker' then + if CurrentAction == 'bank_actions_menu' then + OpenBankActionsMenu() + end + + CurrentAction = nil + end + else + Wait(500) + end + end +end) diff --git a/[esx_addons]/esx_bankerjob/config.lua b/[esx_addons]/esx_bankerjob/config.lua new file mode 100644 index 00000000..9e26ffe1 --- /dev/null +++ b/[esx_addons]/esx_bankerjob/config.lua @@ -0,0 +1,13 @@ +Config = {} +Config.DrawDistance = 10.0 +Config.BankSavingPercentage = 2.5 +Config.Locale = GetConvar('esx:locale', 'en') + +Config.Zones = { + BankActions = { + Coords = vector3(260.1, 204.3, 109.2), + Size = {x = 1.5, y = 1.5, z = 1.0}, + Color = {r = 102, g = 102, b = 204}, + Type = 1 + } +} diff --git a/[esx_addons]/esx_bankerjob/esx_bankerjob.sql b/[esx_addons]/esx_bankerjob/esx_bankerjob.sql new file mode 100644 index 00000000..83b9a13f --- /dev/null +++ b/[esx_addons]/esx_bankerjob/esx_bankerjob.sql @@ -0,0 +1,18 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_banker','Banque',1), + ('bank_savings','Livret Bleu',0) +; + +INSERT INTO `jobs` (name, label) VALUES + ('banker','Banquier') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('banker',0,'advisor','Conseiller',10,'{}','{}'), + ('banker',1,'banker','Banquier',20,'{}','{}'), + ('banker',2,'business_banker',"Banquier d\'affaire",30,'{}','{}'), + ('banker',3,'trader','Trader',40,'{}','{}'), + ('banker',4,'boss','Patron',0,'{}','{}') +; diff --git a/[esx_addons]/esx_bankerjob/fxmanifest.lua b/[esx_addons]/esx_bankerjob/fxmanifest.lua new file mode 100644 index 00000000..47eb4d5f --- /dev/null +++ b/[esx_addons]/esx_bankerjob/fxmanifest.lua @@ -0,0 +1,30 @@ +fx_version 'adamant' + +game 'gta5' + +description 'ESX Banker job' + +version '1.9.0' +lua54 'yes' +shared_script '@es_extended/imports.lua' + +server_scripts { + '@async/async.lua', + '@oxmysql/lib/MySQL.lua', + '@es_extended/locale.lua', + 'config.lua', + 'locales/*.lua', + 'server/main.lua' +} + +client_scripts { + '@es_extended/locale.lua', + 'config.lua', + 'locales/*.lua', + 'client/main.lua' +} + +dependencies { + 'es_extended', + 'esx_society' +} diff --git a/[esx_addons]/esx_bankerjob/locales/br.lua b/[esx_addons]/esx_bankerjob/locales/br.lua new file mode 100644 index 00000000..6bc9341c --- /dev/null +++ b/[esx_addons]/esx_bankerjob/locales/br.lua @@ -0,0 +1,16 @@ +Locales['br'] = { + ['actions'] = 'ações', + ['amount'] = 'quantidade', + ['balance'] = 'saldo', + ['bank'] = 'banco', + ['bill_amount'] = 'montante de dinheiro', + ['billing'] = 'faturamento', + ['customer'] = 'cliente', + ['customers'] = 'clientes', + ['deposit'] = 'depositar', + ['invalid_amount'] = 'quantidade inválida', + ['no_player_nearby'] = 'nenhum jogador nas proximidades', + ['press_input_context_to_open_menu'] = 'pressione [E] para abrir o menu', + ['withdraw'] = 'sacar', + ['boss_actions'] = 'boss Actions', +} diff --git a/[esx_addons]/esx_bankerjob/locales/de.lua b/[esx_addons]/esx_bankerjob/locales/de.lua new file mode 100644 index 00000000..dfd68f42 --- /dev/null +++ b/[esx_addons]/esx_bankerjob/locales/de.lua @@ -0,0 +1,16 @@ +Locales['de'] = { + ['actions'] = 'Aktionen', + ['amount'] = 'Betrag', + ['balance'] = 'Kontostand', + ['bank'] = 'Bank', + ['bill_amount'] = 'Rechnungsbetrag', + ['billing'] = 'Rechnung', + ['customer'] = 'Kunde', + ['customers'] = 'Client', + ['deposit'] = 'einzahlen', + ['invalid_amount'] = 'ungültiger Betrag', + ['no_player_nearby'] = 'kein Spieler in der Nähe', + ['press_input_context_to_open_menu'] = 'Drücke [E] um das Bank Menü zu öffnen', + ['withdraw'] = 'Abheben', + ['boss_actions'] = 'boss Actions', +} diff --git a/[esx_addons]/esx_bankerjob/locales/en.lua b/[esx_addons]/esx_bankerjob/locales/en.lua new file mode 100644 index 00000000..66fae148 --- /dev/null +++ b/[esx_addons]/esx_bankerjob/locales/en.lua @@ -0,0 +1,16 @@ +Locales['en'] = { + ['actions'] = 'actions', + ['amount'] = 'amount', + ['balance'] = 'balance', + ['bank'] = 'bank', + ['bill_amount'] = 'bill amount', + ['billing'] = 'billing', + ['customer'] = 'customer', + ['customers'] = 'clients', + ['deposit'] = 'deposit', + ['invalid_amount'] = 'invalid amount', + ['no_player_nearby'] = 'no player nearby', + ['press_input_context_to_open_menu'] = 'press [E] to open the Bank Menu.', + ['withdraw'] = 'withdraw', + ['boss_actions'] = 'boss Actions', +} diff --git a/[esx_addons]/esx_bankerjob/locales/es.lua b/[esx_addons]/esx_bankerjob/locales/es.lua new file mode 100644 index 00000000..f108ffe0 --- /dev/null +++ b/[esx_addons]/esx_bankerjob/locales/es.lua @@ -0,0 +1,16 @@ +Locales['es'] = { + ['actions'] = 'acciones', + ['amount'] = 'cantidad', + ['balance'] = 'balance', + ['bank'] = 'Banco', + ['bill_amount'] = 'total de la factura', + ['billing'] = 'facturación', + ['customer'] = 'cliente', + ['customers'] = 'Clientes', + ['deposit'] = 'depositar', + ['invalid_amount'] = 'Monto invalido', + ['no_player_nearby'] = 'no hay jugadores cerca', + ['press_input_context_to_open_menu'] = 'presione [E] para abrir el Menú del banc .', + ['withdraw'] = 'retirar', + ['boss_actions'] = 'Acciones del jefe', + } \ No newline at end of file diff --git a/[esx_addons]/esx_bankerjob/locales/et.lua b/[esx_addons]/esx_bankerjob/locales/et.lua new file mode 100644 index 00000000..474ede2a --- /dev/null +++ b/[esx_addons]/esx_bankerjob/locales/et.lua @@ -0,0 +1,16 @@ +Locales['et'] = { + ['actions'] = 'Tegevused', + ['amount'] = 'Kogus', + ['balance'] = 'Saldo', + ['bank'] = 'Pank', + ['bill_amount'] = 'Arve suurus', + ['billing'] = 'Arve', + ['customer'] = 'Klient', + ['customers'] = 'Kliendid', + ['deposit'] = 'Sisesta', + ['invalid_amount'] = 'Vale kogus', + ['no_player_nearby'] = 'Ühtegi isikut pole ligidal', + ['press_input_context_to_open_menu'] = 'Vajuta [E], et avada panga menüü.', + ['withdraw'] = 'Võta välja', + ['boss_actions'] = 'Bossi tegevused', +} diff --git a/[esx_addons]/esx_bankerjob/locales/fi.lua b/[esx_addons]/esx_bankerjob/locales/fi.lua new file mode 100644 index 00000000..27941be9 --- /dev/null +++ b/[esx_addons]/esx_bankerjob/locales/fi.lua @@ -0,0 +1,16 @@ +Locales['fi'] = { + ['actions'] = 'toiminnot', + ['amount'] = 'määrä', + ['balance'] = 'balanssi', + ['bank'] = 'Pankki', + ['bill_amount'] = 'laskun määrä', + ['billing'] = 'laskutus', + ['customer'] = 'asiakas', + ['customers'] = 'asiakkaat', + ['deposit'] = 'talletus', + ['invalid_amount'] = 'virheellinen määrä', + ['no_player_nearby'] = 'ei pelaajia lähettyvillä', + ['press_input_context_to_open_menu'] = 'Paina [E] avataksesi valikon', + ['withdraw'] = 'nosta', + ['boss_actions'] = 'pomo valinnat', +} diff --git a/[esx_addons]/esx_bankerjob/locales/fr.lua b/[esx_addons]/esx_bankerjob/locales/fr.lua new file mode 100644 index 00000000..ceb3efed --- /dev/null +++ b/[esx_addons]/esx_bankerjob/locales/fr.lua @@ -0,0 +1,16 @@ +Locales['fr'] = { + ['actions'] = 'actions', + ['amount'] = 'montant', + ['balance'] = 'solde', + ['bank'] = 'banque', + ['bill_amount'] = 'montant de la facture', + ['billing'] = 'facturation', + ['customer'] = 'client', + ['customers'] = 'clients', + ['deposit'] = 'virement', + ['invalid_amount'] = 'montant invalide', + ['no_player_nearby'] = 'aucun joueur à proximité', + ['press_input_context_to_open_menu'] = 'appuyez sur [E] pour ouvrir le menu', + ['withdraw'] = 'retrait', + ['boss_actions'] = 'action Patron', +} diff --git a/[esx_addons]/esx_bankerjob/locales/hu.lua b/[esx_addons]/esx_bankerjob/locales/hu.lua new file mode 100644 index 00000000..79570d88 --- /dev/null +++ b/[esx_addons]/esx_bankerjob/locales/hu.lua @@ -0,0 +1,16 @@ +Locales['hu'] = { + ['actions'] = 'műveletek', + ['amount'] = 'összeg', + ['balance'] = 'egyenleg', + ['bank'] = 'bank', + ['bill_amount'] = 'Számla összege', + ['billing'] = 'Számlázás', + ['customer'] = 'Vevő', + ['customers'] = 'Kliensek', + ['deposit'] = 'Befizetés', + ['invalid_amount'] = 'Érvénytelen mennyiség', + ['no_player_nearby'] = 'Nincsen játékos a közeledben', + ['press_input_context_to_open_menu'] = 'Nyomj [E] hogy megnyisd a bankot.', + ['withdraw'] = 'Kivétel', + ['boss_actions'] = 'Főnöki menü', +} diff --git a/[esx_addons]/esx_bankerjob/locales/it.lua b/[esx_addons]/esx_bankerjob/locales/it.lua new file mode 100644 index 00000000..47ac737d --- /dev/null +++ b/[esx_addons]/esx_bankerjob/locales/it.lua @@ -0,0 +1,16 @@ +Locales['it'] = { + ['actions'] = 'azioni', + ['amount'] = 'importo', + ['balance'] = 'saldo', + ['bank'] = 'banca', + ['bill_amount'] = 'importo fattura', + ['billing'] = 'fattura', + ['customer'] = 'cliente', + ['customers'] = 'clienti', + ['deposit'] = 'deposito', + ['invalid_amount'] = 'importo non valido', + ['no_player_nearby'] = 'nessun giocatore nelle vicinanze', + ['press_input_context_to_open_menu'] = 'premi [E] per aprire il menu della banca.', + ['withdraw'] = 'ritira', + ['boss_actions'] = 'azioni boss', +} diff --git a/[esx_addons]/esx_bankerjob/locales/nl.lua b/[esx_addons]/esx_bankerjob/locales/nl.lua new file mode 100644 index 00000000..c797c8f3 --- /dev/null +++ b/[esx_addons]/esx_bankerjob/locales/nl.lua @@ -0,0 +1,16 @@ +Locales['nl'] = { + ['actions'] = 'acties', + ['amount'] = 'bedrag', + ['balance'] = 'saldo', + ['bank'] = 'bank', + ['bill_amount'] = 'rekening bedrag', + ['billing'] = 'rekeningen', + ['customer'] = 'klant', + ['customers'] = 'klanten', + ['deposit'] = 'storten', + ['invalid_amount'] = 'ongedig bedrag', + ['no_player_nearby'] = 'geen speler in de omgeving', + ['press_input_context_to_open_menu'] = 'druk op [E] om het Bank Menute openen.', + ['withdraw'] = 'opnemen', + ['boss_actions'] = 'baas acties', +} diff --git a/[esx_addons]/esx_bankerjob/locales/si.lua b/[esx_addons]/esx_bankerjob/locales/si.lua new file mode 100644 index 00000000..a3d5071c --- /dev/null +++ b/[esx_addons]/esx_bankerjob/locales/si.lua @@ -0,0 +1,16 @@ +Locales['si'] = { + ['actions'] = 'actions', + ['amount'] = 'znesek', + ["balance"] = "balance", + ['bank'] = 'bank', + ['bill_amount'] = 'znesek računa', + ["billing"] = "billing", + ["customer"] = "customer", + ['customers'] = 'customers', + ["deposit"] = "deposit", + ["invalid_amount"] = "neveljavni znesek", + ['no_player_nearby'] = 'v bližini ni igralca', + ['press_input_context_to_open_menu'] = 'pritisnite [E] za odprtje menija banke Bank.', + ['withdraw'] = 'umakni', + ['boss_actions'] = 'boss Actions', +} \ No newline at end of file diff --git a/[esx_addons]/esx_bankerjob/locales/sv.lua b/[esx_addons]/esx_bankerjob/locales/sv.lua new file mode 100644 index 00000000..aa76049c --- /dev/null +++ b/[esx_addons]/esx_bankerjob/locales/sv.lua @@ -0,0 +1,16 @@ +Locales['sv'] = { + ['actions'] = 'Handlingar', + ['amount'] = 'Belopp', + ['balance'] = 'Saldo', + ['bank'] = 'Bank', + ['bill_amount'] = 'Räkningsbelopp', + ['billing'] = 'Fakturering', + ['customer'] = 'Kund', + ['customers'] = 'Kunder', + ['deposit'] = 'Insättning', + ['invalid_amount'] = 'Ogiltig belopp', + ['no_player_nearby'] = 'Ingen spelare i närheten', + ['press_input_context_to_open_menu'] = 'Tryck [E] för att öppna Bankmenyn.', + ['withdraw'] = 'Ta ut', + ['boss_actions'] = 'Chef handlingar', +} diff --git a/[esx_addons]/esx_bankerjob/locales/tr.lua b/[esx_addons]/esx_bankerjob/locales/tr.lua new file mode 100644 index 00000000..e7f76b64 --- /dev/null +++ b/[esx_addons]/esx_bankerjob/locales/tr.lua @@ -0,0 +1,17 @@ +Locales['tr'] = { + ['actions'] = 'hareketler', + ['amount'] = 'tutar', + ['balance'] = 'bakiye', + ['bank'] = 'banka', + ['bill_amount'] = 'fatura tutarı', + ['billing'] = 'faturalandırma', + ['customer'] = 'müşteri', + ['customers'] = 'müşteriler', + ['deposit'] = 'para yatır', + ['invalid_amount'] = 'geçersiz tutar', + ['no_player_nearby'] = 'yakında oyuncu yok', + ['press_input_context_to_open_menu'] = 'Banka Menüsünü açmak için [E] tuşuna basın.', + ['withdraw'] = 'para çek', + ['boss_actions'] = 'patron Hareketleri', + } + \ No newline at end of file diff --git a/[esx_addons]/esx_bankerjob/localization/de_esx_bankerjob.sql b/[esx_addons]/esx_bankerjob/localization/de_esx_bankerjob.sql new file mode 100644 index 00000000..6af7cd59 --- /dev/null +++ b/[esx_addons]/esx_bankerjob/localization/de_esx_bankerjob.sql @@ -0,0 +1,18 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_banker','Bank',1), + ('bank_savings','Bank',0) +; + +INSERT INTO `jobs` (name, label) VALUES + ('banker','Banker') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('banker',0,'advisor','Berater',10,'{}','{}'), + ('banker',1,'banker','Banker',20,'{}','{}'), + ('banker',2,'business_banker','Business Banker',30,'{}','{}'), + ('banker',3,'trader','Trader',40,'{}','{}'), + ('banker',4,'boss','Boss',0,'{}','{}') +; diff --git a/[esx_addons]/esx_bankerjob/localization/en_esx_bankerjob.sql b/[esx_addons]/esx_bankerjob/localization/en_esx_bankerjob.sql new file mode 100644 index 00000000..779b3bf8 --- /dev/null +++ b/[esx_addons]/esx_bankerjob/localization/en_esx_bankerjob.sql @@ -0,0 +1,18 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_banker','Bank',1), + ('bank_savings','Bank Savings',0) +; + +INSERT INTO `jobs` (name, label) VALUES + ('banker','Banker') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('banker',0,'advisor','Advisor',10,'{}','{}'), + ('banker',1,'banker','Banker',20,'{}','{}'), + ('banker',2,'business_banker','Business Banker',30,'{}','{}'), + ('banker',3,'trader','Trader',40,'{}','{}'), + ('banker',4,'boss','Lead Banker',0,'{}','{}') +; diff --git a/[esx_addons]/esx_bankerjob/localization/esx_es_esx_bankerjob.sql b/[esx_addons]/esx_bankerjob/localization/esx_es_esx_bankerjob.sql new file mode 100644 index 00000000..1b60b113 --- /dev/null +++ b/[esx_addons]/esx_bankerjob/localization/esx_es_esx_bankerjob.sql @@ -0,0 +1,18 @@ +USE `essentialmode`; + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_banker','Bank',1), + ('bank_savings','Ahorro bancario',0) +; + +INSERT INTO `jobs` (name, label) VALUES + ('banker','Banquero') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('banker',0,'advisor','Asesores',10,'{}','{}'), + ('banker',1,'banker','Banquero',20,'{}','{}'), + ('banker',2,'business_banker','Banquero de negocios',30,'{}','{}'), + ('banker',3,'trader','Comerciante',40,'{}','{}'), + ('banker',4,'boss','Banquero principal',0,'{}','{}') +; diff --git a/[esx_addons]/esx_bankerjob/localization/fi_esx_bankerjob.sql b/[esx_addons]/esx_bankerjob/localization/fi_esx_bankerjob.sql new file mode 100644 index 00000000..6b851c77 --- /dev/null +++ b/[esx_addons]/esx_bankerjob/localization/fi_esx_bankerjob.sql @@ -0,0 +1,18 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_banker','Pankki',1), + ('bank_savings','Pankki',0) +; + +INSERT INTO `jobs` (name, label) VALUES + ('banker','Pankkiiri') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('banker',0,'advisor','Konsultti',10,'{}','{}'), + ('banker',1,'banker','Pankkiiri',20,'{}','{}'), + ('banker',2,'business_banker','Yritys Pankkiiri',30,'{}','{}'), + ('banker',3,'trader','Välittäjä',40,'{}','{}'), + ('banker',4,'boss','Pomo',0,'{}','{}') +; diff --git a/[esx_addons]/esx_bankerjob/localization/nl_esx_bankerjob.sql b/[esx_addons]/esx_bankerjob/localization/nl_esx_bankerjob.sql new file mode 100644 index 00000000..c1289316 --- /dev/null +++ b/[esx_addons]/esx_bankerjob/localization/nl_esx_bankerjob.sql @@ -0,0 +1,16 @@ +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_banker','Bank',1), + ('bank_savings','Spaarrekening',0) +; + +INSERT INTO `jobs` (name, label) VALUES + ('banker','Bankier') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('banker',0,'advisor','Adviseur',10,'{}','{}'), + ('banker',1,'banker','Bankoer',20,'{}','{}'), + ('banker',2,'business_banker','Bedrijfs Bankier',30,'{}','{}'), + ('banker',3,'trader','Stocktrader',40,'{}','{}'), + ('banker',4,'boss','Hoofd Bankier',0,'{}','{}') +; diff --git a/[esx_addons]/esx_bankerjob/localization/sv_esx_bankerjob.sql b/[esx_addons]/esx_bankerjob/localization/sv_esx_bankerjob.sql new file mode 100644 index 00000000..a0323b98 --- /dev/null +++ b/[esx_addons]/esx_bankerjob/localization/sv_esx_bankerjob.sql @@ -0,0 +1,18 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_banker','Bank',1), + ('bank_savings','Bank',0) +; + +INSERT INTO `jobs` (name, label) VALUES + ('banker','Banktjänsteman') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('banker',0,'advisor','Rådgivare',10,'{}','{}'), + ('banker',1,'banker','Banktjänsteman',20,'{}','{}'), + ('banker',2,'business_banker','Företagstjänsteman',30,'{}','{}'), + ('banker',3,'trader','Köpman',40,'{}','{}'), + ('banker',4,'boss','VD',0,'{}','{}') +; diff --git a/[esx_addons]/esx_bankerjob/localization/tr_esx_bankerjob.sql b/[esx_addons]/esx_bankerjob/localization/tr_esx_bankerjob.sql new file mode 100644 index 00000000..89d032df --- /dev/null +++ b/[esx_addons]/esx_bankerjob/localization/tr_esx_bankerjob.sql @@ -0,0 +1,18 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_banker','Banka',1), + ('bank_savings','Banka Birikimi',0) +; + +INSERT INTO `jobs` (name, label) VALUES + ('banker','Bankacı') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('banker',0,'advisor','Danışman',10,'{}','{}'), + ('banker',1,'banker','Bankacı',20,'{}','{}'), + ('banker',2,'business_banker','İşletme Bankacısı',30,'{}','{}'), + ('banker',3,'trader','Borsacı',40,'{}','{}'), + ('banker',4,'boss','Yönetici',0,'{}','{}') +; diff --git a/[esx_addons]/esx_bankerjob/server/main.lua b/[esx_addons]/esx_bankerjob/server/main.lua new file mode 100644 index 00000000..93fa459b --- /dev/null +++ b/[esx_addons]/esx_bankerjob/server/main.lua @@ -0,0 +1,109 @@ +CreateThread(function() + exports["esx_society"]:registerSociety('banker', TranslateCap('bank'), 'society_banker', 'society_banker', 'society_banker', {type = 'public'}) +end) + +RegisterServerEvent('esx_bankerjob:customerDeposit') +AddEventHandler('esx_bankerjob:customerDeposit', function (target, amount) + local xPlayer = ESX.GetPlayerFromId(target) + + TriggerEvent('esx_addonaccount:getSharedAccount', 'society_banker', function (account) + if amount > 0 and account.money >= amount then + account.removeMoney(amount) + + TriggerEvent('esx_addonaccount:getAccount', 'bank_savings', xPlayer.identifier, function (account) + account.addMoney(amount) + end) + else + TriggerClientEvent('esx:showNotification', xPlayer.source, TranslateCap('invalid_amount')) + end + end) +end) + +RegisterServerEvent('esx_bankerjob:customerWithdraw') +AddEventHandler('esx_bankerjob:customerWithdraw', function (target, amount) + local xPlayer = ESX.GetPlayerFromId(target) + + TriggerEvent('esx_addonaccount:getAccount', 'bank_savings', xPlayer.identifier, function (account) + if amount > 0 and account.money >= amount then + account.removeMoney(amount) + + TriggerEvent('esx_addonaccount:getSharedAccount', 'society_banker', function (account) + account.addMoney(amount) + end) + else + TriggerClientEvent('esx:showNotification', xPlayer.source, TranslateCap('invalid_amount')) + end + end) +end) + +ESX.RegisterServerCallback('esx_bankerjob:getCustomers', function (source, cb) + local xPlayers = ESX.GetExtendedPlayers() + local customers = {} + + for i=1, #(xPlayers) do + local xPlayer = xPlayers[i] + + TriggerEvent('esx_addonaccount:getAccount', 'bank_savings', xPlayer.identifier, function(account) + table.insert(customers, { + source = xPlayer.source, + name = xPlayer.name, + bankSavings = account.money + }) + end) + end + + cb(customers) +end) + +function CalculateBankSavings(d, h, m) + local asyncTasks = {} + + MySQL.query('SELECT * FROM addon_account_data WHERE account_name = @account_name', { + ['@account_name'] = 'bank_savings' + }, function(result) + local bankInterests = 0 + + for i=1, #result, 1 do + local xPlayer = ESX.GetPlayerFromIdentifier(result[i].owner) + + if xPlayer then + TriggerEvent('esx_addonaccount:getAccount', 'bank_savings', xPlayer.identifier, function(account) + local interests = math.floor(account.money / 100 * Config.BankSavingPercentage) + bankInterests = bankInterests + interests + + table.insert(asyncTasks, function(cb) + account.addMoney(interests) + end) + end) + else + local interests = math.floor(result[i].money / 100 * Config.BankSavingPercentage) + local newMoney = result[i].money + interests + bankInterests = bankInterests + interests + + local function scope(newMoney, owner) + table.insert(asyncTasks, function(cb) + MySQL.update('UPDATE addon_account_data SET money = @money WHERE owner = @owner AND account_name = @account_name', { + ['@money'] = newMoney, + ['@owner'] = owner, + ['@account_name'] = 'bank_savings', + }, function(rowsChanged) + cb() + end) + end) + end + + scope(newMoney, result[i].owner) + end + end + + TriggerEvent('esx_addonaccount:getSharedAccount', 'society_banker', function(account) + account.addMoney(bankInterests) + end) + + Async.parallelLimit(asyncTasks, 5, function(results) + print('[^2INFO^7] Calculated interest Rate') + end) + end) +end + +TriggerEvent('cron:runAt', 22, 0, CalculateBankSavings) diff --git a/[esx_addons]/esx_banking/LICENSE b/[esx_addons]/esx_banking/LICENSE new file mode 100644 index 00000000..7c2c49f9 --- /dev/null +++ b/[esx_addons]/esx_banking/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_banking + Copyright (C) 2015-2023 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 . + +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_banking Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_banking/README.md b/[esx_addons]/esx_banking/README.md new file mode 100644 index 00000000..46061ac0 --- /dev/null +++ b/[esx_addons]/esx_banking/README.md @@ -0,0 +1,59 @@ +

[ESX] Banking

Discord - Website - Documentation + +A beautiful and Easy-To-Use Banking & ATM system for ESX + +## BANK UI + +![esx_banking_pic1](https://user-images.githubusercontent.com/22717950/189738189-375101ac-c86b-4ce8-8df3-19d740c3809c.png) + +## ATM UI + +![esx_banking_pic2](https://user-images.githubusercontent.com/22717950/189738199-a325092b-5f1d-4c7f-8950-d660d053ed0f.png) +![esx_banking_pic3](https://user-images.githubusercontent.com/22717950/189738210-7af2c7d5-7fa1-4f70-8460-743ee9258f88.png) + +## Special thanks: Gellipapa#9186,Rav3n95#2849,Csoki, csontvazharcos, Füsti, Pécé + +## Download & Installation + +- Download https://github.com/esx-framework/esx-legacy/tree/main/%5Besx_addons%5D/esx_banking +- Put it in the `[esx-addons]` directory + +## Installation + +- Add this to your `server.cfg`: + +``` +ensure esx_banking +``` + +# Database + +``` +Run the banking.sql into your database. Done. +``` + +# If you want to create a bank log in another script, you can do it this way! Only server side! + +``` +exports["esx_banking"]:logTransaction(source,logType,amount) + +- First param: source - player source +- Second param: logType - WITHDRAW,DEPOSIT,TRANSFER_RECEIVE you can only use these log types! +- Third param: amount - The amount to be logged + +For example: exports["esx_banking"]:logTransaction(source,"WITHDRAW",200) +``` + +# Legal + +### License + +esx_banking - banking script for ESX + +Copyright (C) 2023 ESX-Framework + +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/. diff --git a/[esx_addons]/esx_banking/banking.sql b/[esx_addons]/esx_banking/banking.sql new file mode 100644 index 00000000..f225e2cc --- /dev/null +++ b/[esx_addons]/esx_banking/banking.sql @@ -0,0 +1,11 @@ +CREATE TABLE IF NOT EXISTS `banking` ( + `identifier` varchar(46) DEFAULT NULL, + `type` varchar(50) DEFAULT NULL, + `amount` int(64) DEFAULT NULL, + `time` bigint(20) DEFAULT NULL, + `ID` int(11) NOT NULL AUTO_INCREMENT, + `balance` int(11) DEFAULT 0, + PRIMARY KEY (`ID`) +) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4; + +ALTER TABLE `users` ADD COLUMN `pincode` INT NULL; diff --git a/[esx_addons]/esx_banking/client/main.lua b/[esx_addons]/esx_banking/client/main.lua new file mode 100644 index 00000000..a4cddb14 --- /dev/null +++ b/[esx_addons]/esx_banking/client/main.lua @@ -0,0 +1,260 @@ +local BANK = { + Data = {} +} + +local activeBlips, bankPoints, atmPoints, markerPoints = {}, {}, {}, {} +local playerLoaded, uiActive, inMenu = false, false, false + +--Functions + -- General data collecting thread + function BANK:Thread() + self:CreateBlips() + local data = self.Data + data.ped = PlayerPedId() + data.coord = GetEntityCoords(data.Ped) + playerLoaded = true + + CreateThread(function () + while playerLoaded do + data.coord = GetEntityCoords(data.ped) + data.ped = PlayerPedId() + bankPoints, atmPoints, markerPoints = {}, {}, {} + + if (IsPedOnFoot(data.ped) and not ESX.PlayerData.dead) and not inMenu then + for i = 1, #Config.AtmModels do + local atm = GetClosestObjectOfType(data.coord.x, data.coord.y, data.coord.z, 0.7, Config.AtmModels[i], false, false, false) + if atm ~= 0 then + atmPoints[#atmPoints+1] = GetEntityCoords(atm) + end + end + + for i = 1, #Config.Banks do + local bankDistance = #(data.coord - Config.Banks[i].Position.xyz) + if bankDistance <= 0.7 then + bankPoints[#bankPoints+1] = Config.Banks[i].Position.xyz + end + if Config.ShowMarker and bankDistance <= (Config.DrawMarker or 10) then + markerPoints[#markerPoints+1] = Config.Banks[i].Position.xyz + end + end + end + + if next(bankPoints) and not uiActive then + self:TextUi(true) + end + + if next(atmPoints) and not uiActive then + self:TextUi(true, true) + end + + if not next(bankPoints) and not next(atmPoints) and uiActive then + self:TextUi(false) + end + + Wait(1000) + end + end) + + if not Config.ShowMarker then return end + + CreateThread(function() + local wait = 1000 + while playerLoaded do + if next(markerPoints) then + for i = 1, #markerPoints do + DrawMarker(20, markerPoints[i].x, markerPoints[i].y, markerPoints[i].z, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.3, 0.2, 0.2, 187, 255, 0, 255, false, true, 2, false, nil, nil, false) + end + wait = 0 + end + Wait(wait) + end + end) + end + + -- Handle text ui / Keypress + function BANK:TextUi(state, atm) + uiActive = state + if not state then + return ESX.HideUI() + end + ESX.TextUI(TranslateCap('press_e_banking')) + CreateThread(function() + while uiActive do + if IsControlJustReleased(0, 38) then + self:HandleUi(true, atm) + self:TextUi(false) + end + Wait(0) + end + end) + end + + -- Create Blips + function BANK:CreateBlips() + local tmpActiveBlips = {} + for i = 1, #Config.Banks do + if type(Config.Banks[i].Blip) == 'table' and Config.Banks[i].Blip.Enabled then + local position = Config.Banks[i].Position + local bInfo = Config.Banks[i].Blip + local blip = AddBlipForCoord(position.x, position.y, position.z) + SetBlipSprite(blip, bInfo.Sprite) + SetBlipScale(blip, bInfo.Scale) + SetBlipColour(blip, bInfo.Color) + SetBlipAsShortRange(blip, true) + BeginTextCommandSetBlipName('STRING') + AddTextComponentSubstringPlayerName(bInfo.Label) + EndTextCommandSetBlipName(blip) + tmpActiveBlips[#tmpActiveBlips + 1] = blip + end + end + + activeBlips = tmpActiveBlips + end + + -- Remove blips + function BANK:RemoveBlips() + for i = 1, #activeBlips do + if DoesBlipExist(activeBlips[i]) then + RemoveBlip(activeBlips[i]) + end + end + activeBlips = {} + end + + -- Open / Close ui + function BANK:HandleUi(state, atm) + atm = atm or false + SetNuiFocus(state, state) + inMenu = state + if not state then + SendNUIMessage({ + showMenu = false + }) + return + end + ESX.TriggerServerCallback('esx_banking:getPlayerData', function(data) + SendNUIMessage({ + showMenu = true, + openATM = atm, + datas = { + your_money_panel = { + accountsData = {{ + name = "cash", + amount = data.money + }, { + name = "bank", + amount = data.bankMoney + }} + }, + bankCardData = { + bankName = TranslateCap('bank_name'), + cardNumber = "2232 2222 2222 2222", + createdDate = "08/08", + name = data.playerName + }, + transactionsData = data.transactionHistory + } + }) + end) + end + + function BANK:LoadNpc(index, netID) + CreateThread(function() + while not NetworkDoesEntityExistWithNetworkId(netID) do + Wait(200) + end + local npc = NetworkGetEntityFromNetworkId(netID) + TaskStartScenarioInPlace(npc, Config.Peds[index].Scenario, 0, true) + SetEntityProofs(npc, true, true, true, true, true, true, true, true) + SetBlockingOfNonTemporaryEvents(npc, true) + FreezeEntityPosition(npc, true) + SetPedCanRagdollFromPlayerImpact(npc, false) + SetPedCanRagdoll(npc, false) + SetEntityAsMissionEntity(npc, true, true) + SetEntityDynamic(npc, false) + end) + end + +-- Events +RegisterNetEvent('esx_banking:closebanking', function() + BANK:HandleUi(false) +end) + +RegisterNetEvent('esx_banking:pedHandler', function(netIdTable) + for i = 1, #netIdTable do + BANK:LoadNpc(i, netIdTable[i]) + end +end) + +RegisterNetEvent('esx_banking:updateMoneyInUI', function(doingType, bankMoney, money) + SendNUIMessage({ + updateData = true, + data = { + type = doingType, + bankMoney = bankMoney, + money = money + } + }) +end) + +-- Handlers + -- Resource starting + AddEventHandler('onResourceStart', function(resource) + if resource ~= GetCurrentResourceName() then return end + BANK:Thread() + end) + + -- Enable the script on player loaded + RegisterNetEvent('esx:playerLoaded', function() + BANK:Thread() + end) + + -- Disable the script on player logout + RegisterNetEvent('esx:onPlayerLogout', function() + playerLoaded = false + end) + + -- Resource stopping + AddEventHandler('onResourceStop', function(resource) + if resource ~= GetCurrentResourceName() then return end + BANK:RemoveBlips() + if uiActive then BANK:TextUi(false) end + end) + + RegisterNetEvent('esx:onPlayerDeath', function() BANK:TextUi(false) end) + +-- Nui Callbacks +RegisterNUICallback('close', function(data, cb) + BANK:HandleUi(false) + cb('ok') +end) + +RegisterNUICallback('clickButton', function(data, cb) + if not data or not inMenu then + return cb('ok') + end + + TriggerServerEvent("esx_banking:doingType", data) + cb('ok') +end) + +RegisterNUICallback('checkPincode', function(data, cb) + if not data or not inMenu then + return cb('ok') + end + + ESX.TriggerServerCallback("esx_banking:checkPincode", function(pincode) + if pincode then + cb({ + success = true + }) + ESX.ShowNotification(TranslateCap('pincode_found'), "success") + + else + cb({ + error = true + }) + ESX.ShowNotification(TranslateCap('pincode_not_found'), "error") + end + end, data) +end) \ No newline at end of file diff --git a/[esx_addons]/esx_banking/config.lua b/[esx_addons]/esx_banking/config.lua new file mode 100644 index 00000000..a30d5eed --- /dev/null +++ b/[esx_addons]/esx_banking/config.lua @@ -0,0 +1,132 @@ +Config = { + DrawMarker = 10, + ShowMarker = true, + Locale = GetConvar('esx:locale', 'en'), + EnablePeds = true, + AtmModels = {`prop_fleeca_atm`, `prop_atm_01`, `prop_atm_02`, `prop_atm_03`}, + Banks = { + { + Position = vector4(149.91, -1040.74, 29.374, 160), + Blip = { + Enabled = true, + Color = 69, + Label = 'Bank', + Sprite = 108, + Scale = 0.7 + } + }, + { + Position = vector4(-1212.63, -330.78, 37.59, 210), + Blip = { + Enabled = true, + Color = 69, + Label = 'Bank', + Sprite = 108, + Scale = 0.7 + } + }, + { + Position = vector4(-2962.47, 482.93, 15.5, 270), + Blip = { + Enabled = true, + Color = 69, + Label = 'Bank', + Sprite = 108, + Scale = 0.7 + } + }, + { + Position = vector4(-113.01, 6470.24, 31.43, 315), + Blip = { + Enabled = true, + Color = 69, + Label = 'Bank', + Sprite = 108, + Scale = 0.7 + } + }, + { + Position = vector4(314.16, -279.09, 53.97, 160), + Blip = { + Enabled = true, + Color = 69, + Label = 'Bank', + Sprite = 108, + Scale = 0.7 + } + }, + { + Position = vector4(-350.99, -49.99, 48.84, 160), + Blip = { + Enabled = true, + Color = 69, + Label = 'Bank', + Sprite = 108, + Scale = 0.7 + } + }, + { + Position = vector4(1175.02, 2706.87, 37.89, 0), + Blip = { + Enabled = true, + Color = 69, + Label = 'Bank', + Sprite = 108, + Scale = 0.7 + } + }, + { + Position = vector4(246.63, 223.62, 106.0, 160), + Blip = { + Enabled = true, + Color = 69, + Label = 'Bank', + Sprite = 108, + Scale = 0.7 + } + }, + }, + Peds = { + { + Position = vector4(149.5513, -1042.1570, 29.3680, 341.6520), + Model = `U_M_M_BankMan`, + Scenario = 'WORLD_HUMAN_CLIPBOARD' + }, + { + Position = vector4(-1211.8585, -331.9854, 37.7809, 28.5983), + Model = `U_M_M_BankMan`, + Scenario = 'WORLD_HUMAN_CLIPBOARD' + }, + { + Position = vector4(-2961.0720, 483.1107, 15.6970, 88.1986), + Model = `U_M_M_BankMan`, + Scenario = 'WORLD_HUMAN_CLIPBOARD' + }, + { + Position = vector4(-112.2223, 6471.1128, 31.6267, 132.7517), + Model = `U_M_M_BankMan`, + Scenario = 'WORLD_HUMAN_CLIPBOARD' + }, + { + Position = vector4(313.8176, -280.5338, 54.1647, 339.1609), + Model = `U_M_M_BankMan`, + Scenario = 'WORLD_HUMAN_CLIPBOARD' + }, + { + Position = vector4(-351.3247, -51.3466, 49.0365, 339.3305), + Model = `U_M_M_BankMan`, + Scenario = 'WORLD_HUMAN_CLIPBOARD' + }, + { + Position = vector4(1174.9718, 2708.2034, 38.0879, 178.2974), + Model = `U_M_M_BankMan`, + Scenario = 'WORLD_HUMAN_CLIPBOARD' + }, + { + Position = vector4(247.0348, 225.1851, 106.2875, 158.7528), + Model = `U_M_M_BankMan`, + Scenario = 'WORLD_HUMAN_CLIPBOARD' + } + } +} + diff --git a/[esx_addons]/esx_banking/fxmanifest.lua b/[esx_addons]/esx_banking/fxmanifest.lua new file mode 100644 index 00000000..54d199bf --- /dev/null +++ b/[esx_addons]/esx_banking/fxmanifest.lua @@ -0,0 +1,31 @@ +fx_version 'cerulean' + +game 'gta5' + +description 'ESX banking' +lua54 'yes' +version '1.8.6' + +shared_scripts { + '@es_extended/imports.lua', + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua' +} + +server_scripts { + '@oxmysql/lib/MySQL.lua', + 'server/main.lua' +} + +client_scripts { + 'client/main.lua' +} + +ui_page 'html/ui.html' + +files { + 'html/**', +} + +dependency 'es_extended' diff --git a/[esx_addons]/esx_banking/html/config.json b/[esx_addons]/esx_banking/html/config.json new file mode 100644 index 00000000..17f55416 --- /dev/null +++ b/[esx_addons]/esx_banking/html/config.json @@ -0,0 +1,490 @@ +{ + "lang":"EN", + "__comment":"On DYNAMIC_FORM_DATA do not change 'componentName', 'elementID'!", + "EN":{ + "DYNAMIC_FORM_DATA":[ + { + "componentName":"moreGraph", + "elementID":"#wrapper", + "title":"", + "closeButtonText":"Close", + "bankTitle":"Fleeca Bank", + "mainExitButtonText": "Log out" + }, + { + "elementID":"#cpincode", + "name":"cpincode", + "buttonText":"Approve", + "inputPlaceholder": "Enter 4 digit...", + "title":"PIN CODE SETUP", + "description": "Here you can set or change the PIN code.", + "type":"password" + }, + { + "elementID":"#withdraw", + "name":"withdraw", + "buttonText":"Approve", + "inputPlaceholder": "Amount", + "title":"WITHDRAW", + "description": "Here you can withdraw your money from the bank.", + "type":"number" + }, + { + "elementID":"#deposit", + "name":"deposit", + "buttonText":"Approval", + "inputPlaceholder": "Amount", + "title":"DEPOSIT", + "description": "Here, you can deposit your money to the bank.", + "type":"number" + }, + { + "elementID":"#transfer", + "name":"transfer", + "buttonText":"Transfer", + "inputPlaceholder": "Amount", + "inputPlaceholder2": "Player ID", + "title":"TRANSFER", + "description": "Here you can transfer your money to someone else." + }, + { + "componentName":"trans", + "elementID":"#third-column", + "title":"TRANSACTION HISTORY", + "description": "Here you can see your transaction history.", + "moreHistoryText": "Show more history", + "moreGraphText": "Show more graph" + }, + { + "componentName":"pincodePanel", + "elementID":"#wrapper", + "title":"Enter PIN", + "deleteButtonText": "", + "loginButtonText": "", + "closeButtonText": "Close" + }, + { + "componentName":"atmComponent", + "elementID":"#wrapper", + "title":"Fleeca Bank", + "closeButtonText":"Log out" + } + ], + "LAUNGAGE": { + "your_money_title":"Balance", + "your_money_desc":"Here you can see your current balance and cash.", + "your_money_cash_label":"Your cash", + "your_money_bank_label":"Your bank balance", + "withdraw":"WITHDRAW", + "deposit":"DEPOSIT", + "transfer":"TRANSFER", + "transferReceive":"RECEIVED TRANSFER", + "moneyFormat":"$__replaceData__", + "graphTitle":"Your balance", + "moreGraphTitle": "Big Graph", + "moreHistoryTitle":"Show more history", + "inputErrorTitle":"Data is incorrect", + "inputErrorMessage":"It cannot be empty or a value less than 1!", + "showPincodeErrorTitle":"PIN incorrect", + "showPincodeErrorMessage":"The pin must have at least 4 characters!", + "tableLang":{ + "typeLabel": "Transaction type", + "balanceLabel":"Balance", + "amountLabel":"Amount", + "timeLabel":"Time", + "searchInputPlaceholder":"Search ...", + "_comment": "tableFullLanguage options: English, Hungarian, Italian, Spanish, French, you can find here all lang: https://cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/", + "tableFullLanguage":"English" + } + } + }, + "HU":{ + "DYNAMIC_FORM_DATA":[ + { + "componentName":"moreGraph", + "elementID":"#wrapper", + "title":"", + "closeButtonText":"Bezárás", + "bankTitle":"OTP BANK FELÜLET", + "mainExitButtonText": "Kijelentkezés" + }, + { + "elementID":"#cpincode", + "name":"cpincode", + "buttonText":"Jóváhagyás", + "inputPlaceholder": "Írj be 4 számot...", + "title":"PIN KÓD BEÁLLÍTÁS", + "description": "Itt tudod beállítani vagy cserélni pinkódodat.", + "type":"password" + }, + { + "elementID":"#withdraw", + "name":"withdraw", + "buttonText":"Jóváhagyás", + "inputPlaceholder": "Összeg", + "title":"PÉNZ KIVÉTEL", + "description": "Itt tudsz pénzt kivenni a számládról.", + "type":"number" + }, + { + "elementID":"#deposit", + "name":"deposit", + "buttonText":"Jóváhagyás", + "inputPlaceholder": "Összeg", + "title":"PÉNZ BETÉTEL", + "description": "Itt tudsz pénzt be tenni a számládra.", + "type":"number" + }, + { + "elementID":"#transfer", + "name":"transfer", + "buttonText":"Utalás", + "inputPlaceholder": "Összeg", + "inputPlaceholder2": "Játékos azonosító", + "title":"UTALÁS", + "description": "Itt tudsz pénzt utalni egy adott játékosnak." + }, + { + "componentName":"trans", + "elementID":"#third-column", + "title":"SZÁMLA TÖRTÉNET", + "description": "Itt látod a számla történeted.", + "moreHistoryText": "Több számla történet mutatása", + "moreGraphText": "Nagyított diagram mutatása" + }, + { + "componentName":"pincodePanel", + "elementID":"#wrapper", + "title":"Írd be a PIN kódod", + "deleteButtonText": "", + "loginButtonText": "", + "closeButtonText": "Bezárás" + }, + { + "componentName":"atmComponent", + "elementID":"#wrapper", + "title":"OTP BANK", + "closeButtonText":"Kijelentkezés" + } + + ], + "LAUNGAGE": { + "your_money_title":"Egyenleged", + "your_money_desc":"Itt láthatod a jelenlegi egyenleged és készpénzed.", + "your_money_cash_label":"Készpénz", + "your_money_bank_label":"Banki egyenleged", + "withdraw":"KIVÉTEL", + "deposit":"BETÉTEL", + "transfer":"UTALÁS", + "transferReceive":"KAPOTT UTALÁS", + "moneyFormat":"__replaceData__ Ft", + "graphTitle":"Egyenleged", + "moreGraphTitle": "Nagyított grafikon", + "moreHistoryTitle":"Teljes számla történet", + "inputErrorTitle":"Adat hibás", + "inputErrorMessage":"Nem lehet üres vagy érték kisebb mint 1!", + "showPincodeErrorTitle":"PIN hibás", + "showPincodeErrorMessage":"Legalább 4 karakternek kell lennie a pinnek!", + "tableLang":{ + "typeLabel": "Tranzakció típus", + "balanceLabel":"Egyenleged", + "amountLabel":"Összeg", + "timeLabel":"Idő", + "searchInputPlaceholder":"Kereső ...", + "_comment": "tableFullLanguage options: English, Hungarian, Italian, Spanish, French, you can find here all lang: https://cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/", + "tableFullLanguage":"Hungarian" + } + } + }, + "IT":{ + "DYNAMIC_FORM_DATA":[ + { + "componentName":"moreGraph", + "elementID":"#wrapper", + "title":"", + "closeButtonText":"Close", + "bankTitle":"Fleeca Bank", + "mainExitButtonText": "Disconnettersi" + }, + { + "elementID":"#cpincode", + "name":"cpincode", + "buttonText":"conferma", + "inputPlaceholder": "4 cifre...", + "title":"IMPOSTAZIONE CODICE PIN", + "description": "Qui puoi impostare o modificare il codice PIN.", + "type":"password" + }, + { + "elementID":"#withdraw", + "name":"withdraw", + "buttonText":"conferma", + "inputPlaceholder": "Quantità", + "title":"RITIRARE", + "description": "Qui puoi prelevare i tuoi soldi dalla banca.", + "type":"number" + }, + { + "elementID":"#deposit", + "name":"deposit", + "buttonText":"conferma", + "inputPlaceholder": "Quantità", + "title":"DEPOSITARE", + "description": "Qui puoi depositare i tuoi soldi in banca.", + "type":"number" + }, + { + "elementID":"#transfer", + "name":"transfer", + "buttonText":"trasferisci", + "inputPlaceholder": "Quantità", + "inputPlaceholder2": "Giocatore ID", + "title":"TRASFERIMENTO", + "description": "Qui puoi trasferire i tuoi soldi a qualcun altro." + }, + { + "componentName":"trans", + "elementID":"#third-column", + "title":"CRONOLOGIA DELLE TRANSAZIONI", + "description": "Qui puoi vedere la cronologia delle tue operazioni.", + "moreHistoryText": "Mostra più cronologia", + "moreGraphText": "Mostra tutto il grafico" + }, + { + "componentName":"pincodePanel", + "elementID":"#wrapper", + "title":"Enter PIN", + "deleteButtonText": "", + "loginButtonText": "", + "closeButtonText": "Close" + }, + { + "componentName":"atmComponent", + "elementID":"#wrapper", + "title":"Fleeca Bank", + "closeButtonText":"Disconnettersi" + } + ], + "LAUNGAGE": { + "your_money_title":"saldo", + "your_money_desc":"qui puoi vedere il saldo attuale e contanti.", + "your_money_cash_label":"i tuoi soldi", + "your_money_bank_label":"il tuo saldo bancario", + "withdraw":"RITIRARE", + "deposit":"DEPOSITARE", + "transfer":"TRASFERIMENTO", + "transferReceive":"TRASFERIMENTO RICEVUTO", + "moneyFormat":"$__replaceData__", + "graphTitle":"Il tuo bilancio", + "moreGraphTitle": "grafico", + "moreHistoryTitle":"Mostra la cronologia", + "inputErrorTitle":"I dati non sono corretti", + "inputErrorMessage":"Non può essere vuoto o un valore inferiore a 1!", + "showPincodeErrorTitle":"PIN errato", + "showPincodeErrorMessage":"Il pin deve contenere almeno 4 caratteri!", + "tableLang":{ + "typeLabel": "Tipo di transazione", + "balanceLabel":"bilancio", + "amountLabel":"quantità", + "timeLabel":"tempo", + "searchInputPlaceholder":"Cerca ...", + "_comment": "tabella Opzioni complete della lingua: inglese, ungherese, italiana, spagnolo, francese, puoi trovare qui tutte le lingue: https://cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/", + "tableFullLanguage":"Italian" + } + } + }, +"ES":{ + "DYNAMIC_FORM_DATA":[ + { + "componentName":"moreGraph", + "elementID":"#wrapper", + "title":"", + "closeButtonText":"Cerrar", + "bankTitle":"Banco Fleeca", + "mainExitButtonText": "Cerrar sesión" + }, + { + "elementID":"#cpincode", + "name":"cpincode", + "buttonText":"Aprobar", + "inputPlaceholder": "Introduzca 4 dígitos...", + "title":"CONFIGURACIÓN DEL PIN", + "description": "Aquí puede establecer o cambiar el código PIN.", + "type":"password" + }, + { + "elementID":"#withdraw", + "name":"withdraw", + "buttonText":"Aprobar", + "inputPlaceholder": "Importe", + "title":"RETIRAR", + "description": "Aquí puede retirar su dinero del banco.", + "type":"number" + }, + { + "elementID":"#deposit", + "name":"deposit", + "buttonText":"Aprobación", + "inputPlaceholder": "Importe", + "title":"DEPOSITO", + "description": "Aquí puede ingresar su dinero en el banco.", + "type":"number" + }, + { + "elementID":"#transfer", + "name":"transfer", + "buttonText":"Transfererir", + "inputPlaceholder": "Importe", + "inputPlaceholder2": "ID del jugador", + "title":"TRANSFERENCIA", + "description": "Aquí puedes transferir tu dinero a otra persona." + }, + { + "componentName":"trans", + "elementID":"#third-column", + "title":"HISTORIAL DE TRANSACCIONES", + "description": "Aquí puede ver su historial de transacciones.", + "moreHistoryText": "Mostrar más historial", + "moreGraphText": "Mostrar el gráfico" + }, + { + "componentName":"pincodePanel", + "elementID":"#wrapper", + "title":"Introducir PIN", + "deleteButtonText": "", + "loginButtonText": "", + "closeButtonText": "Close" + }, + { + "componentName":"atmComponent", + "elementID":"#wrapper", + "title":"Banco Fleeca", + "closeButtonText":"Cerrar sesión" + } + ], + "LAUNGAGE": { + "your_money_title":"Saldo", + "your_money_desc":"Aquí puedes ver tu saldo actual y tu efectivo.", + "your_money_cash_label":"Su dinero en mano", + "your_money_bank_label":"Su saldo bancario", + "withdraw":"RETIRAR", + "deposit":"DEPÓSITO", + "transfer":"TRANSFERENCIA", + "transferReceive":"TRANSFERENCIA RECIBIDA", + "moneyFormat":"$__replaceData__", + "graphTitle":"Su saldo", + "moreGraphTitle": "Gráfico grande", + "moreHistoryTitle":"Mostrar más historial", + "inputErrorTitle":"Data is incorrect", + "inputErrorMessage":"No puede estar vacío ni tener un valor inferior a 1.", + "showPincodeErrorTitle":"PIN incorrecto", + "showPincodeErrorMessage":"El pin debe tener al menos 4 caracteres.", + "tableLang":{ + "typeLabel": "Tipo de transacción", + "balanceLabel":"Saldo", + "amountLabel":"Importe", + "timeLabel":"Tiempo", + "searchInputPlaceholder":"Buscar...", + "_comment": "tableFullLanguage options: English, Hungarian, Italiano, Spanish, French, you can find here all lang: https://cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/", + "tableFullLanguage":"Spanish" + } + } + }, + "FR":{ + "DYNAMIC_FORM_DATA":[ + { + "componentName":"moreGraph", + "elementID":"#wrapper", + "title":"", + "closeButtonText":"Fermer", + "bankTitle":"Banque Fleeca", + "mainExitButtonText": "Déconnexion" + }, + { + "elementID":"#cpincode", + "name":"cpincode", + "buttonText":"Valider", + "inputPlaceholder": "Entrez 4 chiffres...", + "title":"CONFIGURATION DU PIN", + "description": "Ici vous pouvez définir ou changer votre code PIN.", + "type":"password" + }, + { + "elementID":"#withdraw", + "name":"withdraw", + "buttonText":"Valider", + "inputPlaceholder": "Montant", + "title":"RETIRER", + "description": "Ici vous pouvez retirer votre argent de la banque.", + "type":"number" + }, + { + "elementID":"#deposit", + "name":"deposit", + "buttonText":"Valider", + "inputPlaceholder": "Montant", + "title":"DEPOSIT", + "description": "Ici, vous pouvez déposer votre argent à la banque.", + "type":"number" + }, + { + "elementID":"#transfer", + "name":"transfer", + "buttonText":"Transférer", + "inputPlaceholder": "Montant", + "inputPlaceholder2": "ID du joueur", + "title":"TRANSFERT", + "description": "Ici, vous pouvez transférer votre argent à quelqu'un d'autre." + }, + { + "componentName":"trans", + "elementID":"#third-column", + "title":"HISTORIQUE DES TRANSACTIONS", + "description": "Ici, vous pouvez voir votre historique de transactions.", + "moreHistoryText": "Afficher plus d'historique", + "moreGraphText": "Afficher plus de graphique" + }, + { + "componentName":"pincodePanel", + "elementID":"#wrapper", + "title":"Entrer le code PIN", + "deleteButtonText": "", + "loginButtonText": "", + "closeButtonText": "Fermer" + }, + { + "componentName":"atmComponent", + "elementID":"#wrapper", + "title":"Banque Fleeca", + "closeButtonText":"Se déconnecter" + } + ], + "LAUNGAGE": { + "your_money_title":"Solde", + "your_money_desc":"Ici, vous pouvez voir votre solde actuel et votre argent en espèces.", + "your_money_cash_label":"Votre argent en espèces", + "your_money_bank_label":"Votre solde bancaire", + "withdraw":"RETIRER", + "deposit":"DÉPOSER", + "transfer":"TRANSFERT", + "transferReceive":"TRANSFERT REÇU", + "moneyFormat":"$__replaceData__", + "graphTitle":"Votre solde", + "moreGraphTitle": "Grand graphique", + "moreHistoryTitle":"Afficher plus", + "inputErrorTitle":"Les données sont incorrectes", + "inputErrorMessage":"Il ne peut pas être vide ou avoir une valeur inférieure à 1", + "showPincodeErrorTitle":"Code PIN incorrect", + "showPincodeErrorMessage":"Le code PIN doit avoir au moins 4 caractères!", + "tableLang":{ + "typeLabel": "Type de transaction", + "balanceLabel":"Solde", + "amountLabel":"Montant", + "timeLabel":"Temps", + "searchInputPlaceholder":"Rechercher ...", + "_comment": "Langue complète: Anglais, Hongrois, Italien, Espagnole Français, vous pouvez trouver ici toutes les langues: https://cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/", + "tableFullLanguage":"French" + } + } + } +} \ No newline at end of file diff --git a/[esx_addons]/esx_banking/html/css/app.css b/[esx_addons]/esx_banking/html/css/app.css new file mode 100644 index 00000000..0c70a9c0 --- /dev/null +++ b/[esx_addons]/esx_banking/html/css/app.css @@ -0,0 +1,767 @@ +:root{ + --primary-color: #2e69d5; + --secondary-color: #378cbf; + --text-color:#ffff; + --background-light:#232934; + --background-light-2:#202020; + --background-dark:#0a0e19; + --accent-red: #378cbf; + --accent-green:#45b157; + --accent-gray: #474e57; + --accent-gray-2:#545457; + + --columnsBackground:var(--background-dark); + --allTitleColor:var(--text-color); + --yourMoneyPriceTextColor:var(--accent-green); + --bankCardBackgroundColor: linear-gradient(110deg, var(--primary-color) 0%, var(--secondary-color) 100%); + --buttonBackgroundColor:var(--background-light); + --inputBackgroundColor:var(--background-light); + --inputTextColor:var(--text-color); + --inputPlaceholderColor:var(--accent-gray-2); + --checkmarkColor:var(--text-color); + --acceptExitButtonColorText:var(--text-color); + --exitButtonHoverBackgroundColor:var(--primary-color); + --acceptButtonHoverBackgroundColor:var(--secondary-color); + --bankCardTextColor:var(--text-color); + --bankCardNumberColor:var(--text-color); + --moneyContainerBackgroundColor:var(--background-light); + --moneyAndTransactionContainer:var(--background-light); + --transactionContainerBackgroundColor:var(--background-light); + --moneyAndTransactionallTitleColorText:var(--text-color); + --transactionDataTextColor:var(--text-color); + --cardSubtitleTextColor:var(--accent-gray); + --depositColorText:var(--accent-green); + --withDrawColorText:var(--primary-color); + --moreHistoryButtonHoverColor: var(--secondary-color); + --moreGraphButtonHoverColor:var(--secondary-color); + --hrRowColor:var(--accent-gray); + --loadingCircle:var(--secondary-color); + --tableAllTextColor:var(--text-color); + --tableBackgroundColorPaginationButton: var(--secondary-color); + --tableBackgroundColorPaginationButtonHover:var(--secondary-color); + --tableRowHoverBackgroundColor:var(--secondary-color); + --tableScrollBarBackgroundColor:var(--background-light); + --tableScrollBarBackgroundColorHover:var(--secondary-color); + --tableSelectBoxBackgroundColor:var(--background-light); + --tableSearchInputBackgroundColor:var(--background-light); + --tableScrollBarBackgroundColor2:var(--background-light); + --disableButtonBackgroundColor:var(--background-light-2); + --graphLineColor:var(--secondary-color); + --graphLineBackgroundColor:var(--secondary-color); +} + + + +@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@100;400;500;800&display=swap'); + +*{ + margin:0; + padding:0; +} + +#wrapper{ + width: 100%; + height: 93.24vmin; + display:flex; + justify-content: center; + align-items: center; + font-family: 'Raleway', sans-serif; + user-select: none; + min-width: 42vmin; + font-size: 2vmin; + display: none; +} + +#container { + height: 73vmin; + width: 139.41vmin; + cursor: default; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + max-width: 150vmin; + flex-wrap: wrap; + margin:2vmin; + position: relative; + display: none; +} + +#menu { + display: flex; + flex-direction: row; + gap:3vmin; + flex-wrap: wrap; + height: 68.15vmin; +} + +/* FIRST COLUMN START */ + +#menu #first-column { + width: 36vmin; + background: var(--columnsBackground); + padding: 1.85vmin; + display: flex; + flex-direction: column; + gap: 1.79vmin; + border-radius: 1.38vmin; + flex: 1 1 27.7vmin; + height: 72.56vmin; +} + +#menu #first-column hr { + border: 1px solid var(--hrRowColor); + width: 80%; + margin: 0 auto; +} + +#bankcard { + height: 16.6vmin; + width: 25vmin; + margin: 0 auto; + background: var(--bankCardBackgroundColor); + border-radius: 1.38vmin; + padding: 1.85vmin 1.6vmin 0px 1.85vmin; + position: relative; +} + +#bankcard .content p{ + margin: 0; + color:var(--bankCardTextColor); + font-size: 0.92vmin; +} + +#bankcard .title{ + display: flex; + justify-content: space-between; +} + +#bankcard .title span{ + color:var(--bankCardTextColor); +} + +#bankcard .title svg{ + width: 4.16vmin; + height: 4.16vmin; +} + +#bankcard .content { + position: absolute; + bottom: 1.66vmin; +} + +#bankcard .content .card-data{ + display: flex; + justify-content: space-between; +} + +#bankcard .content .cardnumber { + color: var(--bankCardNumberColor); + font-size: 1.85vmin; + letter-spacing: 0.37vmin; + margin-bottom: 0.46vmin; +} + +#bankcard .content .card-data:nth-child(2){ + margin-right: 0.27vmin; +} + +#bankcard .content .card-data p { + font-size: 1.48vmin; +} + +#your-money-panel #money-containers{ + display: flex; + flex-direction: column; + gap: 0.92vmin; +} + +.exit-button , .accept-button , #pincode-container .button-groups button { + background-color:var(--buttonBackgroundColor); + padding:1.85vmin 1.85vmin; + /*width: 35vmin;*/ + width: 100%; + outline: none; + border:none; + color:var(--acceptExitButtonColorText); + display: flex; + align-items: center; + justify-content: center; + transition: all 0.3s ease; + font-weight: bold; + border-radius: 0.27vmin; + font-family: 'Raleway', sans-serif; + font-size: 1.5vmin; +} + +.exit-button:hover , #modal-container #title-container button:hover{ + background-color: var(--exitButtonHoverBackgroundColor); + box-shadow: -1vmin 1vmin 1vmin -1vmin var(--exitButtonHoverBackgroundColor); +} + +.accept-button:hover{ + background-color: var(--acceptButtonHoverBackgroundColor); + box-shadow: -1vmin 1vmin 1vmin -1vmin var(--acceptButtonHoverBackgroundColor); +} + +/* FIRST COLUMN END */ + + +/* SECOND COLUMN START*/ + +#menu #second-column{ + width: 35.18vmin; + border-radius: 1.38vmin; + display: flex; + align-items: center; + flex-direction: column; + gap: 0.92vmin; + flex: 1 1 27.77vmin; + padding-right: 1.85vmin; + padding-left: 1.85vmin; +} + +#withdraw,#deposit,#transfer{ + background: var(--columnsBackground); + padding: 1.85vmin; + border-radius: 1.38vmin; + width: 35.18vmin; +} + +#menu #second-column #withdraw { + height: 18.48vmin; +} + +#menu #second-column #deposit { + height: 18.48vmin; +} + +#menu #second-column #transfer { + height: 26.63vmin; +} + +/* SECOND COLUMN END*/ + +/* THIRD COLUMN START*/ + +#menu #third-column{ + width: 32.77vmin; + background: var(--columnsBackground); + border-radius: 1.38vmin; + padding:1.85vmin; + flex: 1 1 37.03vmin; +} + +#menu #third-column #graph-container{ + width: calc(100% - 0.46vmin); + height: 38vmin; +} + +#menu #third-column #buttons-container{ + display: flex; + justify-content: center; + align-items: center; + margin: 0px 1.9vmin; + margin-top: 1.48vmin; + gap:0.92vmin; +} + +#menu #third-column #buttons-container button{ + padding: 0.92vmin; + width: 20.92vmin; +} + +#menu #third-column #buttons-container #more_history:hover{ + background-color: var(--moreHistoryButtonHoverColor); + box-shadow: 0px 3.42vmin 9.25vmin -1.20vmin var(--moreHistoryButtonHoverColor); +} + +#menu #third-column #buttons-container #more_graph:hover{ + background-color: var(--moreGraphButtonHoverColor); + box-shadow: 0px 3.42vmin 9.25vmin -1.20vmin var(--moreGraphButtonHoverColor); +} + +#menu #third-column #transactions-container { + display: flex; + flex-direction: column; + align-items: center; + gap: 0.92vmin; + padding: 1.85vmin; +} + +#menu #third-column #transactions-container .transaction-container{ + /* width: 40.37vmin; */ + width: 100%; + background-color: var(--transactionContainerBackgroundColor); + padding: 0.92vmin 0.92vmin 0.92vmin 1.85vmin; + font-size: 1.8vmin; +} + +#menu #third-column #transactions-container .transaction-container .transaction{ + display: flex; + justify-content: space-between; + align-items: center; + font-size: 1.5vmin; +} + +#menu #third-column #transactions-container .transaction-container .transaction span { + color: var(--transactionDataTextColor); + background: var(--columnsBackground); + border-radius: 0.27vmin; + padding: 0.46vmin; + font-size: 1.20vmin; +} + +/* THIRD COLUMN END*/ + + +/* GENERAL START*/ + +.money-container,.transaction-container { + background-color: var(--moneyAndTransactionContainer); + padding: 0.92vmin 0.92vmin 0.92vmin 1.85vmin; + border-radius: 0.27vmin; +} + +.money-container{ + background-color: var(--moneyContainerBackgroundColor); +} + + +.money-container h4 { + margin-bottom: 0.5vmin; +} + +.money-container h4 , .transaction h4{ + color:var(--moneyAndTransactionallTitleColorText); + text-shadow: 0.09vmin 0.09vmin 0.18vmin black; + font-size: 1.5vmin; +} + +.money-container span , .transaction-container span{ + color:var(--yourMoneyPriceTextColor); + text-shadow: 0.09vmin 0.09vmin 0.18vmin black; + font-size: 1.5vmin; +} + +.accept-button svg{ + height: 1.38vmin; + fill:var(--checkmarkColor); +} + +.green-text{ + color:var(--depositColorText) !important; +} + +.red-text{ + color:var(--withDrawColorText) !important; +} + + +.disable-button{ + background-color: var(--disableButtonBackgroundColor) !important; + pointer-events: none; +} + +h3 { + color: #ecedef; + color: var(--allTitleColor); + font-size: 2.31vmin; + text-shadow: 0.09vmin 0.09vmin 0.92vmin rgb(255 255 255 / 47%); + text-transform: uppercase; +} + +p{ + color: var(--cardSubtitleTextColor); + margin-bottom: 0.92vmin; + font-size: 1.5vmin; +} + +input{ + width: 100%; + font-family: 'Raleway', sans-serif; + font-size: 1.38vmin; + background-color: var(--inputBackgroundColor); + padding: 1.85vmin 1.85vmin; + outline: none; + border:none; + color:var(--inputTextColor); + margin-bottom:1.85vmin; + border-radius: 0.46vmin; +} + +input::placeholder { + color: var(--inputPlaceholderColor); + opacity: 1; +} + +input::-webkit-outer-spin-button, +input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; +} + +/* GENERAL END*/ + +#modal-container { + background-color: var(--columnsBackground); + position: absolute; + top: 50%; + height: 100%; + width: 100%; + z-index: 2; + transform: translateY(-50%); + display: none; + border-radius: 1.38vmin; +} + +#more-modal-container { + height: 93%; + padding: 0 6vmin; +} + +#modal-container h3{ + text-align: center; + width: 100%; + margin-top: 1vmin; +} + +#modal-container #title-container button { + background-color: var(--buttonBackgroundColor); + padding: 1.85vmin 1.85vmin; + transition: all 0.3s ease; + font-weight: bold; + border-radius: 0.27vmin 0.27vmin 0.27vmin 1.27vmin; + font-family: 'Raleway', sans-serif; + font-size: 1.5vmin; + border: none; + color: var(--inputTextColor); + margin-left: auto; + position: absolute; + right: 0vmin; + top: 0vmin; + width: 14vmin; +} + +/*DATA TABLES DESIGN */ + +.dataTables_wrapper .dataTables_info { + clear: both; + float: left; + padding-top: .755em; + color:var(--tableAllTextColor) !important; +} + +#example_wrapper { + margin-top: 4vmin; + color: var(--tableAllTextColor) !important; + padding: 1vmin; + font-family: 'Raleway', sans-serif !important; +} + +#example_filter input{ + display: flex; + gap: 1vmin; + border: none; + padding:2vmin; + background-color: var(--tableSearchInputBackgroundColor); +} + +.dataTables_wrapper .dataTables_length, .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_info, .dataTables_wrapper .dataTables_processing, .dataTables_wrapper .dataTables_paginate{ + color: var(--tableAllTextColor) !important; +} + +table.dataTable thead>tr>th.sorting, table.dataTable thead>tr>th.sorting_asc, table.dataTable thead>tr>th.sorting_desc, table.dataTable thead>tr>th.sorting_asc_disabled, table.dataTable thead>tr>th.sorting_desc_disabled, table.dataTable thead>tr>td.sorting, table.dataTable thead>tr>td.sorting_asc, table.dataTable thead>tr>td.sorting_desc, table.dataTable thead>tr>td.sorting_asc_disabled, table.dataTable thead>tr>td.sorting_desc_disabled ,table.dataTable thead>tr>td.sorting_disabled { + cursor: pointer; + position: relative; + padding-right: 26px; + color: var(--tableAllTextColor) !important; +} + +table.dataTable tbody tr td { + color: var(--tableAllTextColor); + font-weight: 500; +} + +.greenTableText{ + color: var(--depositColorText) !important; +} + +.redTableText{ + color: var(--withDrawColorText) !important; +} + +table.dataTable.no-footer { + border-bottom: 1px solid rgba(0, 0, 0, 0.3); +} + +.dataTables_wrapper .dataTables_paginate .paginate_button.disabled, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active { + cursor: default; + color:var(--tableAllTextColor) !important; + border: 1px solid #828282; + background: transparent; + box-shadow: none; +} + +.dataTables_wrapper .dataTables_paginate .paginate_button { + background: none; + color:var(--tableAllTextColor) !important; + border-radius: 4px; + border: 1px solid #828282; +} + +.dataTables_wrapper .dataTables_paginate .paginate_button:hover { + color: white !important; + background: var(--tableBackgroundColorPaginationButtonHover) !important; + background: var(--tableBackgroundColorPaginationButtonHover) !important; + background: var(--tableBackgroundColorPaginationButtonHover) !important; + background: var(--tableBackgroundColorPaginationButtonHover) !important; + box-shadow: 0px 3.42vmin 9.25vmin -1.20vmin var(--tableBackgroundColorPaginationButtonHover) !important; +} + +.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover { + background: var(--tableBackgroundColorPaginationButton) !important; + background: var(--tableBackgroundColorPaginationButton) !important; + background: var(--tableBackgroundColorPaginationButton) !important; + background: var(--tableBackgroundColorPaginationButton) !important; + box-shadow: 0px 3.42vmin 9.25vmin -1.20vmin var(--tableBackgroundColorPaginationButton) !important; + color:var(--tableAllTextColor) !important; +} + + +.dataTables_wrapper .dataTables_length select { + border-radius: 3px; + padding: 5px; + background-color: var(--tableSelectBoxBackgroundColor) !important; + padding: 4px; + color: var(--tableAllTextColor) !important; + padding: 1vmin; + border: none; + outline: none; +} + + +table.dataTable tbody tr{ height: 50px !important; } + +table.dataTable tbody tr:hover { + background-color:var(--tableRowHoverBackgroundColor) !important; + } + + #example_wrapper > div.dataTables_scroll > div.dataTables_scrollHead > div > table > thead > tr > th.sorting_disabled{ + color: var(--tableAllTextColor) !important; +} + + /*DATA TABLE DESIGN END*/ + + /*SCROLLBAR DESIGN*/ +::-webkit-scrollbar { + width: 5px; +} +::-webkit-scrollbar-track { + background: var(--tableScrollBarBackgroundColor2); +} +::-webkit-scrollbar-thumb { + background: var(--tableScrollBarBackgroundColor); +} +::-webkit-scrollbar-thumb:hover { + background: var(--tableScrollBarBackgroundColorHover); +} + + + + +/* LOADING CIRCLE*/ + +:root { + --rotation-animation-speed: 2s; + --rotation-animation-easing: linear; + --stroke-animation-speed: 1.5s; + --stroke-animation-easing: ease-in-out; + --stroke-width: 3px; + --stroke-start-dasharray: 1, 200; + --stroke-end-dasharray: 89, 200; +} + +.loader { + margin: 0px auto; + width: 23.14vmin; + height: 23.14vmin; + position: absolute; + top:50%; + left: 50%; + transform: translate(-50%, -50%); + z-index: 2; + display: none; +} + +.circular-loader { + animation: rotate var(--rotation-animation-speed) var(--rotation-animation-easing) infinite; +} + +.loader-path { + fill: none; + stroke-width: var(--stroke-width); + animation: animate-stroke var(--stroke-animation-speed) var(--stroke-animation-easing) infinite; + stroke-linecap: round; +} + +@keyframes rotate { + 100% { + transform: rotate(360deg); + } +} + +@keyframes animate-stroke { + 0% { + stroke-dasharray: var(--stroke-start-dasharray); + stroke-dashoffset: 0; + stroke: var(--columnsBackground); + } + 50% { + stroke-dasharray: var(--stroke-end-dasharray); + stroke-dashoffset: -35; + stroke: var(--loadingCircle); + } + 100% { + stroke-dasharray: var(--stroke-end-dasharray); + stroke-dashoffset: -124; + stroke: var(--loadingCircle); + } +} + + +#pincode-container{ + background-color: var(--columnsBackground); + height: 80%; + width: 40vmin; + color: white; + display: flex; + border-radius: 3vmin; + flex-direction: column; + justify-content: center; + gap: 5vmin; +} + +#pincode-container h4{ + text-align: center; + margin-top: 2vmin; +} + +#pincode-container .pincode-input { + display: flex; + justify-content: center; + align-items: center; + height: 15vmin; + width: 100%; + gap: 10px; +} + +#pincode-container .pincode-input span{ + display: block; + width: 3vmin; + height: 3vmin; + border-radius: 50%; + border: 2px solid var(--secondary-color); + transition: all 0.2s ease; +} + +#pincode-container .pincode-numbers { + display: grid; + grid-template-columns: 10vmin 10vmin 10vmin; + grid-template-rows: 10vmin 10vmin 10vmin; + place-items: center; + justify-content: center; +} + +#pincode-container .pincode-numbers div { + background-color: var(--background-light); + padding: 2vmin 2vmin; + border-radius: 50%; + width: 3vmin; + height: 3vmin; + display: flex; + justify-content: center; + align-items: center; + transition: all 0.3s ease; +} + +#pincode-container .pincode-numbers div:hover{ + background-color: var(--secondary-color); + box-shadow: 0px 3.42vmin 9.25vmin -1.20vmin var(--secondary-color); +} + +#pincode-container .pincode-numbers div:nth-child(11):hover{ + background-color: var(--exitButtonHoverBackgroundColor); + box-shadow: 0px 3.42vmin 9.25vmin -1.20vmin var(--exitButtonHoverBackgroundColor); +} + +#pincode-container .pincode-numbers div:nth-child(12):hover{ + background-color: var(--acceptButtonHoverBackgroundColor); + box-shadow: 0px 3.42vmin 9.25vmin -1.20vmin var(--acceptButtonHoverBackgroundColor); +} + +#pincode-container .button-groups{ + display: flex; + flex-direction: column; + align-items: center; + gap: 2vmin; + margin-top: 2vmin; +} + +#pincode-container .button-groups button{ + width: 80%; +} + +#pincode-container .button-groups button:hover{ + background-color: var(--exitButtonHoverBackgroundColor); + box-shadow: 0px 3.42vmin 9.25vmin -1.20vmin var(--exitButtonHoverBackgroundColor); +} + +#pincode-container .button-groups .login:hover{ + background-color: var(--acceptButtonHoverBackgroundColor); + box-shadow: 0px 3.42vmin 9.25vmin -1.20vmin var(--acceptButtonHoverBackgroundColor); +} + +.circleBackground{ + background-color: var(--secondary-color); +} + + +/* ATM DESIGNS*/ + +#atm-container{ + display: grid; + grid-template-columns: 60% 60%; + gap:3vmin; + height: 58vh; +} + +.firstGridColumn, .secondGridColumn{ + display: flex; + flex-direction: column; + padding: 1.85vmin; +} + +.firstGridColumn{ + gap: 1.79vmin; + border-radius: 1.38vmin; + background: var(--columnsBackground); +} + +.secondGridColumn{ + gap: 3vmin; + justify-content: center; +} + +.secondGridColumn div{ + background: var(--columnsBackground); + padding: 3vmin; + border-radius: 1.38vmin; +} + +/*MEDIA QUERY*/ +@media only screen and (max-width: 1280px) { + .dataTables_scrollBody{ + max-height: 310px !important; + } +} diff --git a/[esx_addons]/esx_banking/html/roboto.ttf b/[esx_addons]/esx_banking/html/roboto.ttf new file mode 100644 index 00000000..7d9a6c4c Binary files /dev/null and b/[esx_addons]/esx_banking/html/roboto.ttf differ diff --git a/[esx_addons]/esx_banking/html/scripts/app.js b/[esx_addons]/esx_banking/html/scripts/app.js new file mode 100644 index 00000000..be6c105d --- /dev/null +++ b/[esx_addons]/esx_banking/html/scripts/app.js @@ -0,0 +1,985 @@ +var LOADED = true +class Components{ + static allComponents = [] + static generateAllComponents(generatedData,generateType = "bank"){ + $("#wrapper").empty() + generatedData.forEach((form)=>{ + let objData = {} + if(form.elementID.substring(1) == "transfer" && generateType == "bank"){ + objData = new MultiComponentsForm(form) + }else if(form.componentName == "trans" && generateType == "bank"){ + objData = this.generateTransactionContainer(form) + } + else if(form.componentName == "pincodePanel" && generateType == "atm"){ + objData = this.generatePincodeContainer(form) + } + else if(form.componentName == "moreGraph" && generateType == "bank"){ + objData = this.generateMainTemplate(form) + this.generateMenuTemplate(form) + } + else if(form.componentName == "atmComponent" && generateType == "atm"){ + objData = this.generateAtmTemplate(form) + } + else{ + if(generateType == "bank"){ + if(form.componentName == "pincodePanel" || form.componentName == "atmComponent"){ + return + } + } + else if(generateType == "atm"){ + if(form.componentName == "trans" || form.componentName == "moreGraph"){ + return + } + } + objData = new SingleComponentsForm(form) + } + if(form.componentName != undefined){ + this.allComponents[form.componentName] = objData + }else{ + this.allComponents[form.elementID.substring(1)] = objData + } + }) + } + + static getComponent(componentName){ + if(this.allComponents[componentName] != undefined){ + return this.allComponents[componentName] + } + return false + } + + static loader(appendedDiv, state){ + $(appendedDiv).empty() + if(state == "show"){ + $(appendedDiv).append(` + + + `); + $(appendedDiv).fadeIn(200) + LOADED = true + + + setTimeout(() => { + $(`${appendedDiv}`).fadeOut(200) + $("#wrapper").fadeIn().css("display","flex"); + if(appendedDiv == ".loader") $("#container").fadeIn().css("display","flex") + LOADED = false + }, 2500); + }else if(state == "hide"){ + $(`${appendedDiv}`).fadeOut(200) + if(appendedDiv == ".loader"){ + $("#wrapper").fadeOut(200) + $("#container").fadeOut(200) + } + } + } + + static generateTransactionContainer(formData){ + $(formData.elementID).empty() + return $(formData.elementID).html(`

${formData.title}

+

${formData.description}

+
+ +
+
+ + +
+
`); + } + + static generatePincodeContainer(formData){ + return $(formData.elementID).append(` +
+
+

${formData.title}

+
+
+
${formData.deleteButtonText}
+
${formData.loginButtonText}
+
+
+ +
+
+
`); + + } + + static generateMainTemplate(formData){ + return $(formData.elementID).append(` +
+ +
`); + } + + static generateMenuTemplate(formData){ + $("#container").append(` + `); + } + + static generateAtmTemplate(formData){ + $(formData.elementID).append(` +
+
+

${formData.title}

+
+
+
+ +
+
+
+ `); + + return $(`${formData.elementID} #atm-container`) + } + +} + +class SingleComponentsForm { + elementID = "" + buttonText = "" + inputPlaceholder = "" + title = "" + description = "" + type = "number" + template = "" + name = "" + + constructor(form){ + this.elementID = form.elementID + this.buttonText = form.buttonText + this.inputPlaceholder = form.inputPlaceholder + this.title = form.title + this.description = form.description + this.type = form.type + this.name = form.name + this.renderInputAndButton() + } + + setElementId(newElementID){ + this.elementID = newElementID + } + + renderInputAndButton(){ + + this.template = `

${this.title}

${this.description}

`; + + if(this.type == "password"){ + this.template += `` + } + else{ + this.template += `` + } + + this.template += ``; + + $(this.elementID).append(`
${this.template}
`); + } + + show(){ + $(this.elementID).fadeIn(); + } + + hide(){ + $(this.elementID).fadeOut(); + } +} + +class MultiComponentsForm { + elementID = "" + buttonText = "" + inputPlaceholder = "" + inputPlaceholder2 = "" + title = "" + description = "" + + constructor(form){ + this.elementID = form.elementID + this.buttonText = form.buttonText + this.inputPlaceholder = form.inputPlaceholder + this.inputPlaceholder2 = form.inputPlaceholder2 + this.title = form.title + this.description = form.description + this.renderInputAndButtonGroups() + } + + renderInputAndButtonGroups(){ + $(this.elementID).html(`

${this.title}

+

${this.description}

+
+ + + +
`); + } + + show(){ + $(this.elementID).fadeIn(); + } + + hide(){ + $(this.elementID).fadeOut(); + } +} + +class Render { + fullRenderData = {} + elementID = "" + language = "" + constructor(elementID){ + this.elementID = elementID + } + renderBankCard(){ + const bankData = this.fullRenderData + $("#bankcard").empty(); + let template = `
+

${bankData.bankName}

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

Debit Card

+
+

${bankData.name}

+

${bankData.createdDate}

+
+

${bankData.cardNumber}

+
`; + $(template).appendTo("#bankcard"); + } + + renderMyMoneySection(){ + const moneyData = this.fullRenderData + $("#your-money-panel").empty(); + let template = `

${this.language.your_money_title}

+

${this.language.your_money_desc}

+
`; + moneyData.accountsData.forEach((data)=>{ + template += ` +
+

${this.language[`your_money_${data.name}_label`]}

+ ${this.language.moneyFormat.replace("__replaceData__",data.amount)} +
+ `; + }) + + template += "
" + + $(template).appendTo("#your-money-panel"); + } + + renderTransactions(){ + const transactionData = this.fullRenderData + $("#transactions-container").empty(); + if(transactionData.length == 0){ return} + + for(let i = 0; i < transactionData.slice(0,3).length; i++){ + let oneRow = ` +
+
+

${transactionData[i].type}

+ ${Utils.dateFormat(transactionData[i].time)} +
+ ${transactionData[i].type == this.language.withdraw || transactionData[i].type == this.language.transfer ? "-" : "+"}${this.language.moneyFormat.replace("__replaceData__",transactionData[i].amount)} +
+ `; + + $(oneRow).appendTo("#transactions-container"); + } + } + + setData(newData,newLanguage){ + this.fullRenderData = newData; + this.language = newLanguage; + } + + refresh(newData){ + switch (this.elementID) { + case "your_money": + $("#money-cash").html(`${this.language.moneyFormat.replace("__replaceData__",newData.money)} `); + $("#money-bank").html(`${this.language.moneyFormat.replace("__replaceData__",newData.bankMoney)}`); + break; + case "transaction": + this.fullRenderData = newData + this.renderTransactions() + break; + default: + break; + } + } +} + +class Pincode { + elementID = "" + pincode = "" + constructor(elementID){ + this.elementID = elementID + this.renderPinInputs() + this.renderPassCode() + this.hide(false) + } + + setPincode(newPincode){ + this.pincode += newPincode + } + + getPincode(){ + return this.pincode + } + + renderPassCode(){ + $("#container").fadeOut() + this.pincode = "" + $(`${this.elementID} .pincode-input`).empty() + for(let i = 0; i < 4;i++){ + $(`${this.elementID} .pincode-input`).append(``); + } + $(".pincode-numbers div:nth-child(12)").addClass("disable-button") + $(".pincode-numbers div:nth-child(12)").prop("disabled",true) + } + + renderPinInputs(){ + let numbers = [1,2,3,4,5,6,7,8,9,0] + numbers.forEach((number)=>{ + $(`
${number}
`).insertBefore(`.pincode-numbers .deleteButton`) + }) + } + + show(){ + $(this.elementID).fadeIn(100) + } + + hide(anim = true){ + if(anim){ + $(this.elementID).fadeOut(200) + } + else{ + $(this.elementID).hide() + } + } +} + +var timeZone = "" +class Utils { + static dateFormat(date){ + if(typeof(date) == "number"){ + var newDate = new Date(date) + }else{ + var newDate = date + } + return newDate.toLocaleString([Utils.getTimeZone()], { + weekday:"long", + hour:"2-digit", + minute:"2-digit", + }).capitalize() + } + + static setCardData(value){ + if(localStorage.getItem("CARD_DATA") == null){ + localStorage.setItem("CARD_DATA",JSON.stringify(value)) + } + } + + static getCardData(){ + return JSON.parse(localStorage.getItem("CARD_DATA")) + } + + static genMonth() { + var date = new Date(); + var arr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]; + var rNum = Math.floor(Math.random() * arr.length); + var year = date.getFullYear().toString(); + year = year.substr(2, year.length); + year = parseInt(parseInt(year) + 2); + return parseInt(rNum + 1) + '/' + year; + } + + static genCardNumber() { + let char = '0123456789' + let genNum = '' + for (let i = 0; i < 16; i++) { + var rnum = Math.floor(Math.random() * char.length); + genNum += char.substring(rnum, rnum + 1); + if((i + 1) % 4 == 0){ + genNum += " " + } + } + return genNum; + } + + static setTimeZone(newTimeZone){ + timeZone = newTimeZone + } + + static getTimeZone(){ + return timeZone + } +} + +class Graph{ + transData = {} + graphData = { + type: 'line', + data: { + labels: [], + datasets: [ + { + label: "BALANCE", + data:[], + backgroundColor: [ + 'rgba(75, 192, 192, 0.2)', + ], + borderColor: [ + 'rgba(75, 192, 192, 1)', + ], + borderWidth: 1 + } + ] + }, + options: { + responsive: true, + maintainAspectRatio:false, + scales: { + y: { + beginAtZero: true + } + } + } + } + + constructor(transData,title,color){ + this.graphData.data.datasets[0].label = title + this.transData = transData + this.calculateGraphData() + } + + refreshGraphData(newTransData){ + this.transData = newTransData + this.calculateGraphData() + this.renderSmallGraph() + } + + renderSmallGraph(){ + const ctx = $('#smallGraph'); + let chartStatus = Chart.getChart("smallGraph"); + + if (chartStatus != undefined) { + chartStatus.destroy(); + } + + return new Chart(ctx,this.graphData); + } + + renderBigGraph(){ + const ctx = $('#moreGraph'); + let chartStatus = Chart.getChart("moreGraph"); + + if (chartStatus != undefined) { + chartStatus.destroy(); + } + + return new Chart(ctx,this.graphData); + } + + calculateGraphData(){ + this.graphData.data.labels = [] + this.graphData.data.datasets[0].data = [] + this.graphData.data.datasets[0].borderColor = [ getComputedStyle(document.body).getPropertyValue('--graphLineColor')] + this.graphData.data.datasets[0].backgroundColor = [getComputedStyle(document.body).getPropertyValue('--graphLineBackgroundColor')] + for(let transaction of [...this.transData].slice(0,50).reverse()){ + this.graphData.data.labels.push(Utils.dateFormat(transaction.time)) + this.graphData.data.datasets[0].data.push(transaction.balance) + } + } + +} + +class GlobalStore{ + + storedData = {} + + constructor(newStoredData){ + this.storedData = newStoredData + } + + setStoredData(newStoredData){ + this.storedData = newStoredData + } + + getStoredData(){ + return this.storedData + } +} + +Object.defineProperty(String.prototype, 'capitalize', { + value: function() { + return this.charAt(0).toUpperCase() + this.slice(1); + }, + enumerable: false +}); + + +$(document).ready(function(){ + + var formData + var language + $.getJSON("config.json", function(data){ + let lang = "EN" + if(data[data.lang] != null){ + lang = data.lang + } + Utils.setTimeZone(lang == "HU" ? "hu-HU" : "en-GB") + formData = new GlobalStore(data[lang]["DYNAMIC_FORM_DATA"]) + language = new GlobalStore(data[lang]["LAUNGAGE"]) + }).fail(function(error){ + console.log("Can't load JSON file! " + error); + }); + + + var inputData = new GlobalStore({}) + var transactionData + + let yourMoney = new Render("your_money") + let transaction = new Render("transaction") + let bankcard = new Render("bankcard") + let graph = "" + var pincode = "" + var type = "" + + + Utils.setCardData({cardNumber:Utils.genCardNumber(), cardExpiry:Utils.genMonth()}) + + function bankRender(){ + Components.generateAllComponents(formData.getStoredData()) + } + + function ATMRender(){ + Components.generateAllComponents(formData.getStoredData(),"atm") + pincode = new Pincode("#pincode-container") + Components.getComponent("atmComponent").fadeOut() + Components.getComponent("withdraw").setElementId(".secondGridColumn") + Components.getComponent("withdraw").renderInputAndButton() + Components.getComponent("deposit").setElementId(".secondGridColumn") + Components.getComponent("deposit").renderInputAndButton() + + pincode.show() + } + + $(document).on('click','.pincode-numbers div',function(){ + if(pincode.getPincode().length + 1 == 4){ + $(".pincode-numbers div:nth-child(12)").removeClass("disable-button") + $(".pincode-numbers div:nth-child(12)").prop("disabled",false) + } + + let currentNumber = $(this).text(); + $(".pincode-input span").each(function () { + let spanText = $(this).attr('number'); + if (!spanText) { + $(this).attr("number",currentNumber) + $(this).addClass("circleBackground"); + pincode.setPincode(currentNumber) + return false; + } + }) + }) + + + $(document).on('click','.pincode-numbers div:nth-child(11)',function(){ + pincode.renderPassCode() + }) + + $(document).on('click','.pincode-numbers div:nth-child(12)',function(){ + $.post('https://esx_banking/checkPincode', JSON.stringify(pincode.getPincode())) + .then((response) =>{ + if(response.success){ + Components.loader("#pincode-container","show") + setTimeout(()=>{ + Components.getComponent("atmComponent").fadeIn(200) + },2800) + } + else if(response.error){ + pincode.renderPassCode() + } + }); + }) + + + window.addEventListener('message', ({data}) => { + const languageText = language.getStoredData() + if(data.showMenu){ + const datas = data.datas + + transactionData = new GlobalStore(datas.transactionsData) + const transData = transactionData.getStoredData() + transData.map((trans)=>{ + trans.id = trans.time + trans.time = Utils.dateFormat(trans.time) + switch(trans.type){ + case "WITHDRAW": + trans.type = languageText.withdraw + break; + case "DEPOSIT": + trans.type = languageText.deposit + break; + case "TRANSFER_RECEIVE": + trans.type = languageText.transferReceive + break; + default: + trans.type = languageText.transfer + break; + } + return trans + }) + + graph = new Graph(transData,languageText.graphTitle) + + if(data.openATM){ + ATMRender() + type = "ATM" + transaction.setData(transData,languageText) + } + else{ + type = "BANK" + bankRender() + graph.renderSmallGraph() + + transaction.setData(transData,languageText) + transaction.renderTransactions() + } + + const bankData = Utils.getCardData() + datas.bankCardData.cardNumber = bankData.cardNumber + datas.bankCardData.createdDate = bankData.cardExpiry + bankcard.setData(datas.bankCardData) + bankcard.renderBankCard() + + yourMoney.setData(datas.your_money_panel,languageText) + yourMoney.renderMyMoneySection() + + + Components.loader(".loader","show") + }else if(data.updateData){ + const currentInputValues = inputData.getStoredData() + const updateTransData = transactionData.getStoredData() + + let info + if(amount = currentInputValues.withdraw){ + info = {label:languageText.withdraw, amount: amount} + } + else if(amount = currentInputValues.deposit) { + info = {label:languageText.deposit, amount: amount} + } + else if (amount = currentInputValues.transfer?.moneyAmount){ + info = {label:languageText.transfer, amount: amount} + } + else if (currentInputValues.pincode){ + return + } + updateTransData.unshift({time:Utils.dateFormat(new Date()),id: new Date().getTime(),amount: info.amount, type:info.label.toUpperCase(), balance: data.data.bankMoney}) + yourMoney.refresh(data.data) + transaction.refresh(updateTransData) + if(type == "BANK") graph.refreshGraphData(updateTransData) + } + }) + + function resetContainerAndSetTitle(title){ + $("#menu").fadeOut(); + $("#title-container h3").text(title); + $("#more-modal-container").empty(); + } + + + $(document).on('click','#more_graph',function(){ + resetContainerAndSetTitle(language.getStoredData().moreGraphTitle) + $("#modal-container").fadeIn(); + $("#more-modal-container").html(''); + graph.renderBigGraph() + }) + + + $(document).on('click','#more_history',function(){ + const lang = language.getStoredData() + resetContainerAndSetTitle(lang.moreHistoryTitle) + $("#more-modal-container").html(` + + + + + + + + + + +
idtypebalanceamounttime
`); + $('#example').DataTable({ + "responsive": true, + "data": transactionData.getStoredData(), + "columns": [ + { "data" : "id", }, + { "data": "type" , "title":lang.tableLang.typeLabel}, + { "data": "balance" ,"title":lang.tableLang.balanceLabel}, + { "data": "amount" , "title":lang.tableLang.amountLabel}, + { "data": "time" , "title":lang.tableLang.timeLabel} + ], + columnDefs: [ + { + target: 0, + visible: false, + searchable: false, + }, + { + target: 4, + orderable: false, + }, + ], + createdRow: function (row, data, index) { + let parseType = data.type.replace(/[\$,]/g, '') + $('td', row).eq(1).text(`$${data.balance}`) + if (parseType == lang.deposit || parseType == lang.transferReceive) { + $('td', row).eq(2).addClass('greenTableText'); + $('td', row).eq(2).html(`+${lang.moneyFormat.replace("__replaceData__",data.amount)}`) + } + else if(parseType == lang.withdraw || parseType == lang.transfer){ + $('td', row).eq(2).addClass('redTableText'); + $('td', row).eq(2).html(`-${lang.moneyFormat.replace("__replaceData__",data.amount)}`) + } + }, + "order": [[0, 'desc']], + "scrollY": "450px", + "scrollX": true, + "scrollCollapse": true, + "fixedColumns": { + "heightMatch": 'none' + }, + "language": { + "url": `https://cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/${lang.tableLang.tableFullLanguage}.json`, + "search": '', "searchPlaceholder": lang.tableLang.searchInputPlaceholder + }, + + }); + + $("#modal-container").fadeIn(); + }) + + + let inputs = { + first: false, + second: false + } + + $(document).on('keyup','input[type="number"] , input[type="password"]',function(){ + let buttonGroup = $(this).closest('.input-groups-container').find('button'); + + if(buttonGroup.length > 0){ + let name = $(this).attr("name"); + if(name == "moneyAmount"){ + inputs.first = $(this).val() != '' + } + else{ + inputs.second = $(this).val() != '' + } + + if(inputs.first && inputs.second){ + buttonGroup.removeClass('disable-button') + buttonGroup.prop('disabled',false) + } + else{ + buttonGroup.addClass('disable-button') + buttonGroup.prop('disabled',true) + } + + return + } + + let button = $(this).next('button'); + + if($(this).val() != '') { + if($(this).attr("name") == "pincode" && $(this).val().length < 4){ + return + } + + button.removeClass('disable-button') + button.prop('disabled',false) + } + else{ + button.addClass('disable-button') + button.prop('disabled',true) + } + + }); + + $(document).on('click','.accept-button',function(){ + let buttonGroup = $(this).closest('.input-groups-container').find('button'); + let inputValues = {} + if(buttonGroup.length > 0){ + inputValues["transfer"] = {} + $(".input-groups-container input").each(function() { + inputValues["transfer"][$(this).attr('name')] = $(this).val(); + $(this).val(null); + inputs.first = false + inputs.second = false + }); + } + else{ + let inputValue = $(this).prev('input').val(); + if(inputValue == undefined){return} + if((inputValue.length == 0 && inputValue <= 0 )){ + return + } + + inputValues[$(this).prev('input').attr('name')] = inputValue; + + $(this).prev('input').val(null); + } + + + inputData.setStoredData(inputValues) + $.post('https://esx_banking/clickButton', JSON.stringify(inputValues)); + + $(this).addClass('disable-button') + $(this).prop('disabled',true) + }) + + + $(document).on('click','#close-button',function(){ + $("#modal-container").fadeOut(); + $("#menu").fadeIn(); + }) + + $(document).on('click','.exit-button',function(){ + Components.loader(".loader","hide") + $.post('https://esx_banking/close', JSON.stringify({})); + }) + + $(document).keyup(function(e) { + if(e.which == 27) { + if (!LOADED) { + Components.loader(".loader","hide") + $.post('https://esx_banking/close', JSON.stringify({})); + } + } + }); +}) diff --git a/[esx_addons]/esx_banking/html/ui.html b/[esx_addons]/esx_banking/html/ui.html new file mode 100644 index 00000000..922ff813 --- /dev/null +++ b/[esx_addons]/esx_banking/html/ui.html @@ -0,0 +1,19 @@ + + + + + + + + + +
+
+ + + + + + + + diff --git a/[esx_addons]/esx_banking/locales/de.lua b/[esx_addons]/esx_banking/locales/de.lua new file mode 100644 index 00000000..e900bffb --- /dev/null +++ b/[esx_addons]/esx_banking/locales/de.lua @@ -0,0 +1,16 @@ +Locales['de'] = { + ['invalid_amount'] = 'Das ist ein ungültiger Geldbetrag.', + ['deposit_money'] = 'Du hast $%s eingezahlt', + ['withdraw_money'] = 'Du hast $%s abgehoben', + ['pincode_money'] = 'Dein neuer Pincode lautet: %s', + ['transfer_money'] = 'Du hast erfolgreich $%s Geld zu ID: %s transferiert.', + ['receive_transfer'] = 'Du hast $%s Geld von ID: %s erhalten.', + ['press_e_banking'] = 'Drücke [E] um die Bank aufzurufen', + ['access_bank'] = 'Zugang zur Bank', + ['banking_blip'] = 'Bank', + ['cant_do_it'] = "Du kannst es nicht tun!", + ['not_enough_money'] = "Nicht genug Geld, du brauchst $%s", + ['pincode_not_found'] = "Ungültiger Pincode", + ['pincode_found'] = "Gültiger PIN-Code...", + ['bank_name'] = "Fleeca Bank" + } \ No newline at end of file diff --git a/[esx_addons]/esx_banking/locales/en.lua b/[esx_addons]/esx_banking/locales/en.lua new file mode 100644 index 00000000..9f5453c8 --- /dev/null +++ b/[esx_addons]/esx_banking/locales/en.lua @@ -0,0 +1,16 @@ +Locales['en'] = { + ['invalid_amount'] = 'That\'s an invalid amount of money', + ['deposit_money'] = 'you have deposited $%s', + ['withdraw_money'] = 'you have withdrawn $%s', + ['pincode_money'] = 'you have new pincode %s', + ['transfer_money'] = 'you success transfer money $%s ID: %s', + ['receive_transfer'] = 'you receive transfer money $%s ID: %s', + ['press_e_banking'] = 'press [E] to access the bank', + ['access_bank'] = 'Access the bank', + ['banking_blip'] = 'Bank', + ['cant_do_it'] = "Can't do it!", + ['not_enough_money'] = "Not enough money! You need %s money!", + ['pincode_not_found'] = "Invalid PIN code", + ['pincode_found'] = "Valid PIN code...", + ['bank_name'] = "Fleeca Bank" +} \ No newline at end of file diff --git a/[esx_addons]/esx_banking/locales/es.lua b/[esx_addons]/esx_banking/locales/es.lua new file mode 100644 index 00000000..8afa3678 --- /dev/null +++ b/[esx_addons]/esx_banking/locales/es.lua @@ -0,0 +1,16 @@ +Locales['es'] = { + ['invalid_amount'] = 'Esa es una cantidad de dinero no válida', + ['deposit_money'] = 'Has depositado $%s', + ['withdraw_money'] = 'Has retirado $%s', + ['pincode_money'] = 'Tienes un nuevo código PIN %s', + ['transfer_money'] = 'Transferencia exitosa por $%s a ID: %s', + ['receive_transfer'] = 'Recibiste una transferencia por $%s de ID: %s', + ['press_e_banking'] = 'pulsa [E] para acceder al banco', + ['access_bank'] = 'Acceder al banco', + ['banking_blip'] = 'Banco', + ['cant_do_it'] = "No puede hacerlo!", + ['not_enough_money'] = "¡No hay suficiente dinero! Necesitas %s de dinero!", + ['pincode_not_found'] = "Código PIN no valido", + ['pincode_found'] = "Código PIN válido...", + ['bank_name'] = "Banco Fleeca" + } diff --git a/[esx_addons]/esx_banking/locales/et.lua b/[esx_addons]/esx_banking/locales/et.lua new file mode 100644 index 00000000..84f85234 --- /dev/null +++ b/[esx_addons]/esx_banking/locales/et.lua @@ -0,0 +1,16 @@ +Locales['et'] = { + ['invalid_amount'] = 'Tundmatu kogus raha', + ['deposit_money'] = 'Sa sisestasid $%s', + ['withdraw_money'] = 'Sa võtsid välja $%s', + ['pincode_money'] = 'Uus PIN kood: %s', + ['transfer_money'] = 'Sa tegid ülekande summas: $%s ID: %s', + ['receive_transfer'] = 'Sa said ülekande summas: $%s ID: %s', + ['press_e_banking'] = 'Vajuta [E], et avada pank', + ['access_bank'] = 'Ava pank', + ['banking_blip'] = 'Pank', + ['cant_do_it'] = "Ei saa seda teha!", + ['not_enough_money'] = "Pole piisavalt raha! Sul on vaja %s !", + ['pincode_not_found'] = "Vale PIN", + ['pincode_found'] = "Õige PIN...", + ['bank_name'] = "Fleeca Pank" +} diff --git a/[esx_addons]/esx_banking/locales/fr.lua b/[esx_addons]/esx_banking/locales/fr.lua new file mode 100644 index 00000000..4e52384d --- /dev/null +++ b/[esx_addons]/esx_banking/locales/fr.lua @@ -0,0 +1,16 @@ +Locales['fr'] = { + ['invalid_amount'] = "Le montant est invalide.", + ['deposit_money'] = 'Tu as déposé $%s', + ['withdraw_money'] = 'Tu as retiré $%s', + ['pincode_money'] = 'Tu as défini un nouveau code PIN : %s', + ['transfer_money'] = 'Tu as transféré $%s à ID: %s', + ['receive_transfer'] = 'Tu as reçu $%s de ID: %s', + ['press_e_banking'] = 'Appuie sur [E] pour accéder a la banque.', + ['access_bank'] = 'Accéder à la banque', + ['banking_blip'] = 'Banque', + ['cant_do_it'] = "Tu ne peux pas faire ça!", + ['not_enough_money'] = "Tu n'as pas assez d'argent ! Tu as besoin de %s!", + ['pincode_not_found'] = "Code PIN invalide", + ['pincode_found'] = "Code PIN valide...", + ['bank_name'] = "Banque Fleeca" + } \ No newline at end of file diff --git a/[esx_addons]/esx_banking/locales/hu.lua b/[esx_addons]/esx_banking/locales/hu.lua new file mode 100644 index 00000000..0d74a8c4 --- /dev/null +++ b/[esx_addons]/esx_banking/locales/hu.lua @@ -0,0 +1,16 @@ +Locales['hu'] = { + ['invalid_amount'] = 'Érvénytelen pénz mennyiség', + ['deposit_money'] = 'Befizettél %s$-t', + ['withdraw_money'] = 'Kivettél %s$-t', + ['pincode_money'] = 'Az új PIN kódod: %s', + ['transfer_money'] = 'Sikeres utalás! Összeg: $%s ID: %s', + ['receive_transfer'] = 'Utalás érkezett! Összeg: $%s ID: %s', + ['press_e_banking'] = 'Nyomd meg a [E] gombot a bank eléréséhez', + ['access_bank'] = 'Bank megnyitása', + ['banking_blip'] = 'Bank', + ['cant_do_it'] = "Ezt nem lehet!", + ['not_enough_money'] = "Nincs elég pénzed, még szükséged lesz ennyire: %s", + ['pincode_not_found'] = "Érvénytelen PIN kód", + ['pincode_found'] = "Érvényes PIN kód...", + ['bank_name'] = "Fleeca Bank" +} \ No newline at end of file diff --git a/[esx_addons]/esx_banking/locales/it.lua b/[esx_addons]/esx_banking/locales/it.lua new file mode 100644 index 00000000..ed5de004 --- /dev/null +++ b/[esx_addons]/esx_banking/locales/it.lua @@ -0,0 +1,16 @@ +Locales['it'] = { + ['invalid_amount'] = 'questa è una somma di denaro non valida', + ['deposit_money'] = 'hai depositato $%s', + ['withdraw_money'] = 'hai prelevato $%s', + ['pincode_money'] = 'hai un nuovo codice pin %s', + ['transfer_money'] = 'hai trasferito con successo il denaro a $%s ID: %s', + ['receive_transfer'] = 'hai ricevuto un trasferimento di denaro da $%s ID: %s', + ['press_e_banking'] = 'premi [E] per accedere alla banca', + ['access_bank'] = 'accedi alla banca', + ['banking_blip'] = 'Banca', + ['cant_do_it'] = "non puoi farlo!", + ['not_enough_money'] = "non hai abbastanza soldi! hai bisogno di %s soldi!", + ['pincode_not_found'] = "codice PIN errato", + ['pincode_found'] = "codice PIN valido...", + ['bank_name'] = "Fleeca Bank", +} \ No newline at end of file diff --git a/[esx_addons]/esx_banking/locales/nl.lua b/[esx_addons]/esx_banking/locales/nl.lua new file mode 100644 index 00000000..cb713a8a --- /dev/null +++ b/[esx_addons]/esx_banking/locales/nl.lua @@ -0,0 +1,16 @@ +Locales['nl'] = { + ['invalid_amount'] = 'Ongeldigd bedrag', + ['deposit_money'] = 'Je hebt €%s gestort', + ['withdraw_money'] = 'Je hebt €%s opgenomen', + ['pincode_money'] = 'Je nieuwe pincode is %s', + ['transfer_money'] = 'Met succes €%s overgemaakt naar ID: %s', + ['receive_transfer'] = 'Je hebt €%s ontvangen van ID: %s', + ['press_e_banking'] = 'Klik op [E] om de bank te gebruiken', + ['access_bank'] = 'Geldautomaat', + ['banking_blip'] = 'Bank', + ['cant_do_it'] = "Kan dit niet doen!", + ['not_enough_money'] = "Niet genoeg geld! Je hebt nog %s nodig!", + ['pincode_not_found'] = "Onjuiste PIN", + ['pincode_found'] = "Een moment geduld...", + ['bank_name'] = "Fleeca Bank" +} diff --git a/[esx_addons]/esx_banking/server/main.lua b/[esx_addons]/esx_banking/server/main.lua new file mode 100644 index 00000000..8afc5372 --- /dev/null +++ b/[esx_addons]/esx_banking/server/main.lua @@ -0,0 +1,212 @@ +local spawnedPeds, netIdTable = {}, {} + +-- get keys utils +local function get_key(t) + local key + for k, _ in pairs(t) do + key = k + end + return key +end + +-- Resource starting +AddEventHandler('onResourceStart', function(resourceName) + if (GetCurrentResourceName() ~= resourceName) then return end + if Config.EnablePeds then BANK.CreatePeds() end + local twoMonthMs = (os.time() - 5259487) * 1000 + MySQL.Sync.fetchScalar('DELETE FROM banking WHERE time < ? ', {twoMonthMs}) +end) + +AddEventHandler('onResourceStop', function(resourceName) + if (GetCurrentResourceName() ~= resourceName) then return end + if Config.EnablePeds then BANK.DeletePeds() end +end) + +if Config.EnablePeds then + AddEventHandler('esx:playerLoaded', function(playerId) + TriggerClientEvent('esx_banking:pedHandler', playerId, netIdTable) + end) +end + +-- event +RegisterServerEvent('esx_banking:doingType') +AddEventHandler('esx_banking:doingType', function(typeData) + if source == nil then return end + if (typeData == nil) then return end + + local source = source + local xPlayer = ESX.GetPlayerFromId(source) + local identifier = xPlayer.getIdentifier() + local money = xPlayer.getAccount('money').money + local bankMoney = xPlayer.getAccount('bank').money + local amount + + local key = get_key(typeData) + if typeData.deposit then + amount = tonumber(typeData.deposit) + elseif typeData.withdraw then + amount = tonumber(typeData.withdraw) + elseif typeData.transfer and typeData.transfer.moneyAmount then + amount = tonumber(typeData.transfer.moneyAmount) + elseif typeData.pincode then + amount = tonumber(typeData.pincode) + end + + if not tonumber(amount) then return end + amount = ESX.Math.Round(amount) + + if amount == nil or (not typeData.pincode and amount <= 0) then + TriggerClientEvent("esx:showNotification", source, TranslateCap('invalid_amount'), "error") + else + if typeData.deposit and amount <= money then + -- deposit + BANK.Deposit(amount, xPlayer) + elseif typeData.withdraw and bankMoney ~= nil and amount <= bankMoney then + -- withdraw + BANK.Withdraw(amount, xPlayer) + elseif typeData.pincode then + -- pincode + BANK.Pincode(amount, identifier) + elseif typeData.transfer then + -- transfer + if tonumber(typeData.transfer.playerId) > 0 and bankMoney >= amount then + local xTarget = ESX.GetPlayerFromId(tonumber(typeData.transfer.playerId)) + if not BANK.Transfer(xTarget, xPlayer, amount, key) then + return + end + end + else + TriggerClientEvent("esx:showNotification", source, TranslateCap('not_enough_money', amount), "error") + return + end + + money = xPlayer.getAccount('money').money + bankMoney = xPlayer.getAccount('bank').money + if typeData.transfer then + TriggerClientEvent("esx:showNotification", source, + TranslateCap(string.format('%s_money', key), amount, typeData.transfer.playerId), "success") + else + TriggerClientEvent("esx:showNotification", source, TranslateCap(string.format('%s_money', key), typeData.pincode and (string.format("%04d", amount)) or amount), "success") + end + if not typeData.pincode then + BANK.LogTransaction(source, string.upper(key), amount, bankMoney) + end + + TriggerClientEvent("esx_banking:updateMoneyInUI", source, key, bankMoney, money) + end +end) + +-- register callbacks +ESX.RegisterServerCallback("esx_banking:getPlayerData", function(source, cb) + local xPlayer = ESX.GetPlayerFromId(source) + local identifier = xPlayer.getIdentifier() + local weekAgo = (os.time() - 604800) * 1000 + local transactionHistory = MySQL.Sync.fetchAll( + 'SELECT * FROM banking WHERE identifier = ? AND time > ? ORDER BY time DESC LIMIT 10', {identifier, weekAgo}) + local playerData = { + playerName = xPlayer.getName(), + money = xPlayer.getAccount('money').money, + bankMoney = xPlayer.getAccount('bank').money, + transactionHistory = transactionHistory + } + + cb(playerData) +end) + +ESX.RegisterServerCallback("esx_banking:checkPincode", function(source, cb, inputPincode) + local xPlayer = ESX.GetPlayerFromId(source) + local identifier = xPlayer.getIdentifier() + local pincode = MySQL.Sync.fetchScalar('SELECT COUNT(1) AS pincode FROM users WHERE identifier = ? AND pincode = ?', + {identifier, inputPincode}) + cb(pincode > 0) +end) + +function logTransaction(targetSource,key,amount) + if targetSource == nil then + print("ERROR: TargetSource nil!") + return + end + + if key == nil then + print("ERROR: Do you need use these: WITHDRAW,DEPOSIT,TRANSFER_RECEIVE") + return + end + + if type(key) ~= "string" or key == '' then + print("ERROR: Do you need use these: WITHDRAW,DEPOSIT,TRANSFER_RECEIVE and can only be string type!") + return + end + + if amount == nil then + print("ERROR: Amount value is nil! Add some numeric value to the amount!") + return + end + + local xPlayer = ESX.GetPlayerFromId(tonumber(targetSource)) + + if xPlayer ~= nil then + local bankCurrentMoney = xPlayer.getAccount('bank').money + BANK.LogTransaction(targetSource, string.upper(key), amount, bankCurrentMoney) + else + print("ERROR: xPlayer is nil!") + end +end +exports("logTransaction", logTransaction) + +-- bank functions +BANK = { + CreatePeds = function() + for i = 1, #Config.Peds do + local model = Config.Peds[i].Model + local coords = Config.Peds[i].Position + spawnedPeds[i] = CreatePed(0, model, coords.x, coords.y, coords.z, coords.w, true, true) + netIdTable[i] = NetworkGetNetworkIdFromEntity(spawnedPeds[i]) + while not DoesEntityExist(spawnedPeds[i]) do Wait(50) end + end + + Wait(100) + TriggerClientEvent('esx_banking:PedHandler', -1, netIdTable) + end, + DeletePeds = function() + for i = 1, #spawnedPeds do + DeleteEntity(spawnedPeds[i]) + spawnedPeds[i] = nil + end + end, + Withdraw = function(amount, xPlayer) + xPlayer.addAccountMoney('money', amount) + xPlayer.removeAccountMoney('bank', amount) + end, + Deposit = function(amount, xPlayer) + xPlayer.removeAccountMoney('money', amount) + xPlayer.addAccountMoney('bank', amount) + end, + Transfer = function(xTarget, xPlayer, amount, key) + if xTarget == nil or xPlayer.source == xTarget.source then + TriggerClientEvent("esx:showNotification", source, TranslateCap("cant_do_it"), "error") + return false + end + + xPlayer.removeAccountMoney('bank', amount) + xTarget.addAccountMoney('bank', amount) + local bankMoney = xTarget.getAccount('bank').money + BANK.LogTransaction(xTarget.source, "TRANSFER_RECEIVE", amount, bankMoney) + TriggerClientEvent("esx:showNotification", xTarget.source, TranslateCap('receive_transfer', amount, xPlayer.source), + "success") + + return true + end, + Pincode = function(amount, identifier) + MySQL.update('UPDATE users SET pincode = ? WHERE identifier = ? ', {amount, identifier}) + end, + LogTransaction = function(playerId, logType, amount, bankMoney) + if playerId == nil then + return + end + local xPlayer = ESX.GetPlayerFromId(playerId) + local identifier = xPlayer.getIdentifier() + + MySQL.insert('INSERT INTO banking (identifier, type, amount, time, balance) VALUES (?, ?, ?, ?, ?)', + {identifier, logType, amount, os.time() * 1000, bankMoney}) + end +} diff --git a/[esx_addons]/esx_barbershop/.editorconfig b/[esx_addons]/esx_barbershop/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_barbershop/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_barbershop/LICENSE b/[esx_addons]/esx_barbershop/LICENSE new file mode 100644 index 00000000..8dbb3010 --- /dev/null +++ b/[esx_addons]/esx_barbershop/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_barbershop + Copyright (C) 2015-2023 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 . + +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_barbershop Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_barbershop/README.md b/[esx_addons]/esx_barbershop/README.md new file mode 100644 index 00000000..7a097fa5 --- /dev/null +++ b/[esx_addons]/esx_barbershop/README.md @@ -0,0 +1,40 @@ +# esx_barbershop + +## Requirements +- [esx_skin](https://github.com/ESX-Org/esx_skin) + +## Download & Installation + +### Using [fvm](https://github.com/qlaffont/fvm-installer) +``` +fvm install --save --folder=esx esx-org/esx_barbershop +``` + +### Using Git +``` +cd resources +git clone https://github.com/ESX-Org/esx_barbershop [esx]/esx_barbershop +``` + +### Manually +- Download https://github.com/ESX-Org/esx_barbershop/archive/master.zip +- Put it in the `[esx]` directory + +## Installation +- Add this in your `server.cfg`: + +``` +start esx_barbershop +``` + +# Legal +### License +esx_barbershop - barber shop! + +Copyright (C) 2015-2023 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/. \ No newline at end of file diff --git a/[esx_addons]/esx_barbershop/client/main.lua b/[esx_addons]/esx_barbershop/client/main.lua new file mode 100644 index 00000000..d261549a --- /dev/null +++ b/[esx_addons]/esx_barbershop/client/main.lua @@ -0,0 +1,163 @@ +local hasAlreadyEnteredMarker, lastZone, currentAction, currentActionMsg, hasPaid + +function OpenShopMenu() + hasPaid = false + + TriggerEvent('esx_skin:openRestrictedMenu', function(data, menu) + menu.close() + + local elements = { + {unselectable = true, icon = "fas fa-check-double", title = TranslateCap("valid_purchase")}, + {icon = "fas fa-check-circle", title = TranslateCap("yes"), value = "yes"}, + {icon = "fas fa-window-close", title = TranslateCap("no"), value = "no"}, + } + + ESX.OpenContext("right", elements, function(menu,element) + if element.value == "yes" then + ESX.TriggerServerCallback('esx_barbershop:checkMoney', function(hasEnoughMoney) + if hasEnoughMoney then + ESX.CloseContext() + TriggerEvent('skinchanger:getSkin', function(skin) + TriggerServerEvent('esx_skin:save', skin) + end) + + TriggerServerEvent('esx_barbershop:pay') + hasPaid = true + else + ESX.CloseContext() + ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin) + TriggerEvent('skinchanger:loadSkin', skin) + end) + + ESX.ShowNotification(TranslateCap('not_enough_money')) + end + end) + elseif element.value == "no" then + ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin) + TriggerEvent('skinchanger:loadSkin', skin) + end) + ESX.CloseContext() + end + currentAction = 'shop_menu' + currentActionMsg = TranslateCap('press_access') + end, function(menu) + currentAction = 'shop_menu' + currentActionMsg = TranslateCap('press_access') + end) + end, function(data, menu) + menu.close() + + currentAction = 'shop_menu' + currentActionMsg = TranslateCap('press_access') + end, { + 'beard_1', + 'beard_2', + 'beard_3', + 'beard_4', + 'hair_1', + 'hair_2', + 'hair_color_1', + 'hair_color_2', + 'eyebrows_1', + 'eyebrows_2', + 'eyebrows_3', + 'eyebrows_4', + 'makeup_1', + 'makeup_2', + 'makeup_3', + 'makeup_4', + 'lipstick_1', + 'lipstick_2', + 'lipstick_3', + 'lipstick_4', + 'ears_1', + 'ears_2', + }) +end + +AddEventHandler('esx_barbershop:hasEnteredMarker', function(zone) + currentAction = 'shop_menu' + currentActionMsg = TranslateCap('press_access') +end) + +AddEventHandler('esx_barbershop:hasExitedMarker', function(zone) + ESX.CloseContext() + currentAction = nil + + if not hasPaid then + ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin) + TriggerEvent('skinchanger:loadSkin', skin) + end) + end +end) + +-- Create Blips +CreateThread(function() + for k,v in ipairs(Config.Shops) do + local blip = AddBlipForCoord(v) + + SetBlipSprite (blip, 71) + SetBlipColour (blip, 51) + SetBlipAsShortRange(blip, true) + + BeginTextCommandSetBlipName('STRING') + AddTextComponentSubstringPlayerName(TranslateCap('barber_blip')) + EndTextCommandSetBlipName(blip) + end +end) + +-- Enter / Exit marker events and draw marker +CreateThread(function() + while true do + Wait(0) + local playerCoords, isInMarker, currentZone, letSleep = GetEntityCoords(PlayerPedId()), nil, nil, true + + for k,v in ipairs(Config.Shops) do + local distance = #(playerCoords - v) + + if distance < Config.DrawDistance then + letSleep = false + DrawMarker(Config.MarkerType, v, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Config.MarkerSize, Config.MarkerColor.r, Config.MarkerColor.g, Config.MarkerColor.b, 100, false, true, 2, false, nil, nil, false) + + if distance < 1.5 then + isInMarker, currentZone = true, k + end + end + end + + if (isInMarker and not hasAlreadyEnteredMarker) or (isInMarker and lastZone ~= currentZone) then + hasAlreadyEnteredMarker, lastZone = true, currentZone + TriggerEvent('esx_barbershop:hasEnteredMarker', currentZone) + end + + if not isInMarker and hasAlreadyEnteredMarker then + hasAlreadyEnteredMarker = false + TriggerEvent('esx_barbershop:hasExitedMarker', lastZone) + end + + if letSleep then + Wait(500) + end + end +end) + +-- Key controls +CreateThread(function() + while true do + Wait(0) + + if currentAction then + ESX.ShowHelpNotification(currentActionMsg) + + if IsControlJustReleased(0, 38) then + if currentAction == 'shop_menu' then + OpenShopMenu() + end + + currentAction = nil + end + else + Wait(500) + end + end +end) diff --git a/[esx_addons]/esx_barbershop/config.lua b/[esx_addons]/esx_barbershop/config.lua new file mode 100644 index 00000000..6a25a3ab --- /dev/null +++ b/[esx_addons]/esx_barbershop/config.lua @@ -0,0 +1,20 @@ +Config = {} + +Config.Price = 100 + +Config.DrawDistance = 10.0 +Config.MarkerSize = vector3(1.5, 1.5, 1.0) +Config.MarkerColor = {r = 102, g = 102, b = 204} +Config.MarkerType = 1 + +Config.Locale = GetConvar('esx:locale', 'en') + +Config.Shops = { + vector3(-814.3, -183.8, 36.6), + vector3(136.8, -1708.4, 28.3), + vector3(-1282.6, -1116.8, 6.0), + vector3(1931.5, 3729.7, 31.8), + vector3(1212.8, -472.9, 65.2), + vector3(-32.9, -152.3, 56.1), + vector3(-278.1, 6228.5, 30.7) +} diff --git a/[esx_addons]/esx_barbershop/fxmanifest.lua b/[esx_addons]/esx_barbershop/fxmanifest.lua new file mode 100644 index 00000000..4d666ce9 --- /dev/null +++ b/[esx_addons]/esx_barbershop/fxmanifest.lua @@ -0,0 +1,28 @@ +fx_version 'adamant' + +game 'gta5' + +description 'ESX Barber Shop' +lua54 'yes' +version '1.9.0' + +shared_script '@es_extended/imports.lua' + +server_scripts { + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'server/main.lua' +} + +client_scripts { + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'client/main.lua' +} + +dependencies { + 'es_extended', + 'esx_skin' +} diff --git a/[esx_addons]/esx_barbershop/locales/br.lua b/[esx_addons]/esx_barbershop/locales/br.lua new file mode 100644 index 00000000..18a5bafa --- /dev/null +++ b/[esx_addons]/esx_barbershop/locales/br.lua @@ -0,0 +1,9 @@ +Locales['br'] = { + ['valid_purchase'] = 'validar esta compra?', + ['yes'] = 'sim', + ['no'] = 'não', + ['not_enough_money'] = 'você não tem dinheiro suficiente', + ['press_access'] = 'pressione [E] para acessar o menu', + ['barber_blip'] = 'Barbearia', + ['you_paid'] = 'você pagou $%s', +} diff --git a/[esx_addons]/esx_barbershop/locales/cs.lua b/[esx_addons]/esx_barbershop/locales/cs.lua new file mode 100644 index 00000000..3c9fe512 --- /dev/null +++ b/[esx_addons]/esx_barbershop/locales/cs.lua @@ -0,0 +1,9 @@ +Locales['cs'] = { + ['valid_purchase'] = 'potvrdit nakup?', + ['yes'] = 'ano', + ['no'] = 'ne', + ['not_enough_money'] = 'nemas dostatek penez', + ['press_access'] = 'stiskni [E] pro pristup k Holici.', + ['barber_blip'] = 'Holic', + ['you_paid'] = 'zaplatil jsi $%s', +} diff --git a/[esx_addons]/esx_barbershop/locales/de.lua b/[esx_addons]/esx_barbershop/locales/de.lua new file mode 100644 index 00000000..f06ecc10 --- /dev/null +++ b/[esx_addons]/esx_barbershop/locales/de.lua @@ -0,0 +1,9 @@ +Locales['de'] = { + ['valid_purchase'] = 'Einkauf bestätigen?', + ['yes'] = 'ja', + ['no'] = 'nein', + ['not_enough_money'] = 'Du hast nicht genug Geld', + ['press_access'] = 'Drücke [E] um das Menü zu öffnen', + ['barber_blip'] = 'Friseur', + ['you_paid'] = 'Du bezahlst $%s', +} \ No newline at end of file diff --git a/[esx_addons]/esx_barbershop/locales/en.lua b/[esx_addons]/esx_barbershop/locales/en.lua new file mode 100644 index 00000000..53517dfe --- /dev/null +++ b/[esx_addons]/esx_barbershop/locales/en.lua @@ -0,0 +1,9 @@ +Locales['en'] = { + ['valid_purchase'] = 'validate this purchase?', + ['yes'] = 'yes', + ['no'] = 'no', + ['not_enough_money'] = 'you do not have enough money', + ['press_access'] = 'press [E] to access the Barber Shop.', + ['barber_blip'] = 'barber Shop', + ['you_paid'] = 'you paid $%s', +} diff --git a/[esx_addons]/esx_barbershop/locales/es.lua b/[esx_addons]/esx_barbershop/locales/es.lua new file mode 100644 index 00000000..1af39eba --- /dev/null +++ b/[esx_addons]/esx_barbershop/locales/es.lua @@ -0,0 +1,9 @@ +Locales['es'] = { + ['valid_purchase'] = '¿validar esta compra?', + ['yes'] = 'si', + ['no'] = 'no', + ['not_enough_money'] = 'no tienes suficente dinero', + ['press_access'] = 'presiona [E] para acceder al menú', + ['barber_blip'] = 'barbero', + ['you_paid'] = 'has pagado $%s', +} diff --git a/[esx_addons]/esx_barbershop/locales/et.lua b/[esx_addons]/esx_barbershop/locales/et.lua new file mode 100644 index 00000000..2243471e --- /dev/null +++ b/[esx_addons]/esx_barbershop/locales/et.lua @@ -0,0 +1,9 @@ +Locales['et'] = { + ['valid_purchase'] = 'Kinnita ost?', + ['yes'] = 'Jah', + ['no'] = 'Ei', + ['not_enough_money'] = 'Sul pole piisavalt raha.', + ['press_access'] = 'Vajuta [E], et avada juuksuri menüü.', + ['barber_blip'] = 'Juuksur', + ['you_paid'] = 'Maksid $%s', +} diff --git a/[esx_addons]/esx_barbershop/locales/fi.lua b/[esx_addons]/esx_barbershop/locales/fi.lua new file mode 100644 index 00000000..ac8c7d30 --- /dev/null +++ b/[esx_addons]/esx_barbershop/locales/fi.lua @@ -0,0 +1,9 @@ +Locales['fi'] = { + ['valid_purchase'] = 'varmista tämä ostos?', + ['yes'] = 'kyllä', + ['no'] = 'ei', + ['not_enough_money'] = 'sinulla ei ole tarpeeksi rahaa', + ['press_access'] = 'paina [E] avataksesi menu', + ['barber_blip'] = 'Kampaamo', + ['you_paid'] = 'sinä maksoit $%s', +} diff --git a/[esx_addons]/esx_barbershop/locales/fr.lua b/[esx_addons]/esx_barbershop/locales/fr.lua new file mode 100644 index 00000000..edc71d1c --- /dev/null +++ b/[esx_addons]/esx_barbershop/locales/fr.lua @@ -0,0 +1,9 @@ +Locales['fr'] = { + ['valid_purchase'] = 'valider cet achat ?', + ['yes'] = 'oui', + ['no'] = 'non', + ['not_enough_money'] = 'vous n\'avez pas assez d\'argent', + ['press_access'] = 'appuez sur [E] pour accéder au menu', + ['barber_blip'] = 'barbier', + ['you_paid'] = 'vous avez payé $%s', +} diff --git a/[esx_addons]/esx_barbershop/locales/hu.lua b/[esx_addons]/esx_barbershop/locales/hu.lua new file mode 100644 index 00000000..4e26fb0b --- /dev/null +++ b/[esx_addons]/esx_barbershop/locales/hu.lua @@ -0,0 +1,9 @@ +Locales['hu'] = { + ['valid_purchase'] = 'Biztosan kifizeted?', + ['yes'] = 'Igen', + ['no'] = 'Nem', + ['not_enough_money'] = 'Nincsen elég pénzed', + ['press_access'] = 'Nyomj [E] hogy megnyisd a Fodrászatot.', + ['barber_blip'] = 'Fodrászat', + ['you_paid'] = 'Fizettél $%s', +} diff --git a/[esx_addons]/esx_barbershop/locales/it.lua b/[esx_addons]/esx_barbershop/locales/it.lua new file mode 100644 index 00000000..ac483953 --- /dev/null +++ b/[esx_addons]/esx_barbershop/locales/it.lua @@ -0,0 +1,9 @@ +Locales['it'] = { + ['valid_purchase'] = 'confermare l\'acquisto?', + ['yes'] = 'si', + ['no'] = 'no', + ['not_enough_money'] = 'non hai abbastanza soldi', + ['press_access'] = 'premi [E] per accedere al negozio.', + ['barber_blip'] = 'barbiere', + ['you_paid'] = 'hai pagato $%s', +} diff --git a/[esx_addons]/esx_barbershop/locales/pl.lua b/[esx_addons]/esx_barbershop/locales/pl.lua new file mode 100644 index 00000000..3fd5df4f --- /dev/null +++ b/[esx_addons]/esx_barbershop/locales/pl.lua @@ -0,0 +1,9 @@ +Locales['pl'] = { + ['valid_purchase'] = 'potwierdzić ten zakup?', + ['yes'] = 'tak', + ['no'] = 'nie', + ['not_enough_money'] = 'nie posiadasz wystarczająco pieniędzy', + ['press_access'] = 'naciśnij [E] aby otworzyć Fryziera.', + ['barber_blip'] = 'fryzjer', + ['you_paid'] = 'zapłaciłeś/aś $%s', +} diff --git a/[esx_addons]/esx_barbershop/locales/si.lua b/[esx_addons]/esx_barbershop/locales/si.lua new file mode 100644 index 00000000..bdc99c8f --- /dev/null +++ b/[esx_addons]/esx_barbershop/locales/si.lua @@ -0,0 +1,9 @@ +Locales['si'] = { + ['valid_purchase'] = 'potrdi ta nakup?', + ['yes'] = 'da', + ['no'] = 'no', + ['not_enough_money'] = 'nimate dovolj denarja', + ['press_access'] = 'pritisnite [E] za dostop do Barber Shop.', + ['barber_blip'] = 'Frizerski Salon', + ['you_paid'] = 'plačali ste $%s', +} diff --git a/[esx_addons]/esx_barbershop/locales/tr.lua b/[esx_addons]/esx_barbershop/locales/tr.lua new file mode 100644 index 00000000..3f8bec22 --- /dev/null +++ b/[esx_addons]/esx_barbershop/locales/tr.lua @@ -0,0 +1,9 @@ +Locales['tr'] = { + ['valid_purchase'] = 'bu işlemi doğruluyor musun?', + ['yes'] = 'evet', + ['no'] = 'hayır', + ['not_enough_money'] = 'yeterli miktarda paranız yok', + ['press_access'] = 'Berbere erişmek için [E] basın', + ['barber_blip'] = 'berber', + ['you_paid'] = '$%s ödedin', + } diff --git a/[esx_addons]/esx_barbershop/server/main.lua b/[esx_addons]/esx_barbershop/server/main.lua new file mode 100644 index 00000000..2f4a8f6e --- /dev/null +++ b/[esx_addons]/esx_barbershop/server/main.lua @@ -0,0 +1,14 @@ +RegisterServerEvent('esx_barbershop:pay') +AddEventHandler('esx_barbershop:pay', function() + local source = source + local xPlayer = ESX.GetPlayerFromId(source) + + xPlayer.removeMoney(Config.Price, "Haircut") + TriggerClientEvent('esx:showNotification', source, TranslateCap('you_paid', ESX.Math.GroupDigits(Config.Price))) +end) + +ESX.RegisterServerCallback('esx_barbershop:checkMoney', function(source, cb) + local xPlayer = ESX.GetPlayerFromId(source) + + cb(xPlayer.getMoney() >= Config.Price) +end) diff --git a/[esx_addons]/esx_basicneeds/.editorconfig b/[esx_addons]/esx_basicneeds/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_basicneeds/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_basicneeds/LICENSE b/[esx_addons]/esx_basicneeds/LICENSE new file mode 100644 index 00000000..9cb95752 --- /dev/null +++ b/[esx_addons]/esx_basicneeds/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_basicneeds + Copyright (C) 2015-2023 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 . + +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_basicneeds Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_basicneeds/README.md b/[esx_addons]/esx_basicneeds/README.md new file mode 100644 index 00000000..b089eeb3 --- /dev/null +++ b/[esx_addons]/esx_basicneeds/README.md @@ -0,0 +1,43 @@ +# esx_basicneeds +This script implements hunger and thirst status, they can be increased when eating bread or drinking water. + +## Requirements +- [esx_status](https://github.com/ESX-Org/esx_status) + +## Download & Installation + +### Using [fvm](https://github.com/qlaffont/fvm-installer) +``` +fvm install --save --folder=esx esx-org/esx_basicneeds +``` + +### Using Git +``` +cd resources +git clone https://github.com/ESX-Org/esx_basicneeds [esx]/esx_basicneeds +``` + +### Manually +- Download https://github.com/ESX-Org/esx_basicneeds/archive/master.zip +- Put it in the `[esx]` directory + + +## Installation +- Import `esx_basicneeds.sql` in your database +- Add this in your server.cfg : + +``` +start esx_basicneeds +``` + +# Legal +### License +esx_basicneeds - thirst and hunger system + +Copyright (C) 2015-2023 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/. \ No newline at end of file diff --git a/[esx_addons]/esx_basicneeds/client/main.lua b/[esx_addons]/esx_basicneeds/client/main.lua new file mode 100644 index 00000000..c61fa06d --- /dev/null +++ b/[esx_addons]/esx_basicneeds/client/main.lua @@ -0,0 +1,131 @@ +local IsDead = false +local IsAnimated = false + +AddEventHandler('esx_basicneeds:resetStatus', function() + TriggerEvent('esx_status:set', 'hunger', 500000) + TriggerEvent('esx_status:set', 'thirst', 500000) +end) + +RegisterNetEvent('esx_basicneeds:healPlayer') +AddEventHandler('esx_basicneeds:healPlayer', function() + -- restore hunger & thirst + TriggerEvent('esx_status:set', 'hunger', 1000000) + TriggerEvent('esx_status:set', 'thirst', 1000000) + + -- restore hp + local playerPed = PlayerPedId() + SetEntityHealth(playerPed, GetEntityMaxHealth(playerPed)) +end) + +AddEventHandler('esx:onPlayerDeath', function() + IsDead = true +end) + +AddEventHandler('esx:onPlayerSpawn', function(spawn) + if IsDead then + TriggerEvent('esx_basicneeds:resetStatus') + end + + IsDead = false +end) + +AddEventHandler('esx_status:loaded', function(status) + TriggerEvent('esx_status:registerStatus', 'hunger', 1000000, '#CFAD0F', function(status) + return Config.Visible + end, function(status) + status.remove(100) + end) + + TriggerEvent('esx_status:registerStatus', 'thirst', 1000000, '#0C98F1', function(status) + return Config.Visible + end, function(status) + status.remove(75) + end) +end) + +AddEventHandler('esx_status:onTick', function(data) + local playerPed = PlayerPedId() + local prevHealth = GetEntityHealth(playerPed) + local health = prevHealth + + for k, v in pairs(data) do + if v.name == 'hunger' and v.percent == 0 then + if prevHealth <= 150 then + health = health - 5 + else + health = health - 1 + end + elseif v.name == 'thirst' and v.percent == 0 then + if prevHealth <= 150 then + health = health - 5 + else + health = health - 1 + end + end + end + + if health ~= prevHealth then SetEntityHealth(playerPed, health) end +end) + +AddEventHandler('esx_basicneeds:isEating', function(cb) + cb(IsAnimated) +end) + +RegisterNetEvent('esx_basicneeds:onUse') +AddEventHandler('esx_basicneeds:onUse', function(type, prop_name) + if not IsAnimated then + local anim = {dict = 'mp_player_inteat@burger', name = 'mp_player_int_eat_burger_fp', settings = {8.0, -8, -1, 49, 0, 0, 0, 0}} + IsAnimated = true + if type == 'food' then + prop_name = prop_name or 'prop_cs_burger_01' + anim = {dict = 'mp_player_inteat@burger', name = 'mp_player_int_eat_burger_fp', settings = {8.0, -8, -1, 49, 0, 0, 0, 0}} + elseif type == 'drink' then + prop_name = prop_name or 'prop_ld_flow_bottle' + anim = {dict = 'mp_player_intdrink', name = 'loop_bottle', settings = {1.0, -1.0, 2000, 0, 1, true, true, true}} + end + + CreateThread(function() + local playerPed = PlayerPedId() + local x,y,z = table.unpack(GetEntityCoords(playerPed)) + local prop = CreateObject(joaat(prop_name), x, y, z + 0.2, true, true, true) + local boneIndex = GetPedBoneIndex(playerPed, 18905) + AttachEntityToEntity(prop, playerPed, boneIndex, 0.12, 0.028, 0.001, 10.0, 175.0, 0.0, true, true, false, true, 1, true) + + ESX.Streaming.RequestAnimDict(anim.dict, function() + TaskPlayAnim(playerPed, anim.dict, anim.name, anim.settings[1], anim.settings[2], anim.settings[3], anim.settings[4], anim.settings[5], anim.settings[6], anim.settings[7], anim.settings[8]) + RemoveAnimDict(anim.dict) + + Wait(3000) + IsAnimated = false + ClearPedSecondaryTask(playerPed) + DeleteObject(prop) + end) + end) + end +end) + +-- Backwards compatibility +RegisterNetEvent('esx_basicneeds:onEat') +AddEventHandler('esx_basicneeds:onEat', function(prop_name) + local Invoke = GetInvokingResource() + + print(('[^3WARNING^7] ^5%s^7 used ^5esx_basicneeds:onEat^7, this method is deprecated and should not be used! Refer to ^5https://documentation.esx-framework.org/addons/esx_basicneeds/events/oneat^7 for more info!'):format(Invoke)) + + if not prop_name then + prop_name = 'prop_cs_burger_01' + end + TriggerEvent('esx_basicneeds:onUse', 'food', prop_name) +end) + +RegisterNetEvent('esx_basicneeds:onDrink') +AddEventHandler('esx_basicneeds:onDrink', function(prop_name) + local Invoke = GetInvokingResource() + + print(('[^3WARNING^7] ^5%s^7 used ^5esx_basicneeds:onDrink^7, this method is deprecated and should not be used! Refer to ^5https://documentation.esx-framework.org/addons/esx_basicneeds/events/ondrink^7 for more info!'):format(Invoke)) + + + if not prop_name then + prop_name = 'prop_ld_flow_bottle' + end + TriggerEvent('esx_basicneeds:onUse', 'drink', prop_name) +end) \ No newline at end of file diff --git a/[esx_addons]/esx_basicneeds/config.lua b/[esx_addons]/esx_basicneeds/config.lua new file mode 100644 index 00000000..a577e68b --- /dev/null +++ b/[esx_addons]/esx_basicneeds/config.lua @@ -0,0 +1,19 @@ +Config = {} +Config.Locale = GetConvar('esx:locale', 'en') +Config.Visible = true + +Config.Items = { + ["bread"] = { + type = "food", + prop= "prop_cs_burger_01", + status = 200000, + remove = true + }, + + ["water"] = { + type = "drink", + prop = "prop_ld_flow_bottle", + status = 100000, + remove = true + } +} diff --git a/[esx_addons]/esx_basicneeds/esx_basicneeds.sql b/[esx_addons]/esx_basicneeds/esx_basicneeds.sql new file mode 100644 index 00000000..eb71e7c8 --- /dev/null +++ b/[esx_addons]/esx_basicneeds/esx_basicneeds.sql @@ -0,0 +1,6 @@ + + +INSERT INTO `items` (`name`, `label`, `weight`) VALUES + ('bread', 'Bread', 1), + ('water', 'Water', 1) +; diff --git a/[esx_addons]/esx_basicneeds/fxmanifest.lua b/[esx_addons]/esx_basicneeds/fxmanifest.lua new file mode 100644 index 00000000..5eabe7de --- /dev/null +++ b/[esx_addons]/esx_basicneeds/fxmanifest.lua @@ -0,0 +1,28 @@ +fx_version 'adamant' + +game 'gta5' + +description 'ESX Basic Needs' +lua54 'yes' +version '1.9.0' + +shared_script '@es_extended/imports.lua' + +server_scripts { + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'server/main.lua' +} + +client_scripts { + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'client/main.lua' +} + +dependencies { + 'es_extended', + 'esx_status' +} diff --git a/[esx_addons]/esx_basicneeds/locales/br.lua b/[esx_addons]/esx_basicneeds/locales/br.lua new file mode 100644 index 00000000..2f023c30 --- /dev/null +++ b/[esx_addons]/esx_basicneeds/locales/br.lua @@ -0,0 +1,4 @@ +Locales['br'] = { + ['used_eat'] = 'você comeu 1x %s', + ['used_drink'] = 'você tomou 1x %s', +} diff --git a/[esx_addons]/esx_basicneeds/locales/de.lua b/[esx_addons]/esx_basicneeds/locales/de.lua new file mode 100644 index 00000000..93584e37 --- /dev/null +++ b/[esx_addons]/esx_basicneeds/locales/de.lua @@ -0,0 +1,5 @@ +Locales['de'] = { + ['used_food'] = 'Du hast 1x %s gegessen.', + ['used_drink'] = 'Du hast 1x %s getrunken.', + ['got_healed'] = 'Du wurdest geheilt.' +} diff --git a/[esx_addons]/esx_basicneeds/locales/en.lua b/[esx_addons]/esx_basicneeds/locales/en.lua new file mode 100644 index 00000000..a994b1bf --- /dev/null +++ b/[esx_addons]/esx_basicneeds/locales/en.lua @@ -0,0 +1,5 @@ +Locales['en'] = { + ['used_food'] = 'You have eaten 1x %s', + ['used_drink'] = 'You have drinked 1x %s', + ['got_healed'] = 'You have been healed.' +} diff --git a/[esx_addons]/esx_basicneeds/locales/es.lua b/[esx_addons]/esx_basicneeds/locales/es.lua new file mode 100644 index 00000000..06d9abb5 --- /dev/null +++ b/[esx_addons]/esx_basicneeds/locales/es.lua @@ -0,0 +1,4 @@ +Locales['es'] = { + ['used_bread'] = 'Has usado 1x pan', + ['used_water'] = 'Has usado 1x agua', +} \ No newline at end of file diff --git a/[esx_addons]/esx_basicneeds/locales/et.lua b/[esx_addons]/esx_basicneeds/locales/et.lua new file mode 100644 index 00000000..bfb3753f --- /dev/null +++ b/[esx_addons]/esx_basicneeds/locales/et.lua @@ -0,0 +1,4 @@ +Locales['et'] = { + ['used_eat'] = 'Sõid 1x %s', + ['used_drink'] = 'Jõid 1x %s', +} diff --git a/[esx_addons]/esx_basicneeds/locales/fi.lua b/[esx_addons]/esx_basicneeds/locales/fi.lua new file mode 100644 index 00000000..92702f41 --- /dev/null +++ b/[esx_addons]/esx_basicneeds/locales/fi.lua @@ -0,0 +1,4 @@ +Locales['fi'] = { + ['used_bread'] = 'sinä söit 1x leipä', + ['used_water'] = 'sinä joit 1x vesi', +} \ No newline at end of file diff --git a/[esx_addons]/esx_basicneeds/locales/fr.lua b/[esx_addons]/esx_basicneeds/locales/fr.lua new file mode 100644 index 00000000..1d7f3fc0 --- /dev/null +++ b/[esx_addons]/esx_basicneeds/locales/fr.lua @@ -0,0 +1,4 @@ +Locales['fr'] = { + ['used_bread'] = 'vous avez utilisé 1x pain', + ['used_water'] = 'vous avez utilisé 1x eau', +} \ No newline at end of file diff --git a/[esx_addons]/esx_basicneeds/locales/hu.lua b/[esx_addons]/esx_basicneeds/locales/hu.lua new file mode 100644 index 00000000..1277cbac --- /dev/null +++ b/[esx_addons]/esx_basicneeds/locales/hu.lua @@ -0,0 +1,4 @@ +Locales['hu'] = { + ['used_bread'] = 'Megettél egy kenyeret.', + ['used_water'] = 'Megittál egy vizet.', +} \ No newline at end of file diff --git a/[esx_addons]/esx_basicneeds/locales/it.lua b/[esx_addons]/esx_basicneeds/locales/it.lua new file mode 100644 index 00000000..aa80e0a9 --- /dev/null +++ b/[esx_addons]/esx_basicneeds/locales/it.lua @@ -0,0 +1,4 @@ +Locales['it'] = { + ['used_bread'] = 'hai usato 1x panino', + ['used_water'] = 'hai usato 1x acqua', +} \ No newline at end of file diff --git a/[esx_addons]/esx_basicneeds/locales/nl.lua b/[esx_addons]/esx_basicneeds/locales/nl.lua new file mode 100644 index 00000000..5e654ad5 --- /dev/null +++ b/[esx_addons]/esx_basicneeds/locales/nl.lua @@ -0,0 +1,4 @@ +Locales['nl'] = { + ['used_eat'] = 'je hebt 1x %s gegeten', + ['used_drink'] = 'je hebt 1x %s gedronken', + } diff --git a/[esx_addons]/esx_basicneeds/locales/pl.lua b/[esx_addons]/esx_basicneeds/locales/pl.lua new file mode 100644 index 00000000..6ce6b3af --- /dev/null +++ b/[esx_addons]/esx_basicneeds/locales/pl.lua @@ -0,0 +1,4 @@ +Locales['pl'] = { + ['used_bread'] = 'zjadłeś/aś 1x chleb', + ['used_water'] = 'wypiłeś/aś 1x woda', +} \ No newline at end of file diff --git a/[esx_addons]/esx_basicneeds/locales/si.lua b/[esx_addons]/esx_basicneeds/locales/si.lua new file mode 100644 index 00000000..a052b648 --- /dev/null +++ b/[esx_addons]/esx_basicneeds/locales/si.lua @@ -0,0 +1,4 @@ +Locales['si'] = { + ['used_bread'] = 'uporabili ste 1x bread', + ['used_water'] = 'uporabili ste 1x water', +} \ No newline at end of file diff --git a/[esx_addons]/esx_basicneeds/locales/sv.lua b/[esx_addons]/esx_basicneeds/locales/sv.lua new file mode 100644 index 00000000..0a077692 --- /dev/null +++ b/[esx_addons]/esx_basicneeds/locales/sv.lua @@ -0,0 +1,4 @@ +Locales['sv'] = { + ['used_bread'] = 'du käkade upp en bit bröd', + ['used_water'] = 'du drack upp en vattenflaska', +} \ No newline at end of file diff --git a/[esx_addons]/esx_basicneeds/locales/tr.lua b/[esx_addons]/esx_basicneeds/locales/tr.lua new file mode 100644 index 00000000..90511da7 --- /dev/null +++ b/[esx_addons]/esx_basicneeds/locales/tr.lua @@ -0,0 +1,4 @@ +Locales['tr'] = { + ['used_bread'] = '1x ekmek kullandın', + ['used_water'] = '1x su kullandın', +} diff --git a/[esx_addons]/esx_basicneeds/localization/br_esx_basicneeds.sql b/[esx_addons]/esx_basicneeds/localization/br_esx_basicneeds.sql new file mode 100644 index 00000000..68fd3207 --- /dev/null +++ b/[esx_addons]/esx_basicneeds/localization/br_esx_basicneeds.sql @@ -0,0 +1,6 @@ + + +INSERT INTO `items` (`name`, `label`, `weight`) VALUES + ('bread', 'Pao', 1), + ('water', 'Agua', 1) +; diff --git a/[esx_addons]/esx_basicneeds/localization/cs_esx_basicneeds.sql b/[esx_addons]/esx_basicneeds/localization/cs_esx_basicneeds.sql new file mode 100644 index 00000000..ca242f83 --- /dev/null +++ b/[esx_addons]/esx_basicneeds/localization/cs_esx_basicneeds.sql @@ -0,0 +1,6 @@ + + +INSERT INTO `items` (`name`, `label`, `weight`) VALUES + ('bread', 'Chleba', 1), + ('water', 'Voda', 1) +; diff --git a/[esx_addons]/esx_basicneeds/localization/de_esx_basicneeds.sql b/[esx_addons]/esx_basicneeds/localization/de_esx_basicneeds.sql new file mode 100644 index 00000000..a61c3813 --- /dev/null +++ b/[esx_addons]/esx_basicneeds/localization/de_esx_basicneeds.sql @@ -0,0 +1,6 @@ + + +INSERT INTO `items` (`name`, `label`, `weight`) VALUES + ('bread', 'Brot', 1), + ('water', 'Wasser', 1) +; diff --git a/[esx_addons]/esx_basicneeds/localization/es_esx_basicneeds.sql b/[esx_addons]/esx_basicneeds/localization/es_esx_basicneeds.sql new file mode 100644 index 00000000..3170525b --- /dev/null +++ b/[esx_addons]/esx_basicneeds/localization/es_esx_basicneeds.sql @@ -0,0 +1,6 @@ + + +INSERT INTO `items` (`name`, `label`, `weight`) VALUES + ('bread', 'Pan', 1), + ('water', 'Agua', 1) +; diff --git a/[esx_addons]/esx_basicneeds/localization/fi_esx_basicneeds.sql b/[esx_addons]/esx_basicneeds/localization/fi_esx_basicneeds.sql new file mode 100644 index 00000000..4b660320 --- /dev/null +++ b/[esx_addons]/esx_basicneeds/localization/fi_esx_basicneeds.sql @@ -0,0 +1,6 @@ + + +INSERT INTO `items` (`name`, `label`, `weight`) VALUES + ('bread', 'Leipä', 1), + ('water', 'Vesi', 1) +; diff --git a/[esx_addons]/esx_basicneeds/localization/hu_esx_basicneeds.sql b/[esx_addons]/esx_basicneeds/localization/hu_esx_basicneeds.sql new file mode 100644 index 00000000..918f5911 --- /dev/null +++ b/[esx_addons]/esx_basicneeds/localization/hu_esx_basicneeds.sql @@ -0,0 +1,6 @@ + + +INSERT INTO `items` (`name`, `label`, `weight`) VALUES + ('bread', 'Kenyér', 1), + ('water', 'Víz', 1) +; diff --git a/[esx_addons]/esx_basicneeds/localization/nl_esx_basicneeds.sql b/[esx_addons]/esx_basicneeds/localization/nl_esx_basicneeds.sql new file mode 100644 index 00000000..271c3133 --- /dev/null +++ b/[esx_addons]/esx_basicneeds/localization/nl_esx_basicneeds.sql @@ -0,0 +1,4 @@ +INSERT INTO `items` (`name`, `label`, `weight`) VALUES + ('bread', 'Brood', 1), + ('water', 'Water', 1) +; \ No newline at end of file diff --git a/[esx_addons]/esx_basicneeds/localization/pl_esx_basicneeds.sql b/[esx_addons]/esx_basicneeds/localization/pl_esx_basicneeds.sql new file mode 100644 index 00000000..568f00ce --- /dev/null +++ b/[esx_addons]/esx_basicneeds/localization/pl_esx_basicneeds.sql @@ -0,0 +1,6 @@ + + +INSERT INTO `items` (`name`, `label`, `weight`) VALUES + ('bread', 'Chleb', 1), + ('water', 'Woda', 1) +; diff --git a/[esx_addons]/esx_basicneeds/localization/sv_esx_basicneeds.sql b/[esx_addons]/esx_basicneeds/localization/sv_esx_basicneeds.sql new file mode 100644 index 00000000..adad2b13 --- /dev/null +++ b/[esx_addons]/esx_basicneeds/localization/sv_esx_basicneeds.sql @@ -0,0 +1,6 @@ + + +INSERT INTO `items` (`name`, `label`, `weight`) VALUES + ('bread', 'Bröd', 1), + ('water', 'Vatten', 1) +; diff --git a/[esx_addons]/esx_basicneeds/server/main.lua b/[esx_addons]/esx_basicneeds/server/main.lua new file mode 100644 index 00000000..a4eaf01d --- /dev/null +++ b/[esx_addons]/esx_basicneeds/server/main.lua @@ -0,0 +1,36 @@ +CreateThread(function() + for k,v in pairs(Config.Items) do + ESX.RegisterUsableItem(k, function(source) + local xPlayer = ESX.GetPlayerFromId(source) + if v.remove then + xPlayer.removeInventoryItem(k,1) + end + if v.type == "food" then + TriggerClientEvent("esx_status:add", source, "hunger", v.status) + TriggerClientEvent('esx_basicneeds:onUse', source, v.type) + xPlayer.showNotification(TranslateCap('used_food', ESX.GetItemLabel(k))) + elseif v.type == "drink" then + TriggerClientEvent("esx_status:add", source, "thirst", v.status) + TriggerClientEvent('esx_basicneeds:onUse', source, v.type) + xPlayer.showNotification(TranslateCap('used_drink', ESX.GetItemLabel(k))) + else + print(string.format('^1[ERROR]^0 %s has no correct type defined.', k)) + end + end) + end +end) + +ESX.RegisterCommand('heal', 'admin', function(xPlayer, args, showError) + args.playerId.triggerEvent('esx_basicneeds:healPlayer') + args.playerId.showNotification(TranslateCap('got_healed')) +end, true, {help = 'Heal a player, or yourself - restores thirst, hunger and health.', validate = true, arguments = { + {name = 'playerId', help = 'the player id', type = 'player'} +}}) + +AddEventHandler('txAdmin:events:healedPlayer', function(eventData) + if GetInvokingResource() ~= "monitor" or type(eventData) ~= "table" or type(eventData.id) ~= "number" then + return + end + + TriggerClientEvent('esx_basicneeds:healPlayer', eventData.id) +end) diff --git a/[esx_addons]/esx_billing/.editorconfig b/[esx_addons]/esx_billing/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_billing/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_billing/LICENSE b/[esx_addons]/esx_billing/LICENSE new file mode 100644 index 00000000..65dd8c53 --- /dev/null +++ b/[esx_addons]/esx_billing/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_billing + Copyright (C) 2015-2023 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 . + +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_billing Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_billing/README.md b/[esx_addons]/esx_billing/README.md new file mode 100644 index 00000000..cf498c85 --- /dev/null +++ b/[esx_addons]/esx_billing/README.md @@ -0,0 +1,57 @@ +# esx_billing + +This resource for ESX adds possibility for different jobs to send bills to players, for example making police units able to give people fines. It comes with a menu for paying bills, to open the menu the default keybind is `F7`. + +There is a developer server event available in order to register bills in the database, see default resources for examples. + +## Download & Installation + +### Using [fvm](https://github.com/qlaffont/fvm-installer) +``` +fvm install --save --folder=esx esx-org/esx_billing +``` + +### Using Git +``` +cd resources +git clone https://github.com/ESX-Org/esx_billing [esx]/esx_billing +``` + +### Manually +- Download https://github.com/ESX-Org/esx_billing/archive/master.zip +- Put it in the `[esx]` directory + + +## Installation +- Import `esx_billing.sql` in your database +- Add this to your `server.cfg`: + +``` +start esx_billing +``` + +## Usage +Press `[F7]` To show the billing menu + +```lua +local amount = 100 +local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer() + +if closestPlayer == -1 or closestDistance > 3.0 then + ESX.ShowNotification('There\'s no players nearby!') +else + TriggerServerEvent('esx_billing:sendBill', GetPlayerServerId(closestPlayer), 'society_taxi', 'Taxi', amount) +end +``` + +# Legal +### License +esx_billing - billing for ESX + +Copyright (C) 2015-2023 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/. \ No newline at end of file diff --git a/[esx_addons]/esx_billing/client/main.lua b/[esx_addons]/esx_billing/client/main.lua new file mode 100644 index 00000000..66ae67d5 --- /dev/null +++ b/[esx_addons]/esx_billing/client/main.lua @@ -0,0 +1,38 @@ +local isDead = false + +function ShowBillsMenu() + ESX.TriggerServerCallback('esx_billing:getBills', function(bills) + if #bills > 0 then + local elements = { + {unselectable = true, icon = "fas fa-scroll", title = TranslateCap('invoices')} + } + + for k,v in ipairs(bills) do + elements[#elements+1] = { + icon = "fas fa-scroll", + title = ('%s - %s'):format(v.label, TranslateCap('invoices_item', ESX.Math.GroupDigits(v.amount))), + billId = v.id + } + end + + ESX.OpenContext("right", elements, function(menu,element) + ESX.TriggerServerCallback('esx_billing:payBill', function() + ShowBillsMenu() + end, element.billId) + end) + else + ESX.ShowNotification(TranslateCap('no_invoices')) + end + end) +end + +RegisterCommand('showbills', function() + if not isDead then + ShowBillsMenu() + end +end, false) + +RegisterKeyMapping('showbills', TranslateCap('keymap_showbills'), 'keyboard', 'F7') + +AddEventHandler('esx:onPlayerDeath', function() isDead = true end) +AddEventHandler('esx:onPlayerSpawn', function(spawn) isDead = false end) diff --git a/[esx_addons]/esx_billing/config.lua b/[esx_addons]/esx_billing/config.lua new file mode 100644 index 00000000..f6c6c4d9 --- /dev/null +++ b/[esx_addons]/esx_billing/config.lua @@ -0,0 +1,2 @@ +Config = {} +Config.Locale = GetConvar('esx:locale', 'en') diff --git a/[esx_addons]/esx_billing/esx_billing.sql b/[esx_addons]/esx_billing/esx_billing.sql new file mode 100644 index 00000000..a72aa5c8 --- /dev/null +++ b/[esx_addons]/esx_billing/esx_billing.sql @@ -0,0 +1,14 @@ + + +CREATE TABLE `billing` ( + `id` int NOT NULL AUTO_INCREMENT, + `identifier` varchar(60) NOT NULL, + `sender` varchar(60) NOT NULL, + `target_type` varchar(50) NOT NULL, + `target` varchar(60) NOT NULL, + `label` varchar(255) NOT NULL, + `amount` int NOT NULL, + + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + diff --git a/[esx_addons]/esx_billing/fxmanifest.lua b/[esx_addons]/esx_billing/fxmanifest.lua new file mode 100644 index 00000000..081d2291 --- /dev/null +++ b/[esx_addons]/esx_billing/fxmanifest.lua @@ -0,0 +1,26 @@ +fx_version 'adamant' + +game 'gta5' + +description 'ESX Billing' +lua54 'yes' +version '1.9.0' + +shared_script '@es_extended/imports.lua' + +server_scripts { + '@oxmysql/lib/MySQL.lua', + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'server/main.lua' +} + +client_scripts { + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'client/main.lua' +} + +dependency 'es_extended' diff --git a/[esx_addons]/esx_billing/locales/br.lua b/[esx_addons]/esx_billing/locales/br.lua new file mode 100644 index 00000000..74973ca7 --- /dev/null +++ b/[esx_addons]/esx_billing/locales/br.lua @@ -0,0 +1,12 @@ +Locales['br'] = { + ['invoices'] = 'faturas', + ['invoices_item'] = '$%s', + ['received_invoice'] = 'você ~r~recebeu uma fatura', + ['paid_invoice'] = 'você pagou uma fatura de ~r~$%s', + ['no_invoices'] = 'you do not have any bills to pay at this moment', + ['received_payment'] = 'você recebeu um pagamento de ~r~$%s', + ['player_not_online'] = 'o jogador não está na cidade', + ['no_money'] = 'você não tem dinheiro suficiente para pagar esta fatura', + ['target_no_money'] = 'o cidadão ~r~não tem dinheiro suficiente para pagar a conta!', + ['keymap_showbills'] = 'open bills menu', +} diff --git a/[esx_addons]/esx_billing/locales/cs.lua b/[esx_addons]/esx_billing/locales/cs.lua new file mode 100644 index 00000000..6e109ea3 --- /dev/null +++ b/[esx_addons]/esx_billing/locales/cs.lua @@ -0,0 +1,12 @@ +Locales['cs'] = { + ['invoices'] = 'faktury', + ['invoices_item'] = '$%s', + ['received_invoice'] = 'právě jsi ~r~obdrzel fakturu', + ['paid_invoice'] = 'zaplatil jsi fakturu za ~r~$%s', + ['no_invoices'] = 'momentalne nemas zadnou fatkuru k zaplaceni', + ['received_payment'] = 'obdržel jsi platbu za ~r~$%s', + ['player_not_online'] = 'hráč není přihlášen', + ['no_money'] = 'nemáš dostatek peněz na zaplacení této faktury', + ['target_no_money'] = 'hráč ~r~nemá dostatek peněz na zaplacení faktury!', + ['keymap_showbills'] = 'otevrit menu faktur', +} diff --git a/[esx_addons]/esx_billing/locales/de.lua b/[esx_addons]/esx_billing/locales/de.lua new file mode 100644 index 00000000..9c756c5c --- /dev/null +++ b/[esx_addons]/esx_billing/locales/de.lua @@ -0,0 +1,12 @@ +Locales['de'] = { + ['invoices'] = 'Rechnungen', + ['invoices_item'] = '$%s', + ['received_invoice'] = 'Sie haben eine Rechnung erhalten.', + ['paid_invoice'] = 'Sie bezahlen eine Rechnung von $%s.', + ['no_invoices'] = 'Sie haben keine offenen Rechnungen.', + ['received_payment'] = 'Sie erhalten eine Zahlung von $%s.', + ['player_not_online'] = 'Die Person ist nicht erreichbar.', + ['no_money'] = 'Sie haben nicht genug Geld, um diese Rechnung zu bezahlen.', + ['target_no_money'] = 'Die Person kann die Rechnung nicht bezahlen.', + ['keymap_showbills'] = 'Rechnungen anzeigen', +} \ No newline at end of file diff --git a/[esx_addons]/esx_billing/locales/en.lua b/[esx_addons]/esx_billing/locales/en.lua new file mode 100644 index 00000000..a916dd9c --- /dev/null +++ b/[esx_addons]/esx_billing/locales/en.lua @@ -0,0 +1,12 @@ +Locales['en'] = { + ['invoices'] = 'invoices', + ['invoices_item'] = '$%s', + ['received_invoice'] = 'you have just ~r~received an invoice', + ['paid_invoice'] = 'you paid an invoice of ~r~$%s', + ['no_invoices'] = 'you do not have any bills to pay at this moment', + ['received_payment'] = 'you received a payment of ~r~$%s', + ['player_not_online'] = 'the player is not logged in', + ['no_money'] = 'you do not have enough money to pay this bill', + ['target_no_money'] = 'the player ~r~does not have enough money to pay the bill!', + ['keymap_showbills'] = 'open bills menu', +} diff --git a/[esx_addons]/esx_billing/locales/es.lua b/[esx_addons]/esx_billing/locales/es.lua new file mode 100644 index 00000000..a590ba0b --- /dev/null +++ b/[esx_addons]/esx_billing/locales/es.lua @@ -0,0 +1,12 @@ +Locales['es'] = { + ['invoices'] = 'Facturas', + ['invoices_item'] = '%s$', + ['received_invoice'] = 'Has ~r~recibido una multa', + ['paid_invoice'] = 'Has pagado una multa de ~r~%s$', + ['no_invoices'] = 'No tienes ninguna factura para pagar en este momento', + ['received_payment'] = 'Has recibido un pago de %s$', + ['player_not_online'] = 'El jugador no está conectado', + ['no_money'] = 'No tienes suficiente dinero para pagar la factura', + ['target_no_money'] = '¡El jugador ~r~no tiene suficiente dinero para pagar la factura!', + ['keymap_showbills'] = 'Abrir menú de facturas', +} diff --git a/[esx_addons]/esx_billing/locales/et.lua b/[esx_addons]/esx_billing/locales/et.lua new file mode 100644 index 00000000..32d5f2d4 --- /dev/null +++ b/[esx_addons]/esx_billing/locales/et.lua @@ -0,0 +1,12 @@ +Locales['et'] = { + ['invoices'] = 'Arved', + ['invoices_item'] = '$%s', + ['received_invoice'] = 'Sa said ~r~arve', + ['paid_invoice'] = 'Maksid arve maksumusega: ~r~$%s', + ['no_invoices'] = 'Sul pole hetkel arveid', + ['received_payment'] = 'Sa said makse summas: ~r~$%s', + ['player_not_online'] = 'See isik pole linnas', + ['no_money'] = 'Sul pole piisavalt raha, et maksta selle arve eest', + ['target_no_money'] = 'Isikul ~r~pole raha, et maksta seda arvet!', + ['keymap_showbills'] = 'Vaata arveid', +} diff --git a/[esx_addons]/esx_billing/locales/fi.lua b/[esx_addons]/esx_billing/locales/fi.lua new file mode 100644 index 00000000..d621940a --- /dev/null +++ b/[esx_addons]/esx_billing/locales/fi.lua @@ -0,0 +1,12 @@ +Locales['fi'] = { + ['invoices'] = 'laskut', + ['invoices_item'] = '$%s', + ['received_invoice'] = 'sinä ~r~sait laskun', + ['paid_invoice'] = 'sinä maksoit laskun suuruudelta ~r~$%s', + ['no_invoices'] = 'you do not have any bills to pay at this moment', + ['received_payment'] = 'sinä sait maksun suuruudelta ~r~$%s', + ['player_not_online'] = 'pelaaja ei ole sisäänkirjautuneena', + ['no_money'] = 'sinulla ei ole tarpeeksi rahaa maksaaksesi tätä laskua.', + ['target_no_money'] = 'pelaajalla ~r~ei ole tarpeeksi rahaa maksaakseentätä laskua', + ['keymap_showbills'] = 'open bills menu', +} diff --git a/[esx_addons]/esx_billing/locales/fr.lua b/[esx_addons]/esx_billing/locales/fr.lua new file mode 100644 index 00000000..3c7b6b7c --- /dev/null +++ b/[esx_addons]/esx_billing/locales/fr.lua @@ -0,0 +1,12 @@ +Locales['fr'] = { + ['invoices'] = 'factures', + ['invoices_item'] = '$%s', + ['received_invoice'] = 'vous avez ~r~reçu une facture', + ['paid_invoice'] = 'vous avez payé une facture de ~r~$%s', + ['no_invoices'] = 'vous n\'avez aucune facture à payer en ce moment', + ['received_payment'] = 'vous avez reçu un paiement de $%s', + ['player_not_online'] = 'le joueur n\'est pas connecté', + ['no_money'] = 'vous n\'avez pas assez d\'argent pour payer cette facture', + ['target_no_money'] = 'le joueur ~r~n\'a pas assez d\'argent pour payer la facture!', + ['keymap_showbills'] = 'ouvrir le menu des factures', +} diff --git a/[esx_addons]/esx_billing/locales/hu.lua b/[esx_addons]/esx_billing/locales/hu.lua new file mode 100644 index 00000000..d13b564a --- /dev/null +++ b/[esx_addons]/esx_billing/locales/hu.lua @@ -0,0 +1,12 @@ +Locales['hu'] = { + ['invoices'] = 'Számlák', + ['invoices_item'] = '$%s', + ['received_invoice'] = 'Kaptál egy számlát', + ['paid_invoice'] = 'Befizettél egy számlát ( ~r~$%s )', + ['no_invoices'] = 'Nincsen számlád amit kifizethetnél', + ['received_payment'] = 'Fizetést kaptál: ~r~$%s', + ['player_not_online'] = 'A játékos nem elérhető', + ['no_money'] = 'Nincsen elég pénzed, hogy kifizesd ezt a számlát', + ['target_no_money'] = 'A játékosnak nincsen annyi pénze, hogy befizesse a számlát', + ['keymap_showbills'] = 'Számlák megnézése', +} diff --git a/[esx_addons]/esx_billing/locales/it.lua b/[esx_addons]/esx_billing/locales/it.lua new file mode 100644 index 00000000..ae5f6f8c --- /dev/null +++ b/[esx_addons]/esx_billing/locales/it.lua @@ -0,0 +1,12 @@ +Locales['it'] = { + ['invoices'] = 'fatture', + ['invoices_item'] = '$%s', + ['received_invoice'] = 'hai appena ~r~ricevuto~s~ una fattura', + ['paid_invoice'] = 'hai ~g~pagato~s~ una fattura di ~r~$%s~s~', + ['no_invoices'] = 'non hai nessuna fattura da pagare', + ['received_payment'] = 'hai ~g~ricevuto~s~ il pagamento di ~r~$%s~s~', + ['player_not_online'] = 'il giocatore non ha effettuato l\'accesso', + ['no_money'] = 'non hai abbastanza soldi per pagare questo conto', + ['target_no_money'] = 'il giocatore ~r~non ha~s~ abbastanza soldi per pagare la fattura!', + ['keymap_showbills'] = 'apri il menu delle fatture', +} diff --git a/[esx_addons]/esx_billing/locales/nl.lua b/[esx_addons]/esx_billing/locales/nl.lua new file mode 100644 index 00000000..394cf892 --- /dev/null +++ b/[esx_addons]/esx_billing/locales/nl.lua @@ -0,0 +1,12 @@ +Locales['nl'] = { + ['invoices'] = 'Facturen', + ['invoices_item'] = '€%s', + ['received_invoice'] = 'Je hebt zojuist een ~r~factuur ontvangen', + ['paid_invoice'] = 'Je hebt een factuur betaald van ~r~€%s', + ['no_invoices'] = 'Je hoeft momenteel geen facturen te betalen', + ['received_payment'] = 'je hebt een bedrag ontvangen van ~r~€%s', + ['player_not_online'] = 'de speler is niet online', + ['no_money'] = 'je hebt niet genoeg geld om deze factuur te betalen', + ['target_no_money'] = 'de speler ~r~heeft niet genoeg geld om te betalen!', + ['keymap_showbills'] = 'open factuur menu', +} diff --git a/[esx_addons]/esx_billing/locales/pl.lua b/[esx_addons]/esx_billing/locales/pl.lua new file mode 100644 index 00000000..0851f73b --- /dev/null +++ b/[esx_addons]/esx_billing/locales/pl.lua @@ -0,0 +1,12 @@ +Locales['pl'] = { + ['invoices'] = 'faktury', + ['invoices_item'] = '$%s', + ['received_invoice'] = 'właśnie ~r~dostałeś/aś fakture', + ['paid_invoice'] = 'Zapłaciłeś/aś fakture: ~r~$%s', + ['no_invoices'] = 'you do not have any bills to pay at this moment', + ['received_payment'] = 'Otrzymałeś/aś zapłate: ~r~$%s', + ['player_not_online'] = 'gracz nie jest zalogowany', + ['no_money'] = 'nie masz wystarczająco pieniędzy aby zapłacić tą fakture', + ['target_no_money'] = 'gracz ~r~nie posiada wystarczająco pieniędzy aby zapłacić tą fakture!', + ['keymap_showbills'] = 'open bills menu', +} diff --git a/[esx_addons]/esx_billing/locales/si.lua b/[esx_addons]/esx_billing/locales/si.lua new file mode 100644 index 00000000..529d09c9 --- /dev/null +++ b/[esx_addons]/esx_billing/locales/si.lua @@ -0,0 +1,12 @@ +Locales['si'] = { + ['invoices'] = 'racuni', + ['invoices_item'] = '$%s', + ['received_invoice'] = 'pravkar ste prejeli račun', + ['paid_invoice'] = 'plačali ste račun v višini ~r~$%s', + ['no_invoices'] = 'v tem trenutku nimate računov za plačilo', + ['received_payment'] = 'prejeli ste plačilo v višini ~r~$%s', + ['player_not_online'] = 'igralec ni prijavljen', + ['no_money'] = 'nimate dovolj denarja za plačilo tega računa', + ['target_no_money'] = 'igralec ~r~does not ima dovolj denarja za plačilo računa!', + ['keymap_showbills'] = 'odpre meni z računi', +} \ No newline at end of file diff --git a/[esx_addons]/esx_billing/locales/sv.lua b/[esx_addons]/esx_billing/locales/sv.lua new file mode 100644 index 00000000..e946edca --- /dev/null +++ b/[esx_addons]/esx_billing/locales/sv.lua @@ -0,0 +1,12 @@ +Locales['sv'] = { + ['invoices'] = 'räkningar', + ['invoices_item'] = '%s SEK', + ['received_invoice'] = 'du har mottagit en räkning', + ['paid_invoice'] = 'du betalade precis en räkning på %s SEK', + ['no_invoices'] = 'du har inga inkommande räkningar', + ['received_payment'] = 'du har mottagit en räkning på %s SEK', + ['player_not_online'] = 'spelaren är inte online', + ['no_money'] = 'du har ~r~inte råd för att betala räkningen', + ['target_no_money'] = 'spelaren har ~r~inte råd för att betala räkningen', + ['keymap_showbills'] = 'öppna menyn för räkningar', +} diff --git a/[esx_addons]/esx_billing/locales/tr.lua b/[esx_addons]/esx_billing/locales/tr.lua new file mode 100644 index 00000000..c26f72e3 --- /dev/null +++ b/[esx_addons]/esx_billing/locales/tr.lua @@ -0,0 +1,12 @@ +Locales['tr'] = { + ['invoices'] = 'faturalar', + ['invoices_item'] = '%s TL', + ['received_invoice'] = '~r~Yeni bir fatura aldınız', + ['paid_invoice'] = '~r~%s Liralık faturanız ödendi', + ['no_invoices'] = 'şuan ödenmeyi bekleyen bir faturanız yok', + ['received_payment'] = 'faturadan ~r~%s Liralık para kazandınız', + ['player_not_online'] = 'oyuncu aktif değil', + ['no_money'] = 'bu faturayi odemek icin yeterli paran yok', + ['target_no_money'] = 'oyuncunun faturayı ödeyecek miktarda parası yok', + ['keymap_showbills'] = 'faturalar menüsünü aç', +} diff --git a/[esx_addons]/esx_billing/server/main.lua b/[esx_addons]/esx_billing/server/main.lua new file mode 100644 index 00000000..a8a85372 --- /dev/null +++ b/[esx_addons]/esx_billing/server/main.lua @@ -0,0 +1,136 @@ +RegisterServerEvent('esx_billing:sendBill') +AddEventHandler('esx_billing:sendBill', function(playerId, sharedAccountName, label, amount) + local xPlayer = ESX.GetPlayerFromId(source) + local xTarget = ESX.GetPlayerFromId(playerId) + amount = ESX.Math.Round(amount) + + if amount > 0 and xTarget then + TriggerEvent('esx_addonaccount:getSharedAccount', sharedAccountName, function(account) + if account then + MySQL.insert('INSERT INTO billing (identifier, sender, target_type, target, label, amount) VALUES (?, ?, ?, ?, ?, ?)', {xTarget.identifier, xPlayer.identifier, 'society', sharedAccountName, label, amount}, + function(rowsChanged) + xTarget.showNotification(TranslateCap('received_invoice')) + end) + else + MySQL.insert('INSERT INTO billing (identifier, sender, target_type, target, label, amount) VALUES (?, ?, ?, ?, ?, ?)', {xTarget.identifier, xPlayer.identifier, 'player', xPlayer.identifier, label, amount}, + function(rowsChanged) + xTarget.showNotification(TranslateCap('received_invoice')) + end) + end + end) + end +end) + +ESX.RegisterServerCallback('esx_billing:getBills', function(source, cb) + local xPlayer = ESX.GetPlayerFromId(source) + + MySQL.query('SELECT amount, id, label FROM billing WHERE identifier = ?', {xPlayer.identifier}, + function(result) + cb(result) + end) +end) + +ESX.RegisterServerCallback('esx_billing:getTargetBills', function(source, cb, target) + local xPlayer = ESX.GetPlayerFromId(target) + + if xPlayer then + MySQL.query('SELECT amount, id, label FROM billing WHERE identifier = ?', {xPlayer.identifier}, + function(result) + cb(result) + end) + else + cb({}) + end +end) + +ESX.RegisterServerCallback('esx_billing:payBill', function(source, cb, billId) + local xPlayer = ESX.GetPlayerFromId(source) + + MySQL.single('SELECT sender, target_type, target, amount FROM billing WHERE id = ?', {billId}, + function(result) + if result then + local amount = result.amount + local xTarget = ESX.GetPlayerFromIdentifier(result.sender) + + if result.target_type == 'player' then + if xTarget then + if xPlayer.getMoney() >= amount then + MySQL.update('DELETE FROM billing WHERE id = ?', {billId}, + function(rowsChanged) + if rowsChanged == 1 then + xPlayer.removeMoney(amount, "Bill Paid") + xTarget.addMoney(amount, "Paid bill") + + xPlayer.showNotification(TranslateCap('paid_invoice', ESX.Math.GroupDigits(amount))) + xTarget.showNotification(TranslateCap('received_payment', ESX.Math.GroupDigits(amount))) + end + + cb() + end) + elseif xPlayer.getAccount('bank').money >= amount then + MySQL.update('DELETE FROM billing WHERE id = ?', {billId}, + function(rowsChanged) + if rowsChanged == 1 then + xPlayer.removeAccountMoney('bank', amount, "Bill Paid") + xTarget.addAccountMoney('bank', amount, "Paid bill") + + xPlayer.showNotification(TranslateCap('paid_invoice', ESX.Math.GroupDigits(amount))) + xTarget.showNotification(TranslateCap('received_payment', ESX.Math.GroupDigits(amount))) + end + + cb() + end) + else + xTarget.showNotification(TranslateCap('target_no_money')) + xPlayer.showNotification(TranslateCap('no_money')) + cb() + end + else + xPlayer.showNotification(TranslateCap('player_not_online')) + cb() + end + else + TriggerEvent('esx_addonaccount:getSharedAccount', result.target, function(account) + if xPlayer.getMoney() >= amount then + MySQL.update('DELETE FROM billing WHERE id = ?', {billId}, + function(rowsChanged) + if rowsChanged == 1 then + xPlayer.removeMoney(amount, "Bill Paid") + account.addMoney(amount) + + xPlayer.showNotification(TranslateCap('paid_invoice', ESX.Math.GroupDigits(amount))) + if xTarget then + xTarget.showNotification(TranslateCap('received_payment', ESX.Math.GroupDigits(amount))) + end + end + + cb() + end) + elseif xPlayer.getAccount('bank').money >= amount then + MySQL.update('DELETE FROM billing WHERE id = ?', {billId}, + function(rowsChanged) + if rowsChanged == 1 then + xPlayer.removeAccountMoney('bank', amount, "Bill Paid") + account.addMoney(amount) + xPlayer.showNotification(TranslateCap('paid_invoice', ESX.Math.GroupDigits(amount))) + + if xTarget then + xTarget.showNotification(TranslateCap('received_payment', ESX.Math.GroupDigits(amount))) + end + end + + cb() + end) + else + if xTarget then + xTarget.showNotification(TranslateCap('target_no_money')) + end + + xPlayer.showNotification(TranslateCap('no_money')) + cb() + end + end) + end + end + end) +end) diff --git a/[esx_addons]/esx_boat/.editorconfig b/[esx_addons]/esx_boat/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_boat/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_boat/LICENSE b/[esx_addons]/esx_boat/LICENSE new file mode 100644 index 00000000..4b046bd2 --- /dev/null +++ b/[esx_addons]/esx_boat/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_boat + Copyright (C) 2015-2023 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 . + +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_boat Copyright (C) 2015-2023 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 +. + + 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 +. diff --git a/[esx_addons]/esx_boat/README.md b/[esx_addons]/esx_boat/README.md new file mode 100644 index 00000000..683d7473 --- /dev/null +++ b/[esx_addons]/esx_boat/README.md @@ -0,0 +1,42 @@ +# esx_boat +This resource for ESX adds boat shops and boat garages around San Andreas, the island has been populated with boat garages, and comes defaulted with one boat shop. + +## Requirements +- [esx_vehicleshop](https://github.com/ESX-Org/esx_vehicleshop) + +## Download & Installation + +### Using [fvm](https://github.com/qlaffont/fvm-installer) +``` +fvm install --save --folder=esx esx-org/esx_boat +``` + +### Using Git +``` +cd resources +git clone https://github.com/ESX-Org/esx_boat [esx]/esx_boat +``` + +### Manually +- Download https://github.com/ESX-Org/esx_boat/archive/master.zip +- Put it in the `[esx]` directory + +## Installation +- Import `esx_boat.sql` in your database +- Add this to your `server.cfg`: + +``` +start esx_boat +``` + +# Legal +### License +esx_boat - Boat shop and garage for ESX + +Copyright (C) 2015-2023 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/. diff --git a/[esx_addons]/esx_boat/client/main.lua b/[esx_addons]/esx_boat/client/main.lua new file mode 100644 index 00000000..1a9cd519 --- /dev/null +++ b/[esx_addons]/esx_boat/client/main.lua @@ -0,0 +1,229 @@ +isInShopMenu = false +local spawnedVehicles = {} + +function OpenBoatShop(shop) + isInShopMenu = true + + local playerPed = PlayerPedId() + local elements = { + {unselectable = true, icon = "fas fa-ship", title = TranslateCap('boat_shop')} + } + + for k,v in ipairs(Config.Vehicles) do + elements[#elements+1] = { + icon = "fas fa-ship", + title = ('%s - $%s'):format(v.label, ESX.Math.GroupDigits(v.price)), + name = v.label, + model = v.model, + price = v.price, + props = v.props or nil + } + end + + ESX.OpenContext("right", elements, function(menu,element) + local elements2 = { + {unselectable = true, icon = "fas fa-ship", title = element.title}, + {icon = "fas fa-eye", title = "View", val = "view"} + } + + ESX.OpenContext("right", elements2, function(menu2,element2) + if element2.val == "view" then + DeleteSpawnedVehicles() + + ESX.Game.SpawnLocalVehicle(element.model, shop.Inside, shop.Inside.w, function (vehicle) + table.insert(spawnedVehicles, vehicle) + TaskWarpPedIntoVehicle(playerPed, vehicle, -1) + FreezeEntityPosition(vehicle, true) + + if element.props then + ESX.Game.SetVehicleProperties(vehicle, element.props) + end + + local elements3 = { + {unselectable = true, icon = "fas fa-ship", title = element.title}, + {icon = "fas fa-check-double", title = "Buy", value = "buy"}, + {icon = "fas fa-eye", title = "Stop Viewing", value = "stop"} + } + + ESX.OpenContext("right", elements3, function(menu3,element3) + if element3.value == "buy" then + local plate = exports['esx_vehicleshop']:GeneratePlate() + local vehicle = GetVehiclePedIsIn(playerPed, false) + local props = ESX.Game.GetVehicleProperties(vehicle) + props.plate = plate + + ESX.TriggerServerCallback('esx_boat:buyBoat', function(bought) + if bought then + ESX.ShowNotification(TranslateCap('boat_shop_bought', element.name, ESX.Math.GroupDigits(element.price))) + + DeleteSpawnedVehicles() + isInShopMenu = false + ESX.CloseContext() + + CurrentAction = 'boat_shop' + CurrentActionMsg = TranslateCap('boat_shop_open') + + FreezeEntityPosition(playerPed, false) + SetEntityVisible(playerPed, true) + SetEntityCoords(playerPed, shop.Outside.x, shop.Outside.y, shop.Outside.z) + else + ESX.ShowNotification(TranslateCap('boat_shop_nomoney')) + ESX.CloseContext() + end + end, props) + elseif element3.value == "stop" then + isInShopMenu = false + DeleteSpawnedVehicles() + + CurrentAction = 'boat_shop' + CurrentActionMsg = TranslateCap('boat_shop_open') + + FreezeEntityPosition(playerPed, false) + SetEntityVisible(playerPed, true) + SetEntityCoords(playerPed, shop.Outside.x, shop.Outside.y, shop.Outside.z) + ESX.CloseContext() + end + end) + end) + end + end, function(menu) + isInShopMenu = false + CurrentAction = 'boat_shop' + CurrentActionMsg = TranslateCap('boat_shop_open') + end) + end, function(menu) + isInShopMenu = false + CurrentAction = 'boat_shop' + CurrentActionMsg = TranslateCap('boat_shop_open') + end) +end + +function OpenBoatGarage(garage) + ESX.TriggerServerCallback('esx_boat:getGarage', function (ownedBoats) + if #ownedBoats == 0 then + ESX.ShowNotification(TranslateCap('garage_noboats')) + else + -- get all available boats + local elements = { + {unselectable = true, icon = "fas fa-ship", title = TranslateCap('garage')} + } + for i=1, #ownedBoats, 1 do + ownedBoats[i] = json.decode(ownedBoats[i]) + + elements[#elements+1] = { + icon = "fas fa-ship", + title = getVehicleLabelFromHash(ownedBoats[i].model), + vehicleProps = ownedBoats[i] + } + end + + ESX.OpenContext("right", elements, function(menu,element) + local playerPed = PlayerPedId() + local vehicleProps = element.vehicleProps + + if ESX.Game.IsSpawnPointClear(garage.SpawnPoint, 4.0) then + TriggerServerEvent('esx_boat:takeOutVehicle', vehicleProps.plate) + ESX.ShowNotification(TranslateCap('garage_taken')) + + ESX.Game.SpawnVehicle(vehicleProps.model, garage.SpawnPoint, garage.SpawnPoint.w, function(vehicle) + TaskWarpPedIntoVehicle(playerPed, vehicle, -1) + ESX.Game.SetVehicleProperties(vehicle, vehicleProps) + end) + + ESX.CloseContext() + else + ESX.ShowNotification(TranslateCap('garage_blocked')) + end + end, function(menu) + CurrentAction = 'garage_out' + CurrentActionMsg = TranslateCap('garage_open') + end) + end + end) +end + +function OpenLicenceMenu(shop) + local elements = { + {unselectable = true, icon = "fas fa-ship", title = TranslateCap('license_menu')}, + {icon = "fas fa-ship", title = "Purchase Boat License"} + } + + ESX.OpenContext("right", elements, function(menu,element) + local elements2 = { + {unselectable = true, icon = "fas fa-ship", title = element.title}, + {icon = "fas fa-check-double", title = TranslateCap('license_buy_yes'), val = "yes"}, + {icon = "fas fa-window-close", title = TranslateCap('license_buy_no'), val = "no"} + } + + ESX.OpenContext("right", elements2, function(menu2,element2) + ESX.TriggerServerCallback('esx_boat:buyBoatLicense', function (boughtLicense) + if boughtLicense then + ESX.ShowNotification(TranslateCap('license_bought', ESX.Math.GroupDigits(Config.LicensePrice))) + ESX.CloseContext() + + OpenBoatShop(shop) -- parse current shop + else + ESX.ShowNotification(TranslateCap('license_nomoney')) + end + end) + end, function(menu) + CurrentAction = 'boat_shop' + CurrentActionMsg = TranslateCap('boat_shop_open') + end) + end, function(menu) + CurrentAction = 'boat_shop' + CurrentActionMsg = TranslateCap('boat_shop_open') + end) +end + +function StoreBoatInGarage(vehicle, teleportCoords) + local vehicleProps = ESX.Game.GetVehicleProperties(vehicle) + + ESX.TriggerServerCallback('esx_boat:storeVehicle', function (rowsChanged) + if rowsChanged > 0 then + ESX.Game.DeleteVehicle(vehicle) + ESX.ShowNotification(TranslateCap('garage_stored')) + local playerPed = PlayerPedId() + + ESX.Game.Teleport(playerPed, teleportCoords, function() + SetEntityHeading(playerPed, teleportCoords.w) + end) + else + ESX.ShowNotification(TranslateCap('garage_notowner')) + end + end, vehicleProps.plate) +end + +-- Key controls +CreateThread(function() + while true do + Wait(0) + + if isInShopMenu then + DisableControlAction(0, 75, true) -- Disable exit vehicle + DisableControlAction(27, 75, true) -- Disable exit vehicle + else + Wait(500) + end + end +end) + +function DeleteSpawnedVehicles() + while #spawnedVehicles > 0 do + local vehicle = spawnedVehicles[1] + ESX.Game.DeleteVehicle(vehicle) + table.remove(spawnedVehicles, 1) + end +end + +function getVehicleLabelFromHash(hash) + local model = string.lower(GetDisplayNameFromVehicleModel(hash)) + + for i=1, #Config.Vehicles, 1 do + if Config.Vehicles[i].model == model then + return Config.Vehicles[i].label + end + end + + return 'Unknown model [' .. model .. ']' +end diff --git a/[esx_addons]/esx_boat/client/marker.lua b/[esx_addons]/esx_boat/client/marker.lua new file mode 100644 index 00000000..94ff319e --- /dev/null +++ b/[esx_addons]/esx_boat/client/marker.lua @@ -0,0 +1,198 @@ +local HasAlreadyEnteredMarker = false +local LastZone = nil + +CurrentAction = nil +CurrentActionMsg = '' +CurrentActionData = {} + +-- Key controls +CreateThread(function() + while true do + Wait(0) + + if CurrentAction then + ESX.ShowHelpNotification(CurrentActionMsg) + + if IsControlJustReleased(0, 38) then + if CurrentAction == 'boat_shop' then + if not Config.LicenseEnable then + OpenBoatShop(Config.Zones.BoatShops[CurrentActionData.zoneNum]) + else -- check for license + + ESX.TriggerServerCallback('esx_license:checkLicense', function(hasBoatLicense) + if hasBoatLicense then + OpenBoatShop(Config.Zones.BoatShops[CurrentActionData.zoneNum]) + else + OpenLicenceMenu(Config.Zones.BoatShops[CurrentActionData.zoneNum]) + end + end, GetPlayerServerId(PlayerId()), 'boat') + end + elseif CurrentAction == 'garage_out' then + OpenBoatGarage(Config.Zones.Garages[CurrentActionData.zoneNum]) + elseif CurrentAction == 'garage_in' then + StoreBoatInGarage(CurrentActionData.vehicle, Config.Zones.Garages[CurrentActionData.zoneNum].StoreTP) + end + + CurrentAction = nil + end + else + Wait(500) + end + end +end) + +AddEventHandler('esx_boat:hasEnteredMarker', function(zone, zoneNum) + if zone == 'boat_shop' then + CurrentAction = 'boat_shop' + CurrentActionMsg = TranslateCap('boat_shop_open') + CurrentActionData = { zoneNum = zoneNum } + elseif zone == 'garage_out' then + CurrentAction = 'garage_out' + CurrentActionMsg = TranslateCap('garage_open') + CurrentActionData = { zoneNum = zoneNum } + elseif zone == 'garage_in' then + local playerPed = PlayerPedId() + local coords = GetEntityCoords(playerPed) + + if IsPedInAnyVehicle(playerPed, false) then + local vehicle = GetVehiclePedIsIn(playerPed, false) + + if DoesEntityExist(vehicle) and GetPedInVehicleSeat(vehicle, -1) == playerPed then + CurrentAction = 'garage_in' + CurrentActionMsg = TranslateCap('garage_store') + CurrentActionData = { vehicle = vehicle, zoneNum = zoneNum } + end + end + end +end) + +AddEventHandler('esx_boat:hasExitedMarker', function() + if not isInShopMenu then + ESX.CloseContext() + end + + CurrentAction = nil +end) + +-- Enter / Exit marker events +CreateThread(function() + while true do + Wait(0) + + local playerPed = PlayerPedId() + local coords = GetEntityCoords(playerPed) + local isInMarker, hasExited, letSleep = false, false, true + local currentZone, currentZoneNum + + for i=1, #Config.Zones.BoatShops, 1 do + local distance = #(coords - Config.Zones.BoatShops[i].Outside) + + if distance < Config.DrawDistance then + DrawMarker(Config.MarkerType, Config.Zones.BoatShops[i].Outside, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Config.Marker.x, Config.Marker.y, Config.Marker.z, Config.Marker.r, Config.Marker.g, Config.Marker.b, 100, false, true, 2, false, nil, nil, false) + letSleep = false + end + + if distance < Config.Marker.x then + isInMarker = true + currentZone = 'boat_shop' + currentZoneNum = i + end + end + + for i=1, #Config.Zones.Garages, 1 do + local distance = #(coords - Config.Zones.Garages[i].GaragePos) + + if distance < Config.DrawDistance then + DrawMarker(Config.MarkerType, Config.Zones.Garages[i].GaragePos, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Config.Marker.x, Config.Marker.y, Config.Marker.z, Config.Marker.r, Config.Marker.g, Config.Marker.b, 100, false, true, 2, false, nil, nil, false) + letSleep = false + end + + if distance < Config.Marker.x then + isInMarker = true + currentZone = 'garage_out' + currentZoneNum = i + end + + distance = #(coords - Config.Zones.Garages[i].StorePos) + + if distance < Config.DrawDistance then + DrawMarker(Config.MarkerType, Config.Zones.Garages[i].StorePos, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Config.StoreMarker.x, Config.StoreMarker.y, Config.StoreMarker.z, Config.StoreMarker.r, Config.StoreMarker.g, Config.StoreMarker.b, 100, false, true, 2, false, nil, nil, false) + letSleep = false + end + + if distance < Config.StoreMarker.x then + isInMarker = true + currentZone = 'garage_in' + currentZoneNum = i + end + end + + if isInMarker and not HasAlreadyEnteredMarker or (isInMarker and (LastZone ~= currentZone or LastZoneNum ~= currentZoneNum)) then + if + (LastZone ~= nil and LastZoneNum ~= nil) and + (LastZone ~= currentZone or LastZoneNum ~= currentZoneNum) + then + TriggerEvent('esx_boat:hasExitedMarker', LastZone) + hasExited = true + end + + HasAlreadyEnteredMarker = true + LastZone = currentZone + LastZoneNum = currentZoneNum + + TriggerEvent('esx_boat:hasEnteredMarker', currentZone, currentZoneNum) + end + + if not hasExited and not isInMarker and HasAlreadyEnteredMarker then + HasAlreadyEnteredMarker = false + TriggerEvent('esx_boat:hasExitedMarker') + end + + if letSleep then + Wait(500) + end + end +end) + +-- Blips +CreateThread(function() + local blipList = {} + + for i=1, #Config.Zones.Garages, 1 do + table.insert(blipList, { + coords = Config.Zones.Garages[i].GaragePos, + text = TranslateCap('blip_garage'), + sprite = 356, + color = 3, + scale = 1.0 + }) + end + + for i=1, #Config.Zones.BoatShops, 1 do + table.insert(blipList, { + coords = Config.Zones.BoatShops[i].Outside, + text = TranslateCap('blip_shop'), + sprite = 427, + color = 3, + scale = 1.0 + }) + end + + for i=1, #blipList, 1 do + CreateBlip(blipList[i].coords, blipList[i].text, blipList[i].sprite, blipList[i].color, blipList[i].scale) + end +end) + +function CreateBlip(coords, text, sprite, color, scale) + local blip = AddBlipForCoord(coords.x, coords.y) + + SetBlipSprite(blip, sprite) + SetBlipScale(blip, scale) + SetBlipColour(blip, color) + + SetBlipAsShortRange(blip, true) + + BeginTextCommandSetBlipName('STRING') + AddTextComponentSubstringPlayerName(text) + EndTextCommandSetBlipName(blip) +end diff --git a/[esx_addons]/esx_boat/config.lua b/[esx_addons]/esx_boat/config.lua new file mode 100644 index 00000000..c274b201 --- /dev/null +++ b/[esx_addons]/esx_boat/config.lua @@ -0,0 +1,92 @@ +Config = {} + +Config.Locale = GetConvar('esx:locale', 'en') + +Config.LicenseEnable = true -- enable boat license? Requires esx_license +Config.LicensePrice = 50000 + +Config.MarkerType = 1 +Config.DrawDistance = 10.0 + +Config.Marker = { + r = 100, g = 204, b = 100, -- blue-ish color + x = 1.5, y = 1.5, z = 1.0 -- standard size circle +} + +Config.StoreMarker = { + r = 255, g = 0, b = 0, -- red color + x = 5.0, y = 5.0, z = 1.0 -- big circle for storing boat +} + +Config.Zones = { + + Garages = { + { -- Shank St, nearby campaign boat garage + GaragePos = vector3(-772.4, -1430.9, 0.5), + SpawnPoint = vector4(-785.39, -1426.3, 0.0, 146.0), + StorePos = vector3(-798.4, -1456.0, 0.0), + StoreTP = vector4(-791.4, -1452.5, 1.5, 318.9) + }, + + { -- Catfish View + GaragePos = vector3(3864.9, 4463.9, 1.6), + SpawnPoint = vector4(3854.4, 4477.2, 0.0, 273.0), + StorePos = vector3(3857.0, 4446.9, 0.0), + StoreTP = vector4(3854.7, 4458.6, 1.8, 355.3) + }, + + { -- Great Ocean Highway + GaragePos = vector3(-1614.0, 5260.1, 2.8), + SpawnPoint = vector4(-1622.5, 5247.1, 0.0, 21.0), + StorePos = vector3(-1600.3, 5261.9, 0.0), + StoreTP = vector4(-1605.7, 5259.0, 2.0, 25.0) + }, + + { -- North Calafia Way + GaragePos = vector3(712.6, 4093.3, 33.7), + SpawnPoint = vector4(712.8, 4080.2, 29.3, 181.0), + StorePos = vector3(705.1, 4110.1, 30.2), + StoreTP = vector4(711.9, 4110.5, 31.3, 180.0) + }, + + { -- Elysian Fields, nearby the airport + GaragePos = vector3(23.8, -2806.8, 4.8), + SpawnPoint = vector4(23.3, -2828.6, 0.8, 181.0), + StorePos = vector3(-1.0, -2799.2, 0.5), + StoreTP = vector4(12.6, -2793.8, 2.5, 355.2) + }, + + { -- Barbareno Rd + GaragePos = vector3(-3427.3, 956.9, 7.3), + SpawnPoint = vector4(-3448.9, 953.8, 0.0, 75.0), + StorePos = vector3(-3436.5, 946.6, 0.3), + StoreTP = vector4(-3427.0, 952.6, 8.3, 0.0) + } + }, + + BoatShops = { + { -- Shank St, nearby campaign boat garage + Outside = vector3(-773.7, -1495.2, 1.6), + Inside = vector4(-798.5, -1503.1, -0.4, 120.0) + } + } + +} + +Config.Vehicles = { + {model = 'seashark', label = 'Seashark (Random Color)', price = 7500}, + {model = 'seashark3', label = 'Seashark (Dark Blue)', price = 7500}, + {model = 'suntrap', label = 'Suntrap', price = 10000}, + {model = 'jetmax', label = 'Jetmax', price = 45000}, + {model = 'tropic2', label = 'Tropic', price = 65000}, + {model = 'dinghy2', label = 'Dinghy (Black)', price = 32500}, + {model = 'dinghy', label = 'Dinghy 2 (Random Color)', price = 40000}, + {model = 'speeder', label = 'Speeder', price = 85000}, + {model = 'squalo', label = 'Squalo (Random Color)', price = 61000}, + {model = 'toro', label = 'Toro', price = 200000}, + {model = 'submersible', label = 'Submersible', price = 750000} +} + +exports('getGarages', function() + return Config.Zones.Garages +end) diff --git a/[esx_addons]/esx_boat/esx_boat.sql b/[esx_addons]/esx_boat/esx_boat.sql new file mode 100644 index 00000000..784e656b --- /dev/null +++ b/[esx_addons]/esx_boat/esx_boat.sql @@ -0,0 +1,5 @@ + + +INSERT INTO `licenses` (`type`, `label`) VALUES + ('boat', 'Boat License') +; \ No newline at end of file diff --git a/[esx_addons]/esx_boat/fxmanifest.lua b/[esx_addons]/esx_boat/fxmanifest.lua new file mode 100644 index 00000000..451535a4 --- /dev/null +++ b/[esx_addons]/esx_boat/fxmanifest.lua @@ -0,0 +1,30 @@ +fx_version 'adamant' + +game 'gta5' + +description 'ESX Boat' +lua54 'yes' +version '1.9.0' + +shared_script '@es_extended/imports.lua' + +server_scripts { + '@oxmysql/lib/MySQL.lua', + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'server/main.lua' +} + +client_scripts { + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'client/main.lua', + 'client/marker.lua' +} + +dependencies { + 'es_extended', + 'esx_vehicleshop' +} diff --git a/[esx_addons]/esx_boat/locales/de.lua b/[esx_addons]/esx_boat/locales/de.lua new file mode 100644 index 00000000..a3a6dcb8 --- /dev/null +++ b/[esx_addons]/esx_boat/locales/de.lua @@ -0,0 +1,31 @@ +Locales['de'] = { + -- shop + ['boat_shop'] = 'Bootsladen', + ['boat_shop_open'] = 'Drücke [E] um auf den Bootsladen zuzugreifen .', + ['boat_shop_confirm'] = 'Kaufen %s für $%s?', + ['boat_shop_bought'] = 'Du hast ein %s für $%s gekauft', + ['boat_shop_nomoney'] = 'Du kannst dir dass nicht leisten!', + ['confirm_no'] = 'Nein', + ['confirm_yes'] = 'Ja', + + -- garage + ['garage'] = 'Bootsgarage', + ['garage_open'] = 'Drücke [E] um auf deine Bootsgarage zuzugreifen.', + ['garage_store'] = 'Drücke [E] um auf den Laden in deiner Bootsgarage zuzugreifen.', + ['garage_taken'] = 'Das Boot wurde ausgeparkt!', + ['garage_stored'] = 'Das Boot wurde sicher in Ihre Garage gelagert!', + ['garage_noboats'] = 'Sie haben besitzen keine Boote! Besuchen Sie den Bootsladen, um eins zu kaufen.', + ['garage_blocked'] = 'Das Boot kann nicht ausgeparkt werden, weil ein anderes Fahrzeug den Spawn-Punkt blockiert!', + ['garage_notowner'] = 'Dieses Boot gehört nicht Ihnen!', + + -- license + ['license_menu'] = 'Bootsführerschein erwerben?', + ['license_buy_no'] = 'Nein', + ['license_buy_yes'] = 'Bootsführerschein kaufen $%s', + ['license_bought'] = 'Du hast den Bootsführerschein für $%s gekauft', + ['license_nomoney'] = 'Du kannst dir den Bootsführerschein nicht leisten!', + + -- blips + ['blip_garage'] = 'Bootsgarage', + ['blip_shop'] = 'Bootsladen', +} \ No newline at end of file diff --git a/[esx_addons]/esx_boat/locales/en.lua b/[esx_addons]/esx_boat/locales/en.lua new file mode 100644 index 00000000..6afb505d --- /dev/null +++ b/[esx_addons]/esx_boat/locales/en.lua @@ -0,0 +1,31 @@ +Locales['en'] = { + -- shop + ['boat_shop'] = 'boat shop', + ['boat_shop_open'] = 'press [E] to access the boat shop.', + ['boat_shop_confirm'] = 'buy %s for $%s?', + ['boat_shop_bought'] = 'you have bought a %s for $%s', + ['boat_shop_nomoney'] = 'you cannot ~r~afford this boat!', + ['confirm_no'] = 'no', + ['confirm_yes'] = 'yes', + + -- garage + ['garage'] = 'boat garage', + ['garage_open'] = 'press [E] to access your boat garage.', + ['garage_store'] = 'press [E] to store the boat in your garage.', + ['garage_taken'] = 'the boat has been taken out!', + ['garage_stored'] = 'the boat has been safely stored in your garage!', + ['garage_noboats'] = 'you don\'t have any stored boats! Visit the boat shop to buy one.', + ['garage_blocked'] = 'the boat cannot be taken out because another vehicle is blocking the spawn point!', + ['garage_notowner'] = 'you don\'t own this boat!', + + -- license + ['license_menu'] = 'buy Boat License?', + ['license_buy_no'] = 'no', + ['license_buy_yes'] = 'buy Boat License $%s', + ['license_bought'] = 'you have bought the Boat License for $%s', + ['license_nomoney'] = 'you cannot ~r~afford the Boat License!', + + -- blips + ['blip_garage'] = 'boat Garage', + ['blip_shop'] = 'boat Shop', +} diff --git a/[esx_addons]/esx_boat/locales/es.lua b/[esx_addons]/esx_boat/locales/es.lua new file mode 100644 index 00000000..8ad7edc0 --- /dev/null +++ b/[esx_addons]/esx_boat/locales/es.lua @@ -0,0 +1,31 @@ +Locales['es'] = { + -- shop + ['boat_shop'] = 'Tienda de barcos', + ['boat_shop_open'] = 'Pulsa [E] para acceder a la tienda de barcos.', + ['boat_shop_confirm'] = '¿Comprar %s por %s$?', + ['boat_shop_bought'] = 'Has comprado un %s por %s$', + ['boat_shop_nomoney'] = '¡No puedes ~r~permitirte ese barco!', + ['confirm_no'] = 'No', + ['confirm_yes'] = 'Si', + + -- garage + ['garage'] = 'Garaje de barcos', + ['garage_open'] = 'Pulsa [E] para acceder a tu garaje de barcos', + ['garage_store'] = 'Pulsa [E] para almacenar el barco en el garaje', + ['garage_taken'] = '¡El barco ha sido sacado!', + ['garage_stored'] = '¡El barco se ha almacenado en el garaje!', + ['garage_noboats'] = '¡No tienes ningún barco guardado! Visita la tienda de barcos para comprar uno', + ['garage_blocked'] = '¡El barco no ha podido ser sacado, hay un objeto obstruyendo el spawn!', + ['garage_notowner'] = '¡No eres el dueño de ese barco!', + + -- license + ['license_menu'] = '¿Comprar Licencia de Barcos?', + ['license_buy_no'] = 'No', + ['license_buy_yes'] = 'Comprar Licencia de Barcos %s$', + ['license_bought'] = 'Compraste la Licencia de Barcos por $%s', + ['license_nomoney'] = '¡No puedes ~r~permitirte la Licencia de Barcos!', + + -- blips + ['blip_garage'] = 'Garaje de barcos', + ['blip_shop'] = 'Tienda de barcos', +} diff --git a/[esx_addons]/esx_boat/locales/et.lua b/[esx_addons]/esx_boat/locales/et.lua new file mode 100644 index 00000000..35a47350 --- /dev/null +++ b/[esx_addons]/esx_boat/locales/et.lua @@ -0,0 +1,31 @@ +Locales['et'] = { + -- shop + ['boat_shop'] = 'Paadi pood', + ['boat_shop_open'] = 'Vajuta [E], et avada paadi pood.', + ['boat_shop_confirm'] = 'Osta %s $%s eest?', + ['boat_shop_bought'] = 'Sa ostsid %s $%s eest', + ['boat_shop_nomoney'] = 'Sa ei saa ~r~lubada endale seda paati!', + ['confirm_no'] = 'Ei', + ['confirm_yes'] = 'Jah', + + -- garage + ['garage'] = 'Paadi garaaž', + ['garage_open'] = 'Vajuta [E], et avada paadi garaaž.', + ['garage_store'] = 'Vajuta [E], et parkida paat garaaži.', + ['garage_taken'] = 'Paat on väljastatud!', + ['garage_stored'] = 'Paat on pargitud teie garaaži!', + ['garage_noboats'] = 'Sul pole ühtegi paati, külasta paadi poodi.', + ['garage_blocked'] = 'Paati ei saa garaažist välja võtta, kuna miski blokeerib seda!', + ['garage_notowner'] = 'Sa ei oma seda paati!', + + -- license + ['license_menu'] = 'Osta paadi load?', + ['license_buy_no'] = 'Ei', + ['license_buy_yes'] = 'Osta paadi load $%s', + ['license_bought'] = 'Sa ostsid paadi load $%s eest', + ['license_nomoney'] = 'Sa ei võimalda ~r~lubada endale paadi lubasid!', + + -- blips + ['blip_garage'] = 'Paadi garaaž', + ['blip_shop'] = 'Paadi pood', +} diff --git a/[esx_addons]/esx_boat/locales/fr.lua b/[esx_addons]/esx_boat/locales/fr.lua new file mode 100644 index 00000000..9d93feb7 --- /dev/null +++ b/[esx_addons]/esx_boat/locales/fr.lua @@ -0,0 +1,31 @@ +Locales['fr'] = { + -- shop + ['boat_shop'] = 'magasin de bateaux', + ['boat_shop_open'] = 'appuyez sur [E] pour accéder au magasin de bateaux.', + ['boat_shop_confirm'] = 'voulez-vous acheter %s pour $%s?', + ['boat_shop_bought'] = 'vous avez acheté le %s pour $%s', + ['boat_shop_nomoney'] = 'vous n\'avez pas les moyens ~r~pour acheter ce bateau !', + ['confirm_no'] = 'non', + ['confirm_yes'] = 'oui', + + -- garage + ['garage'] = 'garage à bateaux', + ['garage_open'] = 'appuyez sur [E] pour accéder à votre garage à bateaux.', + ['garage_store'] = 'appuyez sur [E] pour ranger votre bateau dans votre garage.', + ['garage_taken'] = 'le bateau est sorti !', + ['garage_stored'] = 'le bateau a bien été rangé dans votre garage !', + ['garage_noboats'] = 'vous n\'avez aucun bateau ici ! Rendez-vous au magasin de bateaux pour en acheter un.', + ['garage_blocked'] = 'le bateau ne peux pas être sorti car un autre véhicule bloque le point !', + ['garage_notowner'] = 'ce bateau ne vous appartient pas !', + + -- license + ['license_menu'] = 'acheter un permis de naviguer', + ['license_buy_no'] = 'non', + ['license_buy_yes'] = 'acheter le permis pour $%s', + ['license_bought'] = 'vous avez acheté le permis de naviguer pour $%s', + ['license_nomoney'] = 'vous n\'avez pas les moyens ~r~pour acheter ce permis !', + + -- blips + ['blip_garage'] = 'garage à bateaux', + ['blip_shop'] = 'magasin de bateaux', +} diff --git a/[esx_addons]/esx_boat/locales/hu.lua b/[esx_addons]/esx_boat/locales/hu.lua new file mode 100644 index 00000000..f15ba04c --- /dev/null +++ b/[esx_addons]/esx_boat/locales/hu.lua @@ -0,0 +1,31 @@ +Locales['hu'] = { + -- shop + ['boat_shop'] = 'Hajóbolt', + ['boat_shop_open'] = 'Nyomj [E] hogy megnézd a hajókat', + ['boat_shop_confirm'] = 'hajó: %s ára: $%s', + ['boat_shop_bought'] = 'Vettél %s ennyiért: $%s', + ['boat_shop_nomoney'] = '~r~Ezt nem engedheted meg magadnak!', + ['confirm_no'] = 'Nem', + ['confirm_yes'] = 'Igen', + + -- garage + ['garage'] = 'Hajógarázs', + ['garage_open'] = 'Nyomj [E] hogy megnyisd a garázst', + ['garage_store'] = 'Nyomj [E] hogy kikösd a hajót', + ['garage_taken'] = 'Sikeresen kivetted a hajót', + ['garage_stored'] = 'Sikeresen leraktad a hajót', + ['garage_noboats'] = '~r~Nincsen hajód', + ['garage_blocked'] = '~r~A lehívási pont blokkolva', + ['garage_notowner'] = '~r~Nem a tied ez a hajó', + + -- license + ['license_menu'] = 'Szeretnél venni hajó engedélyt?', + ['license_buy_no'] = 'Nem', + ['license_buy_yes'] = 'Vegyél hajó engedélyt $%s-ért', + ['license_bought'] = 'Vettél hajó engedélyt $%s-ért', + ['license_nomoney'] = '~r~nem engedheted meg magadnak, hogy vegyél hajó engedélyt!', + + -- blips + ['blip_garage'] = 'Hajógarázs', + ['blip_shop'] = 'Hajóbolt', +} diff --git a/[esx_addons]/esx_boat/locales/it.lua b/[esx_addons]/esx_boat/locales/it.lua new file mode 100644 index 00000000..a771b3c1 --- /dev/null +++ b/[esx_addons]/esx_boat/locales/it.lua @@ -0,0 +1,31 @@ +Locales['it'] = { + -- shop + ['boat_shop'] = 'negozio nautico', + ['boat_shop_open'] = 'premi [E] per accedere al negozio nautico.', + ['boat_shop_confirm'] = 'compra %s per $%s?', + ['boat_shop_bought'] = 'hai comprato un %s per $%s', + ['boat_shop_nomoney'] = 'non puoi ~r~permertterti questa barca!', + ['confirm_no'] = 'no', + ['confirm_yes'] = 'si', + + -- garage + ['garage'] = 'garage barca', + ['garage_open'] = 'premi [E] per accedere al garage della tua barca.', + ['garage_store'] = 'premi [E] per riporre la barca nel tuo garage.', + ['garage_taken'] = 'la barca è stata ritirata', + ['garage_stored'] = 'la barca è stata riposta al sicuro nel tuo garage!', + ['garage_noboats'] = 'non hai barche in deposito! Visita il negozio per acquistarne una.', + ['garage_blocked'] = 'la barca non può essere eliminata perché un altro veicolo sta bloccando il punto di spawn!', + ['garage_notowner'] = 'non possiedi questa barca!', + + -- license + ['license_menu'] = 'acquistare la patente nautica?', + ['license_buy_no'] = 'no', + ['license_buy_yes'] = 'acquista patente nautica $%s', + ['license_bought'] = 'hai acquistato la patente nautica per $%s', + ['license_nomoney'] = 'non puoi ~r~permetterti la patente nautica', + + -- blips + ['blip_garage'] = 'garage delle barche', + ['blip_shop'] = 'negozio di barche', +} diff --git a/[esx_addons]/esx_boat/locales/nl.lua b/[esx_addons]/esx_boat/locales/nl.lua new file mode 100644 index 00000000..372b858b --- /dev/null +++ b/[esx_addons]/esx_boat/locales/nl.lua @@ -0,0 +1,31 @@ +Locales['nl'] = { + -- shop + ['boat_shop'] = 'boten winkel', + ['boat_shop_open'] = 'Druk op [E] tom de boten winkelte openen.', + ['boat_shop_confirm'] = 'Koop %s voor €%s?', + ['boat_shop_bought'] = 'Je hebt een gekochteen %s voor €%s', + ['boat_shop_nomoney'] = 'Deze boot kan je niet betalen!', + ['confirm_no'] = 'nee', + ['confirm_yes'] = 'ja', + + -- garage + ['garage'] = 'boten garage', + ['garage_open'] = 'Druk op [E] om je boten garagete openen.', + ['garage_store'] = 'Druk op [E] om je boot op te slaan.', + ['garage_taken'] = 'de boot staat klaar!', + ['garage_stored'] = 'de boot is opgeslagen in je garage!', + ['garage_noboats'] = 'je hebt geen opgeslagen boten! Ga naar de boten winkel om er een te kopen.', + ['garage_blocked'] = 'de boot kan er niet uit omdat iets het spawnpunt blokkeerd!', + ['garage_notowner'] = 'je bent geen eigenaar van deze boot!', + + -- license + ['license_menu'] = 'Koop Vaarbewijs?', + ['license_buy_no'] = 'nee', + ['license_buy_yes'] = 'Koop vaarbewijs €%s', + ['license_bought'] = 'je kocht het Vaar Bewijs voor €%s', + ['license_nomoney'] = 'je kan het Vaar Bewijsniet betalen! ', + + -- blips + ['blip_garage'] = 'boten garage', + ['blip_shop'] = 'boten winkel', +} diff --git a/[esx_addons]/esx_boat/locales/pl.lua b/[esx_addons]/esx_boat/locales/pl.lua new file mode 100644 index 00000000..aae3369f --- /dev/null +++ b/[esx_addons]/esx_boat/locales/pl.lua @@ -0,0 +1,31 @@ +Locales['pl'] = { + -- shop + ['boat_shop'] = 'sklep z łodziami', + ['boat_shop_open'] = 'naciśnij [E] aby otworzyć sklep z łodziami.', + ['boat_shop_confirm'] = 'kup %s za $%s?', + ['boat_shop_bought'] = 'zakupiłeś/aś %s za $%s', + ['boat_shop_nomoney'] = 'nie posiadasz ~r~wystarczająco pieniędzy aby zakupić te łódź!', + ['confirm_no'] = 'nie', + ['confirm_yes'] = 'tak', + + -- garage + ['garage'] = 'garaż: Lodzie', + ['garage_open'] = 'naciśnij [E] aby otworzyć garaż z łodziami.', + ['garage_store'] = 'naciśnij [E] aby schować swoją łódź do garażu', + ['garage_taken'] = 'łódź zostałą wyjęta z garażu', + ['garage_stored'] = 'łódź została schowana do garażu', + ['garage_noboats'] = 'nie posiadasz żadnych łodzi!', + ['garage_blocked'] = 'łódź nie może zostać wyjęta dlatego że coś blokuje jej miejsce narodzenia', + ['garage_notowner'] = 'nie jesteś właścicielem tej łodzi!', + + -- license + ['license_menu'] = 'kup licencje na płwanie łodziami?', + ['license_buy_no'] = 'nie', + ['license_buy_yes'] = 'kup licencje na pływanie łodziami $%s', + ['license_bought'] = 'zakupiłeś/aś licencje na pływanie łodziami za $%s', + ['license_nomoney'] = 'nie posiadasz ~r~wystarczająco pieniędzy aby zakupić licencje na pływanie łodziami!', + + -- blips + ['blip_garage'] = 'garaż: Lodzie', + ['blip_shop'] = 'sklep z łodziami', +} diff --git a/[esx_addons]/esx_boat/locales/si.lua b/[esx_addons]/esx_boat/locales/si.lua new file mode 100644 index 00000000..2db7b3ba --- /dev/null +++ b/[esx_addons]/esx_boat/locales/si.lua @@ -0,0 +1,31 @@ +Locales['si'] = { + -- trgovina + ['boat_shop'] = 'trgovina s čolni', + ['boat_shop_open'] = 'pritisnite [E] za dostop do boat shop.', + ['boat_shop_confirm'] = 'kupi %s za $%s?', + ['boat_shop_bought'] = 'ste kupili a %s za $%s', + ['boat_shop_nomoney'] = 'tega čolna si ne morete ~r~privoliti~!', + ['confirm_no'] = 'ne', + ['confirm_yes'] = 'da', + + -- garaža + ['garaža'] = 'garaža za čoln', + ['garage_open'] = 'pritisnite [E] za dostop do vaše garage~čolna~.', + ['garage_store'] = 'pritisnite [E], da shranite~čoln v svoji garaži.', + ['garage_taken'] = 'čoln je bil odpeljan!', + ['garage_stored'] = 'čoln je bil varno shranjen v vaši garaži!', + ['garage_noboats'] = 'Nimate shranjenih čolnov! Obiščite trgovine za čolne in jih kupite.', + ['garage_blocked'] = 'čolna ni mogoče odpeljati, ker drugo vozilo blokira drstitveno točko!', + ['garage_notowner'] = 'niste lastnik tega čolna!', + + -- licenca + ['license_menu'] = 'kupiti licenco za čoln?', + ['license_buy_no'] = 'ne', + ['license_buy_yes'] = 'kupi licenco za čoln $%s', + ['license_bought'] = 'kupili ste licenco čoln za $%s', + ['license_nomoney'] = 'ne morete ~r~privoliti~~čolnske licence!', + + -- mehurčki + ['blip_garage'] = 'garaža za čoln', + ['blip_shop'] = 'trgovina s čolni', +} \ No newline at end of file diff --git a/[esx_addons]/esx_boat/locales/sv.lua b/[esx_addons]/esx_boat/locales/sv.lua new file mode 100644 index 00000000..bb51837f --- /dev/null +++ b/[esx_addons]/esx_boat/locales/sv.lua @@ -0,0 +1,31 @@ +Locales['sv'] = { + -- shop + ['boat_shop'] = 'båtaffär', + ['boat_shop_open'] = 'tryck [E] för att öppna båtaffären.', + ['boat_shop_confirm'] = 'köp %s för %s SEK?', + ['boat_shop_bought'] = 'du har köpt en %s för %s SEK', + ['boat_shop_nomoney'] = 'du har ~r~inte råd för denna båt!', + ['confirm_no'] = 'nej', + ['confirm_yes'] = 'ja', + + -- garage + ['garage'] = 'båtgarage', + ['garage_open'] = 'tryck [E] för att öppna båtgaraget.', + ['garage_store'] = 'tryck [E] för att lagra båten i ditt garage.', + ['garage_taken'] = 'båten har släppts från garaget!', + ['garage_stored'] = 'båten har lagrats i garaget!', + ['garage_noboats'] = 'du har inga lagrade båtar! Besök båtaffären för att köpa båtar.', + ['garage_blocked'] = 'båten kan inte tas ur på grund av att en annan båt blokerar spawnpointen!', + ['garage_notowner'] = 'du äger inte denna båt!', + + -- license + ['license_menu'] = 'köpa båtlicens?', + ['license_buy_no'] = 'nej', + ['license_buy_yes'] = 'köp båtlicens %s SEK', + ['license_bought'] = 'du köpte båtlicensen för %s SEK', + ['license_nomoney'] = 'du har ~r~inte råd för båtlicensen!', + + -- blips + ['blip_garage'] = 'båtgarage', + ['blip_shop'] = 'båtaffär', +} diff --git a/[esx_addons]/esx_boat/localization/es_esx_boat.sql b/[esx_addons]/esx_boat/localization/es_esx_boat.sql new file mode 100644 index 00000000..f94aa0cc --- /dev/null +++ b/[esx_addons]/esx_boat/localization/es_esx_boat.sql @@ -0,0 +1,5 @@ + + +INSERT INTO `licenses` (`type`, `label`) VALUES + ('boat', 'Licencia de Barcos') +; diff --git a/[esx_addons]/esx_boat/localization/hu_esx_boat.sql b/[esx_addons]/esx_boat/localization/hu_esx_boat.sql new file mode 100644 index 00000000..f0f13a19 --- /dev/null +++ b/[esx_addons]/esx_boat/localization/hu_esx_boat.sql @@ -0,0 +1,5 @@ + + +INSERT INTO `licenses` (`type`, `label`) VALUES + ('boat', 'Hajó engedély') +; diff --git a/[esx_addons]/esx_boat/server/main.lua b/[esx_addons]/esx_boat/server/main.lua new file mode 100644 index 00000000..93fa884b --- /dev/null +++ b/[esx_addons]/esx_boat/server/main.lua @@ -0,0 +1,109 @@ +MySQL.ready(function() + ParkBoats() +end) + +function ParkBoats() + MySQL.update('UPDATE owned_vehicles SET `stored` = true WHERE `stored` = false AND type = @type', { + ['@type'] = 'boat' + }, function (rowsChanged) + if rowsChanged > 0 then + print(('[^2INFO^7] Stored ^5%s^7 %s !'):format(rowsChanged, rowsChanged > 1 and 'boats' or 'boat')) + end + end) +end + +ESX.RegisterServerCallback('esx_boat:buyBoat', function(source, cb, vehicleProps) + local xPlayer = ESX.GetPlayerFromId(source) + local price = getPriceFromModel(vehicleProps.model) + + -- vehicle model not found + if price == 0 then + print(('[^2INFO^7] Player ^5%s^7 Attempted To Exploit Shop'):format(xPlayer.source)) + cb(false) + else + if xPlayer.getMoney() >= price then + xPlayer.removeMoney(price, "Boat Purchase") + + MySQL.update('INSERT INTO owned_vehicles (owner, plate, vehicle, type, `stored`) VALUES (@owner, @plate, @vehicle, @type, @stored)', { + ['@owner'] = xPlayer.identifier, + ['@plate'] = vehicleProps.plate, + ['@vehicle'] = json.encode(vehicleProps), + ['@type'] = 'boat', + ['@stored'] = true + }, function(rowsChanged) + cb(true) + end) + else + cb(false) + end + end +end) + +RegisterServerEvent('esx_boat:takeOutVehicle') +AddEventHandler('esx_boat:takeOutVehicle', function(plate) + local xPlayer = ESX.GetPlayerFromId(source) + + MySQL.update('UPDATE owned_vehicles SET `stored` = @stored WHERE owner = @owner AND plate = @plate', { + ['@stored'] = false, + ['@owner'] = xPlayer.identifier, + ['@plate'] = plate + }, function(rowsChanged) + if rowsChanged == 0 then + print(('[^2INFO^7] Player ^5%s^7 Attempted To Exploit Garage'):format(xPlayer.source)) + end + end) +end) + +ESX.RegisterServerCallback('esx_boat:storeVehicle', function (source, cb, plate) + local xPlayer = ESX.GetPlayerFromId(source) + + MySQL.update('UPDATE owned_vehicles SET `stored` = @stored WHERE owner = @owner AND plate = @plate', { + ['@stored'] = true, + ['@owner'] = xPlayer.identifier, + ['@plate'] = plate + }, function(rowsChanged) + cb(rowsChanged) + end) +end) + +ESX.RegisterServerCallback('esx_boat:getGarage', function(source, cb) + local xPlayer = ESX.GetPlayerFromId(source) + + MySQL.query('SELECT vehicle FROM owned_vehicles WHERE owner = @owner AND type = @type AND `stored` = @stored', { + ['@owner'] = xPlayer.identifier, + ['@type'] = 'boat', + ['@stored'] = true + }, function(result) + local vehicles = {} + + for i=1, #result, 1 do + table.insert(vehicles, result[i].vehicle) + end + + cb(vehicles) + end) +end) + +ESX.RegisterServerCallback('esx_boat:buyBoatLicense', function(source, cb) + local xPlayer = ESX.GetPlayerFromId(source) + + if xPlayer.getMoney() >= Config.LicensePrice then + xPlayer.removeMoney(Config.LicensePrice, "Boat License Purchase") + + TriggerEvent('esx_license:addLicense', source, 'boat', function() + cb(true) + end) + else + cb(false) + end +end) + +function getPriceFromModel(model) + for k,v in ipairs(Config.Vehicles) do + if joaat(v.model) == model then + return v.price + end + end + + return 0 +end diff --git a/[esx_addons]/esx_clotheshop/.editorconfig b/[esx_addons]/esx_clotheshop/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_clotheshop/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_clotheshop/LICENSE b/[esx_addons]/esx_clotheshop/LICENSE new file mode 100644 index 00000000..2aa46e29 --- /dev/null +++ b/[esx_addons]/esx_clotheshop/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_clotheshop + Copyright (C) 2015-2023 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 . + +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_clotheshop Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_clotheshop/README.md b/[esx_addons]/esx_clotheshop/README.md new file mode 100644 index 00000000..7abeed76 --- /dev/null +++ b/[esx_addons]/esx_clotheshop/README.md @@ -0,0 +1,15 @@ +

[ESX] Clothe Shop

Discord - Website - Documentation + +It`s time to shine! Head over to the variety of stores this resource adds - to Get a new stylish look to out shine all your competition. + +# License + +esx_clotheshop - clothing store + +Copyright (C) 2015-2023 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/. diff --git a/[esx_addons]/esx_clotheshop/client/main.lua b/[esx_addons]/esx_clotheshop/client/main.lua new file mode 100644 index 00000000..6c6d5d40 --- /dev/null +++ b/[esx_addons]/esx_clotheshop/client/main.lua @@ -0,0 +1,184 @@ + +local hasAlreadyEnteredMarker, hasPaid, currentActionData = false, false, {} +local lastZone, currentAction, currentActionMsg + +function OpenShopMenu() + hasPaid = false + + TriggerEvent('esx_skin:openRestrictedMenu', function(data, menu) + menu.close() + + local elements = { + {unselectable = true, icon = "fas fa-check-double", title = TranslateCap("valid_this_purchase")}, + {icon = "fas fa-check-circle", title = TranslateCap("yes"), value = "yes"}, + {icon = "fas fa-window-close", title = TranslateCap("no"), value = "no"}, + } + + ESX.OpenContext("right", elements, function(menu,element) + if element.value == "yes" then + ESX.TriggerServerCallback('esx_clotheshop:buyClothes', function(bought) + if bought then + TriggerEvent('skinchanger:getSkin', function(skin) + TriggerServerEvent('esx_skin:save', skin) + end) + + hasPaid = true + ESX.TriggerServerCallback('esx_clotheshop:checkPropertyDataStore', function(foundStore) + if foundStore then + local elements2 = { + {unselectable = true, icon = "fas fa-check-double", title = TranslateCap('save_in_dressing')}, + {icon = "fas fa-check-circle", title = TranslateCap("yes"), value = "yes"}, + {icon = "fas fa-window-close", title = TranslateCap("no"), value = "no"}, + } + + ESX.OpenContext("right", elements2, function(menu2,element2) + if element2.value == "yes" then + local elements3 = { + {unselectable = true, icon = "fas fa-shirt", title = TranslateCap('name_outfit')}, + {title = "Outfit Name", input = true, inputType = "text", inputPlaceholder = "Outfit name in wardrobe.."}, + {icon = "fas fa-check-circle", title = "Confirm", value = "confirm"} + } + + ESX.OpenContext("right", elements3, function(menu3,element3) + TriggerEvent('skinchanger:getSkin', function(skin) + ESX.CloseContext() + TriggerServerEvent('esx_clotheshop:saveOutfit', menu3.eles[2].inputValue, skin) + ESX.ShowNotification(TranslateCap('saved_outfit')) + end) + end) + elseif element2.value == "no" then + ESX.CloseContext() + end + end) + end + end) + else + ESX.CloseContext() + ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin) + TriggerEvent('skinchanger:loadSkin', skin) + end) + ESX.ShowNotification(TranslateCap('not_enough_money')) + end + end) + elseif element.value == "no" then + ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin) + TriggerEvent('skinchanger:loadSkin', skin) + end) + ESX.CloseContext() + end + currentAction = 'shop_menu' + currentActionMsg = TranslateCap('press_menu') + currentActionData = {} + end, function(menu) + currentAction = 'shop_menu' + currentActionMsg = TranslateCap('press_menu') + currentActionData = {} + end) + + end, function(data, menu) + menu.close() + + currentAction = 'shop_menu' + currentActionMsg = TranslateCap('press_menu') + currentActionData = {} + end, { + 'tshirt_1', 'tshirt_2', + 'torso_1', 'torso_2', + 'decals_1', 'decals_2', + 'arms', 'arms_2', + 'pants_1', 'pants_2', + 'shoes_1', 'shoes_2', + 'bags_1', 'bags_2', + 'chain_1', 'chain_2', + 'helmet_1', 'helmet_2', + 'glasses_1', 'glasses_2' + }) +end + +AddEventHandler('esx_clotheshop:hasEnteredMarker', function(zone) + currentAction = 'shop_menu' + currentActionMsg = TranslateCap('press_menu') + currentActionData = {} +end) + +AddEventHandler('esx_clotheshop:hasExitedMarker', function(zone) + ESX.CloseContext() + currentAction = nil + + if not hasPaid then + ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin) + TriggerEvent('skinchanger:loadSkin', skin) + end) + end +end) + +-- Create Blips +CreateThread(function() + for k,v in ipairs(Config.Shops) do + local blip = AddBlipForCoord(v) + + SetBlipSprite (blip, 73) + SetBlipColour (blip, 47) + SetBlipAsShortRange(blip, true) + + BeginTextCommandSetBlipName('STRING') + AddTextComponentSubstringPlayerName(TranslateCap('clothes')) + EndTextCommandSetBlipName(blip) + end +end) + +-- Enter / Exit marker events & draw markers +CreateThread(function() + while true do + Wait(0) + local playerCoords, isInMarker, currentZone, letSleep = GetEntityCoords(PlayerPedId()), false, nil, true + + for k,v in pairs(Config.Shops) do + local distance = #(playerCoords - v) + + if distance < Config.DrawDistance then + letSleep = false + DrawMarker(Config.MarkerType, v, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Config.MarkerSize.x, Config.MarkerSize.y, Config.MarkerSize.z, Config.MarkerColor.r, Config.MarkerColor.g, Config.MarkerColor.b, 100, false, true, 2, false, nil, nil, false) + + if distance < Config.MarkerSize.x then + isInMarker, currentZone = true, k + end + end + end + + if (isInMarker and not hasAlreadyEnteredMarker) or (isInMarker and lastZone ~= currentZone) then + hasAlreadyEnteredMarker, lastZone = true, currentZone + TriggerEvent('esx_clotheshop:hasEnteredMarker', currentZone) + end + + if not isInMarker and hasAlreadyEnteredMarker then + hasAlreadyEnteredMarker = false + TriggerEvent('esx_clotheshop:hasExitedMarker', lastZone) + end + + if letSleep then + Wait(500) + end + end +end) + +-- Key controls +CreateThread(function() + while true do + Wait(0) + + if currentAction then + ESX.ShowHelpNotification(currentActionMsg) + + if IsControlJustReleased(0, 38) then + if currentAction == 'shop_menu' then + OpenShopMenu() + end + + currentAction = nil + end + else + Wait(500) + end + end +end) diff --git a/[esx_addons]/esx_clotheshop/config.lua b/[esx_addons]/esx_clotheshop/config.lua new file mode 100644 index 00000000..976431e9 --- /dev/null +++ b/[esx_addons]/esx_clotheshop/config.lua @@ -0,0 +1,26 @@ +Config = {} +Config.Locale = GetConvar('esx:locale', 'en') + +Config.Price = 250 + +Config.DrawDistance = 10.0 +Config.MarkerSize = {x = 1.5, y = 1.5, z = 1.0} +Config.MarkerColor = {r = 102, g = 102, b = 204} +Config.MarkerType = 1 + +Config.Shops = { + vector3(72.3, -1399.1, 28.4), + vector3(-703.8, -152.3, 36.4), + vector3(-167.9, -299.0, 38.7), + vector3(428.7, -800.1, 28.5), + vector3(-829.4, -1073.7, 10.3), + vector3(-1447.8, -242.5, 48.8), + vector3(11.6, 6514.2, 30.9), + vector3(123.6, -219.4, 53.6), + vector3(1696.3, 4829.3, 41.1), + vector3(618.1, 2759.6, 41.1), + vector3(1190.6, 2713.4, 37.2), + vector3(-1193.4, -772.3, 16.3), + vector3(-3172.5, 1048.1, 19.9), + vector3(-1108.4, 2708.9, 18.1) +} diff --git a/[esx_addons]/esx_clotheshop/fxmanifest.lua b/[esx_addons]/esx_clotheshop/fxmanifest.lua new file mode 100644 index 00000000..32961b82 --- /dev/null +++ b/[esx_addons]/esx_clotheshop/fxmanifest.lua @@ -0,0 +1,29 @@ +fx_version 'adamant' + +game 'gta5' + +description 'ESX Clothes Shop' + +version '1.9.0' +lua54 'yes' +shared_script '@es_extended/imports.lua' + +server_scripts { + '@oxmysql/lib/MySQL.lua', + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'server/main.lua' +} + +client_scripts { + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'client/main.lua' +} + +dependencies { + 'es_extended', + 'esx_skin' +} diff --git a/[esx_addons]/esx_clotheshop/locales/br.lua b/[esx_addons]/esx_clotheshop/locales/br.lua new file mode 100644 index 00000000..14680720 --- /dev/null +++ b/[esx_addons]/esx_clotheshop/locales/br.lua @@ -0,0 +1,12 @@ +Locales['br'] = { + ['valid_this_purchase'] = 'validar esta compra?', + ['yes'] = 'sim', + ['no'] = 'não', + ['not_enough_money'] = 'você não tem dinheiro suficiente', + ['press_menu'] = 'pressione [E] para acessar o menu', + ['clothes'] = 'roupas', + ['you_paid'] = 'você pagou $%s', + ['save_in_dressing'] = 'você quer salvar essa roupa?', + ['name_outfit'] = 'nome da roupa?', + ['saved_outfit'] = 'roupa salva', +} \ No newline at end of file diff --git a/[esx_addons]/esx_clotheshop/locales/de.lua b/[esx_addons]/esx_clotheshop/locales/de.lua new file mode 100644 index 00000000..417f8d8f --- /dev/null +++ b/[esx_addons]/esx_clotheshop/locales/de.lua @@ -0,0 +1,12 @@ +Locales['de'] = { + ['valid_this_purchase'] = 'Einkauf bestätigen?', + ['yes'] = 'ja', + ['no'] = 'nein', + ['not_enough_money'] = 'Du hast nicht genug Geld', + ['press_menu'] = 'Drücke [E] um das Menü zu öffnen', + ['clothes'] = 'Kleidung', + ['you_paid'] = 'Du bezahlst $%s', + ['save_in_dressing'] = 'Wollen sie das Outfit in ihrer Garderobe speichern?', + ['name_outfit'] = 'Name des outfits?', + ['saved_outfit'] = 'Das outfit wurde gespeichert', +} \ No newline at end of file diff --git a/[esx_addons]/esx_clotheshop/locales/en.lua b/[esx_addons]/esx_clotheshop/locales/en.lua new file mode 100644 index 00000000..0e3e9d6b --- /dev/null +++ b/[esx_addons]/esx_clotheshop/locales/en.lua @@ -0,0 +1,12 @@ +Locales['en'] = { + ['valid_this_purchase'] = 'validate this purchase?', + ['yes'] = 'yes', + ['no'] = 'no', + ['not_enough_money'] = 'you do not have enough money', + ['press_menu'] = 'press [E] to access the Clothing Shop.', + ['clothes'] = 'clothing Shop', + ['you_paid'] = 'you paid $%s', + ['save_in_dressing'] = 'do you want to save the outfit in your property?', + ['name_outfit'] = 'name your outfit', + ['saved_outfit'] = 'the outfit has been saved!', +} \ No newline at end of file diff --git a/[esx_addons]/esx_clotheshop/locales/es.lua b/[esx_addons]/esx_clotheshop/locales/es.lua new file mode 100644 index 00000000..6705e5d8 --- /dev/null +++ b/[esx_addons]/esx_clotheshop/locales/es.lua @@ -0,0 +1,12 @@ +Locales['es'] = { + ['valid_this_purchase'] = '¿Validar esta compra?', + ['yes'] = 'Si', + ['no'] = 'No', + ['not_enough_money'] = 'No tienes suficiente dinero', + ['press_menu'] = 'Presiona [E] para acceder al menú', + ['clothes'] = 'Ropa', + ['you_paid'] = 'Has pagado €%s', + ['save_in_dressing'] = '¿Quieres darle un nombre a tu vestuario?', + ['name_outfit'] = 'nombre del traje?', + ['saved_outfit'] = '¡El atuendo se ha guardado!', +} diff --git a/[esx_addons]/esx_clotheshop/locales/et.lua b/[esx_addons]/esx_clotheshop/locales/et.lua new file mode 100644 index 00000000..1102bea5 --- /dev/null +++ b/[esx_addons]/esx_clotheshop/locales/et.lua @@ -0,0 +1,12 @@ +Locales['et'] = { + ['valid_this_purchase'] = 'Kinnita see ost?', + ['yes'] = 'jah', + ['no'] = 'Ei', + ['not_enough_money'] = 'Sul pole piisavalt raha', + ['press_menu'] = 'Vajuta [E], et avada riidepood.', + ['clothes'] = 'Riidepood', + ['you_paid'] = 'Sa maksid $%s', + ['save_in_dressing'] = 'Kas soovite sellist paari riideid ka enda korteri?', + ['name_outfit'] = 'Pane riietusele nimi', + ['saved_outfit'] = 'Riietus salvestatud!', +} diff --git a/[esx_addons]/esx_clotheshop/locales/fi.lua b/[esx_addons]/esx_clotheshop/locales/fi.lua new file mode 100644 index 00000000..ff729c9d --- /dev/null +++ b/[esx_addons]/esx_clotheshop/locales/fi.lua @@ -0,0 +1,12 @@ +Locales['fi'] = { + ['valid_this_purchase'] = 'varmista tämä ostos?', + ['yes'] = 'kyllä', + ['no'] = 'ei', + ['not_enough_money'] = 'sinulla ei ole tarpeeksi rahaa', + ['press_menu'] = 'paina [E] avataksesi menu', + ['clothes'] = 'vaatekauppa', + ['you_paid'] = 'sinä maksoit $%s', + ['save_in_dressing'] = 'haluatko antaa nimen asulle ?', + ['name_outfit'] = 'asun nimi?', + ['saved_outfit'] = 'the outfit has been saved!', +} \ No newline at end of file diff --git a/[esx_addons]/esx_clotheshop/locales/fr.lua b/[esx_addons]/esx_clotheshop/locales/fr.lua new file mode 100644 index 00000000..dfe6931b --- /dev/null +++ b/[esx_addons]/esx_clotheshop/locales/fr.lua @@ -0,0 +1,12 @@ +Locales['fr'] = { + ['valid_this_purchase'] = 'valider cet achat ?', + ['yes'] = 'oui', + ['no'] = 'non', + ['not_enough_money'] = 'vous n\'avez pas assez d\'argent', + ['press_menu'] = 'appuyez sur [E] pour accéder au menu', + ['clothes'] = 'vêtements', + ['you_paid'] = 'vous avez payé $%s', + ['save_in_dressing'] = 'voulez-vous donner un nom à votre tenue?', + ['name_outfit'] = 'nom de la tenue?', + ['saved_outfit'] = 'la tenue a été sauvegardée !', +} diff --git a/[esx_addons]/esx_clotheshop/locales/hu.lua b/[esx_addons]/esx_clotheshop/locales/hu.lua new file mode 100644 index 00000000..daf3f0be --- /dev/null +++ b/[esx_addons]/esx_clotheshop/locales/hu.lua @@ -0,0 +1,12 @@ +Locales["hu"] = { + ["valid_this_purchase"] = "Megerősíted a vásárlást?", + ["yes"] = "igen", + ["no"] = "nem", + ["not_enough_money"] = "Nincs elég pénzed", + ["press_menu"] = "Nyomd meg a [E] gombot a Ruhabolt megnyitásához.", + ["clothes"] = "ruhabolt", + ["you_paid"] = "fizettél %s$-t", + ["save_in_dressing"] = "Menteni szeretnéd a ruhát az ingatlanodban?", + ["name_outfit"] = "Ruha neve", + ["saved_outfit"] = "Ruha mentésre került!", +} diff --git a/[esx_addons]/esx_clotheshop/locales/it.lua b/[esx_addons]/esx_clotheshop/locales/it.lua new file mode 100644 index 00000000..116eb6a8 --- /dev/null +++ b/[esx_addons]/esx_clotheshop/locales/it.lua @@ -0,0 +1,12 @@ +Locales['it'] = { + ['valid_this_purchase'] = 'Convalidare questo acquisto?', + ['yes'] = 'Si', + ['no'] = 'No', + ['not_enough_money'] = 'Non hai abbastanza soldi', + ['press_menu'] = 'Premere [E] per accedere al menu', + ['clothes'] = 'Vestiario', + ['you_paid'] = 'Hai pagato €%s', + ['save_in_dressing'] = 'Vuoi dare un nome al tuo guardaroba?', + ['name_outfit'] = 'nome del costume?', + ['saved_outfit'] = 'L abito è stato salvato!', +} diff --git a/[esx_addons]/esx_clotheshop/locales/nl.lua b/[esx_addons]/esx_clotheshop/locales/nl.lua new file mode 100644 index 00000000..14989059 --- /dev/null +++ b/[esx_addons]/esx_clotheshop/locales/nl.lua @@ -0,0 +1,12 @@ +Locales['nl'] = { + ['valid_this_purchase'] = 'bevestig deze aankoop?', + ['yes'] = 'ja', + ['no'] = 'nee', + ['not_enough_money'] = 'je hebt niet genoeg geld', + ['press_menu'] = 'klik op [E] om de kleding winkel te bezoeken.', + ['clothes'] = 'kleding winkel', + ['you_paid'] = 'je betaalde $%s', + ['save_in_dressing'] = 'wil je deze outfit opslaan in je garderobe?', + ['name_outfit'] = 'geef je outfit een naam', + ['saved_outfit'] = 'je outfit is opgeslagen.', +} diff --git a/[esx_addons]/esx_clotheshop/locales/pl.lua b/[esx_addons]/esx_clotheshop/locales/pl.lua new file mode 100644 index 00000000..50869f1a --- /dev/null +++ b/[esx_addons]/esx_clotheshop/locales/pl.lua @@ -0,0 +1,12 @@ +Locales['pl'] = { + ['valid_this_purchase'] = 'potwierdzić ten zakup?', + ['yes'] = 'tak', + ['no'] = 'nie', + ['not_enough_money'] = 'nie masz wystarczająco pieniędzy', + ['press_menu'] = 'naciśnij [E] aby uzyskać dostęp do menu.', + ['clothes'] = 'ubranie', + ['you_paid'] = 'płacisz %s $', + ['save_in_dressing'] = 'czy chcesz zapisać te ubranie w swojej posiadłości?', + ['name_outfit'] = 'nazwij swój strój', + ['saved_outfit'] = 'strój został zapisany!', +} \ No newline at end of file diff --git a/[esx_addons]/esx_clotheshop/locales/si.lua b/[esx_addons]/esx_clotheshop/locales/si.lua new file mode 100644 index 00000000..682d6918 --- /dev/null +++ b/[esx_addons]/esx_clotheshop/locales/si.lua @@ -0,0 +1,12 @@ +Locales['si'] = { + ['valid_this_purchase'] = 'potrdi ta nakup?', + ['yes'] = 'da', + ['no'] = 'no', + ['not_enough_money'] = 'nimate dovolj denarja', + ['press_menu'] = 'pritisnite [E] za dostop do Clothing Shop.', + ['clothes'] = 'trgovina z oblačili', + ['you_paid'] = 'plačal si $%s', + ['save_in_dressing'] = 'ali želite oblačila shraniti v svojo lastnino?', + ['name_outfit'] = 'poimenuj svojo obleko', + ['saved_outfit'] = 'obleka je shranjena!', +} diff --git a/[esx_addons]/esx_clotheshop/locales/sv.lua b/[esx_addons]/esx_clotheshop/locales/sv.lua new file mode 100644 index 00000000..695ae212 --- /dev/null +++ b/[esx_addons]/esx_clotheshop/locales/sv.lua @@ -0,0 +1,12 @@ +Locales['sv'] = { + ['valid_this_purchase'] = 'vill du köpa dessa kläder?', + ['yes'] = 'ja', + ['no'] = 'nej', + ['not_enough_money'] = 'du har ~r~inte råd för att köpa detta', + ['press_menu'] = 'tryck [E] för att öppna klädesaffären.', + ['clothes'] = 'klädesaffär', + ['you_paid'] = 'du har betalat $%s', + ['save_in_dressing'] = 'vill du spara outfiten i din fastighet?', + ['name_outfit'] = 'vad ska din outfit heta?', + ['saved_outfit'] = 'outfit har sparats!', +} \ No newline at end of file diff --git a/[esx_addons]/esx_clotheshop/server/main.lua b/[esx_addons]/esx_clotheshop/server/main.lua new file mode 100644 index 00000000..c6f3cadc --- /dev/null +++ b/[esx_addons]/esx_clotheshop/server/main.lua @@ -0,0 +1,43 @@ +RegisterServerEvent('esx_clotheshop:saveOutfit') +AddEventHandler('esx_clotheshop:saveOutfit', function(label, skin) + local xPlayer = ESX.GetPlayerFromId(source) + + TriggerEvent('esx_datastore:getDataStore', 'property', xPlayer.identifier, function(store) + local dressing = store.get('dressing') + + if dressing == nil then + dressing = {} + end + + table.insert(dressing, { + label = label, + skin = skin + }) + + store.set('dressing', dressing) + store.save() + end) +end) + +ESX.RegisterServerCallback('esx_clotheshop:buyClothes', function(source, cb) + local xPlayer = ESX.GetPlayerFromId(source) + + if xPlayer.getMoney() >= Config.Price then + xPlayer.removeMoney(Config.Price, "Outfit Purchase") + TriggerClientEvent('esx:showNotification', source, TranslateCap('you_paid', Config.Price)) + cb(true) + else + cb(false) + end +end) + +ESX.RegisterServerCallback('esx_clotheshop:checkPropertyDataStore', function(source, cb) + local xPlayer = ESX.GetPlayerFromId(source) + local foundStore = false + + TriggerEvent('esx_datastore:getDataStore', 'property', xPlayer.identifier, function(store) + foundStore = true + end) + + cb(foundStore) +end) diff --git a/[esx_addons]/esx_cruisecontrol/.editorconfig b/[esx_addons]/esx_cruisecontrol/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_cruisecontrol/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_cruisecontrol/LICENSE b/[esx_addons]/esx_cruisecontrol/LICENSE new file mode 100644 index 00000000..bde4f52b --- /dev/null +++ b/[esx_addons]/esx_cruisecontrol/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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. + + async + Copyright (C) 2015-2023 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 . + +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: + + async Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_cruisecontrol/README.md b/[esx_addons]/esx_cruisecontrol/README.md new file mode 100644 index 00000000..6dc3ccd4 --- /dev/null +++ b/[esx_addons]/esx_cruisecontrol/README.md @@ -0,0 +1,13 @@ +

[ESX] Cruise Control

Discord - Website - Documentation + +# Legal + +esx_cruisecontrol - relaxing driving + +Copyright (C) 2015-2023 ESX-Framework + +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/. diff --git a/[esx_addons]/esx_cruisecontrol/client/main.lua b/[esx_addons]/esx_cruisecontrol/client/main.lua new file mode 100644 index 00000000..83812177 --- /dev/null +++ b/[esx_addons]/esx_cruisecontrol/client/main.lua @@ -0,0 +1,77 @@ +local CruisedSpeed, CruisedSpeedKm, VehicleVectorY = 0, 0, 0 + +RegisterCommand("cruise", function(src) + if IsDriver() then + TriggerCruiseControl() + end +end) + +RegisterKeyMapping("cruise", "Enable Cruise Control", "keyboard",Config.ToggleKey) + +function TriggerCruiseControl() + if CruisedSpeed == 0 and IsDriving() then + if GetVehicleSpeed() > 0 and GetVehicleCurrentGear(GetVehicle()) > 0 then + CruisedSpeed = GetVehicleSpeed() + CruisedSpeedKm = TransformToKm(CruisedSpeed) + + ESX.ShowNotification(TranslateCap('activated') .. ': ' .. CruisedSpeedKm .. ' km/h') + + CreateThread(function () + while CruisedSpeed > 0 and IsInVehicle() == PlayerPedId() do + Wait(0) + + if not IsTurningOrHandBraking() and GetVehicleSpeed() < (CruisedSpeed - 1.5) then + CruisedSpeed = 0 + ESX.ShowNotification(TranslateCap('deactivated')) + Wait(2000) + break + end + + if not IsTurningOrHandBraking() and IsVehicleOnAllWheels(GetVehicle()) and GetVehicleSpeed() < CruisedSpeed then + SetVehicleForwardSpeed(GetVehicle(), CruisedSpeed) + end + + if IsControlJustPressed(1, 246) then + CruisedSpeed = GetVehicleSpeed() + CruisedSpeedKm = TransformToKm(CruisedSpeed) + end + + if IsControlJustPressed(2, 72) then + CruisedSpeed = 0 + ESX.ShowNotification(TranslateCap('deactivated')) + Wait(2000) + break + end + end + end) + end + end +end + +function IsTurningOrHandBraking () + return IsControlPressed(2, 76) or IsControlPressed(2, 63) or IsControlPressed(2, 64) +end + +function IsDriving () + return IsPedInAnyVehicle(PlayerPedId(), false) +end + +function GetVehicle () + return GetVehiclePedIsIn(PlayerPedId(), false) +end + +function IsInVehicle () + return GetPedInVehicleSeat(GetVehicle(), -1) +end + +function IsDriver () + return GetPedInVehicleSeat(GetVehiclePedIsIn(PlayerPedId(), false), -1) +end + +function GetVehicleSpeed () + return GetEntitySpeed(GetVehicle()) +end + +function TransformToKm (speed) + return math.floor(speed * 3.6 + 0.5) +end diff --git a/[esx_addons]/esx_cruisecontrol/config.lua b/[esx_addons]/esx_cruisecontrol/config.lua new file mode 100644 index 00000000..b5c9d8f1 --- /dev/null +++ b/[esx_addons]/esx_cruisecontrol/config.lua @@ -0,0 +1,4 @@ +Config = {} +Config.Locale = GetConvar('esx:locale', 'en') + +Config.ToggleKey = "CAPITAL" diff --git a/[esx_addons]/esx_cruisecontrol/fxmanifest.lua b/[esx_addons]/esx_cruisecontrol/fxmanifest.lua new file mode 100644 index 00000000..22c0c842 --- /dev/null +++ b/[esx_addons]/esx_cruisecontrol/fxmanifest.lua @@ -0,0 +1,19 @@ +fx_version 'adamant' + +game 'gta5' + +description 'CruiseControl System for ESX' + +version '1.9.0' +lua54 'yes' +dependencies { + 'es_extended' +} + +client_scripts { + '@es_extended/imports.lua', + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'client/main.lua' +} diff --git a/[esx_addons]/esx_cruisecontrol/locales/de.lua b/[esx_addons]/esx_cruisecontrol/locales/de.lua new file mode 100644 index 00000000..01c5d918 --- /dev/null +++ b/[esx_addons]/esx_cruisecontrol/locales/de.lua @@ -0,0 +1,4 @@ +Locales['de'] = { + ['activated'] = 'Aktivieren', + ['deactivated'] = 'Deaktivieren', +} \ No newline at end of file diff --git a/[esx_addons]/esx_cruisecontrol/locales/en.lua b/[esx_addons]/esx_cruisecontrol/locales/en.lua new file mode 100644 index 00000000..6420075b --- /dev/null +++ b/[esx_addons]/esx_cruisecontrol/locales/en.lua @@ -0,0 +1,4 @@ +Locales['en'] = { + ['activated'] = 'activated', + ['deactivated'] = 'deactivated', +} diff --git a/[esx_addons]/esx_cruisecontrol/locales/es.lua b/[esx_addons]/esx_cruisecontrol/locales/es.lua new file mode 100644 index 00000000..e49c184a --- /dev/null +++ b/[esx_addons]/esx_cruisecontrol/locales/es.lua @@ -0,0 +1,4 @@ +Locales['es'] = { + ['activated'] = 'Activado', + ['deactivated'] = 'Desactivado', +} diff --git a/[esx_addons]/esx_cruisecontrol/locales/fi.lua b/[esx_addons]/esx_cruisecontrol/locales/fi.lua new file mode 100644 index 00000000..0d754aba --- /dev/null +++ b/[esx_addons]/esx_cruisecontrol/locales/fi.lua @@ -0,0 +1,4 @@ +Locales['fi'] = { + ['activated'] = 'aktivoitu', + ['deactivated'] = 'sammutettu', +} diff --git a/[esx_addons]/esx_cruisecontrol/locales/fr.lua b/[esx_addons]/esx_cruisecontrol/locales/fr.lua new file mode 100644 index 00000000..5d89d1a8 --- /dev/null +++ b/[esx_addons]/esx_cruisecontrol/locales/fr.lua @@ -0,0 +1,4 @@ +Locales['fr'] = { + ['activated'] = 'activé', + ['deactivated'] = 'désactivé', +} diff --git a/[esx_addons]/esx_cruisecontrol/locales/ge.lua b/[esx_addons]/esx_cruisecontrol/locales/ge.lua new file mode 100644 index 00000000..c7f55a73 --- /dev/null +++ b/[esx_addons]/esx_cruisecontrol/locales/ge.lua @@ -0,0 +1,4 @@ +Locales['ge'] = { + ['activated'] = 'aktiviert', + ['deactivated'] = 'deaktiviert', +} diff --git a/[esx_addons]/esx_cruisecontrol/locales/hu.lua b/[esx_addons]/esx_cruisecontrol/locales/hu.lua new file mode 100644 index 00000000..7a892f66 --- /dev/null +++ b/[esx_addons]/esx_cruisecontrol/locales/hu.lua @@ -0,0 +1,4 @@ +Locales['hu'] = { + ['activated'] = 'Bekapcsolva', + ['deactivated'] = 'Kikapcsolva', +} diff --git a/[esx_addons]/esx_cruisecontrol/locales/it.lua b/[esx_addons]/esx_cruisecontrol/locales/it.lua new file mode 100644 index 00000000..cb7a3129 --- /dev/null +++ b/[esx_addons]/esx_cruisecontrol/locales/it.lua @@ -0,0 +1,4 @@ +Locales['it'] = { + ['activated'] = 'attivato', + ['deactivated'] = 'disattivato', +} diff --git a/[esx_addons]/esx_cruisecontrol/locales/nl.lua b/[esx_addons]/esx_cruisecontrol/locales/nl.lua new file mode 100644 index 00000000..555e377c --- /dev/null +++ b/[esx_addons]/esx_cruisecontrol/locales/nl.lua @@ -0,0 +1,4 @@ +Locales['nl'] = { + ['activated'] = 'geactiveerd', + ['deactivated'] = 'gedeactiveerd', +} diff --git a/[esx_addons]/esx_cruisecontrol/locales/pl.lua b/[esx_addons]/esx_cruisecontrol/locales/pl.lua new file mode 100644 index 00000000..4dee11bb --- /dev/null +++ b/[esx_addons]/esx_cruisecontrol/locales/pl.lua @@ -0,0 +1,4 @@ +Locales['pl'] = { + ['activated'] = 'aktywowano', + ['deactivated'] = 'dezaktywano', +} diff --git a/[esx_addons]/esx_cruisecontrol/locales/si.lua b/[esx_addons]/esx_cruisecontrol/locales/si.lua new file mode 100644 index 00000000..ddfd5db7 --- /dev/null +++ b/[esx_addons]/esx_cruisecontrol/locales/si.lua @@ -0,0 +1,4 @@ +Locales['si'] = { + ['activated'] = 'Aktivirano', + ['deactivated'] = 'Deaktivirano', +} diff --git a/[esx_addons]/esx_datastore/.editorconfig b/[esx_addons]/esx_datastore/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_datastore/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_datastore/LICENSE b/[esx_addons]/esx_datastore/LICENSE new file mode 100644 index 00000000..2c5acd2b --- /dev/null +++ b/[esx_addons]/esx_datastore/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_datastore + Copyright (C) 2015-2023 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 . + +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_datastore Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_datastore/README.md b/[esx_addons]/esx_datastore/README.md new file mode 100644 index 00000000..0ffe8a85 --- /dev/null +++ b/[esx_addons]/esx_datastore/README.md @@ -0,0 +1,43 @@ +

[ESX] Data Store

Discord - Website - Documentation + +A simple script for storing data :) + +# Usage + +There are two types of datastores: shared and not shared. + +- Shared datastores does not belong to a specific user, Example: police armory +- None-shared datastores are created for every user in the server. They are created in db when player is loaded, Example: property (weapons, dressing). + +## `datastore` database information + +An datastore must be configured in the database before using it. Don't forget to run a server restart afterwards (you can alternative restart the script and relog all clients) + +| `name` | `label` | `shared` | +| -------- | ------- | -------- | +| name of the datastore | label of the datastore (not used) | is the datastore shared with others? (boolean either `0` or `1`) | + +```lua +TriggerEvent('esx_datastore:getSharedDataStore', 'police', function(store) + local weapons = store.get('weapons') or {} + + table.insert(weapons, {name = 'WEAPON_PUMPSHOTGUN', ammo = 50}) + store.set('weapons', weapons) +end) + +TriggerEvent('esx_datastore:getDataStore', 'property', 'steam:0123456789', function(store) + local dressing = store.get('dressing') or {} +end) +``` + +# Legal + +esx_datastore - Datastore for ESX-Framework + +Copyright (C) 2015-2023 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/. diff --git a/[esx_addons]/esx_datastore/esx_datastore.sql b/[esx_addons]/esx_datastore/esx_datastore.sql new file mode 100644 index 00000000..d6382413 --- /dev/null +++ b/[esx_addons]/esx_datastore/esx_datastore.sql @@ -0,0 +1,22 @@ + + +CREATE TABLE `datastore` ( + `name` VARCHAR(60) NOT NULL, + `label` VARCHAR(100) NOT NULL, + `shared` INT NOT NULL, + + PRIMARY KEY (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `datastore_data` ( + `id` INT NOT NULL AUTO_INCREMENT, + `name` VARCHAR(60) NOT NULL, + `owner` VARCHAR(60), + `data` LONGTEXT, + + PRIMARY KEY (`id`), + UNIQUE INDEX `index_datastore_data_name_owner` (`name`, `owner`), + INDEX `index_datastore_data_name` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + diff --git a/[esx_addons]/esx_datastore/fxmanifest.lua b/[esx_addons]/esx_datastore/fxmanifest.lua new file mode 100644 index 00000000..a97a7e5d --- /dev/null +++ b/[esx_addons]/esx_datastore/fxmanifest.lua @@ -0,0 +1,14 @@ +fx_version 'adamant' + +game 'gta5' + +description 'ESX Data Store' +lua54 'yes' +version '1.9.0' + +server_scripts { + '@es_extended/imports.lua', + '@oxmysql/lib/MySQL.lua', + 'server/classes/datastore.lua', + 'server/main.lua' +} diff --git a/[esx_addons]/esx_datastore/server/classes/datastore.lua b/[esx_addons]/esx_datastore/server/classes/datastore.lua new file mode 100644 index 00000000..53711386 --- /dev/null +++ b/[esx_addons]/esx_datastore/server/classes/datastore.lua @@ -0,0 +1,81 @@ +function stringsplit(inputstr, sep) + if sep == nil then + sep = "%s" + end + + local t={} ; i=1 + for str in string.gmatch(inputstr, "([^"..sep.."]+)") do + t[i] = str + i = i + 1 + end + + return t +end + +function CreateDataStore(name, owner, data) + local self = {} + + self.name = name + self.owner = owner + self.data = type(data) == 'string' and json.decode(data) or data + + local timeoutCallbacks = {} + + function self.set(key, val) + data[key] = val + self.save() + end + + function self.get(key, i) + local path = stringsplit(key, '.') + local obj = self.data + + for i=1, #path, 1 do + obj = obj[path[i]] + end + + if i == nil then + return obj + else + return obj[i] + end + end + + function self.count(key, i) + local path = stringsplit(key, '.') + local obj = self.data + + for i=1, #path, 1 do + obj = obj[path[i]] + end + + if i ~= nil then + obj = obj[i] + end + + if obj == nil then + return 0 + else + return #obj + end + end + + function self.save() + for i=1, #timeoutCallbacks, 1 do + ESX.ClearTimeout(timeoutCallbacks[i]) + timeoutCallbacks[i] = nil + end + + local timeoutCallback = ESX.SetTimeout(10000, function() + if self.owner == nil then + MySQL.update('UPDATE datastore_data SET data = ? WHERE name = ?', {json.encode(self.data), self.name}) + else + MySQL.update('UPDATE datastore_data SET data = ? WHERE name = ? and owner = ?', {json.encode(self.data), self.name, self.owner}) + end + end) + + table.insert(timeoutCallbacks, timeoutCallback) + end + + return self +end diff --git a/[esx_addons]/esx_datastore/server/main.lua b/[esx_addons]/esx_datastore/server/main.lua new file mode 100644 index 00000000..fee17821 --- /dev/null +++ b/[esx_addons]/esx_datastore/server/main.lua @@ -0,0 +1,80 @@ +local DataStores, DataStoresIndex, SharedDataStores = {}, {}, {} + +AddEventHandler('onResourceStart', function(resourceName) + if resourceName == GetCurrentResourceName() then + local dataStore = MySQL.query.await('SELECT * FROM datastore_data LEFT JOIN datastore ON datastore_data.name = datastore.name UNION SELECT * FROM datastore_data RIGHT JOIN datastore ON datastore_data.name = datastore.name') + + local newData = {} + for i = 1, #dataStore do + local data = dataStore[i] + if data.shared == 0 then + if not DataStores[data.name] then + DataStoresIndex[#DataStoresIndex + 1] = data.name + DataStores[data.name] = {} + end + DataStores[data.name][#DataStores[data.name] + 1] = CreateDataStore(data.name, data.owner, json.decode(data.data)) + else + if data.data then + SharedDataStores[data.name] = CreateDataStore(data.name, nil, json.decode(data.data)) + else + newData[#newData + 1] = {data.name, '\'{}\''} + end + end + end + + if next(newData) then + MySQL.prepare('INSERT INTO datastore_data (name, data) VALUES (?, ?)', newData) + for i = 1, #newData do + local new = newData[i] + SharedDataStores[new[1]] = CreateDataStore(new[1], nil, {}) + end + end + end +end) + +function GetDataStore(name, owner) + for i=1, #DataStores[name], 1 do + if DataStores[name][i].owner == owner then + return DataStores[name][i] + end + end +end + +function GetDataStoreOwners(name) + local identifiers = {} + + for i=1, #DataStores[name], 1 do + table.insert(identifiers, DataStores[name][i].owner) + end + + return identifiers +end + +function GetSharedDataStore(name) + return SharedDataStores[name] +end + +AddEventHandler('esx_datastore:getDataStore', function(name, owner, cb) + cb(GetDataStore(name, owner)) +end) + +AddEventHandler('esx_datastore:getDataStoreOwners', function(name, cb) + cb(GetDataStoreOwners(name)) +end) + +AddEventHandler('esx_datastore:getSharedDataStore', function(name, cb) + cb(GetSharedDataStore(name)) +end) + +AddEventHandler('esx:playerLoaded', function(playerId, xPlayer) + for i=1, #DataStoresIndex, 1 do + local name = DataStoresIndex[i] + local dataStore = GetDataStore(name, xPlayer.identifier) + + if not dataStore then + MySQL.insert('INSERT INTO datastore_data (name, owner, data) VALUES (?, ?, ?)', {name, xPlayer.identifier, '{}'}) + + DataStores[name][#DataStores[name] + 1] = CreateDataStore(name, xPlayer.identifier, {}) + end + end +end) diff --git a/[esx_addons]/esx_dmvschool/.editorconfig b/[esx_addons]/esx_dmvschool/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_dmvschool/LICENSE b/[esx_addons]/esx_dmvschool/LICENSE new file mode 100644 index 00000000..15cc6189 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_dmvschool + Copyright (C) 2015-2023 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 . + +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_dmvschool Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_dmvschool/README.md b/[esx_addons]/esx_dmvschool/README.md new file mode 100644 index 00000000..785f2f58 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/README.md @@ -0,0 +1,15 @@ +

[ESX] DMV School

Discord - Website - Documentation + +Tired of waiting for your local DMV to be free so you can get your driving licence? well today is your day! This amazingly Realistic DMV schools allows you to sit a tough theory test and a Rage fueled , high-stakes Practial Driving Test for Cars, motocycles and Trucks, all from the comfort of FiveM! + +# Legal + +esx_dmvschool - realistic DMV school for ESX + +Copyright (C) 2015-2023 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 . diff --git a/[esx_addons]/esx_dmvschool/client/main.lua b/[esx_addons]/esx_dmvschool/client/main.lua new file mode 100644 index 00000000..1cbdce5d --- /dev/null +++ b/[esx_addons]/esx_dmvschool/client/main.lua @@ -0,0 +1,367 @@ +local CurrentAction = nil +local CurrentActionMsg = nil +local CurrentActionData = nil +local Licenses = {} +local CurrentTest = nil +local CurrentTestType = nil +local CurrentVehicle = nil +local CurrentCheckPoint, DriveErrors = 0, 0 +local LastCheckPoint = -1 +local CurrentBlip = nil +local CurrentZoneType = nil +local IsAboveSpeedLimit = false +local LastVehicleHealth = nil + +function DrawMissionText(msg, time) + ClearPrints() + BeginTextCommandPrint('STRING') + AddTextComponentSubstringPlayerName(msg) + EndTextCommandPrint(time, true) +end + +function StartTheoryTest() + CurrentTest = 'theory' + + SendNUIMessage({ + openQuestion = true + }) + + ESX.SetTimeout(200, function() + SetNuiFocus(true, true) + end) + + +end + +function StopTheoryTest(success) + CurrentTest = nil + + SendNUIMessage({ + openQuestion = false + }) + + SetNuiFocus(false) + + if success then + TriggerServerEvent('esx_dmvschool:addLicense', 'dmv') + ESX.ShowNotification(TranslateCap('passed_test')) + else + ESX.ShowNotification(TranslateCap('failed_test')) + end +end + +function StartDriveTest(type) + ESX.Game.SpawnVehicle(Config.VehicleModels[type], vector3(Config.Zones.VehicleSpawnPoint.Pos.x, Config.Zones.VehicleSpawnPoint.Pos.y, Config.Zones.VehicleSpawnPoint.Pos.z), Config.Zones.VehicleSpawnPoint.Pos.h, function(vehicle) + CurrentTest = 'drive' + CurrentTestType = type + CurrentCheckPoint = 0 + LastCheckPoint = -1 + CurrentZoneType = 'residence' + DriveErrors = 0 + IsAboveSpeedLimit = false + CurrentVehicle = vehicle + LastVehicleHealth = GetEntityHealth(vehicle) + + local playerPed = PlayerPedId() + TaskWarpPedIntoVehicle(playerPed, vehicle, -1) + SetVehicleFuelLevel(vehicle, 100.0) + DecorSetFloat(vehicle, "_FUEL_LEVEL", GetVehicleFuelLevel(vehicle)) + end) +end + +function StopDriveTest(success) + if success then + TriggerServerEvent('esx_dmvschool:addLicense', CurrentTestType) + ESX.ShowNotification(TranslateCap('passed_test')) + else + ESX.ShowNotification(TranslateCap('failed_test')) + end + + CurrentTest = nil + CurrentTestType = nil +end + +function SetCurrentZoneType(type) +CurrentZoneType = type +end + +function OpenDMVSchoolMenu() + local ownedLicenses = {} + + for i=1, #Licenses, 1 do + ownedLicenses[Licenses[i].type] = true + end + + local elements = { + {unselectable = true, icon = "fas fa-car", title = TranslateCap("driving_school")} + } + + if not ownedLicenses['dmv'] then + elements[#elements+1] = { + icon = "fas fa-car", + title = (('%s: %s'):format(TranslateCap('theory_test'), TranslateCap('school_item', ESX.Math.GroupDigits(Config.Prices['dmv'])))), + value = "theory_test" + } + end + + if ownedLicenses['dmv'] then + if not ownedLicenses['drive'] then + elements[#elements+1] = { + icon = "fas fa-car", + title = (('%s: %s'):format(TranslateCap('road_test_car'), TranslateCap('school_item', ESX.Math.GroupDigits(Config.Prices['drive'])))), + value = "drive_test", + type = "drive" + } + end + + if not ownedLicenses['drive_bike'] then + elements[#elements+1] = { + icon = "fas fa-car", + title = (('%s: %s'):format(TranslateCap('road_test_bike'), TranslateCap('school_item', ESX.Math.GroupDigits(Config.Prices['drive_bike'])))), + value = "drive_test", + type = "drive_bike" + } + end + + if not ownedLicenses['drive_truck'] then + elements[#elements+1] = { + icon = "fas fa-car", + title = (('%s: %s'):format(TranslateCap('road_test_truck'), TranslateCap('school_item', ESX.Math.GroupDigits(Config.Prices['drive_truck'])))), + value = "drive_test", + type = "drive_truck" + } + end + end + + ESX.OpenContext("right", elements, function(menu,element) + if element.value == "theory_test" then + ESX.TriggerServerCallback('esx_dmvschool:canYouPay', function(haveMoney) + if haveMoney then + ESX.CloseContext() + StartTheoryTest() + else + ESX.ShowNotification(TranslateCap('not_enough_money')) + end + end, 'dmv') + elseif element.value == "drive_test" then + ESX.TriggerServerCallback('esx_dmvschool:canYouPay', function(haveMoney) + if haveMoney then + ESX.CloseContext() + StartDriveTest(element.type) + else + ESX.ShowNotification(TranslateCap('not_enough_money')) + end + end, element.type) + end + end, function(menu) + CurrentAction = 'dmvschool_menu' + CurrentActionMsg = TranslateCap('press_open_menu') + CurrentActionData = {} + end) +end + +RegisterNUICallback('question', function(data, cb) + SendNUIMessage({ + openSection = 'question' + }) + + cb() +end) + +RegisterNUICallback('close', function(data, cb) + StopTheoryTest(true) + cb() +end) + +RegisterNUICallback('kick', function(data, cb) + StopTheoryTest(false) + cb() +end) + +AddEventHandler('esx_dmvschool:hasEnteredMarker', function(zone) + if zone == 'DMVSchool' then + CurrentAction = 'dmvschool_menu' + CurrentActionMsg = TranslateCap('press_open_menu') + CurrentActionData = {} + end +end) + +AddEventHandler('esx_dmvschool:hasExitedMarker', function(zone) + CurrentAction = nil + ESX.CloseContext() +end) + +RegisterNetEvent('esx_dmvschool:loadLicenses') +AddEventHandler('esx_dmvschool:loadLicenses', function(licenses) + Licenses = licenses +end) + +-- Create Blips +CreateThread(function() + local blip = AddBlipForCoord(Config.Zones.DMVSchool.Pos.x, Config.Zones.DMVSchool.Pos.y, Config.Zones.DMVSchool.Pos.z) + + SetBlipSprite (blip, 408) + SetBlipDisplay(blip, 4) + SetBlipScale (blip, 1.2) + SetBlipAsShortRange(blip, true) + + BeginTextCommandSetBlipName("STRING") + AddTextComponentSubstringPlayerName(TranslateCap('driving_school_blip')) + EndTextCommandSetBlipName(blip) +end) + +-- Display markers +CreateThread(function() + while true do + local sleep = 1500 + local playerPed = PlayerPedId() + local coords = GetEntityCoords(playerPed) + + for k,v in pairs(Config.Zones) do + local Pos = vector3(v.Pos.x, v.Pos.y, v.Pos.z) + if(v.Type ~= -1 and #(coords - Pos) < Config.DrawDistance) then + sleep = 0 + DrawMarker(v.Type, v.Pos.x, v.Pos.y, v.Pos.z, 0.0, 0.0, 0.0, 0, 0.0, 0.0, v.Size.x, v.Size.y, v.Size.z, v.Color.r, v.Color.g, v.Color.b, 100, false, true, 2, false, false, false, false) + end + end + + if CurrentTest == 'theory' then + + sleep = 0 + DisableControlAction(0, 1, true) -- LookLeftRight + DisableControlAction(0, 2, true) -- LookUpDown + DisablePlayerFiring(playerPed, true) -- Disable weapon firing + DisableControlAction(0, 142, true) -- MeleeAttackAlternate + DisableControlAction(0, 106, true) -- VehicleMouseControlOverride + end + + if CurrentTest == 'drive' then + sleep = 0 + local nextCheckPoint = CurrentCheckPoint + 1 + + if Config.CheckPoints[nextCheckPoint] == nil then + if DoesBlipExist(CurrentBlip) then + RemoveBlip(CurrentBlip) + end + + CurrentTest = nil + + ESX.ShowNotification(TranslateCap('driving_test_complete')) + + if DriveErrors < Config.MaxErrors then + StopDriveTest(true) + else + StopDriveTest(false) + end + else + if CurrentCheckPoint ~= LastCheckPoint then + if DoesBlipExist(CurrentBlip) then + RemoveBlip(CurrentBlip) + end + + CurrentBlip = AddBlipForCoord(Config.CheckPoints[nextCheckPoint].Pos.x, Config.CheckPoints[nextCheckPoint].Pos.y, Config.CheckPoints[nextCheckPoint].Pos.z) + SetBlipRoute(CurrentBlip, 1) + + LastCheckPoint = CurrentCheckPoint + end + + local Pos = vector3(Config.CheckPoints[nextCheckPoint].Pos.x,Config.CheckPoints[nextCheckPoint].Pos.y,Config.CheckPoints[nextCheckPoint].Pos.z) + local distance = #(coords - Pos) + + if distance <= Config.DrawDistance then + DrawMarker(1, Config.CheckPoints[nextCheckPoint].Pos.x, Config.CheckPoints[nextCheckPoint].Pos.y, Config.CheckPoints[nextCheckPoint].Pos.z, 0.0, 0.0, 0.0, 0, 0.0, 0.0, 1.5, 1.5, 1.5, 102, 204, 102, 100, false, true, 2, false, false, false, false) + end + + if distance <= 3.0 then + Config.CheckPoints[nextCheckPoint].Action(playerPed, CurrentVehicle, SetCurrentZoneType) + CurrentCheckPoint = CurrentCheckPoint + 1 + end + end + end + + if CurrentAction then + sleep = 0 + ESX.ShowHelpNotification(CurrentActionMsg) + + if (IsControlJustReleased(0, 38)) and (CurrentAction == 'dmvschool_menu') then + OpenDMVSchoolMenu() + CurrentAction = nil + end + end + + local isInMarker = false + local currentZone = nil + + for k,v in pairs(Config.Zones) do + local Pos = vector3(v.Pos.x, v.Pos.y, v.Pos.z) + if(#(coords - Pos) < v.Size.x) then + sleep = 0 + isInMarker = true + currentZone = k + end + end + + if (isInMarker and not HasAlreadyEnteredMarker) or (isInMarker and LastZone ~= currentZone) then + HasAlreadyEnteredMarker = true + LastZone = currentZone + TriggerEvent('esx_dmvschool:hasEnteredMarker', currentZone) + end + + if not isInMarker and HasAlreadyEnteredMarker then + HasAlreadyEnteredMarker = false + TriggerEvent('esx_dmvschool:hasExitedMarker', LastZone) + end + Wait(sleep) + end +end) + +-- Speed / Damage control +CreateThread(function() + while true do + local sleep = 1500 + + if CurrentTest == 'drive' then + sleep = 0 + local playerPed = PlayerPedId() + + if IsPedInAnyVehicle(playerPed, false) then + + local vehicle = GetVehiclePedIsIn(playerPed, false) + local speed = GetEntitySpeed(vehicle) * Config.SpeedMultiplier + local tooMuchSpeed = false + + for k,v in pairs(Config.SpeedLimits) do + if CurrentZoneType == k and speed > v then + tooMuchSpeed = true + + if not IsAboveSpeedLimit then + DriveErrors = DriveErrors + 1 + IsAboveSpeedLimit = true + + ESX.ShowNotification(TranslateCap('driving_too_fast', v)) + ESX.ShowNotification(TranslateCap('errors', DriveErrors, Config.MaxErrors)) + end + end + end + + if not tooMuchSpeed then + IsAboveSpeedLimit = false + end + + local health = GetEntityHealth(vehicle) + if health < LastVehicleHealth then + + DriveErrors = DriveErrors + 1 + + ESX.ShowNotification(TranslateCap('you_damaged_veh')) + ESX.ShowNotification(TranslateCap('errors', DriveErrors, Config.MaxErrors)) + + -- avoid stacking faults + LastVehicleHealth = health + Wait(1500) + end + end + end + Wait(sleep) + end +end) diff --git a/[esx_addons]/esx_dmvschool/config.lua b/[esx_addons]/esx_dmvschool/config.lua new file mode 100644 index 00000000..06c64ed4 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/config.lua @@ -0,0 +1,185 @@ +Config = {} +Config.DrawDistance = 10.0 +Config.MaxErrors = 5 +Config.SpeedMultiplier = 3.6 +Config.Locale = GetConvar('esx:locale', 'en') + +Config.Prices = { + dmv = 500, + drive = 2500, + drive_bike = 3000, + drive_truck = 5000 +} + +Config.VehicleModels = { + drive = 'blista', + drive_bike = 'sanchez', + drive_truck = 'mule3' +} + +Config.SpeedLimits = { + residence = 50, + town = 80, + freeway = 120 +} + +Config.Zones = { + + DMVSchool = { + Pos = {x = 239.471, y = -1380.960, z = 32.741}, + Size = {x = 1.5, y = 1.5, z = 1.0}, + Color = {r = 204, g = 204, b = 0}, + Type = 1 + }, + + VehicleSpawnPoint = { + Pos = {x = 249.409, y = -1407.230, z = 30.4094, h = 317.0}, + Size = {x = 1.5, y = 1.5, z = 1.0}, + Color = {r = 204, g = 204, b = 0}, + Type = -1 + } + +} + +Config.CheckPoints = { + + { + Pos = {x = 255.139, y = -1400.731, z = 29.537}, + Action = function(playerPed, vehicle, setCurrentZoneType) + DrawMissionText(TranslateCap('next_point_speed', Config.SpeedLimits['residence']), 5000) + end + }, + + { + Pos = {x = 271.874, y = -1370.574, z = 30.932}, + Action = function(playerPed, vehicle, setCurrentZoneType) + DrawMissionText(TranslateCap('go_next_point'), 5000) + end + }, + + { + Pos = {x = 234.907, y = -1345.385, z = 29.542}, + Action = function(playerPed, vehicle, setCurrentZoneType) + CreateThread(function() + DrawMissionText(TranslateCap('stop_for_ped'), 5000) + PlaySound(-1, 'RACE_PLACED', 'HUD_AWARDS', false, 0, true) + FreezeEntityPosition(vehicle, true) + Wait(4000) + + FreezeEntityPosition(vehicle, false) + DrawMissionText(TranslateCap('good_lets_cont'), 5000) + end) + end + }, + + { + Pos = {x = 217.821, y = -1410.520, z = 28.292}, + Action = function(playerPed, vehicle, setCurrentZoneType) + setCurrentZoneType('town') + + CreateThread(function() + DrawMissionText(TranslateCap('stop_look_left', Config.SpeedLimits['town']), 5000) + PlaySound(-1, 'RACE_PLACED', 'HUD_AWARDS', false, 0, true) + FreezeEntityPosition(vehicle, true) + Wait(6000) + + FreezeEntityPosition(vehicle, false) + DrawMissionText(TranslateCap('good_turn_right'), 5000) + end) + end + }, + + { + Pos = {x = 178.550, y = -1401.755, z = 27.725}, + Action = function(playerPed, vehicle, setCurrentZoneType) + DrawMissionText(TranslateCap('watch_traffic_lightson'), 5000) + end + }, + + { + Pos = {x = 113.160, y = -1365.276, z = 27.725}, + Action = function(playerPed, vehicle, setCurrentZoneType) + DrawMissionText(TranslateCap('go_next_point'), 5000) + end + }, + + { + Pos = {x = -73.542, y = -1364.335, z = 27.789}, + Action = function(playerPed, vehicle, setCurrentZoneType) + DrawMissionText(TranslateCap('stop_for_passing'), 5000) + PlaySound(-1, 'RACE_PLACED', 'HUD_AWARDS', false, 0, true) + FreezeEntityPosition(vehicle, true) + Wait(6000) + FreezeEntityPosition(vehicle, false) + end + }, + + { + Pos = {x = -355.143, y = -1420.282, z = 27.868}, + Action = function(playerPed, vehicle, setCurrentZoneType) + DrawMissionText(TranslateCap('go_next_point'), 5000) + end + }, + + { + Pos = {x = -439.148, y = -1417.100, z = 27.704}, + Action = function(playerPed, vehicle, setCurrentZoneType) + DrawMissionText(TranslateCap('go_next_point'), 5000) + end + }, + + { + Pos = {x = -453.790, y = -1444.726, z = 27.665}, + Action = function(playerPed, vehicle, setCurrentZoneType) + setCurrentZoneType('freeway') + + DrawMissionText(TranslateCap('hway_time', Config.SpeedLimits['freeway']), 5000) + PlaySound(-1, 'RACE_PLACED', 'HUD_AWARDS', false, 0, true) + end + }, + + { + Pos = {x = -463.237, y = -1592.178, z = 37.519}, + Action = function(playerPed, vehicle, setCurrentZoneType) + DrawMissionText(TranslateCap('go_next_point'), 5000) + end + }, + + { + Pos = {x = -900.647, y = -1986.28, z = 26.109}, + Action = function(playerPed, vehicle, setCurrentZoneType) + DrawMissionText(TranslateCap('go_next_point'), 5000) + end + }, + + { + Pos = {x = 1225.759, y = -1948.792, z = 38.718}, + Action = function(playerPed, vehicle, setCurrentZoneType) + DrawMissionText(TranslateCap('go_next_point'), 5000) + end + }, + + { + Pos = {x = 1225.759, y = -1948.792, z = 38.718}, + Action = function(playerPed, vehicle, setCurrentZoneType) + setCurrentZoneType('town') + DrawMissionText(TranslateCap('in_town_speed', Config.SpeedLimits['town']), 5000) + end + }, + + { + Pos = {x = 1163.603, y = -1841.771, z = 35.679}, + Action = function(playerPed, vehicle, setCurrentZoneType) + DrawMissionText(TranslateCap('gratz_stay_alert'), 5000) + PlaySound(-1, 'RACE_PLACED', 'HUD_AWARDS', false, 0, true) + end + }, + + { + Pos = {x = 235.283, y = -1398.329, z = 28.921}, + Action = function(playerPed, vehicle, setCurrentZoneType) + ESX.Game.DeleteVehicle(vehicle) + end + } + +} diff --git a/[esx_addons]/esx_dmvschool/esx_dmvschool.sql b/[esx_addons]/esx_dmvschool/esx_dmvschool.sql new file mode 100644 index 00000000..85257ab9 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/esx_dmvschool.sql @@ -0,0 +1,6 @@ +INSERT INTO `licenses` (`type`, `label`) VALUES + ('dmv', 'Code de la route'), + ('drive', 'Permis de conduire'), + ('drive_bike', 'Permis moto'), + ('drive_truck', 'Permis camion') +; \ No newline at end of file diff --git a/[esx_addons]/esx_dmvschool/fxmanifest.lua b/[esx_addons]/esx_dmvschool/fxmanifest.lua new file mode 100644 index 00000000..9d45cf22 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/fxmanifest.lua @@ -0,0 +1,40 @@ +fx_version 'adamant' + +game 'gta5' + +description 'ESX DMV School' +lua54 'yes' +version '1.9.0' + +shared_script '@es_extended/imports.lua' + +server_scripts { + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'server/main.lua' +} + +client_scripts { + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'client/main.lua' +} + +ui_page 'html/ui.html' + +files { + 'html/ui.html', + 'html/logo.png', + 'html/dmv.png', + 'html/styles.css', + 'html/questions.js', + 'html/scripts.js', + 'html/debounce.min.js' +} + +dependencies { + 'es_extended', + 'esx_license' +} diff --git a/[esx_addons]/esx_dmvschool/html/debounce.min.js b/[esx_addons]/esx_dmvschool/html/debounce.min.js new file mode 100644 index 00000000..648fe5d3 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/html/debounce.min.js @@ -0,0 +1,9 @@ +/* + * jQuery throttle / debounce - v1.1 - 3/7/2010 + * http://benalman.com/projects/jquery-throttle-debounce-plugin/ + * + * Copyright (c) 2010 "Cowboy" Ben Alman + * Dual licensed under the MIT and GPL licenses. + * http://benalman.com/about/license/ + */ +(function(b,c){var $=b.jQuery||b.Cowboy||(b.Cowboy={}),a;$.throttle=a=function(e,f,j,i){var h,d=0;if(typeof f!=="boolean"){i=j;j=f;f=c}function g(){var o=this,m=+new Date()-d,n=arguments;function l(){d=+new Date();j.apply(o,n)}function k(){h=c}if(i&&!h){l()}h&&clearTimeout(h);if(i===c&&m>e){l()}else{if(f!==true){h=setTimeout(i?k:l,i===c?e-m:e)}}}if($.guid){g.guid=j.guid=j.guid||$.guid++}return g};$.debounce=function(d,e,f){return f===c?a(d,e,false):a(d,f,e!==false)}})(this); diff --git a/[esx_addons]/esx_dmvschool/html/dmv.png b/[esx_addons]/esx_dmvschool/html/dmv.png new file mode 100644 index 00000000..b5cf951f Binary files /dev/null and b/[esx_addons]/esx_dmvschool/html/dmv.png differ diff --git a/[esx_addons]/esx_dmvschool/html/questions.js b/[esx_addons]/esx_dmvschool/html/questions.js new file mode 100644 index 00000000..0cc0d572 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/html/questions.js @@ -0,0 +1,91 @@ +var tableauQuestion = [ + { + question: "If you're going 80 km/h, and you're approaching a residential area you must:", + propositionA: "You accelerate", + propositionB: "You keep your speed, if you do not pass other vehicles", + propositionC: "You slow down", + propositionD: "You keep your speed", + reponse: "C" + }, + + { + question: "If you're turning right at a traffic light, but see a pedestrian crossing what do you do:", + propositionA: "You pass the pedestrian", + propositionB: "You check that there is no other vehicles around", + propositionC: "You wait until the pedestrian has crossed", + propositionD: "You shoot the pedestrian and continue to drive", + reponse: "C" + }, + + { + question: "Without any prior indication, the speed in a residential area is: __ km/h", + propositionA: "30 km/h", + propositionB: "50 km/h", + propositionC: "40 km/h", + propositionD: "60 km/h", + reponse: "B" + }, + + { + question: "Before every lane change you must:", + propositionA: "Check your mirrors", + propositionB: "Check your blind spots", + propositionC: "Signal your intentions", + propositionD: "All of the above", + reponse: "D" + }, + + { + question: "What blood alcohol level is classified as driving while intoxicated?", + propositionA: "0.05%", + propositionB: "0.18%", + propositionC: "0.08%", + propositionD: "0.06%", + reponse: "C" + }, + + { + question: "When can you continue to drive at a traffic light?", + propositionA: "When it is green", + propositionB: "When there is nobody in the intersection", + propositionC: "You are in a school zone", + propositionD: "When it is green and / or red and you're turning right", + reponse: "D" + }, + + { + question: "A pedestrian has a do not cross signal, what do you do?", + propositionA: "You let them pass", + propositionB: "You observe before continuing", + propositionC: "You wave to tell them to cross", + propositionD: "You continue because your traffic light is green", + reponse: "D" + }, + + { + question: "What is allowed when passing another vehicle", + propositionA: "You follow it closely to pass it faster", + propositionB: "You pass it without leaving the roadway", + propositionC: "You drive on the opposite side of the road to pass", + propositionD: "You exceed the speed limit to pass them", + reponse: "C" + }, + + { + question: "You are driving on a highway which indicates a maximum speed of 120 km/h. But most trafficers drive at 125 km/h, so you should not drive faster than:", + propositionA: "120 km/h", + propositionB: "125 km/h", + propositionC: "130 km/h", + propositionD: "110 km/h", + reponse: "A" + }, + + { + question: "When you are overtaken by another vehicle it is important NOT to:", + propositionA: "Slow Down", + propositionB: "Check your mirrors", + propositionC: "Watch other drivers", + propositionD: "Increase your speed", + reponse: "D" + }, +] diff --git a/[esx_addons]/esx_dmvschool/html/questions_en.js b/[esx_addons]/esx_dmvschool/html/questions_en.js new file mode 100644 index 00000000..0cc0d572 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/html/questions_en.js @@ -0,0 +1,91 @@ +var tableauQuestion = [ + { + question: "If you're going 80 km/h, and you're approaching a residential area you must:", + propositionA: "You accelerate", + propositionB: "You keep your speed, if you do not pass other vehicles", + propositionC: "You slow down", + propositionD: "You keep your speed", + reponse: "C" + }, + + { + question: "If you're turning right at a traffic light, but see a pedestrian crossing what do you do:", + propositionA: "You pass the pedestrian", + propositionB: "You check that there is no other vehicles around", + propositionC: "You wait until the pedestrian has crossed", + propositionD: "You shoot the pedestrian and continue to drive", + reponse: "C" + }, + + { + question: "Without any prior indication, the speed in a residential area is: __ km/h", + propositionA: "30 km/h", + propositionB: "50 km/h", + propositionC: "40 km/h", + propositionD: "60 km/h", + reponse: "B" + }, + + { + question: "Before every lane change you must:", + propositionA: "Check your mirrors", + propositionB: "Check your blind spots", + propositionC: "Signal your intentions", + propositionD: "All of the above", + reponse: "D" + }, + + { + question: "What blood alcohol level is classified as driving while intoxicated?", + propositionA: "0.05%", + propositionB: "0.18%", + propositionC: "0.08%", + propositionD: "0.06%", + reponse: "C" + }, + + { + question: "When can you continue to drive at a traffic light?", + propositionA: "When it is green", + propositionB: "When there is nobody in the intersection", + propositionC: "You are in a school zone", + propositionD: "When it is green and / or red and you're turning right", + reponse: "D" + }, + + { + question: "A pedestrian has a do not cross signal, what do you do?", + propositionA: "You let them pass", + propositionB: "You observe before continuing", + propositionC: "You wave to tell them to cross", + propositionD: "You continue because your traffic light is green", + reponse: "D" + }, + + { + question: "What is allowed when passing another vehicle", + propositionA: "You follow it closely to pass it faster", + propositionB: "You pass it without leaving the roadway", + propositionC: "You drive on the opposite side of the road to pass", + propositionD: "You exceed the speed limit to pass them", + reponse: "C" + }, + + { + question: "You are driving on a highway which indicates a maximum speed of 120 km/h. But most trafficers drive at 125 km/h, so you should not drive faster than:", + propositionA: "120 km/h", + propositionB: "125 km/h", + propositionC: "130 km/h", + propositionD: "110 km/h", + reponse: "A" + }, + + { + question: "When you are overtaken by another vehicle it is important NOT to:", + propositionA: "Slow Down", + propositionB: "Check your mirrors", + propositionC: "Watch other drivers", + propositionD: "Increase your speed", + reponse: "D" + }, +] diff --git a/[esx_addons]/esx_dmvschool/html/questions_es.js b/[esx_addons]/esx_dmvschool/html/questions_es.js new file mode 100644 index 00000000..efd70570 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/html/questions_es.js @@ -0,0 +1,91 @@ +var tableauQuestion = [ + { + question: "Si vas a 80 km / h, y te aproximas a una zona residencial, debes:", + propositionA: "Acelerar", + propositionB: "Mantienes tu velocidad, si no pasas otros vehículos.", + propositionC: "Frenas", + propositionD: "Mantienes la velocidad", + reponse: "C" + }, + + { + question: "Si está girando a la derecha en un semáforo, pero ve un cruce de peatones, ¿qué hace?", + propositionA: "Pasas del peaton", + propositionB: "Comprueba que no hay otros vehículos alrededor.", + propositionC: "Esperas hasta que el peatón haya cruzado.", + propositionD: "Disparas al peatón y sigues conduciendo.", + reponse: "C" + }, + + { + question: "Sin ninguna indicación previa, la velocidad en una zona residencial es de: __ km / h", + propositionA: "30 km/h", + propositionB: "50 km/h", + propositionC: "40 km/h", + propositionD: "60 km/h", + reponse: "B" + }, + + { + question: "Antes de cada cambio de carril debe:", + propositionA: "Mirar por los espejos", + propositionB: "Comprobar los puntos muertos del vehiculo", + propositionC: "Señalizar tu intención de girar", + propositionD: "Todas las anteriores", + reponse: "D" + }, + + { + question: "¿Qué nivel de alcohol en la sangre se clasifica como conducir bajo los efectos del alcohol?", + propositionA: "0,5", + propositionB: "0,1", + propositionC: "0,8", + propositionD: "0,0", + reponse: "C" + }, + + { + question: "¿Cuándo puedes continuar conduciendo en un semáforo?", + propositionA: "Cuando esta verde", + propositionB: "Cuando no esta cruzando nadie", + propositionC: "Cuando estas en una zona de colegio", + propositionD: "Cuando estas entre un 60 u 80 km/h", + reponse: "A" + }, + + { + question: "Un peatón tiene una señal de no cruzar, ¿qué haces?", + propositionA: "Le dejas cruzar", + propositionB: "Te quedas mirandolo", + propositionC: "Le dices que cruce para que lo puedas atropellar", + propositionD: "Continuas porque tu señal de tráfico esta en verde", + reponse: "D" + }, + + { + question: "¿Que esta permitido cuando adelantas a otro vehículo?", + propositionA: "Lo sigues de cerca para pasarlo más rápido.", + propositionB: "Lo adelantas por la acera si es necesario.", + propositionC: "Conduce por el lado opuesto de la carretera para adelantarlo.", + propositionD: "Lo adelantas rapido", + reponse: "C" + }, + + { + question: "Usted está conduciendo en una carretera que indica una velocidad máxima de 120 km / h. Pero la mayoría de los conductores conducen a 125 km / h, por lo que no debe conducir más rápido que:", + propositionA: "120 km/h", + propositionB: "125 km/h", + propositionC: "130 km/h", + propositionD: "110 km/h", + reponse: "A" + }, + + { + question: "Cuando es superado por otro vehículo, es importante NO:", + propositionA: "Seguir con la misma velocidad", + propositionB: "Comprobar los espejos", + propositionC: "Mirar a otros conductores", + propositionD: "Aumentar la velocidad", + reponse: "D" + }, +] diff --git a/[esx_addons]/esx_dmvschool/html/questions_fi.js b/[esx_addons]/esx_dmvschool/html/questions_fi.js new file mode 100644 index 00000000..58aa65f6 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/html/questions_fi.js @@ -0,0 +1,91 @@ +var tableauQuestion = [ + { + question: "Jos ajat 80km/h ja vastaan on tulossa asutus alue mitä teet ?", + propositionA: "Painat kaasua että pääset mahollisimman nopeaa pois", + propositionB: "Voit ajaa samaa vauhtia jos alueella ei ole muita autoja", + propositionC: "Sinun pitää hidastaa", + propositionD: "Voit jatkaa samaan malliin", + reponse: "C" + }, + + { + question: "Kun olet kääntymässä vasemmalle vihreistä valoista, näet jalankulkian jalkakäytävällä. Kummalla on lupa mennä ensin.", + propositionA: "Jalankulkijalla koska he voivat mennä tien yli millä valoilla tahansa", + propositionB: "Sinulla koska valo oli vihreä", + propositionC: "Jalankulkijalla, koska hänellä palaa vihreä valo", + propositionD: "Sinulla koska ajoneuvolla on aina oikeus ensin", + reponse: "C" + }, + + { + question: "Muualla ilmoittamatta, sallittu nopeus asutusalueella on ____ km/h.", + propositionA: "50", + propositionB: "55", + propositionC: "65", + propositionD: "70", + reponse: "A" + }, + + { + question: "Ennen jokaista kaistan vaihtoa, sinun pitäisi?", + propositionA: "Katsoa peilit", + propositionB: "Katsoa kuolleet kulmat", + propositionC: "Näyttää vilkuilla mitä aijot tehdä", + propositionD: "Kaikki yllä mainitut", + reponse: "D" + }, + + { + question: "Minkä veren alkoholipitoisuus luokitellaan päihtyneeksi?", + propositionA: "0.2 promillea", + propositionB: "0.8 promillea", + propositionC: "0.5 promillea", + propositionD: "0.4 promillea", + reponse: "C" + }, + + { + question: "Sinun on vedettävä sivuun ja pysähtyä, kunnes hälyytysajoneuvo on ajanut ohi sireenit päällä, ellei:", + propositionA: "Sinulla ole kiirre", + propositionB: "Jos hälyytysajoneuvolla on toisella kaistalla tilaa", + propositionC: "Olet koulunalueella", + propositionD: "Olet risteyksessä", + reponse: "D" + }, + + { + question: "Täytyykö poliisin vilkkuviin valoihin pysähtyä jos ne seuraavat sinua?", + propositionA: "Ei, jos poliisilla ei ole sireenejä päällä", + propositionB: "Kyllä", + propositionC: "Riippuu tilanteesta", + propositionD: "Ei", + reponse: "B" + }, + + { + question: "Mikä seuraavista on sallittua kun aloitat ohittaan ajoneuvoa?", + propositionA: "Ajaminen lähellä ennen ohitusta", + propositionB: "Koitat ajaa katukivetyksen kautta", + propositionC: "Ajaminen vastakkaisella kaistalla", + propositionD: "Nopeusrajoituksen ylittäminen", + reponse: "A" + }, + + { + question: "Ajat moottoritiellä, jonka nopeus on 120 km/h. Suurinosa liikenteestä ajaa 130km/h, joten sinun ei pitäisi ajaa nopeampaa kuin", + propositionA: "80 kmh", + propositionB: "40 kmh", + propositionC: "50 kmh", + propositionD: "120 kmh", + reponse: "D" + }, + + { + question: "Kun sinut ohittaa toinen ajoneuvo, mitä sinun EI pitäisi tehdä?", + propositionA: "Hiljentää", + propositionB: "Tarkistaa peilit", + propositionC: "Katsot toista kuskia", + propositionD: "Kiihdyttää", + reponse: "D" + }, +] diff --git a/[esx_addons]/esx_dmvschool/html/questions_hu.js b/[esx_addons]/esx_dmvschool/html/questions_hu.js new file mode 100644 index 00000000..bb6f44ec --- /dev/null +++ b/[esx_addons]/esx_dmvschool/html/questions_hu.js @@ -0,0 +1,81 @@ +var tableauQuestion = [ + { + question: "Mit jelent a közlekedésben a bizalmi elv?", + propositionA: "Számíthat arra, hogy a KRESZ minden helyzetben és helyen szabályozza a közlekedésben résztvevők jogait és kötelességeit.", + propositionB: "Számíthat arra, hogy a közlekedési szabályokat mások is megtartják.", + propositionC: "Számíthat arra, hogy a szabálysértők mindig megkapják a megérdemelt büntetésüket.", + reponse: "B" + }, + + { + question: "Haladhat-e a villamospályán, ha az út vonalvezetése vagy a látási viszonyok akadályozzák a villamos kellő távolságból való észlelését?", + propositionA: "Igen", + propositionB: "Nem", + propositionC: "Nem tudom", + reponse: "B" + }, + + { + question: "Balra kíván bekanyarodni. Általában hová kell besorolni kétirányú forgalmú úton?", + propositionA: "Az úttest felezővonala mellé.", + propositionB: "Az úttest bal szélére.", + propositionC: "Az úttest jobb szélére.", + reponse: "B" + }, + + { + question: "Lakott területen kívül elsöbbséget kell adnia az autóbuszöblöt elhagyó autóbusz részére?", + propositionA: "Igen", + propositionB: "Nem", + propositionC: "Ha féktávon kivül vagyok, akkor nem", + reponse: "B" + }, + + { + question: "Miként befolyásolja a vezetõ reakcióidejét az alkohol és a fáradtság hatása?", + propositionA: "A reakcióideje többszörösére növekedhet.", + propositionB: "A reakcióideje kismértékben csökken.", + propositionC: "A reakcióideje csak kismértékben növekszik.", + reponse: "A" + }, + + { + question: "Mikor szabad hirtelen fékezni?", + propositionA: "Csak akkor, ha ezt a személy- és vagyonbiztonság megóvása szükségessé teszi.", + propositionB: "Csak akkor, ha Ön mögött haladó jármû helyes követési távolságot tart.", + propositionC: "Csak akkor, ha a jármü gumija nem kopik el fékezés közben.", + reponse: "A" + }, + + { + question: "Hogyan változik a látása a sebesség növekedésével?", + propositionA: "Nagy sebességgel haladva csak a közeli tárgyakat látja élesen; távolra csak homályosan lát.", + propositionB: "Nagy sebességgel haladva csak a távoli tárgyak képe éles; a közeli tárgyak képe elmosódik.", + propositionC: "Nagy sebességgel haladva, olyan mintha belennék állva.", + reponse: "A" + }, + + { + question: "A megkülönböztetõ jelzéseket használó gépjármû részére", + propositionA: "Minden helyzetben elsõbbséget kell adnia.", + propositionB: "Csak akkor kell elsõbbséget adnia, ha azzal más közlekedõt nem akadályoz jelentõsen.", + propositionC: "Csak akkor ha rámdudál.", + reponse: "A" + }, + + { + question: "Az előzés megkezdése előtt miként ellenőrízzük a mögöttes forgalmat?", + propositionA: "Oldalra-hátranézve.", + propositionB: "A belső, valamint a külső visszapillantó tükrök segítségével, és ha szükséges, akkor hátratekintéssel is.", + propositionC: "A külső visszapillantó tükör segítségével.", + reponse: "B" + }, + + { + question: "Be kell-e sorolni a járművel az úttest jobb szélén lévő autóbusz forgalmi sávba jobbra kanyarodáskor?", + propositionA: "Igen", + propositionB: "Nem", + propositionC: "Néha", + reponse: "B" + }, +] diff --git a/[esx_addons]/esx_dmvschool/html/questions_it.js b/[esx_addons]/esx_dmvschool/html/questions_it.js new file mode 100644 index 00000000..8944d8b5 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/html/questions_it.js @@ -0,0 +1,91 @@ +var tableauQuestion = [ + { + question: "Se stai andando a 80 km/h, e ti stai avvicinando a una zona residenziale devi::", + propositionA: "Accellerare", + propositionB: "Mantieni la velocità, se non sorpassi altri veicoli", + propositionC: "Ralenti", + propositionD: "Mantieni la velocità", + reponse: "C" + }, + + { + question: "Se al semaforo stai svoltaando a destra, ma vedi un pedone cosa fai:", + propositionA: "Superi il pedone", + propositionB: "Controlli che non ci siano altri veicoli in giro", + propositionC: "Aspetti che il pedone abbia attraversato", + propositionD: "Spari al pedone e continui a guidare", + reponse: "C" + }, + + { + question: "Senza alcuna indicazione preventiva, la velocità in una zona residenziale è: __ km/h", + propositionA: "30 km/h", + propositionB: "50 km/h", + propositionC: "40 km/h", + propositionD: "60 km/h", + reponse: "B" + }, + + { + question: "Prima di ogni cambio si corsia devi:", + propositionA: "Controllare gli specchietti", + propositionB: "Controllare i punti ciechi", + propositionC: "Segnalare le tue intenzioni", + propositionD: "Tutte le risposte sono esatte", + reponse: "D" + }, + + { + question: "Quale livello di alcol nel sangue è classificato come guida in stato di ebbrezza?", + propositionA: "0.05%", + propositionB: "0.18%", + propositionC: "0.08%", + propositionD: "0.06%", + reponse: "C" + }, + + { + question: "Quando puoi continuare a guidare a un semaforo?", + propositionA: "Quando è verde", + propositionB: "Quando non c'è nessuno all'incrocio", + propositionC: "Quando sei in una zona scolastca", + propositionD: "Quando è verde e/o rosso e stai girando a destra", + reponse: "D" + }, + + { + question: "Un pedone ha un segnale di non attraversare, cosa fai?", + propositionA: "Li lasci passare", + propositionB: "Osservi prima di continuare", + propositionC: "Fai la mano per dire loro di attraversare", + propositionD: "Continui perchè il tuo semaforo è verde", + reponse: "D" + }, + + { + question: "Cosa è consentito quando si supera un'altro veicolo", + propositionA: "Lo segui da vicino per superarlo velocemente", + propositionB: "Lo passi senza lasciare la carreggiata", + propositionC: "Si guida sul lato opposto della strada per passare", + propositionD: "Si supera il limite di velocità per superarli", + reponse: "C" + }, + + { + question: "Stai guidando su un'autostrada che indica una velocità massima di 120 km/h. Ma la maggior parte dei trafficanti guida a 125 km/h, quindi non dovresti guidare più veloce di:", + propositionA: "120 km/h", + propositionB: "125 km/h", + propositionC: "130 km/h", + propositionD: "110 km/h", + reponse: "A" + }, + + { + question: "Quando vieni sorpassato da un altro veicolo è importane NON:", + propositionA: "Rallentare", + propositionB: "Controllare gli specchietti", + propositionC: "Guardare gli altri automobilisti", + propositionD: "Aumentare la tua velocità", + reponse: "D" + }, +] diff --git a/[esx_addons]/esx_dmvschool/html/questions_nl.js b/[esx_addons]/esx_dmvschool/html/questions_nl.js new file mode 100644 index 00000000..94a82463 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/html/questions_nl.js @@ -0,0 +1,91 @@ +var tableauQuestion = [ + { + question: "Als je 80 km/h gaat, en je nadert een woonwijk dan moet je:", + propositionA: "Je geeft gas bij", + propositionB: "Je behoudt je snelheid, zo lang je niemand inhaalt", + propositionC: "Je behoudt je snelheid", + propositionD: "Je remt af", + reponse: "D" + }, + + { + question: "Als je rechts gaat bij een stoplicht, maar dan ziet iemand oversteken wat doe je dan:", + propositionA: "Je wacht totdat de voetganger is overgestoken", + propositionB: "Je passeert de voetganger", + propositionC: "Je kijkt of er geen voertuigen om je heen zijn", + propositionD: "Je rijdt de voetganger aan en maakt dat je weg komt", + reponse: "A" + }, + + { + question: "Zonder enige indicatie, de snelheid in een woonwijk is: __ km/h", + propositionA: "30 km/u", + propositionB: "50 km/u", + propositionC: "40 km/u", + propositionD: "60 km/u", + reponse: "A" + }, + + { + question: "Voordat je van rijstrook veranderd moet je:", + propositionA: "Kijk in je spiegels", + propositionB: "Kijk in je blinde hoek", + propositionC: "Gebruik je knipperlicht naar de correcte rijbaan", + propositionD: "Alles hierboven", + reponse: "D" + }, + + { + question: "Wat bloed alcohol level word gezien als rijden onder invloed?", + propositionA: "0.05%", + propositionB: "0.18%", + propositionC: "0.08%", + propositionD: "0.06%", + reponse: "C" + }, + + { + question: "Wanneer kan je doorrijden bij een verkeerslicht?", + propositionA: "Wanneer het groen is", + propositionB: "Wanneer er niemand bij het kruispunt is", + propositionC: "Als je in een school zone bent", + propositionD: "Als je boven de 100km/u rijdt.", + reponse: "A" + }, + + { + question: "Een voetganger heeft een rood licht om over te steken", + propositionA: "Je laat diegene passeren", + propositionB: "Je observeert wat diegene doet en gaat vervolgens door omdat het groen is.", + propositionC: "Je signaleert diegene om over te steken", + propositionD: "Je gaat door want je hebt groen licht.", + reponse: "D" + }, + + { + question: "Wat is toegestaan als je een voertuig inhaalt", + propositionA: "Je gaat bumper kleven om sneller voorbij te gaan", + propositionB: "Je paseert zonder de weg te verlaten", + propositionC: "Je rijdt aan de andere kant van de weg om in te halen", + propositionD: "Je gaat te snel rijden.", + reponse: "C" + }, + + { + question: "Je rijdt op de snelweg wat een maxiumum snelheid van 120 km/u hanteert maar iedereen rijdt gemiddeld 125 km/u, hoe hard mag je maximaal gaan:", + propositionA: "120 km/u", + propositionB: "125 km/u", + propositionC: "130 km/u", + propositionD: "110 km/u", + reponse: "A" + }, + + { + question: "Wanneer je word ingehaald door een ander voertuig is het belangrijk NIET te:", + propositionA: "Verslomen", + propositionB: "Je spiegels bekijken", + propositionC: "Andere bestuurders bekijken", + propositionD: "Snelheid te verhogen", + reponse: "D" + }, +] diff --git a/[esx_addons]/esx_dmvschool/html/questions_pl.js b/[esx_addons]/esx_dmvschool/html/questions_pl.js new file mode 100644 index 00000000..cfbf8e03 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/html/questions_pl.js @@ -0,0 +1,91 @@ +var tableauQuestion = [ + { + question: "Jeśli masz 80 km/h, a zbliżasz się do terenu zabudowanego, musisz:", + propositionA: "Przyspieszyć", + propositionB: "Zahamować po czym jechać 50 km/h", + propositionC: "Zwolnić", + propositionD: "Zachować prędkość", + reponse: "C" + }, + + { + question: "Jeśli skręcasz w prawo na światłach bezkolizyjnych, ale widzisz przejście dla pieszych, co robisz:", + propositionA: "Przepuszczam pieszego", + propositionB: "Sprawdzam, czy w pobliżu nie ma innych pojazdów", + propositionC: "Zachowuje szczególną ostrożność i przejeżdżam", + propositionD: "Strzelam do pieszego i jadę dalej", + reponse: "C" + }, + + { + question: "Bez wcześniejszego wskazania prędkość w obszarze zabudowanym wynosi: __ km/h", + propositionA: "40", + propositionB: "50", + propositionC: "60", + propositionD: "70", + reponse: "B" + }, + + { + question: "Przed każdą zmianą pasa ruchu należy:", + propositionA: "Spojżeć w lusterka", + propositionB: "Sprawdź swoje martwe pole", + propositionC: "Zasygnalizuj swoje zamiary", + propositionD: "Wszystkie powyższe", + reponse: "D" + }, + + { + question: "Jaki poziom alkoholu we krwi NIE jest klasyfikowany jako jazda po pijanemu?", + propositionA: "0.02%", + propositionB: "0.19%", + propositionC: "0.05%", + propositionD: "0.04%", + reponse: "A" + }, + + { + question: "Kiedy możesz kontynuować jazdę na światłach?", + propositionA: "Kiedy zaświeci się zielone", + propositionB: "Kiedy nie ma nikogo na skrzyżowaniu", + propositionC: "Kiedy zaświeci się żółte", + propositionD: "Kiedy jest zielony lub czerwony ale skręcasz w prawo", + reponse: "A" + }, + + { + question: "Przewożąc ładunek gabarytowy możesz poruszać się tylko:", + propositionA: "Drogami do tego przeznaczonymi", + propositionB: "Nocami", + propositionC: "Drogami ekspresowymi", + propositionD: "Skrzyżowaniami o ruchu okrężnym", + reponse: "B" + }, + + { + question: "Posiadając prawo jazdy kategorii B możesz prowadzić :", + propositionA: "Pojazd samochodowy o dopuszczalnej masie całkowitej nieprzekraczającej 3.5 t, z wyjątkiem autobusu i motocykla", + propositionB: "Zespołem pojazdów złożonym z pojazdu, o którym mowa wyżej, oraz z przyczepy lekkiej", + propositionC: "Zespołem pojazdów złożonym z pojazdu, o którym mowa wyżej, oraz z przyczepy innej niż lekka, o ile łączna dopuszczalna masa całkowita zespołu tych pojazdów nie przekracza 4250 kg", + propositionD: "Wszystkie powyższe", + reponse: "D" + }, + + { + question: "Jedziesz autostradą, która wskazuje maksymalną prędkość 120 km/h. Większość aut jedzie z prędkością 140km/h, więc nie powinieneś jechać szybciej niż:", + propositionA: "120 km/h", + propositionB: "130 km/h", + propositionC: "140 km/h", + propositionD: "150 km/h", + reponse: "A" + }, + + { + question: "Wyprzedzając inne pojazdy należy:", + propositionA: "Zwolnić", + propositionB: "Trąbić na wyprzedzany pojazd", + propositionC: "Oglądać wyprzedzany pojazd", + propositionD: "Zwiększ prędkość", + reponse: "D" + }, +] diff --git a/[esx_addons]/esx_dmvschool/html/questions_sv.js b/[esx_addons]/esx_dmvschool/html/questions_sv.js new file mode 100644 index 00000000..6200edcd --- /dev/null +++ b/[esx_addons]/esx_dmvschool/html/questions_sv.js @@ -0,0 +1,91 @@ +var tableauQuestion = [ + { + question: "Vilket alternativ beskriver defensiv körning?", + propositionA: "Motorbromsningar, överhopp av växlar och användande av motorvärmare.", + propositionB: "Försvarande av den egna positionen genom att exempelvis inte låta någon annan köra om.", + propositionC: "Lugn, säker och planerad körning utan stress.", + propositionD: "Då flera fordon kör i någon typ av följe.", + reponse: "C" + }, + + { + question: "Vad har katalysatorn för uppgift?", + propositionA: "Dämpar motorljudet (ljuddämpare).", + propositionB: "Underlättar kallstarter.", + propositionC: "Omvandlar över 80 % av de skadliga ämnena i avgaserna till vatten och koldioxid.", + propositionD: "Reducerar bilens koldioxidutsläpp med över 80 %.", + reponse: "C" + }, + + { + question: "Vad betyder den svarta 30-skylten?", + propositionA: "Rekommenderad högsta hastighet.", + propositionB: "Vägarbetet upphör den 30:e samma månad.", + propositionC: "Rekommenderad lägsta hastighet.", + propositionD: "Skylten är inget vägmärke, utan är till för vägarbetarna.", + reponse: "A" + }, + + { + question: "Vad är ett reversibelt körfält?", + propositionA: "Ett körfält där trafik i båda färdriktningarna tillåts samtidigt.", + propositionB: "Ett vändbart körfält vars färdriktning bestäms av trafiksignaler.", + propositionC: "Ett körfält som endast får användas av utryckningsfordon.", + propositionD: "Ett körfält där man måste se upp för älgar.", + reponse: "B" + }, + + { + question: "Vilket alternativ ger ett exempel på miljövänlig körning?", + propositionA: "Körning på så låga växlar som möjligt.", + propositionB: "Mycket långsam fartökning.", + propositionC: "Hoppa över växlar.", + propositionD: "Hålla motorns varvtal på minst 3 000 varv/minut.", + reponse: "C" + }, + + { + question: "Vad är sant för unga män med körkort?", + propositionA: "Unga män har en tendens att överskatta sin körförmåga mer när de precis har fått körkort än när de har haft körkort i något år.", + propositionB: "Unga män löper 5–6 gånger större risk att råka ut för en trafikolycka jämfört med de över 75 år.", + propositionC: "Unga män har bäst reaktionstid i trafiken.", + propositionD: "Unga män har en tendens att överskatta sin körförmåga mer när de har haft körkort i något år än när de precis har fått körkort.", + reponse: "D" + }, + + { + question: "Var går gränsen för rattfylleri?", + propositionA: "0,1 promille alkohol i blodet.", + propositionB: "0,2 promille alkohol i blodet.", + propositionC: "1,0 promille alkohol i blodet.", + propositionD: "1,2 promille alkohol i blodet.", + reponse: "B" + }, + + { + question: "Vad är reaktionssträckan?", + propositionA: "Sträckan du förflyttas från det att du upptäckt hindret tills dess att du börjar bromsa.", + propositionB: "Reaktionstiden + bromssträckan.", + propositionC: "Bromssträckan + stoppsträckan.", + propositionD: "Sträckan du förflyttas från det att du upptäckt hindret tills dess att du står stilla.", + reponse: "A" + }, + + { + question: "Du ökar hastigheten från 30 km/h till 90 km/h. Hur påverkas bromssträckan?", + propositionA: "Den blir 9 gånger längre.", + propositionB: "Den blir 3 gånger längre.", + propositionC: "Den blir 2 gånger längre.", + propositionD: "Den förblir oförändrad.", + reponse: "A" + }, + + { + question: "Hur stor del av människans synfält utgörs av periferiseendet?", + propositionA: "1-2 %", + propositionB: "25 %", + propositionC: "50 %", + propositionD: "98-99 %", + reponse: "D" + }, +] diff --git a/[esx_addons]/esx_dmvschool/html/scripts.js b/[esx_addons]/esx_dmvschool/html/scripts.js new file mode 100644 index 00000000..56d70097 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/html/scripts.js @@ -0,0 +1,137 @@ +// question variables +var questionNumber = 1; +var userAnswer = []; +var goodAnswer = []; +var questionUsed = []; +var nbQuestionToAnswer = 10; // don't forget to change the progress bar max value in html +var nbAnswerNeeded = 5; // out of nbQuestionToAnswer +var nbPossibleQuestions = 10; // number of questions in database questions.js +var lastClick = 0; + +function getRandomQuestion() { + var random = Math.floor(Math.random() * nbPossibleQuestions); + + while (true) { + if (questionUsed.indexOf(random) === -1) { + break; + } + + random = Math.floor(Math.random() * nbPossibleQuestions); + } + + questionUsed.push(random); + + return random; +} + +// Partial Functions +function closeMain() { + $(".home").css("display", "none"); +} +function openMain() { + $(".home").css("display", "block"); +} +function closeAll() { + $(".body").css("display", "none"); +} +function openQuestionnaire() { + $(".questionnaire-container").css("display", "block"); + var randomQuestion = getRandomQuestion(); + + $("#questionNumero").html("Question: " + questionNumber); + $("#question").html(tableauQuestion[randomQuestion].question); + $(".answerA").html(tableauQuestion[randomQuestion].propositionA); + $(".answerB").html(tableauQuestion[randomQuestion].propositionB); + $(".answerC").html(tableauQuestion[randomQuestion].propositionC); + $(".answerD").html(tableauQuestion[randomQuestion].propositionD); + $('input[name=question]').attr('checked', false); + + goodAnswer.push(tableauQuestion[randomQuestion].reponse); + $(".questionnaire-container .progression").val(questionNumber - 1); +} +function openResultGood() { + $(".resultGood").css("display", "block"); +} +function openResultBad() { + $(".resultBad").css("display", "block"); +} +function openContainer() { + $(".question-container").css("display", "block"); +} +function closeContainer() { + $(".question-container").css("display", "none"); +} + +// Listen for NUI Events +window.addEventListener('message', function (event) { + var item = event.data; + + // Open & Close main window + if (item.openQuestion == true) { + openContainer(); + openMain(); + } + + if (item.openQuestion == false) { + closeContainer(); + closeMain(); + } + + // Open sub-windows / partials + if (item.openSection == "question") { + closeAll(); + openQuestionnaire(); + } +}); + +// Handle Button Presses +$(".btnQuestion").click(function () { + $.post('http://esx_dmvschool/question', JSON.stringify({})); +}); + +$(".btnClose").click(function () { + $.post('http://esx_dmvschool/close', JSON.stringify({})); + userAnswer = []; + goodAnswer = []; + questionUsed = []; + questionNumber = 1; +}); + +$(".btnKick").click(function () { + $.post('http://esx_dmvschool/kick', JSON.stringify({})); + userAnswer = []; + goodAnswer = []; + questionUsed = []; + questionNumber = 1; +}); + +// Handle Form Submits +$("#question-form").submit(function (e) { + e.preventDefault(); + + if (questionNumber != nbQuestionToAnswer) { + //question 1 to 9: pushing answer in array + closeAll(); + userAnswer.push($('input[name="question"]:checked').val()); + questionNumber++; + openQuestionnaire(); + } else { + // question 10: comparing arrays and sending number of good answers + userAnswer.push($('input[name="question"]:checked').val()); + var nbGoodAnswer = 0; + for (i = 0; i < nbQuestionToAnswer; i++) { + if (userAnswer[i] == goodAnswer[i]) { + nbGoodAnswer++; + } + } + + closeAll(); + if (nbGoodAnswer >= nbAnswerNeeded) { + openResultGood(); + } else { + openResultBad(); + } + } + + return false; +}); diff --git a/[esx_addons]/esx_dmvschool/html/styles.css b/[esx_addons]/esx_dmvschool/html/styles.css new file mode 100644 index 00000000..ad39fba4 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/html/styles.css @@ -0,0 +1,187 @@ +html { + overflow: hidden; + font-family: 'Open Sans', sans-serif; +} + +.full-screen { + width: 100%; + height: 100%; + display: flex; + align-items: center; +} + +.question-container { + width: 70%; + height: 700px; + background-color: #fff; + border: 1px solid #222; + border-radius: 1px; + margin-left: auto; + margin-right: auto; + overflow: hidden; + z-index: 9999999; + display: none; +} + +.header { + width: 100%; + height: 20%; + background-color: #eee; + display: flex; + flex-direction: row; + flex-wrap: wrap; + justify-content: center; +} + +.header .logo { + width: 80%; + max-height: 50%; + margin: auto; + margin-bottom: 0; +} + +.header h1 { + font-size: 2em; + text-align: center; + margin: auto; +} + +.body { + width: 100%; + height: 80%; + display: flex; + flex-direction: row; + flex-wrap: wrap; + display: none; +} + +.content { + display: flex; + flex-direction: column; + align-self: center; + width: 90%; + height: 70%; + margin: auto; + border: none; +} + +.content .logo { + width: auto; + max-height: auto; + margin: auto; + margin-bottom: 0; +} + +.content h2, p { + margin: 5px; +} + +.buttonspot { + display: flex; + flex-direction: column; + align-self: center; + width: auto; + height: 15%; + margin: auto; + border: none; +} + +.buttonspot h2, p { + margin: 5px; +} + +.button { + width: 30%; + height: 40px; + align-self: center; + text-align: center; + margin-left: 40px; + margin-right: 40px; + background: #6699ff; + background-image: linear-gradient(to bottom, #6699ff, #4d88ff); + border-radius: 4px; + color: #ffffff; + font-size: 1.5em; + text-decoration: none; +} + +.form { + display: flex; + flex-direction: row; + justify-content: center; + flex-wrap: wrap; + width: 100%; + margin-top: 5px; +} + +.form div { + margin: auto; + margin-top: 5px; + margin-bottom: 5px; + width: 100%; +} + +.submit { + align-items: center; + height: 30px; + text-align: center; + width: 30%; + background: #017ebc; + background-image: linear-gradient(to bottom, #6699ff, #4d88ff); + border-radius: 4px; + color: #fff; + font-size: 1.2em; + margin-top: 10px; +} + +.barre-progression { + width: 50%; + align-self: center; + height: 10%; + margin: auto; + margin-top: 0; + display: flex; + flex-wrap: wrap; + justify-content: center; + padding: 0; +} + +.barre-progression h2 { + width: 100%; + height: 60%; + text-align: center; + display: flex; + justify-content: center; + align-items: center; + margin: 0; + color: #6699ff; +} + +.progression { + width: 80%; + border: 0 none; + background: #ddd; + border-radius: 14px; + box-shadow: inset 0px 1px 1px rgba(0, 0, 0, 0.5), 0px 1px 0px rgba(255, 255, 255, 0.2); +} + +.progression::-moz-progress-bar { + background: #FFF; + border-radius: 14px; + box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.4), 0 2px 5px 0px rgba(0, 0, 0, 0.3); +} + +.progression::-webkit-progress-bar { + background: transparent; +} + +.progression::-webkit-progress-value { + background-image: linear-gradient(to bottom, #6699ff, #4d88ff); + border-radius: 14px; + box-shadow: inset 0 -2px 4px rgba(0, 0, 0, 0.4), 0 2px 5px 0px rgba(0, 0, 0, 0.3); +} + +.bold-text { + font-weight: bold; + font-size: 1.3em; +} \ No newline at end of file diff --git a/[esx_addons]/esx_dmvschool/html/ui.html b/[esx_addons]/esx_dmvschool/html/ui.html new file mode 100644 index 00000000..1c841c2f --- /dev/null +++ b/[esx_addons]/esx_dmvschool/html/ui.html @@ -0,0 +1,120 @@ + + + + + + +

+
+ +
+

Driving School

+
+ +
+
+ +
+ +
+

Welcome to Driving School +

+
+
All citizens of Los Santos must pass their exam before they can drive. +
Take your time, answer with common sense, and do not answer randomly. +
+
Theory Test +
- The Theory Test costs $200, this is not refunded if you fail the test. +
- Don't be afraid, the driving school accepts credit, but be careful not to get into debt. +
- If you fail your test the first time, you can't retake it immediately, you'll have to take it at a later + date. +
+
Driving Test +
- The Driving Test costs $500, just like the theory test, this payment will not be refunded if you fail. +
- Make sure you stay alert whilst driving, and avoid accidents!

+
+
+
+ Start +
+
+

Progress

+ +
+
+ +
+
+

+

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+
+

Progress

+ +
+
+ +
+
+
+

Good work!

+
+
You did well during the examination. +
+
You can close this window, and go take your road test(s). +
+
+
+ Close +
+
+

Progress

+ +
+
+
+
+
+

You failed

+
+
You weren't ready for this test, try again later... +
+
+
+
+
+ Close +
+
+

Progress

+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/[esx_addons]/esx_dmvschool/html/ui_en.html b/[esx_addons]/esx_dmvschool/html/ui_en.html new file mode 100644 index 00000000..1c841c2f --- /dev/null +++ b/[esx_addons]/esx_dmvschool/html/ui_en.html @@ -0,0 +1,120 @@ + + + + + + +
+
+ +
+

Driving School

+
+ +
+
+ +
+ +
+

Welcome to Driving School +

+
+
All citizens of Los Santos must pass their exam before they can drive. +
Take your time, answer with common sense, and do not answer randomly. +
+
Theory Test +
- The Theory Test costs $200, this is not refunded if you fail the test. +
- Don't be afraid, the driving school accepts credit, but be careful not to get into debt. +
- If you fail your test the first time, you can't retake it immediately, you'll have to take it at a later + date. +
+
Driving Test +
- The Driving Test costs $500, just like the theory test, this payment will not be refunded if you fail. +
- Make sure you stay alert whilst driving, and avoid accidents!

+
+
+
+ Start +
+
+

Progress

+ +
+
+ +
+
+

+

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+
+

Progress

+ +
+
+ +
+
+
+

Good work!

+
+
You did well during the examination. +
+
You can close this window, and go take your road test(s). +
+
+
+ Close +
+
+

Progress

+ +
+
+
+
+
+

You failed

+
+
You weren't ready for this test, try again later... +
+
+
+
+
+ Close +
+
+

Progress

+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/[esx_addons]/esx_dmvschool/html/ui_es.html b/[esx_addons]/esx_dmvschool/html/ui_es.html new file mode 100644 index 00000000..ce2cf51c --- /dev/null +++ b/[esx_addons]/esx_dmvschool/html/ui_es.html @@ -0,0 +1,119 @@ + + + + + + +
+
+ +
+

Escuela de Conducción

+
+ +
+
+ +
+ +
+

Bienvenido a la Escuela de Conducción +

+
+
Todos los ciudadanos de la ciudad deben aprobar su examen antes de poder conducir. +
Tómese su tiempo, responda con sentido común y no conteste al azar. +
+
Examen teórico +
- La prueba teórica cuesta $ 200, esto no se reembolsa si falla la prueba. +
- No tenga miedo, la escuela de conducción acepta crédito, pero tenga cuidado de no entrar en deuda. +
- Si falla la prueba la primera vez, no puede volver a tomarla de inmediato, tendrá que realizarla más adelante. +
+
Examen de Conducir +
- La prueba de conducir cuesta $500, al igual que la prueba de la teoría, este pago no se devolverá si fallas. +
- ¡Asegúrate de estar alerta mientras conduces y de evitar accidentes!

+
+
+
+ Empezar +
+
+

Progreso

+ +
+
+ +
+
+

+

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+
+

Progreso

+ +
+
+ +
+
+
+

¡Buen trabajo!

+
+
Lo hiciste bien durante el examen. +
+
Puede cerrar esta ventana y tomar la prueba de conducción. +
+
+
+ Cerrar +
+
+

Progress

+ +
+
+
+
+
+

Has fallado

+
+
No estabas listo para esta prueba, inténtalo de nuevo más tarde ... +
+
+
+
+
+ Cerrar +
+
+

Progress

+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/[esx_addons]/esx_dmvschool/html/ui_fi.html b/[esx_addons]/esx_dmvschool/html/ui_fi.html new file mode 100644 index 00000000..5e679388 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/html/ui_fi.html @@ -0,0 +1,122 @@ + + + + + + +
+
+ +
+

Autokoulu

+
+ +
+
+ +
+ +
+

Tervetuloa autokouluun +

+
+
Vaadimme kaikilta kansalaisilta että pääset läpi teoriaoppitestin ennen kuin voit saada voimassa olevan + ajokortin. +
Varaa aikaa ja vastaa maalaisjärjellä, älä yritä vastata tuurilla. +
+
+
+ Teoriakoe +
- Teoriakoe maksaa 200 € ja siitä ei voi saada rahoja takaisin jos epäonnistut +
- Älä huoli, Autokoulu antaa maksaa luotolla, mutta älä ota liian paljon luottoa +
- Jos epäonnistut testissä, et voi ottaa sitä heti uudelleen, palaa takaisin toisella kertaa yrittään + uudelleen. +
+
Inssi +
- Ajokortti vaihtoehtoja on useita ja hinnat vaihtelee niitten mukaan. +
- Inssin päätavote on kiinittää huomiota yksityiskohtiin, ympäristöön ja liikenteeseen. Älä myöskään kolaroi!

+
+
+ Aloitus +
+
+

Edistyminen

+ +
+
+ +
+
+

+

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+
+

Edistyminen

+ +
+
+ +
+
+
+

Hienoa !

+
+
Sinulla meni testi aika hyvin! +
+
Voit sulkea tämän ikkunan nyt ja jatkaa inssikokeeseen. +
+
+
+ Sulje +
+
+

Edistyminen

+ +
+
+
+
+
+

Epäonnistuit

+
+
Et ole vielä valmis aloittaa suorittaa mitään ajokorttia, kokeile toisella kertaa. +
+
+
+
+
+ Sulje +
+
+

Edistyminen

+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/[esx_addons]/esx_dmvschool/html/ui_hu.html b/[esx_addons]/esx_dmvschool/html/ui_hu.html new file mode 100644 index 00000000..fffdf27a --- /dev/null +++ b/[esx_addons]/esx_dmvschool/html/ui_hu.html @@ -0,0 +1,118 @@ + + + + + + +
+
+ +
+

Autós Iskola

+
+ +
+
+ +
+ +
+

Üdvözöljük a Los Santos Autosiskolánál! +

+
+
Los Santos összes polgárának meg kell csinálni a KRESZ vizsgát a forgalmi vizsa elött +
A válaszoknál ne kapkodjon, használja ki a teljes idöt, gondolkodjon jozan ésszel. +
+
+
+ KRESZ Vizsga +
- A KRESZ vizsga 1.000$-ba kerül, ami nem visszatéritendö! +
- Az autosiskola elfogadja a bankkártyás fizetést is de vigyázz, ne kerülj adosságba! +
- Ha nem sikerülne a teszt, ne aggodjon, ismét megprobálhatja! +
+
Forgalmi Vizsga +
- A Forgalmi vizsga 1.500$-ba kerül, ami szintén nem visszatéritendö összeg! +
- A Forgalmi vizsgánál figyelj oda, hogy ne okozz balesetet! +

+ +
+
+ Kezdés +
+ +
+ +
+
+

+

+
+
+ + +
+
+ + +
+
+ + +
+ +
+
+
+

Folyamat

+ +
+
+ +
+
+
+

Sikeres KRESZ Vizsga!

+
+
Gratulálok a sikeres KRESZ vizsgához! +
+
Most már elkezdheted a vezetést! +
+
+
+ Bezár +
+ +
+
+
+
+

Sajnos nem sikerült a vizsga!

+
+
Sajnálattal közlöm, de nem sikerült a KRESZ vizsga, kérlek probáld ujra késöbb... +
+
+
+
+
+ Bezár +
+ +
+
+
+ + + + + + + diff --git a/[esx_addons]/esx_dmvschool/html/ui_it.html b/[esx_addons]/esx_dmvschool/html/ui_it.html new file mode 100644 index 00000000..8b1c59bb --- /dev/null +++ b/[esx_addons]/esx_dmvschool/html/ui_it.html @@ -0,0 +1,119 @@ + + + + + + +
+
+ +
+

Scuola Guida

+
+ +
+
+ +
+ +
+

Benvenuto alla Scuola Guida +

+
+
Tutti i cittadini di Los Santos devono superare l'esame prima di poter governare. +
Prenditi il ​​tuo tempo, rispondi con il buon senso e non rispondere a caso. +
+
Prova di teoria +
- Il test di teoria costa $ 200, questo non viene rimborsato se non superi il test. +
- Non abbiate paura, la scuola guida accetta crediti, ma attenzione a non indebitarvi. +
- Se fallisci il test la prima volta, non puoi ripeterlo immediatamente, eseguirlo in un secondo momento. +
+
Esame di guid +
- L'esame di guida costa $ 500, proprio come l'esame di teoria, questo pagamento non verrà rimborsato in caso di esito negativo. +
- Assicurati di stare attento durante la guida ed evitare incidenti!

+
+
+
+ Inizio +
+
+

Progressi

+ +
+
+ +
+
+

+

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+
+

Progressi

+ +
+
+ +
+
+
+

Buon lavoro!

+
+
Hai fatto bene durante l'esame. +
+
Puoi chiudere questa finestra e fare la tua prova su strada. +
+
+
+ Chiudi +
+
+

Progressi

+ +
+
+
+
+
+

Hai fallito

+
+
Non eri pronto per questo test, riprova più tardi... +
+
+
+
+
+ Chiudi +
+
+

Progressi

+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/[esx_addons]/esx_dmvschool/html/ui_pl.html b/[esx_addons]/esx_dmvschool/html/ui_pl.html new file mode 100644 index 00000000..653ab9cd --- /dev/null +++ b/[esx_addons]/esx_dmvschool/html/ui_pl.html @@ -0,0 +1,120 @@ + + + + + + +
+
+ +
+

Szkoła Jazdy

+
+ +
+
+ +
+ +
+

Witaj w szkole jazdy. +

+
+
Wszyscy mieszkańcy naszej wyspy muszą zdać egzamin zanim zaczną jeździć po ulicach. +
Nie spiesz się, odpowiadaj zgodnie z polskimi przepisami i nie odpowiadaj losowo. +
+
Egzamin teoretyczny +
- Test teoretyczny kosztuje 200 $, kwota uiszczana za każde podejście. +
- Jeśli nie zdasz za pierwszym razem możesz przystąpić ponownie +
- Nie obawiaj się, szkoła jazdy akceptuje kredyt, ale uważaj, aby nie zadłużać się za bardzo. +
- Jeśli nie zaliczysz egzaminu teoretycznego, nie możesz przystąpić do egzaminu praktycznego. +
+
Egzamin praktycznyt +
- Egzamin praktyczny kosztuje 500 $, tak jak w przypadku praktyki kwota uiszczana jest za każde podejście. +
- Zachowaj czujność podczas jazdy i unikaj wypadków!

+
+
+
+ Start +
+
+

Postęp

+ +
+
+ +
+
+

+

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+
+

Postęp

+ +
+
+ +
+
+
+

Gratulacje!

+
+
Dobrze się spisałeś podczas egzaminu. +
+
Możesz zamknąć to okno i przejść do egzaminu praktycznego. +
+
+
+ Zamknij +
+
+

Postęp

+ +
+
+
+
+
+

Egzamin niezaliczony

+
+
Nie jesteś gotowy na ten test, spróbuj ponownie później ... +
+
+
+
+
+ Zamknij +
+
+

Postęp

+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/[esx_addons]/esx_dmvschool/html/ui_sv.html b/[esx_addons]/esx_dmvschool/html/ui_sv.html new file mode 100644 index 00000000..dc1a2939 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/html/ui_sv.html @@ -0,0 +1,121 @@ + + + + + + +
+
+ +
+

Körskola

+
+ +
+
+ +
+ +
+

Välkommen till körskolan +

+
+
Alla medborgare i Los Santos måste ha körkort för att få behörigheten att köra fordon +
Ta din tid, svara med sunt förnuft och svara inte slumpmässigt. +
+
Kunskapsprov +
- Det teoretiska provet kostar 200 SEK, och kommer ej återbetalas om du misslyckas. +
- Var inte rädd, körskolan accepterar kredit. Var dock försiktig så att du inte får en stor skuld. +
- Om du misslyckas med testet första gången kan du inte omedelbart återta det, du måste ta det på ett senare + tillfälle. +
+
Uppkörning +
- Uppkörningen kostar 500 SEK, precis som den teoretiska delen. Denna betalning återbetalas ej om du + misslyckas. +
- Se till att du är uppmärksam vid körning och försök undvik olyckor!

+
+
+
+ Start +
+
+

Framsteg

+ +
+
+ +
+
+

+

+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+
+

Framsteg

+ +
+
+ +
+
+
+

Bra jobbat!

+
+
Du har klarat teoretiska delen av körkortet +
+
Du kan nu stänga det här fönstret och ta uppkörningen! +
+
+
+ Stäng +
+
+

Framsteg

+ +
+
+
+
+
+

Du kuggade

+
+
Du var inte redo för detta prov, försök igen senare... +
+
+
+
+
+ Stäng +
+
+

Framsteg

+ +
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/[esx_addons]/esx_dmvschool/locales/br.lua b/[esx_addons]/esx_dmvschool/locales/br.lua new file mode 100644 index 00000000..aeb34b53 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/locales/br.lua @@ -0,0 +1,29 @@ +Locales['br'] = { + ['you_paid'] = 'você pagou $%s para a auto escola', + ['go_next_point'] = 'vá para o próximo ponto!', + ['in_town_speed'] = 'entrou na cidade, preste atenção à sua velocidade! Limite de velocidade: %s km/h', + ['next_point_speed'] = 'vá para o próximo ponto! Limite de velocidade: %s km/h', + ['stop_for_ped'] = '~r~Pare para o pedestre atravessar o cruzando', + ['good_lets_cont'] = 'Boa, vamos continuar.', + ['stop_look_left'] = '~r~Pare and look left. Limite de velocidade: %s km/h', + ['good_turn_right'] = 'Boa, vire à direita e siga a em frente', + ['watch_traffic_lightson'] = 'observe o trânsito e acenda suas luzes!', + ['stop_for_passing'] = '~r~Pare olher para um lado e para o outro e veja ser não tem veículos passando!', + ['hway_time'] = 'é hora de dirigir na auto-estrada! Limite de velocidade: %s km/h', + ['gratz_stay_alert'] = 'Estou impressionado, mas não se esqueça de ficar ~r~alerta enquanto dirigindo!', + ['passed_test'] = 'você passou no teste, parabéns!', + ['failed_test'] = 'você ~r~falhou no teste, melhor sorte da próxima vez!', + ['theory_test'] = 'teste teórico de condução', + ['road_test_car'] = 'teste de habilidades de condução', + ['road_test_bike'] = 'teste de habilidades da motocicleta', + ['road_test_truck'] = 'teste de habilidades de caminhão', + ['school_item'] = '$%s', + ['driving_school'] = 'escola de condução', + ['press_open_menu'] = 'pressione [E] para abrir o menu', + ['driving_school_blip'] = 'escola de condução', + ['driving_test_complete'] = 'teste de condução concluído', + ['driving_too_fast'] = '~r~Você está dirigindo rápido demais o limite de velocidade atual é: %s km/h!', + ['errors'] = 'erros: ~r~%s/%s', + ['you_damaged_veh'] = 'você danificou o veículo', + ['not_enough_money'] = 'Você não tem dinheiro suficiente' +} diff --git a/[esx_addons]/esx_dmvschool/locales/de.lua b/[esx_addons]/esx_dmvschool/locales/de.lua new file mode 100644 index 00000000..3155a93d --- /dev/null +++ b/[esx_addons]/esx_dmvschool/locales/de.lua @@ -0,0 +1,29 @@ +Locales['de'] = { + ['you_paid'] = 'Du hast $%s an die Fahrschule gezahlt.', + ['go_next_point'] = 'Fahre zum nächsten Punkt!', + ['in_town_speed'] = 'Du begibst dich in ein Wohngebiet! Geschwindigkeitsbegrenzung: %s km/h', + ['next_point_speed'] = 'Begieb dich zum nächsten Punkt! Geschwindigkeitsbegrenzung: %s km/h', + ['stop_for_ped'] = '~r~Halte für den Fußgänger.', + ['good_lets_cont'] = 'Gut gemacht, weiter so.', + ['stop_look_left'] = '~r~Halte an und schau nach links. Geschwindigkeitsbegrenzung: %s km/h', + ['good_turn_right'] = 'Weiter so, biege rechts ab und folge der Route.', + ['watch_traffic_lightson'] = 'Pass auf den Verkehr auf und achte auf deine Beleuchtung!', + ['stop_for_passing'] = '~r~Halte an für weitere Fahrzeuge!', + ['hway_time'] = 'Es ist Zeit auf der Autobahn zu fahren! Geschwindigkeitsbegrenzung: %s km/h', + ['gratz_stay_alert'] = 'Sehr gut, bleibe jedoch immer achtsam während der Fahrt!', + ['passed_test'] = '~g~Du hast bestanden, herzlichen Glückwunsch!', + ['failed_test'] = '~r~Du hast nicht bestanden, viel Glück beim nächsten Mal!', + ['theory_test'] = 'Theoretische Fahrprüfung', + ['road_test_car'] = 'Praktische Fahrprüfung', + ['road_test_bike'] = 'Motorrad Fahrprüfung', + ['road_test_truck'] = 'LKW Fahrprüfung', + ['school_item'] = '$%s', + ['driving_school'] = 'Fahrschule', + ['press_open_menu'] = 'Drücke [~y~E~s~] um das Menü zu öffnen.', + ['driving_school_blip'] = 'Fahrschule', + ['driving_test_complete'] = 'Fahrschultest abgeschlossen.', + ['driving_too_fast'] = '~r~Du fährst zu schnell, die Geschwindigkeitsbegrenzung ist: %s km/h!', + ['errors'] = 'Fehler: ~r~%s/%s', + ['you_damaged_veh'] = 'Du hast das Fahrzeug beschädigt.', + ['not_enough_money'] = 'Du hast nicht genügend Geld.', +} diff --git a/[esx_addons]/esx_dmvschool/locales/en.lua b/[esx_addons]/esx_dmvschool/locales/en.lua new file mode 100644 index 00000000..7258cb45 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/locales/en.lua @@ -0,0 +1,29 @@ +Locales['en'] = { + ['you_paid'] = 'you paid $%s to the DMV school', + ['go_next_point'] = 'go to the next point!', + ['in_town_speed'] = 'entered town, pay attention to your speed! Speed Limit: %s km/h', + ['next_point_speed'] = 'go to the next point! Speed Limit: %s km/h', + ['stop_for_ped'] = '~r~Stop for the pedestrian crossing', + ['good_lets_cont'] = 'Good, continue.', + ['stop_look_left'] = '~r~Stop and look left. Speed Limit: %s km/h', + ['good_turn_right'] = 'Good, turn right and follow the line', + ['watch_traffic_lightson'] = 'watch the traffic and turn on your lights!', + ['stop_for_passing'] = '~r~Stop for passing vehicles!', + ['hway_time'] = 'it\'s time to drive on the highway! Speed Limit: %s km/h', + ['gratz_stay_alert'] = 'i\'m impressed, but don\'t forget to stay ~r~alert whilst driving!', + ['passed_test'] = 'you passed the test, congratulations!', + ['failed_test'] = 'you ~r~failed the test, better luck next time!', + ['theory_test'] = 'theoretical Driving Test', + ['road_test_car'] = 'driving Test', + ['road_test_bike'] = 'motorcycle Skills Test', + ['road_test_truck'] = 'truck Skills Test', + ['school_item'] = '$%s', + ['driving_school'] = 'driving School', + ['press_open_menu'] = 'press [E] to open the menu', + ['driving_school_blip'] = 'driving School', + ['driving_test_complete'] = 'driving test completed', + ['driving_too_fast'] = '~r~You\'re driving too fast, the current speed limit is: %s km/h!', + ['errors'] = 'mistakes: ~r~%s/%s', + ['you_damaged_veh'] = 'you damaged the vehicle', + ['not_enough_money'] = 'You don\'t have enough money', +} diff --git a/[esx_addons]/esx_dmvschool/locales/es.lua b/[esx_addons]/esx_dmvschool/locales/es.lua new file mode 100644 index 00000000..1d67c113 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/locales/es.lua @@ -0,0 +1,29 @@ +Locales['es'] = { + ['you_paid'] = 'Pagaste %s$ a la autoescuela', + ['go_next_point'] = '¡Vete al siguiente punto!', + ['in_town_speed'] = '¡Entraste a la ciudad, presta atención a tu velocidad! Límite de velocidad: %s km/h', + ['next_point_speed'] = '¡Vete al siguiente punto! Límite de velocidad: %s km/h', + ['stop_for_ped'] = '~r~Para en el paso de peatones', + ['good_lets_cont'] = 'Bien, continua', + ['stop_look_left'] = '~r~Para y mira a la izquierda. Límite de velocidad: %s km/h', + ['good_turn_right'] = 'Bien, gira a la derecha y sigue la línea', + ['watch_traffic_lightson'] = '¡Mira el tráfico y enciende las luces!', + ['stop_for_passing'] = '¡~r~Para para que pasen los vehículos!', + ['hway_time'] = '¡Es hora de conducir por la autopista! Límite de velocidad: %s km/h', + ['gratz_stay_alert'] = '¡Estoy impresionado pero no dejes de estar ~r~alerta mientras conduces!', + ['passed_test'] = 'Has aprobado el examen, ¡Enorabuena!', + ['failed_test'] = 'Has ~r~suspendido el examen, ¡Más suerte la próxima vez!', + ['theory_test'] = 'Examen teórico de conducir', + ['road_test_car'] = 'Examen práctico de conducir', + ['road_test_bike'] = 'Examen práctico de moto', + ['road_test_truck'] = 'Examen práctico de camiones', + ['school_item'] = '%s$', + ['driving_school'] = 'Escuela de conducción', + ['press_open_menu'] = 'Pulsa [E] para abrir el menú', + ['driving_school_blip'] = 'Autoescuela', + ['driving_test_complete'] = 'Examen de conducir finalizado', + ['driving_too_fast'] = '¡~r~Estás conduciendo muy rápido, el límite de velocidad actual es: %s km/h!', + ['errors'] = 'Fallos: ~r~%s / %s', + ['you_damaged_veh'] = '¡Has dañado el vehículo!', + ['not_enough_money'] = 'No tienes suficiente dinero' +} diff --git a/[esx_addons]/esx_dmvschool/locales/fi.lua b/[esx_addons]/esx_dmvschool/locales/fi.lua new file mode 100644 index 00000000..8a39b953 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/locales/fi.lua @@ -0,0 +1,29 @@ +Locales['fi'] = { + ['you_paid'] = 'you paid $%s to the DMV school', + ['go_next_point'] = 'mene seuraavaan pisteeseen.', + ['in_town_speed'] = 'saavuit kaupunkiin! Seuraa nopeuttasi Nopeusrajoitus: %s km/h', + ['next_point_speed'] = 'mene seuraavaan pisteeseen Nopeusrajoitus: %s km/h', + ['stop_for_ped'] = '~r~Pysähdy katso tietä ylittäviä jalankulikijoita', + ['good_lets_cont'] = 'Hyvä, jatkakaa.', + ['stop_look_left'] = '~r~Pysähdy ja katso vasemmalle. Nopeusrajoitus: %s km/h', + ['good_turn_right'] = 'Hyvä, käänny oikealle ja seuraa kaistaa', + ['watch_traffic_lightson'] = 'seuraa liikennettä, ja käänny kun valot ovat vihreät!', + ['stop_for_passing'] = '~r~Pysähdy ohi menevien autojen vuoksi', + ['hway_time'] = 'on aika mennä moottoritielle. Nopeusrajoitus: %s km/h', + ['gratz_stay_alert'] = 'onnitelut, ole ~r~tarkkana kun ajat!', + ['passed_test'] = 'sinä läpäisit kokeen', + ['failed_test'] = 'sinä ~r~epäonnistuit kokeessa', + ['theory_test'] = 'teoriakoe', + ['road_test_car'] = 'ajokoe', + ['road_test_bike'] = 'moottoripyörä ajokoe', + ['road_test_truck'] = 'rekka ajokoe', + ['school_item'] = '$%s', + ['driving_school'] = 'Autokoulu', + ['press_open_menu'] = 'paina [E] hankkiaksesi ajokortin', + ['driving_school_blip'] = 'Autokoulu', + ['driving_test_complete'] = 'ajokoe suoritettu', + ['driving_too_fast'] = '~r~Ajat liian nopeeta! Hidasta! Nopeusrajoitus: %s km/h!', + ['errors'] = 'mistakes: ~r~%s/%s', + ['you_damaged_veh'] = 'sinä vahingoitit ajoneuvoa. Aja varovaisemmin...', + ['not_enough_money'] = 'Sinulla ei ole tarpeeksi rahaa' +} diff --git a/[esx_addons]/esx_dmvschool/locales/fr.lua b/[esx_addons]/esx_dmvschool/locales/fr.lua new file mode 100644 index 00000000..0d2487a8 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/locales/fr.lua @@ -0,0 +1,29 @@ +Locales['fr'] = { + ['you_paid'] = 'vous avez payé $%s', + ['go_next_point'] = 'allez vers le prochain passage!', + ['in_town_speed'] = 'entrée en ville, attention à votre vitesse! Vitesse limite: %s km/h', + ['next_point_speed'] = 'allez vers le prochain passage! Vitesse limite: %s km/h', + ['stop_for_ped'] = 'faites rapidement un ~r~stop pour le piéton qui traverse', + ['good_lets_cont'] = 'Bien! continuons!', + ['stop_look_left'] = 'marquer rapidement un ~r~stop et regardez à votre gauche. Vitesse limite: %s km/h', + ['good_turn_right'] = 'Bien! prenez à droite et suivez votre file', + ['watch_traffic_lightson'] = 'observez le traffic allumez vos feux!', + ['stop_for_passing'] = 'marquez le stop pour laisser passer les véhicules!', + ['hway_time'] = 'il est temps d\'aller sur la rocade! Vitesse limite: %s km/h', + ['gratz_stay_alert'] = 'bravo, restez vigiliant!', + ['passed_test'] = 'vous avez réussi le test', + ['failed_test'] = 'vous avez ~r~raté le test', + ['theory_test'] = 'examen du code', + ['road_test_car'] = 'examen de conduite [voiture]', + ['road_test_bike'] = 'examen de conduite [moto]', + ['road_test_truck'] = 'examen de conduite [camion]', + ['school_item'] = '$%s', + ['driving_school'] = 'ecole de conduite', + ['press_open_menu'] = 'appuyez sur [E] pour ouvrir le menu', + ['driving_school_blip'] = 'auto-école', + ['driving_test_complete'] = 'test de conduite terminé', + ['driving_too_fast'] = 'vous roulez trop vite, vitesse limite: %s km/h!', + ['errors'] = 'erreurs: ~r~%s/%s', + ['you_damaged_veh'] = 'vous avez endommagé votre véhicule', + ['not_enough_money'] = 'Tu n\'as pas assez d\'argent' +} diff --git a/[esx_addons]/esx_dmvschool/locales/hu.lua b/[esx_addons]/esx_dmvschool/locales/hu.lua new file mode 100644 index 00000000..933ae7a4 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/locales/hu.lua @@ -0,0 +1,29 @@ +Locales['hu'] = { + ['you_paid'] = 'Fizettél $%s az autósiskolának iskolának!', + ['go_next_point'] = 'Menj a kövtkező ponthoz!', + ['in_town_speed'] = 'Beértél a városba, figyelj a sebességedre! A sebesség határ: %s km/h', + ['next_point_speed'] = 'Menj a következő ponthoz! Sebesség határ: %s km/h', + ['stop_for_ped'] = 'Mindig ~r~álj meg a zebránál!', + ['good_lets_cont'] = 'Ügyes, folytasd a vezetést.', + ['stop_look_left'] = '~r~Álj meg és néz balra. Sebesség határ: %s km/h', + ['good_turn_right'] = 'Ügyes, fordulj jobbra, és kövesd a vonalat', + ['watch_traffic_lightson'] = 'Nézd a forgalmat, és kapcsold fel a fényszóróidat!', + ['stop_for_passing'] = '~r~Álj meg a keresztező autóknak!', + ['hway_time'] = 'Itt az idő, hogy először vezess autópályán! Sebesség határ: %s km/h', + ['gratz_stay_alert'] = 'Levagyok nyűgözve, de sose feledd, ~r~NE vezess fáradtan!', + ['passed_test'] = 'Átmentél a vizsgán, gratulálok!', + ['failed_test'] = '~r~Megbuktál a vizsgán, pár óra plusz vezetés után próbáld újra!', + ['theory_test'] = 'Elméleti vizsga', + ['road_test_car'] = 'Személyautó vizsga', + ['road_test_bike'] = ' Nagy motor vizsga', + ['road_test_truck'] = 'Teher autó vizsga', + ['school_item'] = '$%s', + ['driving_school'] = 'Autósiskola', + ['press_open_menu'] = 'Nyomd meg a(z) [E] gombot, hogy megnyisd a menüt.', + ['driving_school_blip'] = 'Autósiskola', + ['driving_test_complete'] = 'A vizsga sikeres volt', + ['driving_too_fast'] = '~r~Túl gyorsan hajtasz,a végén még megállít a rendőr. A sebesség határ: %s km/h!', + ['errors'] = 'Hibapontok: ~r~%s/%s', + ['you_damaged_veh'] = 'Összetörted az autót, ez drága lesz.', + ['not_enough_money'] = 'Nincs elég pénzed!', +} diff --git a/[esx_addons]/esx_dmvschool/locales/it.lua b/[esx_addons]/esx_dmvschool/locales/it.lua new file mode 100644 index 00000000..465a1719 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/locales/it.lua @@ -0,0 +1,29 @@ +Locales['it'] = { + ['you_paid'] = 'hai pagato $%s alla scuola guida', + ['go_next_point'] = 'vai al punto successivo!', + ['in_town_speed'] = 'sei entrato in città, fai attenzione alla tua velocità! Limite di velocità: %s km/h', + ['next_point_speed'] = 'vai al punto successivo! Limite di velocità: %s km/h', + ['stop_for_ped'] = '~r~Stop per il passaggio pedonale', + ['good_lets_cont'] = 'Bene, continua.', + ['stop_look_left'] = '~r~Fermati e guarda a sinistra. Limite di velocità: %s km/h', + ['good_turn_right'] = 'Bene, gira a destra e segui la linea', + ['watch_traffic_lightson'] = 'guarda il traffico e accendi le luci!', + ['stop_for_passing'] = '~r~Stop per i veicoli in transito!', + ['hway_time'] = 'è ora di guidare in autostrada! Limite di velocità: %s km/h', + ['gratz_stay_alert'] = 'sono impressionato, ma non dimenticare di stare ~r~allerta mentre guidi!', + ['passed_test'] = 'hai superato il test, congratulazioni!', + ['failed_test'] = '~r~non hai superato il test, buona fortuna per la prossima volta!', + ['theory_test'] = 'Test di guida teorico', + ['road_test_car'] = 'Test di guida auto', + ['road_test_bike'] = 'Test di guida moto', + ['road_test_truck'] = 'Test di guida camion', + ['school_item'] = '$%s', + ['driving_school'] = 'scuola guida', + ['press_open_menu'] = 'premi [E] per aprire il menu', + ['driving_school_blip'] = 'scuola guida', + ['driving_test_complete'] = 'test di guida completato', + ['driving_too_fast'] = '~r~stai guidando troppo veloce, il limite di velocità attuale è: %s km/h!', + ['errors'] = 'errori: ~r~%s/%s', + ['you_damaged_veh'] = 'hai danneggiato il veicolo', + ['not_enough_money'] = 'non hai abbastanza soldi', +} diff --git a/[esx_addons]/esx_dmvschool/locales/nl.lua b/[esx_addons]/esx_dmvschool/locales/nl.lua new file mode 100644 index 00000000..c06ce9ae --- /dev/null +++ b/[esx_addons]/esx_dmvschool/locales/nl.lua @@ -0,0 +1,29 @@ +Locales['nl'] = { + ['you_paid'] = 'je betaalde €%s aan het CBR', + ['go_next_point'] = 'ga naar het volgende punt!', + ['in_town_speed'] = 'We zitten in de stad, let op je snelheid! Snelheids limiet: %s km/h', + ['next_point_speed'] = 'Ga naar het volgende punt! Snelheids limiet: %s km/h', + ['stop_for_ped'] = '~r~Stop voor de overstekende voetganger', + ['good_lets_cont'] = 'Goed, ga verder.', + ['stop_look_left'] = '~r~Stop en kijk naar links Snelheids limiet: %s km/h', + ['good_turn_right'] = 'Goed, ga naar rechts en volg de weg.', + ['watch_traffic_lightson'] = 'Let op het verkeer en zet je lichten aan!', + ['stop_for_passing'] = '~r~Stop voor passerende voertuigen!', + ['hway_time'] = 'Het is tijd om op de snelweg te rijden! Snelheids limiet: %s km/h', + ['gratz_stay_alert'] = 'Ik ben onder de indruk, vergeet tijdens het rijden niet om ~r~alert te blijven!', + ['passed_test'] = 'je bent geslaagd, gefeliciteerd!', + ['failed_test'] = 'je bent ~r~gezakt~s~, volgende keer beter!', + ['theory_test'] = 'Theorie examen', + ['road_test_car'] = 'Praktijk examen', + ['road_test_bike'] = 'Motor examen', + ['road_test_truck'] = 'Vrachtwagen examen', + ['school_item'] = '€%s', + ['driving_school'] = 'CBR', + ['press_open_menu'] = 'klik op [E] om het menu te openen', + ['driving_school_blip'] = 'CBR', + ['driving_test_complete'] = 'Praktijk examen gedaan', + ['driving_too_fast'] = '~r~Je rijd te snel! De snelheids limiet is: %s km/h!', + ['errors'] = 'Fouten: ~r~%s/%s', + ['you_damaged_veh'] = 'Je hebt het voertuig beschadigd', + ['not_enough_money'] = 'Je hebt niet genoeg geld', +} diff --git a/[esx_addons]/esx_dmvschool/locales/pl.lua b/[esx_addons]/esx_dmvschool/locales/pl.lua new file mode 100644 index 00000000..b1527fc5 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/locales/pl.lua @@ -0,0 +1,29 @@ +Locales['pl'] = { + ['you_paid'] = 'zapłaciłes $%s dla szkoły jazdy.', + ['go_next_point'] = 'udaj się do nastepnego punktu!', + ['in_town_speed'] = 'wjeżdżasz do miasta, zachowaj ostrożność! Ograniczenie prędkości: %s km/h', + ['next_point_speed'] = 'udaj się do nastepnego punktu! Ograniczenie prędkości: %s km/h', + ['stop_for_ped'] = '~r~Stop przejście dla pieszych', + ['good_lets_cont'] = 'Świetnie, kontynuuj.', + ['stop_look_left'] = '~r~Stop spójrz w lewo. Ograniczenie prędkości: %s km/h', + ['good_turn_right'] = 'Świetnie, skręć w prawo i podążaj za linią', + ['watch_traffic_lightson'] = 'obserwuj ruch uliczny i włącz światła!', + ['stop_for_passing'] = '~r~Stop przepuść przejeżdźające pojazdy!', + ['hway_time'] = 'czas na autostradę! Ograniczenie prędkości: %s km/h', + ['gratz_stay_alert'] = 'jestem pod wrażeniem, ale nie zapomnij się zatrzymać ~r~alert podczas jazdy!', + ['passed_test'] = 'Zdałeś egzamin, gratulacje!', + ['failed_test'] = '~r~Oblałeś egzamin, powodzenia następnym razem!', + ['theory_test'] = 'ezgamin Teoretyczny', + ['road_test_car'] = 'egzamin praktyczny kat. B', + ['road_test_bike'] = 'egzamin praktyczny kat. A', + ['road_test_truck'] = 'egzamin praktyczny kat. C', + ['school_item'] = '$%s', + ['driving_school'] = 'szkoła jazdy', + ['press_open_menu'] = 'wciśnij [E] by otworzyć menu', + ['driving_school_blip'] = 'ośrodek egzaminacyjny', + ['driving_test_complete'] = 'test praktyczny zakończony', + ['driving_too_fast'] = '~r~Przekroczenie prędkości! , limit prędkości to: %s km/h!', + ['errors'] = 'błędy: ~r~%s/%s', + ['you_damaged_veh'] = 'uszkodziłeś auto', + ['not_enough_money'] = 'Nie masz wystarczająco dużo pieniędzy' +} diff --git a/[esx_addons]/esx_dmvschool/locales/si.lua b/[esx_addons]/esx_dmvschool/locales/si.lua new file mode 100644 index 00000000..cb9c78ea --- /dev/null +++ b/[esx_addons]/esx_dmvschool/locales/si.lua @@ -0,0 +1,29 @@ +Locales['si'] = { + ['you_paid'] = 'šoli DMV ste plačali $%s', + ['go_next_point'] = 'pojdi na naslednjo točko!', + ['in_town_speed'] = 'vstopil v mesto, bodi pozoren na svojo hitrost! Omejitev hitrosti: %s km/h', + ['next_point_speed'] = 'pojdi do naslednje točke! Omejitev hitrosti: %s km/h', + ['stop_for_ped'] = '~r~Stop za pešca pred prehodom', + ['good_lets_cont'] = 'Good, continue.', + ['stop_look_left'] = '~r~Stop and look left. Omejitev hitrosti: %s km/h', + ['good_turn_right'] = 'Good, zavijte desno in sledite črti', + ['watch_traffic_lightson'] = 'Pazi na promet in prižgi luči!', + ['stop_for_passing'] = '~r~Stop za mimo vozeča vozila!', + ['hway_time'] = 'čas je za vožnjo po avtocesti! Omejitev hitrosti: %s km/h', + ['gratz_stay_alert'] = 'Navdušen sem, vendar med vožnjo ne pozabite ostati ~r~alert!', + ['passed_test'] = 'opravil si test, čestitam!', + ['failed_test'] = 'na testu ste bili neuspešni, naslednjič imejte več sreče!', + ['theory_test'] = 'teoretični vozniški izpit', + ['road_test_car'] = 'test vožnje', + ['road_test_bike'] = 'preizkus spretnosti za motorno kolo', + ['road_test_truck'] = 'preizkus spretnosti za tovornjake', + ['school_item'] = '$%s', + ['driving_school'] = 'šola vožnje', + ['press_open_menu'] = 'pritisnite [E] za odprtje menija', + ['driving_school_blip'] = 'šola vožnje', + ['driving_test_complete'] = 'vozniški izpit opravljen', + ['driving_too_fast'] = '~r~Vozite prehitro, trenutna omejitev hitrosti je: ~km/h!', + ['errors'] = 'napake: ~r~%s/%s', + ['you_damaged_veh'] = 'poškodovali ste vozilo', + ['not_enough_money'] = 'nimaš dovolj denarja', +} diff --git a/[esx_addons]/esx_dmvschool/locales/sv.lua b/[esx_addons]/esx_dmvschool/locales/sv.lua new file mode 100644 index 00000000..53183c59 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/locales/sv.lua @@ -0,0 +1,29 @@ +Locales['sv'] = { + ['you_paid'] = 'du betalade ~r~%s SEK till körskolan', + ['go_next_point'] = 'åk till nästa punkt!', + ['in_town_speed'] = 'du åker ni i stan, var uppmärksam på din hastighet! hastighetsgräns: ', + ['next_point_speed'] = 'åk till nästa punkt! hastighetsgräns: %s km/h', + ['stop_for_ped'] = '~r~Stanna för fotgängare som korsar vägen!', + ['good_lets_cont'] = 'Bra, fortsätt.', + ['stop_look_left'] = '~r~Stanna och kolla åt vänster. Hastighetsgräns: %s km/h', + ['good_turn_right'] = 'Bra, sväng höger och följ linjen', + ['watch_traffic_lightson'] = 'var vaken i trafiken och sätt på dina lampor!', + ['stop_for_passing'] = '~r~Stanna för passerande fordon!', + ['hway_time'] = 'det är dags att köra på motorväg! Hastighetsgräns: %s km/h', + ['gratz_stay_alert'] = 'jag är imponerad, glöm inte vara ~r~pigg när du kör!', + ['passed_test'] = 'du passerade provet, gratulerar!', + ['failed_test'] = 'du ~r~kuggade provet, bättre lycka nästa gång', + ['theory_test'] = 'teoretiskt körningsprov', + ['road_test_car'] = 'B-körkort (personbil)', + ['road_test_bike'] = 'A-körkort (motorcykel)', + ['road_test_truck'] = 'C-körkort (lastbil)', + ['school_item'] = '%s SEK', + ['driving_school'] = 'körskola', + ['press_open_menu'] = 'tryck [E] för att öppna menyn', + ['driving_school_blip'] = 'körskola', + ['driving_test_complete'] = 'körprovet har avslutats', + ['driving_too_fast'] = '~r~Du kör för snabbt, den nuvarande hastighetsgräns är: %s km/h!', + ['errors'] = 'misstag: ~r~%s/%s', + ['you_damaged_veh'] = 'du skadade fordonet!', + ['not_enough_money'] = 'Du har inte tillräckligt med pengar' +} diff --git a/[esx_addons]/esx_dmvschool/localization/de_esx_dmvschool.sql b/[esx_addons]/esx_dmvschool/localization/de_esx_dmvschool.sql new file mode 100644 index 00000000..d052385e --- /dev/null +++ b/[esx_addons]/esx_dmvschool/localization/de_esx_dmvschool.sql @@ -0,0 +1,6 @@ +INSERT INTO `licenses` (`type`, `label`) VALUES + ('dmv', 'Probeführerschein'), + ('drive', 'Führerschein'), + ('drive_bike', 'Motorradschein'), + ('drive_truck', 'Lastkraftschein') +; diff --git a/[esx_addons]/esx_dmvschool/localization/en_esx_dmvschool.sql b/[esx_addons]/esx_dmvschool/localization/en_esx_dmvschool.sql new file mode 100644 index 00000000..7a111bc7 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/localization/en_esx_dmvschool.sql @@ -0,0 +1,8 @@ + + +INSERT INTO `licenses` (`type`, `label`) VALUES + ('dmv', 'Driving Permit'), + ('drive', 'Drivers License'), + ('drive_bike', 'Motorcycle License'), + ('drive_truck', 'Commercial Drivers License') +; diff --git a/[esx_addons]/esx_dmvschool/localization/es_esx_dmvschool.sql b/[esx_addons]/esx_dmvschool/localization/es_esx_dmvschool.sql new file mode 100644 index 00000000..a87c5f6a --- /dev/null +++ b/[esx_addons]/esx_dmvschool/localization/es_esx_dmvschool.sql @@ -0,0 +1,8 @@ + + +INSERT INTO `licenses` (`type`, `label`) VALUES + ('dmv', 'Permiso teórico de conducir'), + ('drive', 'Permiso de conducir de coche'), + ('drive_bike', 'Permiso de conducir de moto'), + ('drive_truck', 'Permiso de conducir de camión') +; diff --git a/[esx_addons]/esx_dmvschool/localization/fi_esx_dmvschool.sql b/[esx_addons]/esx_dmvschool/localization/fi_esx_dmvschool.sql new file mode 100644 index 00000000..2e5dd812 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/localization/fi_esx_dmvschool.sql @@ -0,0 +1,8 @@ + + +INSERT INTO `licenses` (`type`, `label`) VALUES + ('dmv', 'Teoriakoe'), + ('drive', 'Autokortti'), + ('drive_bike', 'Moottoripyöräkortti'), + ('drive_truck', 'Rekkakortti') +; diff --git a/[esx_addons]/esx_dmvschool/localization/fr_esx_dmvschool.sql b/[esx_addons]/esx_dmvschool/localization/fr_esx_dmvschool.sql new file mode 100644 index 00000000..35fd2c3d --- /dev/null +++ b/[esx_addons]/esx_dmvschool/localization/fr_esx_dmvschool.sql @@ -0,0 +1,8 @@ + + +INSERT INTO `licenses` (`type`, `label`) VALUES + ('dmv', 'Permis de conduire'), + ('drive', 'Licence de conduite'), + ('drive_bike', 'Permis de motocyclette'), + ('drive_truck', 'Licence de conduite commerciale') +; diff --git a/[esx_addons]/esx_dmvschool/localization/hu_esx_dmvschool.sql b/[esx_addons]/esx_dmvschool/localization/hu_esx_dmvschool.sql new file mode 100644 index 00000000..3906c805 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/localization/hu_esx_dmvschool.sql @@ -0,0 +1,8 @@ + + +INSERT INTO `licenses` (`type`, `label`) VALUES + ('dmv', 'Vezetési engedély'), + ('drive', 'Jogosítvány'), + ('drive_bike', 'Motoros Jogosítvány'), + ('drive_truck', 'Kereskedelmi Jogosítvány') +; diff --git a/[esx_addons]/esx_dmvschool/localization/nl_esx_dmvschool.sql b/[esx_addons]/esx_dmvschool/localization/nl_esx_dmvschool.sql new file mode 100644 index 00000000..45180d16 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/localization/nl_esx_dmvschool.sql @@ -0,0 +1,6 @@ +INSERT INTO `licenses` (`type`, `label`) VALUES + ('dmv', 'Theorie examen'), + ('drive', 'Rijbewijs B'), + ('drive_bike', 'Motor Rijbewijs'), + ('drive_truck', 'Vrachtwagen Rijbewijs') +; diff --git a/[esx_addons]/esx_dmvschool/localization/si_esx_dmvschool.sql b/[esx_addons]/esx_dmvschool/localization/si_esx_dmvschool.sql new file mode 100644 index 00000000..48e4e035 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/localization/si_esx_dmvschool.sql @@ -0,0 +1,8 @@ + + +INSERT INTO `licenses` (`type`, `label`) VALUES + ('dmv', 'CPP Licenca'), + ('drive', 'Licenca za voznjo avtomobila'), + ('drive_bike', 'Licenca za voznjo motorja'), + ('drive_truck', 'Licenca za voznjo tovornjaka') +; diff --git a/[esx_addons]/esx_dmvschool/localization/sv_esx_dmvschool.sql b/[esx_addons]/esx_dmvschool/localization/sv_esx_dmvschool.sql new file mode 100644 index 00000000..ebca81d5 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/localization/sv_esx_dmvschool.sql @@ -0,0 +1,8 @@ + + +INSERT INTO `licenses` (`type`, `label`) VALUES + ('dmv', 'Körkortstillstånd'), + ('drive', 'B-körkort'), + ('drive_bike', 'A-körkort'), + ('drive_truck', 'C-körkort') +; diff --git a/[esx_addons]/esx_dmvschool/server/main.lua b/[esx_addons]/esx_dmvschool/server/main.lua new file mode 100644 index 00000000..558a0051 --- /dev/null +++ b/[esx_addons]/esx_dmvschool/server/main.lua @@ -0,0 +1,29 @@ +ESX.RegisterServerCallback('esx_dmvschool:canYouPay', function(source, cb, type) + local xPlayer = ESX.GetPlayerFromId(source) + + if xPlayer.getMoney() >= Config.Prices[type] then + xPlayer.removeMoney(Config.Prices[type], "DMV Purchase") + TriggerClientEvent('esx:showNotification', source, TranslateCap('you_paid', Config.Prices[type])) + cb(true) + else + cb(false) + end +end) + +AddEventHandler('esx:playerLoaded', function(source) + TriggerEvent('esx_license:getLicenses', source, function(licenses) + TriggerClientEvent('esx_dmvschool:loadLicenses', source, licenses) + end) +end) + +RegisterNetEvent('esx_dmvschool:addLicense') +AddEventHandler('esx_dmvschool:addLicense', function(type) + local source = source + + TriggerEvent('esx_license:addLicense', source, type, function() + TriggerEvent('esx_license:getLicenses', source, function(licenses) + TriggerClientEvent('esx_dmvschool:loadLicenses', source, licenses) + end) + end) +end) + diff --git a/[esx_addons]/esx_drugs/.editorconfig b/[esx_addons]/esx_drugs/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_drugs/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_drugs/.gitattributes b/[esx_addons]/esx_drugs/.gitattributes new file mode 100644 index 00000000..dfe07704 --- /dev/null +++ b/[esx_addons]/esx_drugs/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/[esx_addons]/esx_drugs/LICENSE b/[esx_addons]/esx_drugs/LICENSE new file mode 100644 index 00000000..c52fbcb5 --- /dev/null +++ b/[esx_addons]/esx_drugs/LICENSE @@ -0,0 +1,674 @@ +GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_drugs + Copyright (C) 2015-2023 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 . + +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_drugs Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_drugs/README.md b/[esx_addons]/esx_drugs/README.md new file mode 100644 index 00000000..07a675db --- /dev/null +++ b/[esx_addons]/esx_drugs/README.md @@ -0,0 +1,15 @@ +

[ESX] Drugs

Discord - Website - Documentation + +Who loves some good old Marijuana? I hope you do! Cause this resource lets you grow, pick, proccess and roll your own to either use for personal use or do some shady deals to sell off your stock to earn **lots** of money! + +# Legal + +esx_drugs - Drugs Job + +Copyright (C) 2015-2023 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/. diff --git a/[esx_addons]/esx_drugs/client/main.lua b/[esx_addons]/esx_drugs/client/main.lua new file mode 100644 index 00000000..77cd648d --- /dev/null +++ b/[esx_addons]/esx_drugs/client/main.lua @@ -0,0 +1,157 @@ +local menuOpen = false +local inZoneDrugShop = false +local inRangeMarkerDrugShop = false +local cfgMarker = Config.Marker; + +--slow loop +CreateThread(function() + while true do + local playerPed = PlayerPedId() + local coords = GetEntityCoords(playerPed) + local distDrugShop = #(coords - Config.CircleZones.DrugDealer.coords) + + inRangeMarkerDrugShop = false + if(distDrugShop <= Config.Marker.Distance) then + inRangeMarkerDrugShop = true + end + + if distDrugShop < 1 then + inZoneDrugShop = true + else + inZoneDrugShop = false + if menuOpen then + menuOpen=false + end + end + + Wait(500) + end +end) + +--drawk marker +CreateThread(function() + while true do + local Sleep = 1500 + if(inRangeMarkerDrugShop) then + Sleep = 0 + local coordsMarker = Config.CircleZones.DrugDealer.coords + local color = cfgMarker.Color + DrawMarker(cfgMarker.Type, coordsMarker.x, coordsMarker.y,coordsMarker.z - 1.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + cfgMarker.Size, color.r,color.g,color.b,color.a, + false, true, 2, false, nil, nil, false) + end + Wait(Sleep) + end +end) + +--main loop +CreateThread(function () + while true do + local Sleep = 1500 + if inZoneDrugShop and not menuOpen then + Sleep = 0 + ESX.ShowHelpNotification(TranslateCap('dealer_prompt'),true) + if IsControlJustPressed(0, 38) then + OpenDrugShop() + end + end + Wait(Sleep) + end +end) + +function OpenDrugShop() + local elements = { + {unselectable = true, icon = "fas fa-cannabis", title = TranslateCap('dealer_title')} + } + menuOpen = true + + for k, v in pairs(ESX.GetPlayerData().inventory) do + local price = Config.DrugDealerItems[v.name] + + if price and v.count > 0 then + elements[#elements+1] = { + icon = "fas fa-shopping-basket", + title = ('%s - %s'):format(v.label, TranslateCap('dealer_item', ESX.Math.GroupDigits(price))), + name = v.name, + price = price, + } + end + end + + ESX.OpenContext("right", elements, function(menu,element) + local elements2 = { + {unselectable = true, icon = "fas fa-shopping-basket", title = element.title}, + {icon = "fas fa-shopping-basket", title = "Amount", input = true, inputType = "number", inputPlaceholder = "Amount you want to sell", inputMin = Config.SellMenu.Min, inputMax = Config.SellMenu.Max}, + {icon = "fas fa-check-double", title = "Confirm", val = "confirm"} + } + + ESX.OpenContext("right", elements2, function(menu2,element2) + local amount = menu2.eles[2].inputValue + ESX.CloseContext() + TriggerServerEvent('esx_drugs:sellDrug', element.name, amount) + end, function(menu) + menuOpen = false + end) + end, function(menu) + menuOpen = false + end) +end + +AddEventHandler('onResourceStop', function(resource) + if resource == GetCurrentResourceName() then + if menuOpen then + ESX.CloseContext() + end + end +end) + +function OpenBuyLicenseMenu(licenseName) + menuOpen = true + local license = Config.LicensePrices[licenseName] + + local elements = { + {unselectable = true, title = TranslateCap('purchase_license')}, + {title = ('%s - %s'):format(license.label, TranslateCap('dealer_item', ESX.Math.GroupDigits(license.price))), value = licenseName, price = license.price, licenseName = license.label} + } + + ESX.OpenContext("right", elements, function(menu,element) + ESX.TriggerServerCallback('esx_drugs:buyLicense', function(boughtLicense) + if boughtLicense then + ESX.CloseContext() + ESX.ShowNotification(TranslateCap('license_bought', element.licenseName, ESX.Math.GroupDigits(element.price))) + else + ESX.ShowNotification(TranslateCap('license_bought_fail', element.licenseName)) + end + end, element.value) + end, function(menu) + menuOpen = false + end) +end + +function CreateBlipCircle(coords, text, radius, color, sprite) + local blip = AddBlipForRadius(coords, radius) + + SetBlipHighDetail(blip, true) + SetBlipColour(blip, 1) + SetBlipAlpha (blip, 128) + + -- create a blip in the middle + blip = AddBlipForCoord(coords) + + SetBlipHighDetail(blip, true) + SetBlipSprite (blip, sprite) + SetBlipScale (blip, 1.0) + SetBlipColour (blip, color) + SetBlipAsShortRange(blip, true) + + BeginTextCommandSetBlipName("STRING") + AddTextComponentSubstringPlayerName(text) + EndTextCommandSetBlipName(blip) +end + +CreateThread(function() + for k,zone in pairs(Config.CircleZones) do + CreateBlipCircle(zone.coords, zone.name, zone.radius, zone.color, zone.sprite) + end +end) diff --git a/[esx_addons]/esx_drugs/client/weed.lua b/[esx_addons]/esx_drugs/client/weed.lua new file mode 100644 index 00000000..b2b7e931 --- /dev/null +++ b/[esx_addons]/esx_drugs/client/weed.lua @@ -0,0 +1,203 @@ +local spawnedWeeds = 0 +local weedPlants = {} +local isPickingUp, isProcessing = false, false + +CreateThread(function() + while true do + Wait(700) + local coords = GetEntityCoords(PlayerPedId()) + + if #(coords - Config.CircleZones.WeedField.coords) < 50 then + SpawnWeedPlants() + end + end +end) + +CreateThread(function() + while true do + local wait = 1000 + local playerPed = PlayerPedId() + local coords = GetEntityCoords(playerPed) + + if #(coords - Config.CircleZones.WeedProcessing.coords) < 1 then + wait = 2 + if not isProcessing then + ESX.ShowHelpNotification(TranslateCap('weed_processprompt')) + end + + if IsControlJustReleased(0, 38) and not isProcessing then + ESX.TriggerServerCallback('esx_drugs:cannabis_count', function(xCannabis) + if Config.LicenseEnable then + ESX.TriggerServerCallback('esx_license:checkLicense', function(hasProcessingLicense) + if hasProcessingLicense then + ProcessWeed(xCannabis) + else + OpenBuyLicenseMenu('weed_processing') + end + end, GetPlayerServerId(PlayerId()), 'weed_processing') + else + ProcessWeed(xCannabis) + end + end) + end + end + Wait(wait) + end +end) + +function ProcessWeed(xCannabis) + isProcessing = true + ESX.ShowNotification(TranslateCap('weed_processingstarted')) + TriggerServerEvent('esx_drugs:processCannabis') + if(xCannabis <= 3) then + xCannabis = 0 + end + local timeLeft = (Config.Delays.WeedProcessing * xCannabis) / 1000 + local playerPed = PlayerPedId() + + while timeLeft > 0 do + Wait(1000) + timeLeft = timeLeft - 1 + + if #(GetEntityCoords(playerPed) - Config.CircleZones.WeedProcessing.coords) > 4 then + ESX.ShowNotification(TranslateCap('weed_processingtoofar')) + TriggerServerEvent('esx_drugs:cancelProcessing') + TriggerServerEvent('esx_drugs:outofbound') + break + end + end + + isProcessing = false +end + +CreateThread(function() + while true do + local Sleep = 1500 + + local playerPed = PlayerPedId() + local coords = GetEntityCoords(playerPed) + local nearbyObject, nearbyID + + for i=1, #weedPlants, 1 do + if #(coords - GetEntityCoords(weedPlants[i])) < 1.5 then + nearbyObject, nearbyID = weedPlants[i], i + end + end + + if nearbyObject and IsPedOnFoot(playerPed) then + Sleep = 0 + if not isPickingUp then + ESX.ShowHelpNotification(TranslateCap('weed_pickupprompt')) + end + + if IsControlJustReleased(0, 38) and not isPickingUp then + isPickingUp = true + + ESX.TriggerServerCallback('esx_drugs:canPickUp', function(canPickUp) + if canPickUp then + TaskStartScenarioInPlace(playerPed, 'world_human_gardener_plant', 0, false) + + Wait(2000) + ClearPedTasks(playerPed) + Wait(1500) + + ESX.Game.DeleteObject(nearbyObject) + + table.remove(weedPlants, nearbyID) + spawnedWeeds = spawnedWeeds - 1 + + TriggerServerEvent('esx_drugs:pickedUpCannabis') + else + ESX.ShowNotification(TranslateCap('weed_inventoryfull')) + end + + isPickingUp = false + end, 'cannabis') + end + end + Wait(Sleep) + end +end) + +AddEventHandler('onResourceStop', function(resource) + if resource == GetCurrentResourceName() then + for k, v in pairs(weedPlants) do + ESX.Game.DeleteObject(v) + end + end +end) + +function SpawnWeedPlants() + while spawnedWeeds < 25 do + Wait(0) + local weedCoords = GenerateWeedCoords() + + ESX.Game.SpawnLocalObject('prop_weed_02', weedCoords, function(obj) + PlaceObjectOnGroundProperly(obj) + FreezeEntityPosition(obj, true) + + table.insert(weedPlants, obj) + spawnedWeeds = spawnedWeeds + 1 + end) + end +end + +function ValidateWeedCoord(plantCoord) + if spawnedWeeds > 0 then + local validate = true + + for k, v in pairs(weedPlants) do + if #(plantCoord - GetEntityCoords(v)) < 5 then + validate = false + end + end + + if #(plantCoord - Config.CircleZones.WeedField.coords) > 50 then + validate = false + end + + return validate + else + return true + end +end + +function GenerateWeedCoords() + while true do + Wait(0) + + local weedCoordX, weedCoordY + + math.randomseed(GetGameTimer()) + local modX = math.random(-90, 90) + + Wait(100) + + math.randomseed(GetGameTimer()) + local modY = math.random(-90, 90) + + weedCoordX = Config.CircleZones.WeedField.coords.x + modX + weedCoordY = Config.CircleZones.WeedField.coords.y + modY + + local coordZ = GetCoordZ(weedCoordX, weedCoordY) + local coord = vector3(weedCoordX, weedCoordY, coordZ) + + if ValidateWeedCoord(coord) then + return coord + end + end +end + +function GetCoordZ(x, y) + local groundCheckHeights = { 48.0, 49.0, 50.0, 51.0, 52.0, 53.0, 54.0, 55.0, 56.0, 57.0, 58.0 } + + for i, height in ipairs(groundCheckHeights) do + local foundGround, z = GetGroundZFor_3dCoord(x, y, height) + + if foundGround then + return z + end + end + + return 43.0 +end diff --git a/[esx_addons]/esx_drugs/config.lua b/[esx_addons]/esx_drugs/config.lua new file mode 100644 index 00000000..27409d0e --- /dev/null +++ b/[esx_addons]/esx_drugs/config.lua @@ -0,0 +1,40 @@ +Config = {} + +Config.Locale = GetConvar('esx:locale', 'en') + +Config.Delays = { + WeedProcessing = 1000 * 7 +} + +Config.DrugDealerItems = { + marijuana = 91 +} + +Config.LicenseEnable = false -- enable processing licenses? The player will be required to buy a license in order to process drugs. Requires esx_license + +Config.LicensePrices = { + weed_processing = {label = TranslateCap('license_weed'), price = 15000} +} + +Config.GiveBlack = true -- give black money? if disabled it'll give regular cash. + +Config.CircleZones = { + WeedField = {coords = vector3(2220.72, 5582.52, 53.81), name = TranslateCap('blip_weedfield'), color = 25, sprite = 496, radius = 100.0}, + WeedProcessing = {coords = vector3(2329.02, 2571.29, 46.68), name = TranslateCap('blip_weedprocessing'), color = 25, sprite = 496}, + + DrugDealer = {coords = vector3(-1172.02, -1571.98, 4.66), name = TranslateCap('blip_drugdealer'), color = 6, sprite = 378}, +} + +Config.Marker = { + Distance = 100.0, + Color = {r=60,g=230,b=60,a=255}, + Size = vector3(1.5,1.5,1.0), + Type = 1, +} + +-- min amount of Config.DrugDealerItems to sell +-- max amount of Config.DrugDealerItems to sell +Config.SellMenu = { + Min = 1, + Max = 50 +} diff --git a/[esx_addons]/esx_drugs/esx_drugs.sql b/[esx_addons]/esx_drugs/esx_drugs.sql new file mode 100644 index 00000000..b511100e --- /dev/null +++ b/[esx_addons]/esx_drugs/esx_drugs.sql @@ -0,0 +1,10 @@ + + +INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES + ('cannabis', 'Cannabis', 3, 0, 1), + ('marijuana', 'Marijuana', 2, 0, 1) +; + +INSERT INTO `licenses` (`type`, `label`) VALUES + ('weed_processing', 'Weed Processing License') +; diff --git a/[esx_addons]/esx_drugs/fxmanifest.lua b/[esx_addons]/esx_drugs/fxmanifest.lua new file mode 100644 index 00000000..5298065a --- /dev/null +++ b/[esx_addons]/esx_drugs/fxmanifest.lua @@ -0,0 +1,29 @@ +fx_version 'adamant' + +game 'gta5' +lua54 'yes' +description 'ESX Drugs' + +version '1.9.0' + +shared_script '@es_extended/imports.lua' + +server_scripts { + '@oxmysql/lib/MySQL.lua', + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'server/main.lua' +} + +client_scripts { + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'client/main.lua', + 'client/weed.lua' +} + +dependencies { + 'es_extended' +} diff --git a/[esx_addons]/esx_drugs/locales/br.lua b/[esx_addons]/esx_drugs/locales/br.lua new file mode 100644 index 00000000..dd36f658 --- /dev/null +++ b/[esx_addons]/esx_drugs/locales/br.lua @@ -0,0 +1,31 @@ +Locales ['br'] = { + -- weed + ['weed_pickupprompt'] = 'aperte [E] para colher a planta Cannabis.', + ['weed_quitprocess'] = 'aperte [E] para parar Processar Cannabis.', + ['weed_inventoryfull'] = 'você não tem mais espaço no inventário para Cannabis.', + ['weed_processprompt'] = 'aperte [E] para começar Processar Cannabis.', + ['weed_processingstarted'] = 'processando Cannabis em Maconha...', + ['weed_processingfull'] = 'processando ~r~cancelado porque o inventário está cheio!', + ['weed_processingenough'] = 'você prescisa ter 3x Cannabis para poder processar.', + ['weed_processed'] = 'você processou 3x Cannabis para 1x Maconha', + ['weed_processingtoofar'] = 'o processamento foi ~r~cancelado porque você abandonou a área.', + + -- drug dealer + ['dealer_prompt'] = 'aperte [E] para falar com o ~r~Drug Dealer.', + ['dealer_title'] = 'traficante de drogas', + ['dealer_item'] = '$%s', + ['dealer_notenough'] = 'você não tem o suficiente disso para vender!', + ['dealer_sold'] = 'você vendeu %sx %s para$%s', + + -- license + ['license_title'] = 'você precisa tirar uma Licença de Processamento de Ervas para processar este produto, a liçenca pode ser comprada aqui.', + ['license_no'] = 'não', + ['license_bought'] = 'você comprou o(a) %s para ~r~$%s', + ['license_bought_fail'] = 'você não pode pagar um %s!', + ['license_weed'] = 'Licença de Processamento de Ervas', + + -- blips + ['blip_weedfield'] = 'campo de ervas', + ['blip_weedprocessing'] = 'Processamento de ervas', + ['blip_drugdealer'] = 'traficante de drogas', +} diff --git a/[esx_addons]/esx_drugs/locales/dk.lua b/[esx_addons]/esx_drugs/locales/dk.lua new file mode 100644 index 00000000..5aa312e2 --- /dev/null +++ b/[esx_addons]/esx_drugs/locales/dk.lua @@ -0,0 +1,30 @@ +Locales ['dk'] = { + -- weed + ['weed_pickupprompt'] = 'tryk [E] for at høste Cannabis planten.', + ['weed_inventoryfull'] = 'du har ikke mere plads i dit inventory til Cannabis.', + ['weed_processprompt'] = 'tryk [E] for at starte Behandling af Cannabis.', + ['weed_processingstarted'] = 'laver Cannabis om til Marihuana...', + ['weed_processingfull'] = 'behandling ~r~annulleret på grund af dit inventory er fuldt!', + ['weed_processingenough'] = 'du skal have ~b2 stks Cannabis for at lave dem om.', + ['weed_processed'] = 'du har lavet 2 stks Cannabis om til 1 stks Marihuana', + ['weed_processingtoofar'] = 'din behandling er blevet ~r~annulleret fordi du kom ud af rækkevidde.', + + -- drug dealer + ['dealer_prompt'] = 'tryk [E] for at snakke med ~r~Pusheren.', + ['dealer_title'] = 'Pusher', + ['dealer_item'] = '$%s', + ['dealer_notenough'] = 'Du har ikke nok til at sælge!', + ['dealer_sold'] = 'Du har solgt %sx %s for $%s', + + -- license + ['license_title'] = 'Du er forpligtet til at eje et behandlingslicens for at lave stoffer, det kan købes her.', + ['license_no'] = 'nej', + ['license_bought'] = 'du købte %s for ~r~$%s', + ['license_bought_fail'] = 'du har ikke råd til en %s!', + ['license_weed'] = 'Cannabis behandlings licens', + + -- blips + ['blip_weedfield'] = 'Cannabis Mark', + ['blip_weedprocessing'] = 'Cannabis Behandlingscenter', + ['blip_drugdealer'] = 'Pusher', +} diff --git a/[esx_addons]/esx_drugs/locales/en.lua b/[esx_addons]/esx_drugs/locales/en.lua new file mode 100644 index 00000000..888cd334 --- /dev/null +++ b/[esx_addons]/esx_drugs/locales/en.lua @@ -0,0 +1,31 @@ +Locales ['en'] = { + -- weed + ['weed_pickupprompt'] = 'press [E] to harvest the Cannabis plant.', + ['weed_quitprocess'] = 'press [E] to stop Process Cannabis.', + ['weed_inventoryfull'] = 'you do not have any more inventory space for Cannabis.', + ['weed_processprompt'] = 'press [E] to start Process Cannabis.', + ['weed_processingstarted'] = 'processing Cannabis into Marijuana...', + ['weed_processingfull'] = 'processing ~r~canceled due to full inventory!', + ['weed_processingenough'] = 'you must have 3x Cannabis in order to process.', + ['weed_processed'] = 'you\'ve processed 3x Cannabis to 1x Marijuana', + ['weed_processingtoofar'] = 'the processing has been ~r~canceled due to you abandoning the area.', + + -- drug dealer + ['dealer_prompt'] = 'press [E] to talk with the ~r~Drug Dealer.', + ['dealer_title'] = 'drug Dealer', + ['dealer_item'] = '$%s', + ['dealer_notenough'] = 'you don\'t have enough of that to sell!', + ['dealer_sold'] = 'you\'ve sold %sx %s for $%s', + + -- license + ['license_title'] = 'you are required to own a processing license to process this product, it can be bought here.', + ['license_no'] = 'no', + ['license_bought'] = 'you bought the %s for ~r~$%s', + ['license_bought_fail'] = 'you cannot afford an %s!', + ['license_weed'] = 'weed Processing License', + + -- blips + ['blip_weedfield'] = 'weed Field', + ['blip_weedprocessing'] = 'weed Processing', + ['blip_drugdealer'] = 'drug Dealer', +} diff --git a/[esx_addons]/esx_drugs/locales/es.lua b/[esx_addons]/esx_drugs/locales/es.lua new file mode 100644 index 00000000..fbfc3a2d --- /dev/null +++ b/[esx_addons]/esx_drugs/locales/es.lua @@ -0,0 +1,30 @@ +Locales ['es'] = { + -- weed + ['weed_pickupprompt'] = 'pulsa [E] para recolectar Marijuana húmeda.', + ['weed_inventoryfull'] = 'no puedes llevar más Marijuana húmeda!', + ['weed_processprompt'] = 'pulsa [E] para secar la Marijuana.', + ['weed_processingstarted'] = 'secando la Marijuana húmeda...', + ['weed_processingfull'] = 'no puedes llevar más Marijuana!', + ['weed_processingenough'] = 'necesitas 3x Marijuana húmeda.', + ['weed_processed'] = 'de 3x Marijuana húmeda has obtenido 1x Marijuana', + ['weed_processingtoofar'] = 'el secado se ha ~r~cancelado por que has abandonado el área.', + + -- drug dealer + ['dealer_prompt'] = 'pulsa [E] para hablar con el ~r~Camello.', + ['dealer_title'] = 'camello', + ['dealer_item'] = '$%s', + ['dealer_notenough'] = 'esa mierda no es cantidad suficiente para vender!', + ['dealer_sold'] = 'has vendido %sx %s por $%s', + + -- license + ['license_title'] = 'necesitas un permiso para poder tratar con ese producto, puedes comprarlo aquí.', + ['license_no'] = 'no', + ['license_bought'] = 'has comprado %s por ~r~$%s', + ['license_bought_fail'] = 'no puedes permitirte %s!', + ['license_weed'] = 'permiso de cultivo de Marijuana', + + -- blips + ['blip_weedfield'] = 'plantación de Marijuana', + ['blip_weedprocessing'] = 'preparación de Marijuana', + ['blip_drugdealer'] = 'camello' +} diff --git a/[esx_addons]/esx_drugs/locales/et.lua b/[esx_addons]/esx_drugs/locales/et.lua new file mode 100644 index 00000000..e9f8bee5 --- /dev/null +++ b/[esx_addons]/esx_drugs/locales/et.lua @@ -0,0 +1,31 @@ +Locales ['et'] = { + -- weed + ['weed_pickupprompt'] = 'Vajuta [E], et korjata kanepitaime.', + ['weed_quitprocess'] = 'Vajuta [E], et katkestada kanepitaimede töötlemine.', + ['weed_inventoryfull'] = 'Sul pole rohkem ruumi kanepitaimede jaoks.', + ['weed_processprompt'] = 'Vajuta [E], et töödelda kanepitaimesid.', + ['weed_processingstarted'] = 'Kanepitaimede töötlemine kanepiks...', + ['weed_processingfull'] = 'Töötlemine ~r~katkestatud, kuna sul pole rohkem ruumi!', + ['weed_processingenough'] = 'Sul peab olema vähemalt 3x kanepitaime, et töödelda.', + ['weed_processed'] = 'Sa töötlesid 3x kanepitaime 1x kanepiks', + ['weed_processingtoofar'] = 'Töötlemine ~r~katkestatud, kuna lahkusid alast.', + + -- drug dealer + ['dealer_prompt'] = 'Vajuta [E], et rääkida ~r~Narko Diileriga.', + ['dealer_title'] = 'Narko diiler', + ['dealer_item'] = '$%s', + ['dealer_notenough'] = 'Sul pole seda piisavalt, et müüa!', + ['dealer_sold'] = 'Sa müüsid %sx %s $%s eest', + + -- license + ['license_title'] = 'Sul peab olema töötlemis litsents,et seda teha, seda saab ostas siit.', + ['license_no'] = 'ei', + ['license_bought'] = 'Sa ostsid %s ~r~$%s eest', + ['license_bought_fail'] = 'Sul pole piisavalt raha, et osta%s!', + ['license_weed'] = 'Kanepi töötlemis litsents', + + -- blips + ['blip_weedfield'] = 'Kanepi põld', + ['blip_weedprocessing'] = 'Kanepi töötlemine', + ['blip_drugdealer'] = 'Narko diiler', +} diff --git a/[esx_addons]/esx_drugs/locales/fr.lua b/[esx_addons]/esx_drugs/locales/fr.lua new file mode 100644 index 00000000..9c068f66 --- /dev/null +++ b/[esx_addons]/esx_drugs/locales/fr.lua @@ -0,0 +1,30 @@ +Locales ['fr'] = { + -- weed + ['weed_pickupprompt'] = 'appuyez sur [E] pour récolter un plan de Cannabis.', + ['weed_inventoryfull'] = 'vous n\'avez plus assez de place dans votre inventaire pour récolter du Cannabis.', + ['weed_processprompt'] = 'appuyez [E] pour démarrer la tranformation du Cannabis.', + ['weed_processingstarted'] = 'transformation du Cannabis en Marijuana...', + ['weed_processingfull'] = 'transformation ~r~annulée. Votre inventaire est plein!', + ['weed_processingenough'] = 'vous devez avoir 3x Cannabis pour lancer une transformation.', + ['weed_processed'] = 'vous avez transformé 3x Cannabis en 1x Marijuana', + ['weed_processingtoofar'] = 'la transformation a été ~r~annulée. Vous êtes sorti de la zone.', + + -- drug dealer + ['dealer_prompt'] = 'appuyez sur [E] pour parler avec le ~r~Dealer de drogue.', + ['dealer_title'] = 'Dealer de drogue', + ['dealer_item'] = '$%s', + ['dealer_notenough'] = 't\'en as pas assez à vendre!', + ['dealer_sold'] = 'vous avez vendu %sx %s pour $%s', + + -- license + ['license_title'] = 'vous devez posséder une license spécifique vous autorisant à transformer ce produit. Vous pouvez l\'acheter ici.', + ['license_no'] = 'non', + ['license_bought'] = 'vous avez acheté %s pour ~r~$%s', + ['license_bought_fail'] = 'vous ne pouvez pas acheter %s!', + ['license_weed'] = 'permis de transformation de weed', + + -- blips + ['blip_weedfield'] = 'champs de weed', + ['blip_weedprocessing'] = 'transformation de weed', + ['blip_drugdealer'] = 'Dealer de drogue', +} diff --git a/[esx_addons]/esx_drugs/locales/hu.lua b/[esx_addons]/esx_drugs/locales/hu.lua new file mode 100644 index 00000000..60556106 --- /dev/null +++ b/[esx_addons]/esx_drugs/locales/hu.lua @@ -0,0 +1,31 @@ +Locales ['hu'] = { + -- weed + ['weed_pickupprompt'] = 'Nyomd meg a [E] gombot a betakarításhoz Kannabisz', + ['weed_quitprocess'] = 'Nyomd meg a [E] gombot a betakarítás befejezéséhez', + ['weed_inventoryfull'] = 'Nincs több hely a Kannabisz számára.', + ['weed_processprompt'] = 'Nyomd meg a [E] gombot a kezdéshez Kannabisz betakarítása.', + ['weed_processingstarted'] = 'Folyamatban Kannabisz into Marihuana...', + ['weed_processingfull'] = 'Betakarítás ~r~befejezve a raktár tele', + ['weed_processingenough'] = 'Rendelkezned kell 3x Kannabisz a végrehajtáshoz', + ['weed_processed'] = 'Feldolgoztad 3x Kannabisz to 1x Marihuana', + ['weed_processingtoofar'] = 'A feldolgozás ~r~megszakadt elhagytad a területet.', + + -- drug dealer + ['dealer_prompt'] = 'Nyomd meg a [E] gombot a találkozáshoz a ~r~Dílerrel.', + ['dealer_title'] = 'Díler', + ['dealer_item'] = '$%s', + ['dealer_notenough'] = 'Nincs elég anyagod az eladáshoz', + ['dealer_sold'] = 'Sikeres eladás %sx %s for $%s', + + -- license + ['license_title'] = 'A feldolgozáshoz engedélyek kellenek, melyeket itt megvehetsz', + ['license_no'] = 'Nem', + ['license_bought'] = 'Megvetted a %s for ~r~$%s', + ['license_bought_fail'] = 'Nincs elég pénzed %s!', + ['license_weed'] = 'Kannabisz Feldolgozási Engedély', + + -- blips + ['blip_weedfield'] = 'Kannabisz ültetvény', + ['blip_weedprocessing'] = 'Kannabisz feldolgozás', + ['blip_drugdealer'] = 'Díler', +} diff --git a/[esx_addons]/esx_drugs/locales/it.lua b/[esx_addons]/esx_drugs/locales/it.lua new file mode 100644 index 00000000..2d93420e --- /dev/null +++ b/[esx_addons]/esx_drugs/locales/it.lua @@ -0,0 +1,31 @@ +Locales ['it'] = { + -- weed + ['weed_pickupprompt'] = 'premi [E] per raccogliere la pianta di cannabis.', + ['weed_quitprocess'] = 'premi [E] per interrompere il Processo Cannabis.', + ['weed_inventoryfull'] = 'non hai più spazio nell\'inventario per la Cannabis.', + ['weed_processprompt'] = 'premi [E] per avviare il processo Cannabis.', + ['weed_processingstarted'] = 'trasformando la cannabis in Marijuana...', + ['weed_processingfull'] = 'elaborazione ~r~annullata a causa dell\'inventario pieno!', + ['weed_processingenough'] = 'devi avere 3x Cannabis per poter processare.', + ['weed_processed'] = 'hai trasformato 3x di cannabis in 1x Marijuana', + ['weed_processingtoofar'] = 'la trasformazione è stata ~r~annullata a causa dell\'abbandono dell\'area .', + + -- drug dealer + ['dealer_prompt'] = 'premi [E] per parlare con il ~r~venditore.', + ['dealer_title'] = 'venditore', + ['dealer_item'] = '$%s', + ['dealer_notenough'] = 'non hai abbastanza merce da vendere!', + ['dealer_sold'] = 'hai venduto %sx %s per $%s', + + -- license + ['license_title'] = 'devi possedere una licenza di elaborazione per elaborare questo prodotto, può essere acquistata qui.', + ['license_no'] = 'no', + ['license_bought'] = 'hai comprato %s per ~r~$%s', + ['license_bought_fail'] = 'non puoi permetterti un %s!', + ['license_weed'] = 'licenza elaborazione erba', + + -- blips + ['blip_weedfield'] = 'campo erba', + ['blip_weedprocessing'] = 'elaborazione erba', + ['blip_drugdealer'] = 'compratore', +} diff --git a/[esx_addons]/esx_drugs/locales/nl.lua b/[esx_addons]/esx_drugs/locales/nl.lua new file mode 100644 index 00000000..479c521a --- /dev/null +++ b/[esx_addons]/esx_drugs/locales/nl.lua @@ -0,0 +1,31 @@ +Locales ['nl'] = { + -- weed + ['weed_pickupprompt'] = 'druk op [E] om de Cannabis plant te oogsten.', + ['weed_quitprocess'] = 'druk op [E] om Proces Cannabis te stoppen.', + ['weed_inventoryfull'] = 'heb je geen voorraadruimte meer voor Cannabis.', + ['weed_processprompt'] = 'druk op [E] om Proces Cannabis te starten.', + ['weed_processingstarted'] = 'Cannabis verwerken tot marihuana...', + ['weed_processingfull'] = 'verwerking ~r~geannuleerd wegens volle voorraad!', + ['weed_processingenough'] = 'u moet 3x Cannabis hebben om te kunnen verwerken.', + ['weed_processed'] = 'je hebt 3x Cannabis verwerkt tot 1x Marihuana', + ['weed_processingtoofar'] = 'het proces is geannuleerd omdat u het gebied verlaten heeft.', + + -- drug dealer + ['dealer_prompt'] = 'druk op [E] om met de ~r~Drugs Dealer te praten.', + ['dealer_title'] = 'drugsdealer', + ['dealer_item'] = '$%s', + ['dealer_notenough'] = 'heb je daar niet genoeg van om te verkopen!', + ['dealer_sold'] = 'je hebt %sx %s verkocht voor $%s', + + -- license + ['license_title'] = 'u moet een verwerkingsvergunning hebben om dit product te verwerken, die kunt u hier kopen.', + ['license_no'] = 'nee', + ['license_bought'] = 'je kocht de %s voor ~r~$%s', + ['license_bought_fail'] = 'je kunt je geen %s veroorloven!', + ['license_weed'] = 'Licentie voor wietverwerking', + + -- blips + ['blip_weedfield'] = 'onkruidveld', + ['blip_weedprocessing'] = 'onkruidverwerking', + ['blip_drugdealer'] = 'drugsdealer', +} diff --git a/[esx_addons]/esx_drugs/locales/pl.lua b/[esx_addons]/esx_drugs/locales/pl.lua new file mode 100644 index 00000000..ca85f8a3 --- /dev/null +++ b/[esx_addons]/esx_drugs/locales/pl.lua @@ -0,0 +1,31 @@ +Locales ['pl'] = { + -- weed (marihuana) + ['weed_pickupprompt'] = 'naciśnij [E] aby zebrać liście Konopii.', + ['weed_quitprocess'] = 'naciśnij [E] aby przestać Przerabianie Marihuany.', + ['weed_inventoryfull'] = '~r~Nie możesz zebrać więcej konopii, nie masz wystarczająco miejsca w ekwipunku!', + ['weed_processprompt'] = 'naciśnij [E] aby rozpocząć Przerabianie Marihuany.', + ['weed_processingstarted'] = 'przerabianie Konopii na Marihuane...', + ['weed_processingfull'] = 'przerabianie ~r~przerwane ponieważ masz pełny ekwipunek!', + ['weed_processingenough'] = 'potrzebujesz 3x Konopii aby rozpocząć przerabianie.', + ['weed_processed'] = 'przerobiłeś 3x Konopii na 1x Marihuane', + ['weed_processingtoofar'] = 'przerabianie zostało ~r~przerwane ponieważ opuściłeś teren.', + + -- drug dealer (dealer narkotyków) + ['dealer_prompt'] = 'naciśnij [E] aby rozmawiać z ~r~Dealerem Narkotyków.', + ['dealer_title'] = 'dealer Narkotyków', + ['dealer_item'] = '$%s', + ['dealer_notenough'] = 'nie masz tego wystarczająco aby to sprzedać!', + ['dealer_sold'] = 'sprzedałeś %sx %s za $%s', + + -- license (licencje) + ['license_title'] = 'musisz posiadać licencję na przetwarzanie aby przerobić ten produkt, możesz zakupić ją tutaj.', + ['license_no'] = 'nie', + ['license_bought'] = 'kupiłeś %s za ~r~$%s', + ['license_bought_fail'] = 'nie stać cię na %s!', + ['license_weed'] = 'licencja na przetwarzanie zioła', + + -- blips (znaczniki) + ['blip_weedfield'] = 'plantacja Marihuany', + ['blip_weedprocessing'] = 'przeróbka Marihuany', + ['blip_drugdealer'] = 'dealer Narkotyków', +} diff --git a/[esx_addons]/esx_drugs/locales/si.lua b/[esx_addons]/esx_drugs/locales/si.lua new file mode 100644 index 00000000..554c8aa4 --- /dev/null +++ b/[esx_addons]/esx_drugs/locales/si.lua @@ -0,0 +1,31 @@ +Locales ['si'] = { + -- trava + ['weed_pickupprompt'] = 'pritisnite [E], da poberete rastlino Cannabis.', + ['weed_quitprocess'] = 'pritisnite [E], da ustavite Process Cannabis.', + ['weed_inventoryfull'] = 'v inventarju ni več prostora za Cannabis.', + ['weed_processprompt'] = 'pritisnite [E], da začnete Proces Cannabis.', + ['weed_processingstarted'] = 'obdelava Cannabis v Marijuana...', + ['weed_processingfull'] = 'obdelava ~r~canceled zaradi polne zaloge!', + ['weed_processingenough'] = 'za obdelavo moraš imeti 3x Cannabis.', + ['weed_processed'] = 'predelal si 3x Cannabis v 1x Marijuana', + ['weed_processingtoofar'] = 'obdelava je bila ~r~zaključena, ker ste zapustili območje.', + + -- preprodajalec drog + ['dealer_prompt'] = 'pritisnite [E] za pogovor s ~r~dilerjem drog.', + ['dealer_title'] = 'prodajalec drog', + ['dealer_item'] = '$%s', + ['dealer_notenough'] = 'nimaš dovolj tega, da bi ga prodal!', + ['dealer_sold'] = 'prodal si %sx %s za $%s', + + -- licenca + ['licence_title'] = 'za predelavo tega izdelka morate imeti licenco za predelavo, ki jo lahko kupite tukaj.', + ['licence_no'] = 'ne', + ['licence_bought'] = 'kupili ste %s za ~r~$%s', + ['license_bought_fail'] = 'ne morete si privoščiti %s!', + ['licence_weed'] = 'dovoljenje za predelavo plevela', + + -- blips + ['blip_weedfield'] = 'plevel Field', + ['blip_weedprocessing'] = 'obdelava plevela', + ['blip_drugdealer'] = 'trgovec z drogami', +} diff --git a/[esx_addons]/esx_drugs/locales/sv.lua b/[esx_addons]/esx_drugs/locales/sv.lua new file mode 100644 index 00000000..7f3127ee --- /dev/null +++ b/[esx_addons]/esx_drugs/locales/sv.lua @@ -0,0 +1,30 @@ +Locales ['sv'] = { + -- weed + ['weed_pickupprompt'] = 'tryck [E] för att skörda Cannabisväxten.', + ['weed_inventoryfull'] = 'du har ingen mer plats för Cannabis.', + ['weed_processprompt'] = 'tryck [E] för att börja Processera Cannabis.', + ['weed_processingstarted'] = 'processerar Cannabis till Marijuana...', + ['weed_processingfull'] = 'processeringen ~r~avbröts för att utrymmet är slut!', + ['weed_processingenough'] = 'du måste ha 3x Cannabis för att kunna bearbeta det.', + ['weed_processed'] = 'du har processerat 3x Cannabis till 1x Marijuana', + ['weed_processingtoofar'] = 'processeringen har ~r~har avbrutit på grund av att du lämnade området.', + + -- drug dealer + ['dealer_prompt'] = 'tryck [E] för att prata med ~r~Drågsäljaren.', + ['dealer_title'] = 'drogsäljare', + ['dealer_item'] = '%s SEK', + ['dealer_notenough'] = 'du har inte tillräckligt med det till salu!', + ['dealer_sold'] = 'du har sålt %sx %s för %s SEK', + + -- license + ['license_title'] = 'du måste ha ett visst processeringslicens för att kunna bearbeta denna produkt, detta kan dock köpas här.', + ['license_no'] = 'nej', + ['license_bought'] = 'du köpte %s för ~r~%s SEK', + ['license_bought_fail'] = 'du har inte råd för %s!', + ['license_weed'] = 'marijuana processeringslicens', + + -- blips + ['blip_weedfield'] = 'marijuana plock', + ['blip_weedprocessing'] = 'marijuana processering', + ['blip_drugdealer'] = 'drogsäljare', +} diff --git a/[esx_addons]/esx_drugs/localization/en_esx_drugs.sql b/[esx_addons]/esx_drugs/localization/en_esx_drugs.sql new file mode 100644 index 00000000..b511100e --- /dev/null +++ b/[esx_addons]/esx_drugs/localization/en_esx_drugs.sql @@ -0,0 +1,10 @@ + + +INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES + ('cannabis', 'Cannabis', 3, 0, 1), + ('marijuana', 'Marijuana', 2, 0, 1) +; + +INSERT INTO `licenses` (`type`, `label`) VALUES + ('weed_processing', 'Weed Processing License') +; diff --git a/[esx_addons]/esx_drugs/localization/es_esx_drugs.sql b/[esx_addons]/esx_drugs/localization/es_esx_drugs.sql new file mode 100644 index 00000000..5a1a0940 --- /dev/null +++ b/[esx_addons]/esx_drugs/localization/es_esx_drugs.sql @@ -0,0 +1,10 @@ + + +INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES + ('cannabis', 'Marijuana húmeda', 3, 0, 1), + ('marijuana', 'Marijuana', 2, 0, 1) +; + +INSERT INTO `licenses` (`type`, `label`) VALUES + ('weed_processing', 'permiso de cultivo de Marijuana') +; diff --git a/[esx_addons]/esx_drugs/localization/hu_esx_drugs.sql b/[esx_addons]/esx_drugs/localization/hu_esx_drugs.sql new file mode 100644 index 00000000..5e0680a1 --- /dev/null +++ b/[esx_addons]/esx_drugs/localization/hu_esx_drugs.sql @@ -0,0 +1,10 @@ + + +INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES + ('cannabis', 'Cannabis', 3, 0, 1), + ('marijuana', 'Marihuána', 2, 0, 1) +; + +INSERT INTO `licenses` (`type`, `label`) VALUES + ('weed_processing', 'Fű termesztési engedély') +; diff --git a/[esx_addons]/esx_drugs/localization/nl_esx_drugs.sql b/[esx_addons]/esx_drugs/localization/nl_esx_drugs.sql new file mode 100644 index 00000000..b3ab5429 --- /dev/null +++ b/[esx_addons]/esx_drugs/localization/nl_esx_drugs.sql @@ -0,0 +1,8 @@ +INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES + ('cannabis', 'Onvewerkte Wiet', 3, 0, 1), + ('marijuana', 'Wiet', 2, 0, 1) +; + +INSERT INTO `licenses` (`type`, `label`) VALUES + ('weed_processing', 'Wiet Processing Vergunning') +; diff --git a/[esx_addons]/esx_drugs/server/main.lua b/[esx_addons]/esx_drugs/server/main.lua new file mode 100644 index 00000000..6dda8af4 --- /dev/null +++ b/[esx_addons]/esx_drugs/server/main.lua @@ -0,0 +1,144 @@ +local playersProcessingCannabis = {} +local outofbound = true +local alive = true + +RegisterServerEvent('esx_drugs:sellDrug') +AddEventHandler('esx_drugs:sellDrug', function(itemName, amount) + local xPlayer = ESX.GetPlayerFromId(source) + local price = Config.DrugDealerItems[itemName] + local xItem = xPlayer.getInventoryItem(itemName) + + if not price then + print(('esx_drugs: %s attempted to sell an invalid drug!'):format(xPlayer.identifier)) + return + end + + if xItem.count < amount then + xPlayer.showNotification(TranslateCap('dealer_notenough')) + return + end + + price = ESX.Math.Round(price * amount) + + if Config.GiveBlack then + xPlayer.addAccountMoney('black_money', price, "Drugs Sold") + else + xPlayer.addMoney(price, "Drugs Sold") + end + + xPlayer.removeInventoryItem(xItem.name, amount) + xPlayer.showNotification(TranslateCap('dealer_sold', amount, xItem.label, ESX.Math.GroupDigits(price))) +end) + +ESX.RegisterServerCallback('esx_drugs:buyLicense', function(source, cb, licenseName) + local xPlayer = ESX.GetPlayerFromId(source) + local license = Config.LicensePrices[licenseName] + + if license then + if xPlayer.getMoney() >= license.price then + xPlayer.removeMoney(license.price) + + TriggerEvent('esx_license:addLicense', source, licenseName, function() + cb(true) + end) + else + cb(false) + end + else + print(('esx_drugs: %s attempted to buy an invalid license!'):format(xPlayer.identifier)) + cb(false) + end +end) + +RegisterServerEvent('esx_drugs:pickedUpCannabis') +AddEventHandler('esx_drugs:pickedUpCannabis', function() + local xPlayer = ESX.GetPlayerFromId(source) + local cime = math.random(5,10) + + if xPlayer.canCarryItem('cannabis', cime) then + xPlayer.addInventoryItem('cannabis', cime) + else + xPlayer.showNotification(TranslateCap('weed_inventoryfull')) + end +end) + +ESX.RegisterServerCallback('esx_drugs:canPickUp', function(source, cb, item) + local xPlayer = ESX.GetPlayerFromId(source) + cb(xPlayer.canCarryItem(item, 1)) +end) + +RegisterServerEvent('esx_drugs:outofbound') +AddEventHandler('esx_drugs:outofbound', function() + outofbound = true +end) + +ESX.RegisterServerCallback('esx_drugs:cannabis_count', function(source, cb) + local xPlayer = ESX.GetPlayerFromId(source) + local xCannabis = xPlayer.getInventoryItem('cannabis').count + cb(xCannabis) +end) + +RegisterServerEvent('esx_drugs:processCannabis') +AddEventHandler('esx_drugs:processCannabis', function() + if not playersProcessingCannabis[source] then + local source = source + local xPlayer = ESX.GetPlayerFromId(source) + local xCannabis = xPlayer.getInventoryItem('cannabis') + local can = true + outofbound = false + if xCannabis.count >= 3 then + while outofbound == false and can do + if playersProcessingCannabis[source] == nil then + playersProcessingCannabis[source] = ESX.SetTimeout(Config.Delays.WeedProcessing , function() + if xCannabis.count >= 3 then + if xPlayer.canSwapItem('cannabis', 3, 'marijuana', 1) then + xPlayer.removeInventoryItem('cannabis', 3) + xPlayer.addInventoryItem('marijuana', 1) + xPlayer.showNotification(TranslateCap('weed_processed')) + else + can = false + xPlayer.showNotification(TranslateCap('weed_processingfull')) + TriggerEvent('esx_drugs:cancelProcessing') + end + else + can = false + xPlayer.showNotification(TranslateCap('weed_processingenough')) + TriggerEvent('esx_drugs:cancelProcessing') + end + + playersProcessingCannabis[source] = nil + end) + else + Wait(Config.Delays.WeedProcessing) + end + end + else + xPlayer.showNotification(TranslateCap('weed_processingenough')) + TriggerEvent('esx_drugs:cancelProcessing') + end + + else + print(('esx_drugs: %s attempted to exploit weed processing!'):format(GetPlayerIdentifiers(source)[1])) + end +end) + +function CancelProcessing(playerId) + if playersProcessingCannabis[playerId] then + ESX.ClearTimeout(playersProcessingCannabis[playerId]) + playersProcessingCannabis[playerId] = nil + end +end + +RegisterServerEvent('esx_drugs:cancelProcessing') +AddEventHandler('esx_drugs:cancelProcessing', function() + CancelProcessing(source) +end) + +AddEventHandler('esx:playerDropped', function(playerId, reason) + CancelProcessing(playerId) +end) + +RegisterServerEvent('esx:onPlayerDeath') +AddEventHandler('esx:onPlayerDeath', function(data) + CancelProcessing(source) +end) diff --git a/[esx_addons]/esx_garage/LICENSE b/[esx_addons]/esx_garage/LICENSE new file mode 100644 index 00000000..4b0e8316 --- /dev/null +++ b/[esx_addons]/esx_garage/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_garage + Copyright (C) 2015-2023 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 . + +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_garage Copyright (C) 2015-2023 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 +. + + 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 +. diff --git a/[esx_addons]/esx_garage/README.md b/[esx_addons]/esx_garage/README.md new file mode 100644 index 00000000..e738bc72 --- /dev/null +++ b/[esx_addons]/esx_garage/README.md @@ -0,0 +1,15 @@ +

[ESX] Garage

Discord - Website - Documentation + +Store Your vehicles in style! ESX garage has an amazing New UI to help you be stylish while parking your broken, rusty Nissan Micra! + +# Legal + +esx_Garage - store vehicles in style! + +Copyright (C) ESX-Framework + +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/. diff --git a/[esx_addons]/esx_garage/client/main.lua b/[esx_addons]/esx_garage/client/main.lua new file mode 100644 index 00000000..bdc4d1ec --- /dev/null +++ b/[esx_addons]/esx_garage/client/main.lua @@ -0,0 +1,444 @@ +local LastMarker, LastPart, thisGarage, thisPound = nil, nil, nil, nil +local next = next +local nearMarker, menuIsShowed = false, false +local vehiclesList, vehiclesImpoundedList = {}, {} + +RegisterNetEvent('esx_garage:closemenu') +AddEventHandler('esx_garage:closemenu', function() + menuIsShowed = false + vehiclesList, vehiclesImpoundedList = {}, {} + + SetNuiFocus(false) + SendNUIMessage({ + hideAll = true + }) + + if not menuIsShowed and thisGarage then + ESX.TextUI(TranslateCap('access_parking')) + end + if not menuIsShowed and thisPound then + ESX.TextUI(TranslateCap('access_Impound')) + end +end) + +RegisterNUICallback('escape', function(data, cb) + TriggerEvent('esx_garage:closemenu') + cb('ok') +end) + +RegisterNUICallback('spawnVehicle', function(data, cb) + local spawnCoords = vector3(data.spawnPoint.x, data.spawnPoint.y, data.spawnPoint.z) + if thisGarage then + + if ESX.Game.IsSpawnPointClear(spawnCoords, 2.5) then + thisGarage = nil + TriggerServerEvent('esx_garage:updateOwnedVehicle', false, nil, nil, data, spawnCoords) + TriggerEvent('esx_garage:closemenu') + + ESX.ShowNotification(TranslateCap('veh_released')) + + else + ESX.ShowNotification(TranslateCap('veh_block'), 'error') + end + + elseif thisPound then + + ESX.TriggerServerCallback('esx_garage:checkMoney', function(hasMoney) + if hasMoney then + if ESX.Game.IsSpawnPointClear(spawnCoords, 2.5) then + TriggerServerEvent('esx_garage:payPound', data.exitVehicleCost) + thisPound = nil + + TriggerServerEvent('esx_garage:updateOwnedVehicle', false, nil, nil, data, spawnCoords) + TriggerEvent('esx_garage:closemenu') + + else + ESX.ShowNotification(TranslateCap('veh_block'), 'error') + end + else + ESX.ShowNotification(TranslateCap('missing_money')) + end + end, data.exitVehicleCost) + + end + + cb('ok') +end) + +RegisterNUICallback('impound', function(data, cb) + local poundCoords = { + x = data.poundSpawnPoint.x, + y = data.poundSpawnPoint.y + } + + TriggerServerEvent('esx_garage:setImpound', data.poundName, data.vehicleProps) + TriggerEvent('esx_garage:closemenu') + + SetNewWaypoint(poundCoords.x, poundCoords.y) + + cb('ok') +end) + +-- Create Blips +CreateThread(function() + for k, v in pairs(Config.Garages) do + local blip = AddBlipForCoord(v.EntryPoint.x, v.EntryPoint.y, v.EntryPoint.z) + + SetBlipSprite(blip, v.Sprite) + SetBlipDisplay(blip, 4) + SetBlipScale(blip, v.Scale) + SetBlipColour(blip, v.Colour) + SetBlipAsShortRange(blip, true) + + BeginTextCommandSetBlipName("STRING") + AddTextComponentSubstringPlayerName(TranslateCap('parking_blip_name')) + EndTextCommandSetBlipName(blip) + end + + for k, v in pairs(Config.Impounds) do + local blip = AddBlipForCoord(v.GetOutPoint.x, v.GetOutPoint.y, v.GetOutPoint.z) + + SetBlipSprite(blip, v.Sprite) + SetBlipDisplay(blip, 4) + SetBlipScale(blip, v.Scale) + SetBlipColour(blip, v.Colour) + SetBlipAsShortRange(blip, true) + + BeginTextCommandSetBlipName("STRING") + AddTextComponentSubstringPlayerName(TranslateCap('Impound_blip_name')) + EndTextCommandSetBlipName(blip) + end +end) + +AddEventHandler('esx_garage:hasEnteredMarker', function(name, part) + if part == 'EntryPoint' then + local isInVehicle = IsPedInAnyVehicle(ESX.PlayerData.ped, false) + local garage = Config.Garages[name] + thisGarage = garage + + if isInVehicle then + ESX.TextUI(TranslateCap('park_veh')) + else + ESX.TextUI(TranslateCap('access_parking')) + end + end + + if part == 'GetOutPoint' then + local pound = Config.Impounds[name] + thisPound = pound + + ESX.TextUI(TranslateCap('access_Impound')) + end +end) + +AddEventHandler('esx_garage:hasExitedMarker', function() + thisGarage = nil + thisPound = nil + ESX.HideUI() + TriggerEvent('esx_garage:closemenu') +end) + +-- Display markers +CreateThread(function() + while true do + local sleep = 500 + + local playerPed = ESX.PlayerData.ped + local coords = GetEntityCoords(playerPed) + local inVehicle = IsPedInAnyVehicle(playerPed, false) + + -- parking + for k, v in pairs(Config.Garages) do + if (#(coords - vector3(v.EntryPoint.x, v.EntryPoint.y, v.EntryPoint.z)) < Config.DrawDistance) then + DrawMarker(Config.Markers.EntryPoint.Type, v.EntryPoint.x, v.EntryPoint.y, v.EntryPoint.z, 0.0, 0.0, + 0.0, 0, 0.0, 0.0, Config.Markers.EntryPoint.Size.x, Config.Markers.EntryPoint.Size.y, + Config.Markers.EntryPoint.Size.z, Config.Markers.EntryPoint.Color.r, + Config.Markers.EntryPoint.Color.g, Config.Markers.EntryPoint.Color.b, 100, false, true, 2, false, + false, false, false) + sleep = 0 + break + end + end + + -- Impound + for k, v in pairs(Config.Impounds) do + if (#(coords - vector3(v.GetOutPoint.x, v.GetOutPoint.y, v.GetOutPoint.z)) < Config.DrawDistance) then + DrawMarker(Config.Markers.GetOutPoint.Type, v.GetOutPoint.x, v.GetOutPoint.y, v.GetOutPoint.z, 0.0, 0.0, + 0.0, 0, 0.0, 0.0, Config.Markers.GetOutPoint.Size.x, Config.Markers.GetOutPoint.Size.y, + Config.Markers.GetOutPoint.Size.z, Config.Markers.GetOutPoint.Color.r, + Config.Markers.GetOutPoint.Color.g, Config.Markers.GetOutPoint.Color.b, 100, false, true, 2, false, + false, false, false) + sleep = 0 + break + end + end + + if sleep == 0 then + nearMarker = true + else + nearMarker = false + end + + Wait(sleep) + end +end) + +-- Enter / Exit marker events (parking) +CreateThread(function() + while true do + if nearMarker then + local playerPed = ESX.PlayerData.ped + local coords = GetEntityCoords(playerPed) + local isInMarker = false + local currentMarker = nil + local currentPart = nil + + for k, v in pairs(Config.Garages) do + if (#(coords - vector3(v.EntryPoint.x, v.EntryPoint.y, v.EntryPoint.z)) < + Config.Markers.EntryPoint.Size.x) then + isInMarker = true + currentMarker = k + currentPart = 'EntryPoint' + local isInVehicle = IsPedInAnyVehicle(playerPed, false) + + if not isInVehicle then + if IsControlJustReleased(0, 38) and not menuIsShowed then + ESX.TriggerServerCallback('esx_garage:getVehiclesInParking', function(vehicles) + if next(vehicles) then + menuIsShowed = true + + for i = 1, #vehicles, 1 do + table.insert(vehiclesList, { + model = GetDisplayNameFromVehicleModel(vehicles[i].vehicle.model), + plate = vehicles[i].plate, + props = vehicles[i].vehicle + }) + + end + + local spawnPoint = { + x = v.SpawnPoint.x, + y = v.SpawnPoint.y, + z = v.SpawnPoint.z, + heading = v.SpawnPoint.heading + } + + ESX.TriggerServerCallback('esx_garage:getVehiclesImpounded', function(vehicles) + if next(vehicles) then + + for i = 1, #vehicles, 1 do + table.insert(vehiclesImpoundedList, { + model = GetDisplayNameFromVehicleModel(vehicles[i].vehicle.model), + plate = vehicles[i].plate, + props = vehicles[i].vehicle + }) + end + + local poundSpawnPoint = { + x = Config.Impounds[v.ImpoundedName].GetOutPoint.x, + y = Config.Impounds[v.ImpoundedName].GetOutPoint.y + } + + SendNUIMessage({ + showMenu = true, + type = 'garage', + vehiclesList = {json.encode(vehiclesList)}, + vehiclesImpoundedList = {json.encode(vehiclesImpoundedList)}, + poundName = v.ImpoundedName, + poundSpawnPoint = poundSpawnPoint, + spawnPoint = spawnPoint, + locales = { + action = TranslateCap('veh_exit'), + veh_model = TranslateCap('veh_model'), + veh_plate = TranslateCap('veh_plate'), + veh_condition = TranslateCap('veh_condition'), + veh_action = TranslateCap('veh_action'), + impound_action = TranslateCap('impound_action') + } + }) + else + SendNUIMessage({ + showMenu = true, + type = 'garage', + vehiclesList = {json.encode(vehiclesList)}, + spawnPoint = spawnPoint, + locales = { + action = TranslateCap('veh_exit'), + veh_model = TranslateCap('veh_model'), + veh_plate = TranslateCap('veh_plate'), + veh_condition = TranslateCap('veh_condition'), + veh_action = TranslateCap('veh_action'), + no_veh_impounded = TranslateCap('no_veh_impounded') + } + }) + end + end) + + SetNuiFocus(true, true) + + if menuIsShowed then + ESX.HideUI() + end + else + menuIsShowed = true + + ESX.TriggerServerCallback('esx_garage:getVehiclesImpounded', function(vehicles) + if next(vehicles) then + + for i = 1, #vehicles, 1 do + table.insert(vehiclesImpoundedList, { + model = GetDisplayNameFromVehicleModel(vehicles[i].vehicle.model), + plate = vehicles[i].plate, + props = vehicles[i].vehicle + }) + end + + local poundSpawnPoint = { + x = Config.Impounds[v.ImpoundedName].GetOutPoint.x, + y = Config.Impounds[v.ImpoundedName].GetOutPoint.y + } + + SendNUIMessage({ + showMenu = true, + type = 'garage', + vehiclesImpoundedList = {json.encode(vehiclesImpoundedList)}, + poundName = v.ImpoundedName, + poundSpawnPoint = poundSpawnPoint, + locales = { + action = TranslateCap('veh_exit'), + veh_model = TranslateCap('veh_model'), + veh_plate = TranslateCap('veh_plate'), + veh_condition = TranslateCap('veh_condition'), + veh_action = TranslateCap('veh_action'), + no_veh_parking = TranslateCap('no_veh_parking'), + no_veh_impounded = TranslateCap('no_veh_impounded'), + impound_action = TranslateCap('impound_action') + } + }) + else + SendNUIMessage({ + showMenu = true, + type = 'garage', + locales = { + action = TranslateCap('veh_exit'), + veh_model = TranslateCap('veh_model'), + veh_plate = TranslateCap('veh_plate'), + veh_condition = TranslateCap('veh_condition'), + veh_action = TranslateCap('veh_action'), + no_veh_parking = TranslateCap('no_veh_parking') + } + }) + end + end) + + SetNuiFocus(true, true) + + if menuIsShowed then + ESX.HideUI() + end + end + end, currentMarker) + end + end + + if isInVehicle then + if IsControlJustReleased(0, 38) then + local vehicle = GetVehiclePedIsIn(playerPed, false) + local vehicleProps = ESX.Game.GetVehicleProperties(vehicle) + ESX.TriggerServerCallback('esx_garage:checkVehicleOwner', function(owner) + if owner then + ESX.Game.DeleteVehicle(vehicle) + TriggerServerEvent('esx_garage:updateOwnedVehicle', true, currentMarker, nil, + {vehicleProps = vehicleProps}) + else + ESX.ShowNotification(TranslateCap('not_owning_veh'), 'error') + end + end, vehicleProps.plate) + end + end + break + end + end + + for k, v in pairs(Config.Impounds) do + + if (#(coords - vector3(v.GetOutPoint.x, v.GetOutPoint.y, v.GetOutPoint.z)) < 2.0) then + isInMarker = true + currentMarker = k + currentPart = 'GetOutPoint' + + if IsControlJustReleased(0, 38) and not menuIsShowed then + ESX.TriggerServerCallback('esx_garage:getVehiclesInPound', function(vehicles) + if next(vehicles) then + menuIsShowed = true + + for i = 1, #vehicles, 1 do + table.insert(vehiclesList, { + model = GetDisplayNameFromVehicleModel(vehicles[i].vehicle.model), + plate = vehicles[i].plate, + props = vehicles[i].vehicle + }) + end + + local spawnPoint = { + x = v.SpawnPoint.x, + y = v.SpawnPoint.y, + z = v.SpawnPoint.z, + heading = v.SpawnPoint.heading + } + + SendNUIMessage({ + showMenu = true, + type = 'impound', + vehiclesList = {json.encode(vehiclesList)}, + spawnPoint = spawnPoint, + poundCost = v.Cost, + locales = { + action = TranslateCap('pay_impound'), + veh_model = TranslateCap('veh_model'), + veh_plate = TranslateCap('veh_plate'), + veh_condition = TranslateCap('veh_condition'), + veh_action = TranslateCap('veh_action') + } + }) + + SetNuiFocus(true, true) + + if menuIsShowed then + ESX.HideUI() + end + else + ESX.ShowNotification(TranslateCap('no_veh_Impound')) + end + end, currentMarker) + end + break + end + end + + if isInMarker and not HasAlreadyEnteredMarker or + (isInMarker and (LastMarker ~= currentMarker or LastPart ~= currentPart)) then + + if LastMarker ~= currentMarker or LastPart ~= currentPart then + TriggerEvent('esx_garage:hasExitedMarker') + end + + HasAlreadyEnteredMarker = true + LastMarker = currentMarker + LastPart = currentPart + + TriggerEvent('esx_garage:hasEnteredMarker', currentMarker, currentPart) + end + + if not isInMarker and HasAlreadyEnteredMarker then + HasAlreadyEnteredMarker = false + + TriggerEvent('esx_garage:hasExitedMarker') + end + + Wait(0) + else + Wait(500) + end + end +end) diff --git a/[esx_addons]/esx_garage/config.lua b/[esx_addons]/esx_garage/config.lua new file mode 100644 index 00000000..e4b3e20a --- /dev/null +++ b/[esx_addons]/esx_garage/config.lua @@ -0,0 +1,131 @@ +Config = {} +Config.Locale = GetConvar('esx:locale', 'en') + +Config.DrawDistance = 10.0 + +Config.Markers = { + EntryPoint = { + Type = 21, + Size = { + x = 1.0, + y = 1.0, + z = 0.5, + }, + Color = { + r = 50, + g = 200, + b = 50, + }, + }, + GetOutPoint = { + Type = 21, + Size = { + x = 1.0, + y = 1.0, + z = 0.5, + }, + Color = { + r = 200, + g = 51, + b = 51, + }, + }, +} + +Config.Garages = { + VespucciBoulevard = { + EntryPoint = { + x = -285.2, + y = -886.5, + z = 31.0, + }, + SpawnPoint = { + x = -309.3, + y = -897.0, + z = 31.0, + heading = 351.8, + }, + Sprite = 357, + Scale = 0.8, + Colour = 3, + ImpoundedName = "LosSantos", + }, + SanAndreasAvenue = { + EntryPoint = { + x = 216.4, + y = -786.6, + z = 30.8, + }, + SpawnPoint = { + x = 218.9, + y = -779.7, + z = 30.8, + heading = 338.8, + }, + Sprite = 357, + Scale = 0.8, + Colour = 3, + ImpoundedName = "LosSantos", + }, +} + +Config.Impounds = { + LosSantos = { + GetOutPoint = { + x = 400.7, + y = -1630.5, + z = 29.3, + }, + SpawnPoint = { + x = 401.9, + y = -1647.4, + z = 29.2, + heading = 323.3, + }, + Sprite = 524, + Scale = 0.8, + Colour = 1, + Cost = 3000, + }, + PaletoBay = { + GetOutPoint = { + x = -211.4, + y = 6206.5, + z = 31.4, + }, + SpawnPoint = { + x = -204.6, + y = 6221.6, + z = 30.5, + heading = 227.2, + }, + Sprite = 524, + Scale = 0.8, + Colour = 1, + Cost = 3000, + }, + SandyShores = { + GetOutPoint = { + x = 1728.2, + y = 3709.3, + z = 33.2, + }, + SpawnPoint = { + x = 1722.7, + y = 3713.6, + z = 33.2, + heading = 19.9, + }, + Sprite = 524, + Scale = 0.8, + Colour = 1, + Cost = 3000, + }, +} + +exports("getGarages", function() + return Config.Garages +end) +exports("getImpounds", function() + return Config.Impounds +end) diff --git a/[esx_addons]/esx_garage/esx_garage.sql b/[esx_addons]/esx_garage/esx_garage.sql new file mode 100644 index 00000000..d5711282 --- /dev/null +++ b/[esx_addons]/esx_garage/esx_garage.sql @@ -0,0 +1,3 @@ +DROP TABLE `user_parkings`; +ALTER TABLE `owned_vehicles` ADD `parking` VARCHAR(60) NULL AFTER `stored`; +ALTER TABLE `owned_vehicles` ADD `pound` VARCHAR(60) NULL AFTER `parking`; \ No newline at end of file diff --git a/[esx_addons]/esx_garage/fxmanifest.lua b/[esx_addons]/esx_garage/fxmanifest.lua new file mode 100644 index 00000000..14f6c8aa --- /dev/null +++ b/[esx_addons]/esx_garage/fxmanifest.lua @@ -0,0 +1,17 @@ +fx_version 'cerulean' +game 'gta5' + +author 'ESX-Framework' +description 'Official ESX Garage System for ESX Legacy' +version '1.9.0' +lua54 'yes' + +shared_script '@es_extended/imports.lua' + +server_scripts {'@es_extended/locale.lua', 'locales/*.lua', '@oxmysql/lib/MySQL.lua', 'config.lua', 'server/main.lua'} + +client_scripts {'@es_extended/locale.lua', 'locales/*.lua', 'config.lua', 'client/main.lua'} + +ui_page 'nui/ui.html' + +files {'nui/ui.html', 'nui/js/*.js', 'nui/css/*.css', 'nui/img/*.png', 'nui/roboto.ttf'} diff --git a/[esx_addons]/esx_garage/locales/de.lua b/[esx_addons]/esx_garage/locales/de.lua new file mode 100644 index 00000000..1acf743e --- /dev/null +++ b/[esx_addons]/esx_garage/locales/de.lua @@ -0,0 +1,25 @@ +Locales["de"] = { + ["parking_blip_name"] = 'Garage', + ["Impound_blip_name"] = 'Abschlepphof', + ["access_parking"] = 'Drücke [E] to access the car park.', + ["access_Impound"] = 'Drücke [E] um den Abschlepphof zu öffnen.', + ["park_veh"] = 'Drücke [E] um das Fahrzeug zu parken.', + ["not_owning_veh"] = 'Du besitzt dieses Fahrzeug nicht!', + ['veh_released'] = 'Du hast dein Fahrzeug erfolgreich abgeholt.', + ['veh_Impound_released'] = 'Du hast dein Fahrzeug erfolgreich zurückgeholt.', + ['veh_stored'] = 'Erfolgreich gelagertes Fahrzeug', + ['veh_impounded'] = 'Beschlagnahmtes Fahrzeug', + ['no_veh_parking'] = 'Kein Fahrzeug von dir ist hier eingelagert.', + ['no_veh_impounded'] = 'Kein Fahrzeug von dir ist hier beschlagnahmt.', + ['no_veh_Impound'] = 'Du hast keine beschlagnahmten Fahrzeuge.', + ['veh_model'] = 'Model', + ['veh_plate'] = 'Kennzeichen', + ['veh_condition'] = 'Zustand', + ['veh_action'] = 'Aktion', + ['impound_action'] = 'Beschlagnahme', + ['veh_exit'] = 'Fahrzeug zurückholen', + ['pay_impound'] = 'Beschlagnahme bezahlen', + ['veh_block'] = 'Fahrzeug kann nicht zurückgeholt werden da der Spawn blockiert ist.', + ['pay_Impound_bill'] = 'Du hast $%s zum Abschlepphof bezahlt.', + ['missing_money'] = 'Du hast nicht genug Geld.' +} diff --git a/[esx_addons]/esx_garage/locales/en.lua b/[esx_addons]/esx_garage/locales/en.lua new file mode 100644 index 00000000..2ec63652 --- /dev/null +++ b/[esx_addons]/esx_garage/locales/en.lua @@ -0,0 +1,25 @@ +Locales["en"] = { + ["parking_blip_name"] = 'Garage', + ["Impound_blip_name"] = 'Impound', + ["access_parking"] = 'press [E] to access the car park.', + ["access_Impound"] = 'press [E] to access the impound.', + ["park_veh"] = 'press [E] to park the vehicle.', + ["not_owning_veh"] = 'You do not own this vehicle!', + ['veh_released'] = 'Successfully Retrieved Vehicle.', + ['veh_Impound_released'] = 'Successfully Retrieved Vehicle From Impound.', + ['veh_stored'] = 'Successfully Stored Vehicle', + ['veh_impounded'] = 'Impounded Vehicle', + ['no_veh_parking'] = 'No Vehicles Stored Here.', + ['no_veh_impounded'] = 'No Impounded Vehicles.', + ['no_veh_Impound'] = 'you have No Impounded Vehicles.', + ['veh_model'] = 'Model', + ['veh_plate'] = 'Plate', + ['veh_condition'] = 'Condition', + ['veh_action'] = 'Action', + ['impound_action'] = 'Impound', + ['veh_exit'] = 'Retrieve Vehicle', + ['pay_impound'] = 'Pay Impound', + ['veh_block'] = 'Unable to retrieve vehicle, Spawn Position is blocked.', + ['pay_Impound_bill'] = 'Successfully Paid ~g~$%s~s~ to the Impound.', + ['missing_money'] = 'You don`t have enough money.' +} diff --git a/[esx_addons]/esx_garage/locales/et.lua b/[esx_addons]/esx_garage/locales/et.lua new file mode 100644 index 00000000..8174955a --- /dev/null +++ b/[esx_addons]/esx_garage/locales/et.lua @@ -0,0 +1,25 @@ +Locales["et"] = { + ["parking_blip_name"] = 'Garaaž', + ["Impound_blip_name"] = 'Sõiduk konfiskeeritud', + ["access_parking"] = 'Vajuta [E], et avada garaaž.', + ["access_Impound"] = 'Vajuta [E], et avada konfiskeeritud sõidukite garaaž.', + ["park_veh"] = 'Vajuta [E], et parkida see sõiduk.', + ["not_owning_veh"] = 'Sa ei oma seda sõidukit!', + ['veh_released'] = 'Sõiduk edukalt pargitud.', + ['veh_Impound_released'] = 'Sõiduk edukalt välja ostetud.', + ['veh_stored'] = 'Sõiduk edukalt pargitud', + ['veh_impounded'] = 'Sõiduk on konfiskeeritud sõidukite parklas', + ['no_veh_parking'] = 'ÜHtegi autot pole siin garaažis', + ['no_veh_impounded'] = 'Ühtegi autot pole konfiskeeritud.', + ['no_veh_Impound'] = 'Sul pole ühtegi konfiskeeritud sõidukit.', + ['veh_model'] = 'Mudel', + ['veh_plate'] = 'Numbrimärk', + ['veh_condition'] = 'Konditsioon', + ['veh_action'] = 'Tegevus', + ['impound_action'] = 'Konfiskeeritud sõidukid', + ['veh_exit'] = 'Väljasta sõiduk', + ['pay_impound'] = 'Maksa trahv', + ['veh_block'] = 'Sõidukit ei saanud väljastada, miski blokeerib.', + ['pay_Impound_bill'] = 'Edukalt makstud ~g~$%s~s~.', + ['missing_money'] = 'Sul pole piisavalt raha.' +} diff --git a/[esx_addons]/esx_garage/locales/fr.lua b/[esx_addons]/esx_garage/locales/fr.lua new file mode 100644 index 00000000..3b780aa2 --- /dev/null +++ b/[esx_addons]/esx_garage/locales/fr.lua @@ -0,0 +1,25 @@ +Locales["fr"] = { + ["parking_blip_name"] = 'Garage', + ["Impound_blip_name"] = 'Fourrière', + ["access_parking"] = "appuyez sur [E] pour accéder au parking.", + ["access_Impound"] = 'appuyez sur [E] pour accéder à la fourrière.', + ["park_veh"] = "appuyez sur [E] pour ranger le véhicule.", + ["not_owning_veh"] = "ce véhicule ne t'appartient pas.", + ['veh_released'] = 'le véhicule a été sorti du parking.', + ['veh_Impound_released'] = 'le véhicule a été sorti de la fourrière', + ['veh_stored'] = 'le véhicule a bien été rangé.', + ['veh_impounded'] = 'le véhicule a bien été mis en fourrière.', + ['no_veh_parking'] = 'aucun véhicule dans ce parking.', + ['no_veh_impounded'] = 'aucun véhicule à mettre en fourrière.', + ['no_veh_Impound'] = 'vous n\'avez aucun véhicule dans cette fourrière.', + ['veh_model'] = 'modèle', + ['veh_plate'] = 'immatriculation', + ['veh_condition'] = 'etat', + ['veh_action'] = 'action', + ['impound_action'] = 'mettre en fourrière', + ['veh_exit'] = 'sortir le véhicule', + ['pay_Impound'] = 'payer la fourrière', + ['veh_block'] = 'il semble qu\'un véhicule gêne la sortie.', + ['pay_Impound_bill'] = 'vous venez de payer $%s à la fourrière.', + ['missing_money'] = 'vous n\'avez pas assez d\'argent.' +} diff --git a/[esx_addons]/esx_garage/locales/hu.lua b/[esx_addons]/esx_garage/locales/hu.lua new file mode 100644 index 00000000..727b4a19 --- /dev/null +++ b/[esx_addons]/esx_garage/locales/hu.lua @@ -0,0 +1,25 @@ +Locales["hu"] = { + ["parking_blip_name"] = 'Garázs', + ["Impound_blip_name"] = 'Lefoglaltak', + ["access_parking"] = 'Nyomd meg az [E] gombot a parkoló megtekintéséhez.', + ["access_Impound"] = 'Nyomd meg az [E] gombot a lefoglaltak megtekintéséhez.', + ["park_veh"] = 'Nyomd meg az [E] gombot a jármű parkolásához.', + ["not_owning_veh"] = 'Ez a jármű nem a te tulajdonod!', + ['veh_released'] = 'Sikeresen kivetted a járművet.', + ['veh_Impound_released'] = 'Jármű sikeresen kiváltva a legfolalásból.', + ['veh_stored'] = 'Jármű sikeresen tárolva', + ['veh_impounded'] = 'Lefoglalt jármű megjelölve a térképen', + ['no_veh_parking'] = 'Nincsenek itt tárolt járművek.', + ['no_veh_impounded'] = 'Nincs lefoglalt jármű.', + ['no_veh_Impound'] = 'nincs lefoglalt járműved.', + ['veh_model'] = 'Model', + ['veh_plate'] = 'Rendszám', + ['veh_condition'] = 'Állapot', + ['veh_action'] = 'Művelet', + ['impound_action'] = 'Lefoglal', + ['veh_exit'] = 'Jármű visszakérése', + ['pay_impound'] = 'Lefoglalás fizetése', + ['veh_block'] = 'Jármű lekérés sikertelen, a spawn hely foglalt.', + ['pay_Impound_bill'] = 'Kiváltottad a járművet ~g~%s$~s~-ért', + ['missing_money'] = 'Nincs elég pénzed!' +} diff --git a/[esx_addons]/esx_garage/locales/it.lua b/[esx_addons]/esx_garage/locales/it.lua new file mode 100644 index 00000000..745de4cb --- /dev/null +++ b/[esx_addons]/esx_garage/locales/it.lua @@ -0,0 +1,25 @@ +Locales["it"] = { + ["parking_blip_name"] = 'Garage', + ["Impound_blip_name"] = 'sequestro', + ["access_parking"] = 'premi [E] per accedere al parcheggio.', + ["access_Impound"] = 'premi [E] per accedere al sequestro.', + ["park_veh"] = 'premi [E] per parcheggiare il veicolo.', + ["not_owning_veh"] = 'non possiedi questo veicolo!', + ['veh_released' ] = ' Veicolo recuperato con successo. ' , + ['veh_Impound_released'] = ' Veicolo recuperato con successo dal sequestro. ' , + ['veh_stored'] = ' Veicolo depositato con successo ' , + ['veh_impounded'] = ' Veicolo sequestrato ' , + ['no_veh_parking'] = ' Nessun veicolo immagazzinato qui. ' , + ['no_veh_impounded'] = ' Nessun veicolo sequestrato. ' , + ['no_veh_Impound'] = ' non hai veicoli sequestrati. ' , + ['veh_model'] = ' Modello ' , + ['veh_plate'] = ' targa ' , + ['veh_condition'] = ' Condizione ' , + ['veh_action ' ] = ' Azione ' , + ['impound_action' ] = ' Sequestro ' , + ['veh_exit' ] = ' Ritira veicolo ' , + ['pay_impound' ] = ' Paga sequestro ' , + ['veh_block' ] = ' Impossibile recuperare il veicolo, la posizione di spawn è bloccata. ' , + ['pay_Impound_bill' ] = 'hai pagato ~g~$%s~s~ al sequestro. ' , + ['missing_money' ] = ' Non hai abbastanza soldi. ' +} diff --git a/[esx_addons]/esx_garage/locales/nl.lua b/[esx_addons]/esx_garage/locales/nl.lua new file mode 100644 index 00000000..5670d6fa --- /dev/null +++ b/[esx_addons]/esx_garage/locales/nl.lua @@ -0,0 +1,25 @@ +Locales["nl"] = { + ["parking_blip_name"] = 'Garage', + ["Impound_blip_name"] = 'In beslag genomen', + ["access_parking"] = 'klik op [E] om je garage te gebruiken.', + ["access_Impound"] = 'klik op [E] om je in beslag genomen voertuigen te krijgen.', + ["park_veh"] = 'klik op [E] om je voertuig te parkeren.', + ["not_owning_veh"] = 'Dit is niet jou voertuig!', + ['veh_released'] = 'Succesvol je voertuig opgehaald.', + ['veh_Impound_released'] = 'Succesvol je voertuig terug gekregen van de politie.', + ['veh_stored'] = 'Succesvol je voertuig geparkeerd', + ['veh_impounded'] = 'In beslag genomen voertuig', + ['no_veh_parking'] = 'Er staan hier geen voertuigen.', + ['no_veh_impounded'] = 'Geen in beslag genomen voertuigen.', + ['no_veh_Impound'] = 'Er zijn geen voertuigen in beslag genomen.', + ['veh_model'] = 'Model', + ['veh_plate'] = 'Kenteken', + ['veh_condition'] = 'Conditie', + ['veh_action'] = 'Actie', + ['impound_action'] = 'Neem in beslag', + ['veh_exit'] = 'Haal voertuig op', + ['pay_impound'] = 'Betaal boete', + ['veh_block'] = 'Kan het voertuig niet ophalen, iets blokkeert de uitgang.', + ['pay_Impound_bill'] = 'Succesvol ~g~€%s~s~ betaald aan de politie.', + ['missing_money'] = 'Je hebt niet genoeg geld.' +} diff --git a/[esx_addons]/esx_garage/nui/css/app.css b/[esx_addons]/esx_garage/nui/css/app.css new file mode 100644 index 00000000..6a327f5f --- /dev/null +++ b/[esx_addons]/esx_garage/nui/css/app.css @@ -0,0 +1,279 @@ +@font-face { + font-family: roboto; + src: url('../roboto.ttf'); +} + +body { + width: 100%; + height: 100%; + overflow: hidden; + font-family: roboto; +} + +#cursor { + position: absolute; + z-index: 999999; + display: none; +} + +#container { + position: absolute; + background: #232934; + border-radius: 10px; + border-top: 20px solid #353e4f; + height: 700px; + width: 1000px; + top: 40%; + left: 40%; + margin: -250px 0 0 -300px; + cursor: default; + display: flex; + flex-direction: unset; +} + +#header { + color: white; + font-size: 44px; + border-radius: 0px 0px 0px 10px; + background: #353e4f; + display: flex; + justify-content: space-between; + flex-direction: column; + align-items: baseline; +} + +#header .title { + padding: 50px; +} + +#header ul { + font-size: 15px; + margin-top: -150px; + padding: 0px; + list-style-type: none; +} + +#header li { + cursor: pointer; + padding: 15px; + width: 296px; +} + +#header li:hover { + font-weight: bold; + background-color: rgba(0, 0, 0, 0.356); + border-right: 3px solid #7186ad; +} +#header li.selected { + font-weight: bold; + background-color: rgba(0, 0, 0, 0.356); + border-right: 3px solid #7186ad; +} + +#header .close { + float: right; + text-align: center; + color: #b90000; + font-size: 20px; + font-weight: bold; + padding: 5px 5px; + background: #00000026; + border: 1px solid #00000026; + border-radius: 3px; + cursor: pointer; + border-radius: 50%; + -moz-border-radius: 50%; + -webkit-border-radius: 50%; + height: 25px; + width: 25px; + margin: 30px 144px; +} + +#header .close:hover { + color: #df3d3d; + background: #00000041; +} + +.clear-both { + clear: both; +} + +#menu { + display: flex; + flex-direction: row; + justify-content: space-between; +} + +.right-side { + width: 50%; +} + +.content { + width: 100%; + margin: 20px; + color: white; + height: 655px; + overflow-y: auto; + -ms-overflow-style: none; /* IE and Edge */ + scrollbar-width: none; /* Firefox */ +} + +.content h2 { + width: 290px; + height: 290px; + position: absolute; + top: 50%; + left: 55%; + margin: -25px 0 0 -25px; + text-align: center; +} + +.content::-webkit-scrollbar { + display: none; +} + +.impounded_content { + display: none; + width: 100%; + margin: 20px; + color: white; + height: 655px; + overflow-y: auto; + -ms-overflow-style: none; /* IE and Edge */ + scrollbar-width: none; /* Firefox */ +} + +.impounded_content h2 { + width: 290px; + height: 290px; + position: absolute; + top: 50%; + left: 55%; + margin: -25px 0 0 -25px; + text-align: center; +} + +.impounded_content::-webkit-scrollbar { + display: none; +} + +.webgl { + position: fixed; + left: 0; + top: 0; + outline: none; +} + +.content .vehicle-header { + display: flex; + justify-content: space-between; + padding: 5px 20px; +} + +.group { + margin: 20px; + color: white; + display: flex; + flex-direction: column; + margin-bottom: 20px; + padding: 10px; + border: solid #353e4f 2px; + border-radius: 10px; +} + +.group > button { + color: white; + width: 50%; + padding: 12px 20px; + margin: 8px 0; + border: 1px solid #353e4f; + border-radius: 4px; + background-color: #353e4f; +} + +.group > input { + color: white; + width: 100%; + padding: 12px 20px; + margin: 8px 0; + background-color: #353e4f; + border: none; + border-radius: 4px; + appearance: none; + -moz-appearance: none; + -webkit-appearance: none; +} + +.group > input::-webkit-outer-spin-button, +input::-webkit-inner-spin-button { + -webkit-appearance: none; + margin: 0; +} + +.vehicle-listing { + display: inline-block; + flex-direction: row; + border: 1px solid #353e4f; + border-left: 5px solid #353e4f; + border-radius: 3px; + margin: 5px; + padding: 20px 35px; + font-size: 18px; + text-align: center; + width: 229px; +} + +.vehicle-listing div { + display: flow-root; + justify-content: space-between; + align-content: space-between; +} + +.vehicle-listing strong { + display: inline-block; +} + +.vehicle-listing:hover { + background: #353e4f; + border: 1px solid #353e4f; + border-left: 5px solid #353e4f; +} + +.unstyled-button { + padding: 0; + border: none; + background: none; + outline: none; +} + +.vehicle-action { + background: linear-gradient(to bottom, #77b55a 5%, #72b352 100%); + background-color: #77b55a; + border-radius: 3px; + border: 1px solid #4b8f29; + display: inline-block; + cursor: pointer; + color: #ffffff; + font-size: 17px; + font-weight: bold; + padding: 20px 30px; + margin: 15px; + text-shadow: -1px 1px 2px #00000026; +} + +.vehicle-action:hover { + background: linear-gradient(to bottom, #72b352 5%, #77b55a 100%); + background-color: #72b352; +} + +.vehicle-action.red { + border: 1px solid #8f2929; + background: linear-gradient(to bottom, #b55a5a 5%, #b35252 100%); + background-color: #b55a5a; +} + +.vehicle-action.red:hover { + border: 1px solid #8f2c29; + background: linear-gradient(to bottom, #b55a5a 5%, #b35852 100%); + background-color: #b55a5a; +} diff --git a/[esx_addons]/esx_garage/nui/js/app.js b/[esx_addons]/esx_garage/nui/js/app.js new file mode 100644 index 00000000..0f707edc --- /dev/null +++ b/[esx_addons]/esx_garage/nui/js/app.js @@ -0,0 +1,228 @@ +$(window).ready(function () { + window.addEventListener('message', function (event) { + let data = event.data + + if (data.showMenu) { + $('#container').fadeIn() + $('#menu').fadeIn() + + if (data.type === 'impound') { + $('#header ul').hide() + } else { + $('#header ul').show() + } + + if (data.vehiclesList != undefined) { + $('#container').data('spawnpoint', data.spawnPoint) + if (data.poundCost) $('#container').data('poundcost', data.poundCost) + + if (data.poundCost != undefined) { + $('.content .vehicle-list').html( + getVehicles(data.locales, data.vehiclesList, data.poundCost) + ) + } else { + $('.content .vehicle-list').html( + getVehicles(data.locales, data.vehiclesList) + ) + } + + $('.content h2').hide() + } else { + $('.content h2').show() + $('.content .vehicle-list').empty() + } + + if (data.vehiclesImpoundedList != undefined) { + $('.impounded_content').data('poundName', data.poundName) + $('.impounded_content').data('poundSpawnPoint', data.poundSpawnPoint) + + if (data.poundCost) $('#container').data('poundcost', data.poundCost) + + $('.impounded_content .vehicle-list').html( + getImpoundedVehicles(data.locales, data.vehiclesImpoundedList) + ) + $('.impounded_content h2').hide() + } else { + $('.impounded_content h2').show() + $('.impounded_content .vehicle-list').empty() + } + + // Locales + + // needs a rework + // $(".content h2").html(function (i, text) { + // return text.replace("No vehicle in this garage.", data.locales.no_veh_parking); + // }); + + // $(".impounded_content h2").html(function (i, text) { + // return text.replace("No vehicle impounded.", data.locales.no_veh_impounded); + // }); + + $('.vehicle-listing').html(function (i, text) { + return text.replace('Model', data.locales.veh_model) + }) + $('.vehicle-listing').html(function (i, text) { + return text.replace('Plate', data.locales.veh_plate) + }) + $('.vehicle-listing').html(function (i, text) { + return text.replace('Condition', data.locales.veh_condition) + }) + } else if (data.hideAll) { + $('#container').fadeOut() + } + }) + + $('#container').hide() + + $('.close').click(function (event) { + $('#container').hide() + $.post('https://esx_garage/escape', '{}') + + $('.impounded_content').hide() + $('.content').show() + $('li[data-page="garage"]').addClass('selected') + $('li[data-page="impounded"]').removeClass('selected') + }) + + document.onkeyup = function (data) { + if (data.which == 27) { + $.post('https://esx_garage/escape', '{}') + + $('.impounded_content').hide() + $('.content').show() + $('li[data-page="garage"]').addClass('selected') + $('li[data-page="impounded"]').removeClass('selected') + } + } + + function getVehicles (locale, vehicle, amount = null) { + let html = '' + let vehicleData = JSON.parse(vehicle) + let bodyHealth = 1000 + let engineHealth = 1000 + let tankHealth = 1000 + let vehicleDamagePercent = '' + + for (let i = 0; i < vehicleData.length; i++) { + bodyHealth = (vehicleData[i].props.bodyHealth / 1000) * 100 + engineHealth = (vehicleData[i].props.engineHealth / 1000) * 100 + tankHealth = (vehicleData[i].props.tankHealth / 1000) * 100 + + vehicleDamagePercent = + Math.round(((bodyHealth + engineHealth + tankHealth) / 300) * 100) + '%' + + html += "

" + html += '
Model: ' + vehicleData[i].model + '
' + html += '
Plate: ' + vehicleData[i].plate + '
' + html += + '
Condition: ' + vehicleDamagePercent + '
' + html += + "' + html += '
' + } + + return html + } + + function getImpoundedVehicles (locale, vehicle) { + let html = '' + let vehicleData = JSON.parse(vehicle) + let bodyHealth = 1000 + let engineHealth = 1000 + let tankHealth = 1000 + let vehicleDamagePercent = '' + + for (let i = 0; i < vehicleData.length; i++) { + bodyHealth = (vehicleData[i].props.bodyHealth / 1000) * 100 + engineHealth = (vehicleData[i].props.engineHealth / 1000) * 100 + tankHealth = (vehicleData[i].props.tankHealth / 1000) * 100 + + vehicleDamagePercent = + Math.round(((bodyHealth + engineHealth + tankHealth) / 300) * 100) + '%' + + html += "
" + html += '
Model: ' + vehicleData[i].model + '
' + html += '
Plate: ' + vehicleData[i].plate + '
' + html += + '
Condition: ' + vehicleDamagePercent + '
' + html += + "' + html += '
' + } + + return html + } + + $('li[data-page="garage"]').click(function (event) { + $('.impounded_content').hide() + $('.content').show() + $('li[data-page="garage"]').addClass('selected') + $('li[data-page="impounded"]').removeClass('selected') + }) + + $('li[data-page="impounded"]').click(function (event) { + $('.content').hide() + $('.impounded_content').show() + $('li[data-page="impounded"]').addClass('selected') + $('li[data-page="garage"]').removeClass('selected') + }) + + $(document).on( + 'click', + "button[data-button='spawn'].vehicle-action", + function (event) { + let spawnPoint = $('#container').data('spawnpoint') + let poundCost = $('#container').data('poundcost') + let vehicleProps = $(this).data('vehprops') + + // prevent empty cost + if (poundCost === undefined) poundCost = 0 + + $.post( + 'https://esx_garage/spawnVehicle', + JSON.stringify({ + vehicleProps: vehicleProps, + spawnPoint: spawnPoint, + exitVehicleCost: poundCost + }) + ) + + $('.impounded_content').hide() + $('.content').show() + $('li[data-page="garage"]').addClass('selected') + $('li[data-page="impounded"]').removeClass('selected') + } + ) + + $(document).on( + 'click', + "button[data-button='impounded'].vehicle-action", + function (event) { + let vehicleProps = $(this).data('vehprops') + let poundName = $('.impounded_content').data('poundName') + let poundSpawnPoint = $('.impounded_content').data('poundSpawnPoint') + $.post( + 'https://esx_garage/impound', + JSON.stringify({ + vehicleProps: vehicleProps, + poundName: poundName, + poundSpawnPoint: poundSpawnPoint + }) + ) + + $('.impounded_content').hide() + $('.content').show() + $('li[data-page="garage"]').addClass('selected') + $('li[data-page="impounded"]').removeClass('selected') + } + ) +}) diff --git a/[esx_addons]/esx_garage/nui/roboto.ttf b/[esx_addons]/esx_garage/nui/roboto.ttf new file mode 100644 index 00000000..7d9a6c4c Binary files /dev/null and b/[esx_addons]/esx_garage/nui/roboto.ttf differ diff --git a/[esx_addons]/esx_garage/nui/ui.html b/[esx_addons]/esx_garage/nui/ui.html new file mode 100644 index 00000000..3509705b --- /dev/null +++ b/[esx_addons]/esx_garage/nui/ui.html @@ -0,0 +1,33 @@ + + + + + + +
+ + + +
+ + + + + diff --git a/[esx_addons]/esx_garage/server/main.lua b/[esx_addons]/esx_garage/server/main.lua new file mode 100644 index 00000000..5c5683cb --- /dev/null +++ b/[esx_addons]/esx_garage/server/main.lua @@ -0,0 +1,141 @@ +RegisterServerEvent('esx_garage:updateOwnedVehicle') +AddEventHandler('esx_garage:updateOwnedVehicle', function(stored, parking, Impound, data, spawn) + local source = source + local xPlayer = ESX.GetPlayerFromId(source) + MySQL.update('UPDATE owned_vehicles SET `stored` = @stored, `parking` = @parking, `pound` = @Impound, `vehicle` = @vehicle WHERE `plate` = @plate AND `owner` = @identifier', + { + ['@identifier'] = xPlayer.identifier, + ['@vehicle'] = json.encode(data.vehicleProps), + ['@plate'] = data.vehicleProps.plate, + ['@stored'] = stored, + ['@parking'] = parking, + ['@Impound'] = Impound + }) + + if stored then + xPlayer.showNotification(TranslateCap('veh_stored')) + else + ESX.OneSync.SpawnVehicle(data.vehicleProps.model, spawn, data.spawnPoint.heading,data.vehicleProps, function(vehicle) + local vehicle = NetworkGetEntityFromNetworkId(vehicle) + Wait(300) + TaskWarpPedIntoVehicle(GetPlayerPed(source), vehicle, -1) + end) + end +end) + +RegisterServerEvent('esx_garage:setImpound') +AddEventHandler('esx_garage:setImpound', function(Impound, vehicleProps) + local source = source + local xPlayer = ESX.GetPlayerFromId(source) + + MySQL.update('UPDATE owned_vehicles SET `stored` = @stored, `pound` = @Impound, `vehicle` = @vehicle WHERE `plate` = @plate AND `owner` = @identifier', + { + ['@identifier'] = xPlayer.identifier, + ['@vehicle'] = json.encode(vehicleProps), + ['@plate'] = vehicleProps.plate, + ['@stored'] = 2, + ['@Impound'] = Impound + }) + + xPlayer.showNotification(TranslateCap('veh_impounded')) +end) + + +ESX.RegisterServerCallback('esx_garage:getVehiclesInParking', function(source, cb, parking) + local xPlayer = ESX.GetPlayerFromId(source) + + MySQL.query('SELECT * FROM `owned_vehicles` WHERE `owner` = @identifier AND `parking` = @parking AND `stored` = 1', + { + ['@identifier'] = xPlayer.identifier, + ['@parking'] = parking + }, function(result) + + local vehicles = {} + for i = 1, #result, 1 do + table.insert(vehicles, { + vehicle = json.decode(result[i].vehicle), + plate = result[i].plate + }) + end + + cb(vehicles) + end) +end) + +ESX.RegisterServerCallback('esx_garage:checkVehicleOwner', function(source, cb, plate) + local xPlayer = ESX.GetPlayerFromId(source) + + MySQL.query('SELECT COUNT(*) as count FROM `owned_vehicles` WHERE `owner` = @identifier AND `plate` = @plate', + { + ['@identifier'] = xPlayer.identifier, + ['@plate'] = plate + }, function(result) + + if tonumber(result[1].count) > 0 then + return cb(true) + else + return cb(false) + end + end) +end) + +-- Pounds part +ESX.RegisterServerCallback('esx_garage:getVehiclesImpounded', function(source, cb) + local xPlayer = ESX.GetPlayerFromId(source) + + MySQL.query('SELECT * FROM `owned_vehicles` WHERE `owner` = @identifier AND `stored` = 0', + { + ['@identifier'] = xPlayer.identifier, + }, function(result) + local vehicles = {} + + for i = 1, #result, 1 do + table.insert(vehicles, { + vehicle = json.decode(result[i].vehicle), + plate = result[i].plate + }) + end + + cb(vehicles) + end) +end) + +ESX.RegisterServerCallback('esx_garage:getVehiclesInPound', function(source, cb, Impound) + local xPlayer = ESX.GetPlayerFromId(source) + + MySQL.query('SELECT * FROM `owned_vehicles` WHERE `owner` = @identifier AND `pound` = @Impound AND `stored` = 2', + { + ['@identifier'] = xPlayer.identifier, + ['@Impound'] = Impound + }, function(result) + local vehicles = {} + + for i = 1, #result, 1 do + table.insert(vehicles, { + vehicle = json.decode(result[i].vehicle), + plate = result[i].plate + }) + end + + cb(vehicles) + end) +end) + +ESX.RegisterServerCallback('esx_garage:checkMoney', function(source, cb, amount) + local xPlayer = ESX.GetPlayerFromId(source) + + cb(xPlayer.getMoney() >= amount) +end) + +RegisterServerEvent("esx_garage:payPound") +AddEventHandler("esx_garage:payPound", function(amount) + local source = source + local xPlayer = ESX.GetPlayerFromId(source) + + if xPlayer.getMoney() >= amount then + xPlayer.removeMoney(amount, "Impound Fee") + xPlayer.showNotification(TranslateCap('pay_Impound_bill', amount)) + else + xPlayer.showNotification(TranslateCap('missing_money')) + end +end) \ No newline at end of file diff --git a/[esx_addons]/esx_holdup/.editorconfig b/[esx_addons]/esx_holdup/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_holdup/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_holdup/LICENSE b/[esx_addons]/esx_holdup/LICENSE new file mode 100644 index 00000000..a65d7691 --- /dev/null +++ b/[esx_addons]/esx_holdup/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_holdup + Copyright (C) 2015-2023 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 . + +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_holdup Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_holdup/README.md b/[esx_addons]/esx_holdup/README.md new file mode 100644 index 00000000..141e02da --- /dev/null +++ b/[esx_addons]/esx_holdup/README.md @@ -0,0 +1,15 @@ +

[ESX] Hold Up

Discord - Website - Documentation + +"Freeze!" - is the only you will be hearing here. This resource adds **alot** of stores for you to rob and steal from, because how else are you going to get money? work? uh, Lame! + +# Legal + +esx_holdup - rob stores! + +Copyright (C) 2015-2023 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/. \ No newline at end of file diff --git a/[esx_addons]/esx_holdup/client/main.lua b/[esx_addons]/esx_holdup/client/main.lua new file mode 100644 index 00000000..6f171414 --- /dev/null +++ b/[esx_addons]/esx_holdup/client/main.lua @@ -0,0 +1,118 @@ +local holdingUp = false +local store = '' +local blipRobbery = nil + +function DrawTxt(x,y, width, height, scale, text, r, g, b, a, outline) + SetTextFont(0) + SetTextScale(scale, scale) + SetTextColour(r, g, b, a) + SetTextDropshadow(0, 0, 0, 0,255) + SetTextDropShadow() + if outline then + SetTextOutline() + end + BeginTextCommandDisplayText('STRING') + AddTextComponentSubstringPlayerName(text) + EndTextCommandDisplayText(x - width / 2, y - height / 2 + 0.005) +end + +RegisterNetEvent('esx_holdup:currentlyRobbing') +AddEventHandler('esx_holdup:currentlyRobbing', function(currentStore) + holdingUp, store = true, currentStore +end) + +RegisterNetEvent('esx_holdup:killBlip') +AddEventHandler('esx_holdup:killBlip', function() + RemoveBlip(blipRobbery) +end) + +RegisterNetEvent('esx_holdup:setBlip') +AddEventHandler('esx_holdup:setBlip', function(position) + blipRobbery = AddBlipForCoord(position) + SetBlipSprite(blipRobbery, 161) + SetBlipScale(blipRobbery, 2.0) + SetBlipColour(blipRobbery, 3) + PulseBlip(blipRobbery) +end) + +RegisterNetEvent('esx_holdup:tooFar') +AddEventHandler('esx_holdup:tooFar', function() + store = '' + ESX.ShowNotification(TranslateCap('robbery_cancelled')) +end) + +RegisterNetEvent('esx_holdup:robberyComplete') +AddEventHandler('esx_holdup:robberyComplete', function(award) + holdingUp, store = false, '' + ESX.ShowNotification(TranslateCap('robbery_complete', award)) +end) + +RegisterNetEvent('esx_holdup:startTimer') +AddEventHandler('esx_holdup:startTimer', function() + local timer = Stores[store].secondsRemaining + CreateThread(function() + while timer > 0 and holdingUp do + Wait(1000) + if timer > 0 then + timer = timer - 1 + end + end + end) + CreateThread(function() + while holdingUp do + Wait(0) + DrawTxt(0.66, 1.44, 1.0, 1.0, 0.4, TranslateCap('robbery_timer', timer), 255, 255, 255, 255) + end + end) +end) + +CreateThread(function() + for k,v in pairs(Stores) do + local blip = AddBlipForCoord(v.position) + SetBlipSprite(blip, 156) + SetBlipScale(blip, 0.8) + SetBlipAsShortRange(blip, true) + BeginTextCommandSetBlipName('STRING') + AddTextComponentSubstringPlayerName(TranslateCap('shop_robbery')) + EndTextCommandSetBlipName(blip) + end +end) + +CreateThread(function() + while true do + Wait(0) + local playerPos, letSleep = GetEntityCoords(PlayerPedId()), true + for k,v in pairs(Stores) do + local distance = #(playerPos - v.position) + if distance < Config.Marker.DrawDistance then + if not holdingUp then + letSleep = false + DrawMarker(Config.Marker.Type, v.position, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Config.Marker.x, Config.Marker.y, Config.Marker.z, Config.Marker.r, Config.Marker.g, Config.Marker.b, Config.Marker.a, false, false, 2, false, false, false, false) + if distance < 2.0 then + ESX.ShowHelpNotification(TranslateCap('press_to_rob', v.nameOfStore)) + if IsControlJustReleased(0, 38) then + if IsPedArmed(PlayerPedId(), 4) then + TriggerServerEvent('esx_holdup:robberyStarted', k) + else + ESX.ShowNotification(TranslateCap('no_threat')) + end + end + end + end + break + else + letSleep = true + end + end + if holdingUp then + letSleep = false + if #(playerPos - Stores[store].position) > Config.MaxDistance then + TriggerServerEvent('esx_holdup:tooFar', store) + holdingUp, letSleep = false, true + end + end + if letSleep then + Wait(500) + end + end +end) diff --git a/[esx_addons]/esx_holdup/config.lua b/[esx_addons]/esx_holdup/config.lua new file mode 100644 index 00000000..9ea2d292 --- /dev/null +++ b/[esx_addons]/esx_holdup/config.lua @@ -0,0 +1,80 @@ +Config = {} +Config.Locale = GetConvar('esx:locale', 'en') + +Config.Marker = { + r = 250, g = 0, b = 0, a = 100, -- red color + x = 1.0, y = 1.0, z = 1.5, -- tiny, cylinder formed circle + DrawDistance = 15.0, Type = 1 -- default circle type, low draw distance due to indoors area +} + +Config.PoliceNumberRequired = 2 +Config.TimerBeforeNewRob = 1800 -- The cooldown timer on a store after robbery was completed / canceled, in seconds + +Config.MaxDistance = 20 -- max distance from the robbary, going any longer away from it will to cancel the robbary +Config.GiveBlackMoney = true -- give black money? If disabled it will give cash instead + +Stores = { + ['paleto_twentyfourseven'] = { + position = vector3(1736.32, 6419.47, 34.03), + reward = math.random(5000, 35000), + nameOfStore = '24/7. (Paleto Bay)', + secondsRemaining = 350, -- seconds + lastRobbed = 0 + }, + ['sandyshores_twentyfoursever'] = { + position = vector3(1961.24, 3749.46, 31.34), + reward = math.random(3000, 20000), + nameOfStore = '24/7. (Sandy Shores)', + secondsRemaining = 200, -- seconds + lastRobbed = 0 + }, + ['littleseoul_twentyfourseven'] = { + position = vector3(-709.17, -904.21, 18.21), + reward = math.random(3000, 20000), + nameOfStore = '24/7. (Little Seoul)', + secondsRemaining = 200, -- seconds + lastRobbed = 0 + }, + ['bar_one'] = { + position = vector3(1990.57, 3044.95, 46.21), + reward = math.random(5000, 35000), + nameOfStore = 'Yellow Jack. (Sandy Shores)', + secondsRemaining = 300, -- seconds + lastRobbed = 0 + }, + ['ocean_liquor'] = { + position = vector3(-2959.33, 388.21, 13.00), + reward = math.random(3000, 30000), + nameOfStore = 'Robs Liquor. (Great Ocean Highway)', + secondsRemaining = 200, -- seconds + lastRobbed = 0 + }, + ['rancho_liquor'] = { + position = vector3(1126.80, -980.40, 44.41), + reward = math.random(3000, 50000), + nameOfStore = 'Robs Liquor. (El Rancho Blvd)', + secondsRemaining = 200, -- seconds + lastRobbed = 0 + }, + ['sanandreas_liquor'] = { + position = vector3(-1219.85, -916.27, 10.32), + reward = math.random(3000, 30000), + nameOfStore = 'Robs Liquor. (San Andreas Avenue)', + secondsRemaining = 200, -- seconds + lastRobbed = 0 + }, + ['grove_ltd'] = { + position = vector3(-43.40, -1749.20, 28.42), + reward = math.random(3000, 15000), + nameOfStore = 'LTD Gasoline. (Grove Street)', + secondsRemaining = 200, -- seconds + lastRobbed = 0 + }, + ['mirror_ltd'] = { + position = vector3(1160.67, -314.40, 68.20), + reward = math.random(3000, 15000), + nameOfStore = 'LTD Gasoline. (Mirror Park Boulevard)', + secondsRemaining = 200, -- seconds + lastRobbed = 0 + } +} diff --git a/[esx_addons]/esx_holdup/fxmanifest.lua b/[esx_addons]/esx_holdup/fxmanifest.lua new file mode 100644 index 00000000..23cd302b --- /dev/null +++ b/[esx_addons]/esx_holdup/fxmanifest.lua @@ -0,0 +1,23 @@ +fx_version 'adamant' + +game 'gta5' + +description 'ESX Holdup' +lua54 'yes' +version '1.9.0' + +shared_script '@es_extended/imports.lua' + +client_scripts { + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'client/main.lua' +} + +server_scripts { + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'server/main.lua' +} diff --git a/[esx_addons]/esx_holdup/locales/de.lua b/[esx_addons]/esx_holdup/locales/de.lua new file mode 100644 index 00000000..fb9c7a05 --- /dev/null +++ b/[esx_addons]/esx_holdup/locales/de.lua @@ -0,0 +1,16 @@ +Locales['de'] = { + ['shop_robbery'] = 'Ladenraub', + ['press_to_rob'] = 'Drücke [E] zum Ausrauben %s', + ['robbery_timer'] = 'Ladenraub: %s Sekunden übrig!', + ['recently_robbed'] = 'dieser Laden wurde bereits ausgeraubt. Bitte warte %s sekunden!', + ['rob_in_prog'] = 'Raub im Gange bei: %s', + ['started_to_rob'] = 'Du hast einen Raub gestartet %s', + ['alarm_triggered'] = 'Der Alarm wurde ausgelöst', + ['robbery_complete'] = 'Raub erfolgreich. Du hast $%s gestohlen', + ['robbery_complete_at'] = 'Raub erfolgreich bei: %s', + ['robbery_cancelled'] = 'Der Raub wurde abgebrochen, du bekommst nichts!', + ['robbery_cancelled_at'] = 'Raub abgebrochen bei: %s', + ['min_police'] = 'Es müssen mindestens %s Polizisten im Dienst sein um ein Raub zu starten.', + ['robbery_already'] = 'Ein Raub ist bereits im gange.', + ['no_threat'] = 'Du machst den Ladenbesitzer keine Angst!', +} diff --git a/[esx_addons]/esx_holdup/locales/en.lua b/[esx_addons]/esx_holdup/locales/en.lua new file mode 100644 index 00000000..073d95df --- /dev/null +++ b/[esx_addons]/esx_holdup/locales/en.lua @@ -0,0 +1,16 @@ +Locales['en'] = { + ['shop_robbery'] = 'shop Robbery', + ['press_to_rob'] = 'press [E] to ~o~rob %s', + ['robbery_timer'] = 'store robbery: ~r~%s seconds remaning', + ['recently_robbed'] = 'this store was recently been robbed. Please wait %s seconds until you can rob again', + ['rob_in_prog'] = '~r~robbery in progress at %s', + ['started_to_rob'] = 'you started to rob %s', + ['alarm_triggered'] = 'the alarm has been triggered', + ['robbery_complete'] = '~r~The robbery has been successful, you ~o~stole $%s', + ['robbery_complete_at'] = '~r~Robbery successful at %s', + ['robbery_cancelled'] = 'the robbery has been cancelled!', + ['robbery_cancelled_at'] = '~r~The robbery at %s has been cancelled!', + ['min_police'] = 'there must be at least %s cops in town to rob.', + ['robbery_already'] = '~r~A robbery is already in progress.', + ['no_threat'] = 'you do not pose a threat to the store keeper', +} diff --git a/[esx_addons]/esx_holdup/locales/es.lua b/[esx_addons]/esx_holdup/locales/es.lua new file mode 100644 index 00000000..326f26fb --- /dev/null +++ b/[esx_addons]/esx_holdup/locales/es.lua @@ -0,0 +1,16 @@ +Locales['es'] = { + ['shop_robbery'] = 'atraco a tienda', + ['press_to_rob'] = 'pulsa [E] para ~o~robar %s', + ['robbery_timer'] = 'atraco: ~r~%s segundos restantes', + ['recently_robbed'] = 'esta tienda fue robada recientemente. Espera %s antes de poder robarla de nuevo', + ['rob_in_prog'] = '~r~Robo en proceso en %s', + ['started_to_rob'] = 'has empezado a robar en %s', + ['alarm_triggered'] = 'la alarma ha sido activada!', + ['robbery_complete'] = '~r~El robo salió bien, has ~o~robado %s€', + ['robbery_complete_at'] = '~r~Robo finalizado en %s', + ['robbery_cancelled'] = 'el ~o~robo ha sido cancelado!', + ['robbery_cancelled_at'] = '~r~El robo en %s ha sido cancelado!', + ['min_police'] = 'se necesitan %s policias activos para poder robar.', + ['robbery_already'] = '~r~Ya hay un robo en progreso.', + ['no_threat'] = 'sin pistola el encargado de la tienda no te tiene miedo...', +} diff --git a/[esx_addons]/esx_holdup/locales/et.lua b/[esx_addons]/esx_holdup/locales/et.lua new file mode 100644 index 00000000..b04db889 --- /dev/null +++ b/[esx_addons]/esx_holdup/locales/et.lua @@ -0,0 +1,16 @@ +Locales['et'] = { + ['shop_robbery'] = 'Poe rööv', + ['press_to_rob'] = 'Vajuta [E], et ~o~röövida %s', + ['robbery_timer'] = 'Poe vargus: ~r~%s sekundit jäänud', + ['recently_robbed'] = 'Seda poodi on juba röövitud. Palun oota %s sekundit, et seda poodi röövida uuesti', + ['rob_in_prog'] = '~r~Toimumas poe rööv asukohas: %s', + ['started_to_rob'] = 'Sa alustasid %s röövimisega', + ['alarm_triggered'] = 'Alarm on käivitatud', + ['robbery_complete'] = '~r~Rööv edukas, sa ~o~varastasid $%s', + ['robbery_complete_at'] = '~r~Edukas rööv asukohas %s', + ['robbery_cancelled'] = 'Poe rööv katkestatud!', + ['robbery_cancelled_at'] = '~r~Rööv asukohas: %s on katkestatud!', + ['min_police'] = 'Linnas peab olema vähemalt %s politseiniku ,et röövida poodi.', + ['robbery_already'] = '~r~Keegi juba röövib kusagil poodi.', + ['no_threat'] = 'Sa ei kujuta poepidajale ohtu', +} diff --git a/[esx_addons]/esx_holdup/locales/fi.lua b/[esx_addons]/esx_holdup/locales/fi.lua new file mode 100644 index 00000000..eafb48e8 --- /dev/null +++ b/[esx_addons]/esx_holdup/locales/fi.lua @@ -0,0 +1,16 @@ +Locales['fi'] = { + ['shop_robbery'] = 'kaupan ryöstö', + ['press_to_rob'] = 'paina [E] ~o~ryöstääksesi kaupan %s', + ['robbery_timer'] = 'kauppa ryöstö: ~r~%s sekunttia jäljellä', + ['recently_robbed'] = 'tämä kauppa ryöstettiin vasta. Odota %s sekunttia että voit ryöstää.', + ['rob_in_prog'] = '~r~ryöstö menossa kohteessa %s', + ['started_to_rob'] = 'sinä aloitit ryöstään %s', + ['alarm_triggered'] = 'hälyytys laukaistu!', + ['robbery_complete'] = '~r~Ryöstö onnistui, sinä ~o~varastit $%s', + ['robbery_complete_at'] = '~r~Ryöstö ohitse kohteessa %s', + ['robbery_cancelled'] = 'ryöstö keskeytyi!', + ['robbery_cancelled_at'] = '~r~Ryöstö kohteessa %s keskeytyi!', + ['min_police'] = 'kaupungissa pitää olla vähintää %s poliisia paikalla ryöstön aloitukseen.', + ['robbery_already'] = '~r~Ryöstö on jo menossa.', + ['no_threat'] = 'you do not pose a threat to the store keeper', +} diff --git a/[esx_addons]/esx_holdup/locales/fr.lua b/[esx_addons]/esx_holdup/locales/fr.lua new file mode 100644 index 00000000..86ff6cbb --- /dev/null +++ b/[esx_addons]/esx_holdup/locales/fr.lua @@ -0,0 +1,16 @@ +Locales['fr'] = { + ['shop_robbery'] = 'braquage magasin', + ['press_to_rob'] = 'appuyez sur [E] ~o~pour braquer %s', + ['robbery_timer'] = 'braquage magasin: il reste ~r~%s secondes', + ['recently_robbed'] = 'ce magasin a déjà été braqué. Attendez ~r~%s secondes.', + ['rob_in_prog'] = '~r~Braquage en cours à: %s', + ['started_to_rob'] = 'vous avez commencé à braquer %s', + ['alarm_triggered'] = 'l\'alarme a été déclenchée', + ['robbery_complete'] = '~r~Braquage terminé. Vous avez ~o~volé $%s', + ['robbery_complete_at'] = '~r~Braquage terminé à: %s', + ['robbery_cancelled'] = 'le braquage va être annulé, vous ne gagnerez rien!', + ['robbery_cancelled_at'] = '~r~Braquage annulé à: %s', + ['min_police'] = 'il faut minimum %s policiers en ville pour braquer.', + ['robbery_already'] = '~r~Un braquage est déjà en cours.', + ['no_threat'] = 'vous ne représentez pas une menace pour le commerçant', +} diff --git a/[esx_addons]/esx_holdup/locales/hu.lua b/[esx_addons]/esx_holdup/locales/hu.lua new file mode 100644 index 00000000..f6d2190f --- /dev/null +++ b/[esx_addons]/esx_holdup/locales/hu.lua @@ -0,0 +1,16 @@ +Locales['hu'] = { + ['shop_robbery'] = 'Boltrablás', + ['press_to_rob'] = 'Nyomd meg az [E] gombot ~o~rablás indításához %s', + ['robbery_timer'] = 'Ennyi idö van a rablásból: ~r~%s másodperc', + ['recently_robbed'] = 'Ezt a boltot már rabolták. Várj a következö rablásig: %s másodperc', + ['rob_in_prog'] = '~r~Rablás indult: %s', + ['started_to_rob'] = 'Elindítottál egy rablást: %s', + ['alarm_triggered'] = 'Vészjelzö elindult!', + ['robbery_complete'] = '~r~Rablás sikeres, ennyit kaptál: $%s', + ['robbery_complete_at'] = '~r~Rablás sikeres: %s', + ['robbery_cancelled'] = 'Rablást félbe szakítottad!', + ['robbery_cancelled_at'] = '~r~Rablást megszakították: %s!', + ['min_police'] = 'Legalább %s rendőrnek kell lennie a városban a rabláshoz.', + ['robbery_already'] = '~r~Rablás folyamatban.', + ['no_threat'] = 'nem jelentesz veszélyzt az üzletvezetőre', +} \ No newline at end of file diff --git a/[esx_addons]/esx_holdup/locales/it.lua b/[esx_addons]/esx_holdup/locales/it.lua new file mode 100644 index 00000000..df8ae255 --- /dev/null +++ b/[esx_addons]/esx_holdup/locales/it.lua @@ -0,0 +1,16 @@ +Locales['it'] = { + ['shop_robbery'] = 'rapine negozi', + ['press_to_rob'] = 'premi [E] per ~o~avviare una rapina %s', + ['robbery_timer'] = 'rapina: ~r~%s secondi rimanenti', + ['recently_robbed'] = 'questo negozio è stato recentemente rapinato. Attendi %s secondi prima di poter avviare una nuova rapina', + ['rob_in_prog'] = '~r~rapina in corso %s', + ['started_to_rob'] = 'hai iniziato a derubare %s', + ['alarm_triggered'] = 'l\'allarme è stato attivato', + ['robbery_complete'] = '~r~la rapina ha avuto successo, hai ~o~rubato $%s', + ['robbery_complete_at'] = '~r~rapina riuscita %s', + ['robbery_cancelled'] = 'la rapina è stata annullata!', + ['robbery_cancelled_at'] = '~r~la rapina a %s è stata annullata!', + ['min_police'] = 'devono esserci almeno %s poliziotti in città per avviare una rapina.', + ['robbery_already'] = '~r~una rapina è già in corso.', + ['no_threat'] = 'non rappresenti una minaccia per il negoziante', +} diff --git a/[esx_addons]/esx_holdup/locales/nl.lua b/[esx_addons]/esx_holdup/locales/nl.lua new file mode 100644 index 00000000..650e5ff0 --- /dev/null +++ b/[esx_addons]/esx_holdup/locales/nl.lua @@ -0,0 +1,16 @@ +Locales['nl'] = { + ['shop_robbery'] = 'Winkel Overval', + ['press_to_rob'] = 'Druk op ~INPUT_CONTEXT~ om ~b~%s~s~ te ~o~overvallen~s~ ', + ['robbery_timer'] = 'Winkel overval: nog ~r~%s~s~ seconden wachten', + ['recently_robbed'] = 'Deze winkel is net overvallen . Wacht nog ~y~%s~s~ seconden voordat je deze winkel kan overvallen', + ['rob_in_prog'] = '~r~Overval aan de gang bij de ~b~%s~s~', + ['started_to_rob'] = 'Je bent begonnen met het overvallen van de ~y~%s~s~', + ['alarm_triggered'] = 'Het alarm gaat af!', + ['robbery_complete'] = '~r~De overval is succesvol ~s~, je hebt ~g~$%s~s~ ~o~buitgemaakt~s~', + ['robbery_complete_at'] = '~r~De overval bij de ~y~%s~s~ is geslaagd', + ['robbery_cancelled'] = 'De overval is gestopt!', + ['robbery_cancelled_at'] = '~r~De overval bij de ~b~%s~s~ is gestopt!', + ['min_police'] = 'Er moeten minimaal ~b~%s agenten~s~ in de stad aanwezig zijn.', + ['robbery_already'] = '~r~Er is al een overval gaande.', + ['no_threat'] = 'Je vormt geen Bedreiging voor de eigenaar', +} diff --git a/[esx_addons]/esx_holdup/locales/pl.lua b/[esx_addons]/esx_holdup/locales/pl.lua new file mode 100644 index 00000000..7e0c122a --- /dev/null +++ b/[esx_addons]/esx_holdup/locales/pl.lua @@ -0,0 +1,16 @@ +Locales['pl'] = { + ['shop_robbery'] = 'napad na sklep', + ['press_to_rob'] = 'naciśnij [E] aby rozpocząc ~o~napad na %s', + ['robbery_timer'] = 'napad na sklep: ~r~%s sekund do końca', + ['recently_robbed'] = 'ten sklep niedawno został obrabowany. Proszę poczekać %s sekund przed kolejnym napadem', + ['rob_in_prog'] = '~r~napad w toku w %s', + ['started_to_rob'] = 'rozpoczałeś/aś napad %s', + ['alarm_triggered'] = 'alarm został włączony', + ['robbery_complete'] = '~r~Napad udany, ~o~obrabowałeś/aś $%s', + ['robbery_complete_at'] = '~r~Napad udany w %s', + ['robbery_cancelled'] = 'napad został anulowany!', + ['robbery_cancelled_at'] = '~r~Napad w %s został anulowany!', + ['min_police'] = 'minimalnie musi być %s policjantów w mieście aby obrabować.', + ['robbery_already'] = '~r~Napad jest już w toku.', + ['no_threat'] = 'nie stwarzasz zagrożenia dla tego sklepu', +} diff --git a/[esx_addons]/esx_holdup/locales/si.lua b/[esx_addons]/esx_holdup/locales/si.lua new file mode 100644 index 00000000..9b2974e9 --- /dev/null +++ b/[esx_addons]/esx_holdup/locales/si.lua @@ -0,0 +1,16 @@ +Locales['si'] = { + ['shop_robbery'] = 'rop trgovine', + ['press_to_rob'] = 'pritisnite [E] za ~o~rob %s', + ['robbery_timer'] = 'rop trgovine: ~r~%s sekundah', + ['recently_robbed'] = 'ta trgovina je bila nedavno oropana. Počakajte %s sekund, da boste lahko ponovno ropali', + ['rob_in_prog'] = '~r~robljenje poteka v %s', + ['started_to_rob'] = 'začel si ropati %s', + ['alarm_triggered'] = 'alarm se je sprožil', + ['robbery_complete'] = '~r~Lop je bil uspešen, ~o~stole $%s', + ['robbery_complete_at'] = '~r~Robbery successful at %s', + ['robbery_cancelled'] = 'rop je bil preklican!', + ['robbery_cancelled_at'] = '~r~Lop na lokaciji %s je bil preklican!', + ['min_police'] = 'za rop mora biti v mestu vsaj %s policistov.', + ['robbery_already'] = '~r~Lop je že v teku.', + ['no_threat'] = 'ne predstavljaš nevarnosti za lastnika trgovine', +} diff --git a/[esx_addons]/esx_holdup/locales/sv.lua b/[esx_addons]/esx_holdup/locales/sv.lua new file mode 100644 index 00000000..68ef5826 --- /dev/null +++ b/[esx_addons]/esx_holdup/locales/sv.lua @@ -0,0 +1,16 @@ +Locales['sv'] = { + ['shop_robbery'] = 'butikrån', + ['press_to_rob'] = 'tryck [E] för att ~o~råna %s', + ['robbery_timer'] = 'butiksrån: ~r~%s sekunder kvarstår', + ['recently_robbed'] = 'denna butik har nyligen rånats, du måste vänta %s sekunder!', + ['rob_in_prog'] = '~r~Det är ett pågående rån vid %s', + ['started_to_rob'] = 'du började att råna %s, gå inte för långt från butiken!', + ['alarm_triggered'] = '~o~Larmet har utlösts', + ['robbery_complete'] = '~r~Rånet är avklarat, du stal ~r~%s SEK!', + ['robbery_complete_at'] = '~r~Ett rån lyckades vid %s', + ['robbery_cancelled'] = 'rånet avbröts!', + ['robbery_cancelled_at'] = '~r~Rånet vid %s avbröts!', + ['min_police'] = 'det måste vara minst %s poliser inne för att du ska kunna ~o~råna butiker.', + ['robbery_already'] = '~r~Ett rån pågår redan.', + ['no_threat'] = 'du kan inte hota utan ett vapen', +} \ No newline at end of file diff --git a/[esx_addons]/esx_holdup/server/main.lua b/[esx_addons]/esx_holdup/server/main.lua new file mode 100644 index 00000000..0e8498d4 --- /dev/null +++ b/[esx_addons]/esx_holdup/server/main.lua @@ -0,0 +1,68 @@ +local rob = false +local robbers = {} + +RegisterServerEvent('esx_holdup:tooFar') +AddEventHandler('esx_holdup:tooFar', function(currentStore) + local source = source + rob = false + for _, xPlayer in pairs(ESX.GetExtendedPlayers('job', 'police')) do + TriggerClientEvent('esx:showNotification', xPlayer.source, TranslateCap('robbery_cancelled_at', Stores[currentStore].nameOfStore)) + TriggerClientEvent('esx_holdup:killBlip', xPlayer.source) + end + if robbers[source] then + TriggerClientEvent('esx_holdup:tooFar', source) + ESX.ClearTimeout(robbers[source]) + robbers[source] = nil + TriggerClientEvent('esx:showNotification', source, TranslateCap('robbery_cancelled_at', Stores[currentStore].nameOfStore)) + end +end) + +RegisterServerEvent('esx_holdup:robberyStarted') +AddEventHandler('esx_holdup:robberyStarted', function(currentStore) + local source = source + local xPlayer = ESX.GetPlayerFromId(source) + if Stores[currentStore] then + local store = Stores[currentStore] + if (os.time() - store.lastRobbed) < Config.TimerBeforeNewRob and store.lastRobbed ~= 0 then + TriggerClientEvent('esx:showNotification', source, TranslateCap('recently_robbed', Config.TimerBeforeNewRob - (os.time() - store.lastRobbed))) + return + end + if not rob then + local xPlayers = ESX.GetExtendedPlayers('job', 'police') + if #xPlayers >= Config.PoliceNumberRequired then + rob = true + for i=1, #(xPlayers) do + local xPlayer = xPlayers[i] + TriggerClientEvent('esx:showNotification', xPlayer.source, TranslateCap('rob_in_prog', store.nameOfStore)) + TriggerClientEvent('esx_holdup:setBlip', xPlayer.source, Stores[currentStore].position) + end + TriggerClientEvent('esx:showNotification', source, TranslateCap('started_to_rob', store.nameOfStore)) + TriggerClientEvent('esx:showNotification', source, TranslateCap('alarm_triggered')) + TriggerClientEvent('esx_holdup:currentlyRobbing', source, currentStore) + TriggerClientEvent('esx_holdup:startTimer', source) + Stores[currentStore].lastRobbed = os.time() + robbers[source] = ESX.SetTimeout(store.secondsRemaining * 1000, function() + rob = false + if xPlayer then + TriggerClientEvent('esx_holdup:robberyComplete', source, store.reward) + if Config.GiveBlackMoney then + xPlayer.addAccountMoney('black_money', store.reward, "Robbery") + else + xPlayer.addMoney(store.reward, "Robbery") + end + local xPlayers = ESX.GetExtendedPlayers('job', 'police') + for i=1, #(xPlayers) do + local xPlayer = xPlayers[i] + TriggerClientEvent('esx:showNotification', xPlayer.source, TranslateCap('robbery_complete_at', store.nameOfStore)) + TriggerClientEvent('esx_holdup:killBlip', xPlayer.source) + end + end + end) + else + TriggerClientEvent('esx:showNotification', source, TranslateCap('min_police', Config.PoliceNumberRequired)) + end + else + TriggerClientEvent('esx:showNotification', source, TranslateCap('robbery_already')) + end + end +end) diff --git a/[esx_addons]/esx_joblisting/.editorconfig b/[esx_addons]/esx_joblisting/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_joblisting/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_joblisting/LICENSE b/[esx_addons]/esx_joblisting/LICENSE new file mode 100644 index 00000000..505256b5 --- /dev/null +++ b/[esx_addons]/esx_joblisting/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_joblisting + Copyright (C) 2015-2023 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 . + +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_joblisting Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_joblisting/README.md b/[esx_addons]/esx_joblisting/README.md new file mode 100644 index 00000000..66cf64d2 --- /dev/null +++ b/[esx_addons]/esx_joblisting/README.md @@ -0,0 +1,15 @@ +

[ESX] Job Listing

Discord - Website - Documentation + +This Simple resource lets you finally contribute to Society and make a difference in the Word! How? it adds an amazing Menu where you can pick what you want to be in life - want to be a police officier? No-problem! Or maybe you want to stalk people and be a creepy reporter? We got you covered! + +## Legal + +esx_joblisting - virtual Job Center! + +Copyright (C) 2015-2023 Jérémie N'gadi, ESX-Framework + +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/. diff --git a/[esx_addons]/esx_joblisting/client/main.lua b/[esx_addons]/esx_joblisting/client/main.lua new file mode 100644 index 00000000..2ab5cc08 --- /dev/null +++ b/[esx_addons]/esx_joblisting/client/main.lua @@ -0,0 +1,81 @@ +local menuIsShowed, TextUIdrawing = false, false + +function ShowJobListingMenu() + menuIsShowed = true + ESX.TriggerServerCallback('esx_joblisting:getJobsList', function(jobs) + local elements = {{unselectable = "true", title = TranslateCap('job_center'), icon = "fas fa-briefcase"}} + + for i = 1, #(jobs) do + elements[#elements + 1] = {title = jobs[i].label, name = jobs[i].name} + end + + ESX.OpenContext("right", elements, function(menu, SelectJob) + TriggerServerEvent('esx_joblisting:setJob', SelectJob.name) + ESX.CloseContext() + ESX.ShowNotification(TranslateCap('new_job', SelectJob.title), "success") + menuIsShowed = false + TextUIdrawing = false + end, function() + menuIsShowed = false + TextUIdrawing = false + end) + end) +end + +-- Activate menu when player is inside marker, and draw markers +CreateThread(function() + while true do + local Sleep = 1500 + + local coords = GetEntityCoords(ESX.PlayerData.ped) + local isInMarker = false + + for i = 1, #Config.Zones, 1 do + local distance = #(coords - Config.Zones[i]) + + if distance < Config.DrawDistance then + Sleep = 0 + DrawMarker(Config.MarkerType, Config.Zones[i], 0.0, 0.0, 0.0, 0, 0.0, 0.0, Config.ZoneSize.x, Config.ZoneSize.y, Config.ZoneSize.z, + Config.MarkerColor.r, Config.MarkerColor.g, Config.MarkerColor.b, 100, false, true, 2, false, false, false, false) + end + + if distance < (Config.ZoneSize.x / 2) then + isInMarker = true + if not TextUIdrawing then + ESX.TextUI(TranslateCap("access_job_center")) + TextUIdrawing = true + end + if IsControlJustReleased(0, 38) and not menuIsShowed then + ShowJobListingMenu() + ESX.HideUI() + end + end + end + + if not isInMarker and TextUIdrawing then + ESX.HideUI() + TextUIdrawing = false + end + + Wait(Sleep) + end +end) + +-- Create blips +if Config.Blip.Enabled then + CreateThread(function() + for i = 1, #Config.Zones, 1 do + local blip = AddBlipForCoord(Config.Zones[i]) + + SetBlipSprite(blip, Config.Blip.Sprite) + SetBlipDisplay(blip, Config.Blip.Display) + SetBlipScale(blip, Config.Blip.Scale) + SetBlipColour(blip, Config.Blip.Colour) + SetBlipAsShortRange(blip, Config.Blip.ShortRange) + + BeginTextCommandSetBlipName("STRING") + AddTextComponentSubstringPlayerName(TranslateCap('blip_text')) + EndTextCommandSetBlipName(blip) + end + end) +end \ No newline at end of file diff --git a/[esx_addons]/esx_joblisting/config.lua b/[esx_addons]/esx_joblisting/config.lua new file mode 100644 index 00000000..f26abe18 --- /dev/null +++ b/[esx_addons]/esx_joblisting/config.lua @@ -0,0 +1,22 @@ +Config = {} + +Config.DrawDistance = 15.0 +Config.ZoneSize = {x = 2.7, y = 2.7, z = 0.5} +Config.MarkerColor = {r = 100, g = 200, b = 104} +Config.MarkerType = 27 +Config.Debug = ESX.GetConfig().EnableDebug + +Config.Locale = GetConvar('esx:locale', 'en') + +Config.Zones = { + vector3(-265.08, -964.1, 30.3) +} + +Config.Blip = { + Enabled = true, + Sprite = 407, + Display = 4, + Scale = 0.8, + Colour = 27, + ShortRange = true +} diff --git a/[esx_addons]/esx_joblisting/esx_joblisting.sql b/[esx_addons]/esx_joblisting/esx_joblisting.sql new file mode 100644 index 00000000..98493ad5 --- /dev/null +++ b/[esx_addons]/esx_joblisting/esx_joblisting.sql @@ -0,0 +1 @@ +ALTER TABLE jobs add whitelisted BOOLEAN NOT NULL DEFAULT FALSE; \ No newline at end of file diff --git a/[esx_addons]/esx_joblisting/fxmanifest.lua b/[esx_addons]/esx_joblisting/fxmanifest.lua new file mode 100644 index 00000000..a2066124 --- /dev/null +++ b/[esx_addons]/esx_joblisting/fxmanifest.lua @@ -0,0 +1,19 @@ +fx_version 'bodacious' +game 'gta5' + +description 'ESX Job Listing' +lua54 'yes' +version '1.9.0' + +shared_scripts { + '@es_extended/imports.lua', + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua' +} + +server_script 'server/main.lua' + +client_script 'client/main.lua' + +dependency 'es_extended' diff --git a/[esx_addons]/esx_joblisting/locales/br.lua b/[esx_addons]/esx_joblisting/locales/br.lua new file mode 100644 index 00000000..26f317fb --- /dev/null +++ b/[esx_addons]/esx_joblisting/locales/br.lua @@ -0,0 +1,5 @@ +Locales['br'] = { + ['new_job'] = 'Você agora tem um novo emprego!', + ['access_job_center'] = 'Pressione ~INPUT_PICKUP~ para acessar a Lista de Empregos.', + ['job_center'] = 'Agência de Empregos', +} diff --git a/[esx_addons]/esx_joblisting/locales/cs.lua b/[esx_addons]/esx_joblisting/locales/cs.lua new file mode 100644 index 00000000..8c934176 --- /dev/null +++ b/[esx_addons]/esx_joblisting/locales/cs.lua @@ -0,0 +1,5 @@ +Locales['cs'] = { + ['new_job'] = 'mate novou praci!', + ['access_job_center'] = 'stiskni ~INPUT_PICKUP~ pro pristup na Urad prace.', + ['job_center'] = 'Urad prace', +} diff --git a/[esx_addons]/esx_joblisting/locales/de.lua b/[esx_addons]/esx_joblisting/locales/de.lua new file mode 100644 index 00000000..84ad3342 --- /dev/null +++ b/[esx_addons]/esx_joblisting/locales/de.lua @@ -0,0 +1,7 @@ +Locales['de'] = { + ['new_job'] = 'Du hast einen neuen Job!', + ['access_job_center'] = 'Drücke [E] um das Arbeitsamt zu öffnen.', + ['job_center'] = 'Arbeitsamt', + ["blip_text"] = "Job Center" + +} diff --git a/[esx_addons]/esx_joblisting/locales/en.lua b/[esx_addons]/esx_joblisting/locales/en.lua new file mode 100644 index 00000000..901e076f --- /dev/null +++ b/[esx_addons]/esx_joblisting/locales/en.lua @@ -0,0 +1,6 @@ +Locales['en'] = { + ['new_job'] = 'New Job: ~b~%s~s~ !', + ['access_job_center'] = 'Press ~b~[E]~s~ To Open Job Selector.', + ['job_center'] = 'Select A Job.', + ["blip_text"] = "Job Centre" +} diff --git a/[esx_addons]/esx_joblisting/locales/es.lua b/[esx_addons]/esx_joblisting/locales/es.lua new file mode 100644 index 00000000..95afec8a --- /dev/null +++ b/[esx_addons]/esx_joblisting/locales/es.lua @@ -0,0 +1,5 @@ +Locales['es'] = { + ['new_job'] = '¡Tienes un trabajo nuevo!', + ['access_job_center'] = 'Pulsa ~INPUT_PICKUP~ para entrar a la Oficina de Empleo.', + ['job_center'] = 'Oficina de Empleo', +} diff --git a/[esx_addons]/esx_joblisting/locales/et.lua b/[esx_addons]/esx_joblisting/locales/et.lua new file mode 100644 index 00000000..663d0446 --- /dev/null +++ b/[esx_addons]/esx_joblisting/locales/et.lua @@ -0,0 +1,6 @@ +Locales['et'] = { + ['new_job'] = 'Uus töökoht: ~b~%s~s~ !', + ['access_job_center'] = 'Vajuta ~b~[E]~s~, et avada töötukassa menüü.', + ['job_center'] = 'Vali töökoht.', + ["blip_text"] = "Töötukassa" +} diff --git a/[esx_addons]/esx_joblisting/locales/fi.lua b/[esx_addons]/esx_joblisting/locales/fi.lua new file mode 100644 index 00000000..1e37abdd --- /dev/null +++ b/[esx_addons]/esx_joblisting/locales/fi.lua @@ -0,0 +1,5 @@ +Locales['fi'] = { + ['new_job'] = 'Sinulla on nyt uusi työ !', + ['access_job_center'] = 'paina ~INPUT_PICKUP~ vaihtaaksesi työtä työkeskuksessa.', + ['job_center'] = 'työkeskus', +} diff --git a/[esx_addons]/esx_joblisting/locales/fr.lua b/[esx_addons]/esx_joblisting/locales/fr.lua new file mode 100644 index 00000000..7ac0a78b --- /dev/null +++ b/[esx_addons]/esx_joblisting/locales/fr.lua @@ -0,0 +1,5 @@ +Locales['fr'] = { + ['new_job'] = 'vous avez un nouveau job !', + ['access_job_center'] = 'appuyez sur ~INPUT_PICKUP~ pour \naccéder au Pôle Emploi.', + ['job_center'] = 'pôle-Emploi', +} diff --git a/[esx_addons]/esx_joblisting/locales/hu.lua b/[esx_addons]/esx_joblisting/locales/hu.lua new file mode 100644 index 00000000..36cb8365 --- /dev/null +++ b/[esx_addons]/esx_joblisting/locales/hu.lua @@ -0,0 +1,5 @@ +Locales['hu'] = { + ['new_job'] = 'Felvetted a munkát!', + ['access_job_center'] = 'Nyomj ~b~[E]~s~ hogy megnézd a munkákat', + ['job_center'] = 'Munkaügyi központ', +} diff --git a/[esx_addons]/esx_joblisting/locales/it.lua b/[esx_addons]/esx_joblisting/locales/it.lua new file mode 100644 index 00000000..fd2e9a89 --- /dev/null +++ b/[esx_addons]/esx_joblisting/locales/it.lua @@ -0,0 +1,6 @@ +Locales['it'] = { + ['new_job'] = 'Nuovo lavoro: ~b~%s~s~ !', + ['access_job_center'] = 'Premi ~b~[E]~s~ per aprire la scelta dei lavori.', + ['job_center'] = 'Seleziona un lavoro.', + ["blip_text"] = "Centro lavori" +} diff --git a/[esx_addons]/esx_joblisting/locales/nl.lua b/[esx_addons]/esx_joblisting/locales/nl.lua new file mode 100644 index 00000000..7152f026 --- /dev/null +++ b/[esx_addons]/esx_joblisting/locales/nl.lua @@ -0,0 +1,6 @@ +Locales['nl'] = { + ['new_job'] = 'Nieuwe baan: ~b~%s~s~ !', + ['access_job_center'] = 'Klik op ~b~[E]~s~ om het uitzendbureau te openen.', + ['job_center'] = 'Selecteer een baan.', + ["blip_text"] = "Uitzendbureau" +} diff --git a/[esx_addons]/esx_joblisting/locales/pl.lua b/[esx_addons]/esx_joblisting/locales/pl.lua new file mode 100644 index 00000000..9f22e657 --- /dev/null +++ b/[esx_addons]/esx_joblisting/locales/pl.lua @@ -0,0 +1,5 @@ +Locales['pl'] = { + ['new_job'] = 'masz nową pracę!', + ['access_job_center'] = 'wciśnij ~INPUT_PICKUP~ aby otworzyć urząd pracy.', + ['job_center'] = 'urząd Pracy', +} diff --git a/[esx_addons]/esx_joblisting/locales/si.lua b/[esx_addons]/esx_joblisting/locales/si.lua new file mode 100644 index 00000000..76c5b6dd --- /dev/null +++ b/[esx_addons]/esx_joblisting/locales/si.lua @@ -0,0 +1,5 @@ +Locales['si'] = { + ['new_job'] = 'imaš novo službo!', + ['access_job_center'] = 'pritisnite ~INPUT_PICKUP~ za dostop do job center.', + ['job_center'] = 'center za delovna mesta', +} diff --git a/[esx_addons]/esx_joblisting/locales/sv.lua b/[esx_addons]/esx_joblisting/locales/sv.lua new file mode 100644 index 00000000..b718af6c --- /dev/null +++ b/[esx_addons]/esx_joblisting/locales/sv.lua @@ -0,0 +1,5 @@ +Locales['sv'] = { + ['new_job'] = 'du har ett nytt jobb! Tips: kolla kartan för nya blips.', + ['access_job_center'] = 'tryck ~INPUT_PICKUP~ för att öppna arbetsförmedlingen', + ['job_center'] = 'arbetsförmedlingen', +} diff --git a/[esx_addons]/esx_joblisting/server/main.lua b/[esx_addons]/esx_joblisting/server/main.lua new file mode 100644 index 00000000..648c4c2b --- /dev/null +++ b/[esx_addons]/esx_joblisting/server/main.lua @@ -0,0 +1,55 @@ +function getJobs() + local jobs = ESX.GetJobs() + local availableJobs = {} + for k, v in pairs(jobs) do + if v.whitelisted == false then + availableJobs[#availableJobs + 1] = {label = v.label, name = k} + end + end + return availableJobs +end + +ESX.RegisterServerCallback('esx_joblisting:getJobsList', function(source, cb) + local jobs = getJobs() + cb(jobs) +end) + +function IsJobAvailable(job) + local jobs = ESX.GetJobs() + local JobToCheck = jobs[job] + return not JobToCheck.whitelisted +end + +function IsNearCentre(player) + local Ped = GetPlayerPed(player) + local PedCoords = GetEntityCoords(Ped) + local Zones = Config.Zones + local Close = false + + for i = 1, #Config.Zones, 1 do + local distance = #(PedCoords - Config.Zones[i]) + + if distance < Config.DrawDistance then + Close = true + end + end + + return Close +end + +RegisterServerEvent('esx_joblisting:setJob') +AddEventHandler('esx_joblisting:setJob', function(job) + local source = source + local xPlayer = ESX.GetPlayerFromId(source) + local jobs = getJobs() + + if xPlayer and IsNearCentre(source) and IsJobAvailable(job) then + if ESX.DoesJobExist(job, 0) then + xPlayer.setJob(job, 0) + else + print("[^1ERROR^7] Tried Setting User ^5".. source .. "^7 To Invalid Job - ^5"..job .."^7!") + end + else + print("[^3WARNING^7] User ^5".. source .. "^7 Attempted to Exploit ^5`esx_joblisting:setJob`^7!") + end +end) diff --git a/[esx_addons]/esx_jobs/.editorconfig b/[esx_addons]/esx_jobs/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_jobs/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_jobs/LICENSE b/[esx_addons]/esx_jobs/LICENSE new file mode 100644 index 00000000..e5461dfb --- /dev/null +++ b/[esx_addons]/esx_jobs/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_jobs + Copyright (C) 2015-2023 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 . + +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_jobs Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_jobs/README.md b/[esx_addons]/esx_jobs/README.md new file mode 100644 index 00000000..71762a83 --- /dev/null +++ b/[esx_addons]/esx_jobs/README.md @@ -0,0 +1,48 @@ +# esx_jobs + +## Requirements + +- [esx_addonaccount](https://github.com/ESX-Org/esx_addonaccount) +- [esx_skin](https://github.com/ESX-Org/esx_skin) + +### Features + +- Jobs: slaughterer, miner, fisherman, journalist, fueler, tailor +- Security deposit when renting a job vehicle (given back in case of crash, to the amount of damage the vehicle has already taken) +- Easy system to create jobs (samples in jobs folder) +- Item farming jobs +This addon is an easy way to have farming jobs on your server, there is no player management. + +## iZone integreation (optional) + +- You can use iZone with esx_jobs by creating polynomial zones with iZone. When you finish the zone creation, take the zone name and set a Zone field on the job like so: + +``` +CloakRoom = { + Zone = "miner_room", -- HERE + Size = {x = 3.0, y = 3.0, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker = 1, + Blip = true, + Name = TranslateCap("m_miner_locker"), + Type = "cloakroom", + Hint = TranslateCap("cloak_change"), + GPS = {x = 884.86, y = -2176.51, z = 29.51} +} +``` + +- Note that this is just to have custom zone and avoid using radius. + +### [How to install and use iZone](https://github.com/izio38/iZone) + +## Legal + +esx_jobs - jobs + +Copyright (C) 2015-2023 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 . diff --git a/[esx_addons]/esx_jobs/client/main.lua b/[esx_addons]/esx_jobs/client/main.lua new file mode 100644 index 00000000..721742de --- /dev/null +++ b/[esx_addons]/esx_jobs/client/main.lua @@ -0,0 +1,496 @@ +local Blips = {} +local JobBlips = {} +local isInMarker = false +local hintToDisplay = "no hint to display" +local onDuty = false +local spawner = 0 +local myPlate = {} + +local vehicleObjInCaseofDrop = nil +local vehicleInCaseofDrop = nil + +local vehicleMaxHealth = nil + +RegisterNetEvent('esx:playerLoaded', function(xPlayer) + ESX.PlayerData = xPlayer + ESX.PlayerLoaded = true + refreshBlips() +end) + +RegisterNetEvent('esx:onPlayerLogout',function() + ESX.PlayerLoaded = false + ESX.PlayerData = {} +end) + +RegisterNetEvent('esx:setJob',function(job) + ESX.PlayerData.job = job +end) + +function OpenMenu() + local elements = { + {unselectable = true, icon = "fas fa-shirt", title = TranslateCap('cloakroom')}, + {icon = "fas fa-shirt", title = TranslateCap('job_wear'), value = "job_wear"}, + {icon = "fas fa-shirt", title = TranslateCap('citizen_wear'), value = "citizen_wear"}, + } + + ESX.OpenContext("right", elements, function(menu,element) + if element.value == "citizen_wear" then + onDuty = false + ESX.ShowNotification(TranslateCap('offduty'),"success") + ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin, jobSkin) + local isMale = skin.sex == 0 + + TriggerEvent('skinchanger:loadDefaultModel', isMale, function() + ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin) + TriggerEvent('skinchanger:loadSkin', skin) + end) + end) + end) + elseif element.value == "job_wear" then + onDuty = true + ESX.ShowNotification(TranslateCap('onduty'), "success") + ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin, jobSkin) + if skin.sex == 0 then + if ESX.Table.SizeOf(jobSkin.skin_male) >= 1 then + TriggerEvent('skinchanger:loadClothes', skin, jobSkin.skin_male) + else + ESX.ShowNotification(TranslateCap('no_male_clothing'), "error") + end + else + if ESX.Table.SizeOf(jobSkin.skin_female) >= 1 then + TriggerEvent('skinchanger:loadClothes', skin, jobSkin.skin_female) + else + ESX.ShowNotification(TranslateCap('no_female_clothing'), "error") + end + end + end) + end + end) +end + +AddEventHandler('esx_jobs:action', function(job, zone, zoneKey) + menuIsShowed = true + if zone.Type == "cloakroom" then + OpenMenu() + elseif zone.Type == "work" then + local playerPed = PlayerPedId() + + if IsPedInAnyVehicle(playerPed, false) then + ESX.ShowNotification(TranslateCap('foot_work')) + else + TriggerServerEvent('esx_jobs:startWork', zone.Item, zoneKey) + end + elseif zone.Type == "vehspawner" then + local spawnPoint = nil + local vehicle = nil + + for k,v in pairs(Config.Jobs) do + if ESX.PlayerData.job.name == k then + for l,w in pairs(v.Zones) do + if w.Type == "vehspawnpt" and w.Spawner == zone.Spawner then + spawnPoint = w + spawner = w.Spawner + end + end + + for m,x in pairs(v.Vehicles) do + if x.Spawner == zone.Spawner then + vehicle = x + end + end + end + end + + if ESX.Game.IsSpawnPointClear(spawnPoint.Pos, 5.0) then + spawnVehicle(spawnPoint, vehicle, zone.Caution) + else + ESX.ShowNotification(TranslateCap('spawn_blocked')) + end + + elseif zone.Type == "vehdelete" then + local looping = true + + for k,v in pairs(Config.Jobs) do + if ESX.PlayerData.job.name == k then + for l,w in pairs(v.Zones) do + if w.Type == "vehdelete" and w.Spawner == zone.Spawner then + local playerPed = PlayerPedId() + + if IsPedInAnyVehicle(playerPed, false) then + + local vehicle = GetVehiclePedIsIn(playerPed, false) + local plate = GetVehicleNumberPlateText(vehicle) + plate = string.gsub(plate, " ", "") + local driverPed = GetPedInVehicleSeat(vehicle, -1) + local vehicleMaxHealth = GetVehicleEngineHealth(vehicle) + + if playerPed == driverPed then + + for i=1, #myPlate, 1 do + if myPlate[i] == plate then + + local vehicleHealth = GetVehicleEngineHealth(vehicleInCaseofDrop) + local giveBack = ESX.Math.Round(vehicleHealth / vehicleMaxHealth, 2) + + TriggerServerEvent('esx_jobs:caution', "give_back", giveBack, 0, 0) + DeleteVehicle(GetVehiclePedIsIn(playerPed, false)) + + if w.Teleport ~= 0 then + ESX.Game.Teleport(playerPed, w.Teleport) + end + + table.remove(myPlate, i) + + if vehicleObjInCaseofDrop.HasCaution then + vehicleInCaseofDrop = nil + vehicleObjInCaseofDrop = nil + vehicleMaxHealth = nil + end + + break + end + end + + else + ESX.ShowNotification(TranslateCap('not_your_vehicle')) + end + + end + + looping = false + break + end + + if looping == false then + break + end + end + end + if looping == false then + break + end + end + elseif zone.Type == "delivery" then + if Blips['delivery'] ~= nil then + RemoveBlip(Blips['delivery']) + Blips['delivery'] = nil + end + TriggerServerEvent('esx_jobs:startWork', zone.Item, zoneKey) + end + --nextStep(zone.GPS) +end) + +function nextStep(gps) + if gps ~= 0 then + if Blips['delivery'] ~= nil then + RemoveBlip(Blips['delivery']) + Blips['delivery'] = nil + end + + Blips['delivery'] = AddBlipForCoord(gps.x, gps.y, gps.z) + SetBlipRoute(Blips['delivery'], true) + ESX.ShowNotification(TranslateCap('next_point')) + end +end + +AddEventHandler('esx_jobs:hasExitedMarker', function(zone) + TriggerServerEvent('esx_jobs:stopWork') + menuIsShowed = false + isInMarker = false +end) + +RegisterNetEvent('esx:setJob', function(job) + onDuty = false + myPlate = {} -- loosing vehicle caution in case player changes job. + spawner = 0 + deleteBlips() + refreshBlips() +end) + +function deleteBlips() + if JobBlips[1] ~= nil then + for i=1, #JobBlips, 1 do + RemoveBlip(JobBlips[i]) + JobBlips[i] = nil + end + end +end + +function refreshBlips() + local zones = {} + local blipInfo = {} + + if ESX.PlayerData.job ~= nil then + for jobKey,jobValues in pairs(Config.Jobs) do + if jobKey == ESX.PlayerData.job.name then + for zoneKey,zoneValues in pairs(jobValues.Zones) do + + if zoneValues.Blip then + local _Pos = {} + if (zoneValues.Zone) then + TriggerEvent("izone:getZoneCenter", zoneValues.Zone, function(_center) + if (_center) then + _Pos = _center + end + end) + else + _Pos = zoneValues.Pos + end + local blip = AddBlipForCoord(_Pos.x, _Pos.y, _Pos.z) + SetBlipSprite (blip, jobValues.BlipInfos.Sprite) + SetBlipDisplay (blip, 4) + SetBlipScale (blip, 0.8) + SetBlipCategory(blip, 3) + SetBlipColour (blip, jobValues.BlipInfos.Color) + SetBlipAsShortRange(blip, true) + + BeginTextCommandSetBlipName("STRING") + AddTextComponentSubstringPlayerName(zoneValues.Name) + EndTextCommandSetBlipName(blip) + table.insert(JobBlips, blip) + end + end + end + end + end +end + +function spawnVehicle(spawnPoint, vehicle, vehicleCaution) + hintIsShowed = false + TriggerServerEvent('esx_jobs:caution', 'take', vehicleCaution, spawnPoint, vehicle) +end + +RegisterNetEvent('esx_jobs:spawnJobVehicle',function(spawnPoint, vehicle) + local playerPed = PlayerPedId() + + ESX.Game.SpawnVehicle(vehicle.Hash, spawnPoint.Pos, spawnPoint.Heading, function(spawnedVehicle) + + if vehicle.Trailer ~= "none" then + ESX.Game.SpawnVehicle(vehicle.Trailer, spawnPoint.Pos, spawnPoint.Heading, function(trailer) + AttachVehicleToTrailer(spawnedVehicle, trailer, 1.1) + end) + end + + -- save & set plate + local plate = 'WORK' .. math.random(100, 900) + SetVehicleNumberPlateText(spawnedVehicle, plate) + table.insert(myPlate, plate) + plate = string.gsub(plate, " ", "") + + TaskWarpPedIntoVehicle(playerPed, spawnedVehicle, -1) + + if vehicle.HasCaution then + vehicleInCaseofDrop = spawnedVehicle + vehicleObjInCaseofDrop = vehicle + vehicleMaxHealth = GetVehicleEngineHealth(spawnedVehicle) + end + end) +end) + +-- Display markers (only if on duty and the player's job ones) +CreateThread(function() + while true do + local Sleep = 1500 + local zones = {} + + if ESX.PlayerData.job then + for k,v in pairs(Config.Jobs) do + if ESX.PlayerData.job.name == k then + Sleep = 0 + zones = v.Zones + end + end + + local coords = GetEntityCoords(PlayerPedId()) + for k,v in pairs(zones) do + if onDuty or v.Type == "cloakroom" then + if (v.Zone) then + TriggerEvent("izone:getZoneCenter", v.Zone, function(center) + if (not(center == nil)) then + if(v.Marker ~= -1 and #(coords - center) < Config.DrawDistance) then + Sleep = 0 + DrawMarker(v.Marker, center.x, center.y, center.z - 1, 0.0, 0.0, 0.0, 0, 0.0, 0.0, v.Size.x, v.Size.y, v.Size.z, v.Color.r, v.Color.g, v.Color.b, 100, false, true, 2, false, false, false, false) + end + end + end) + else + local Pos = vector3(v.Pos.x, v.Pos.y, v.Pos.z) + if(v.Marker ~= -1 and #(coords - Pos) < Config.DrawDistance) then + Sleep = 0 + DrawMarker(v.Marker, v.Pos.x, v.Pos.y, v.Pos.z, 0.0, 0.0, 0.0, 0, 0.0, 0.0, v.Size.x, v.Size.y, v.Size.z, v.Color.r, v.Color.g, v.Color.b, 100, false, true, 2, false, false, false, false) + end + end + end + end + end + Wait(Sleep) + end +end) + +-- Display public markers +CreateThread(function() + while true do + local Sleep = 1500 + local coords = GetEntityCoords(PlayerPedId()) + for k,v in pairs(Config.PublicZones) do + if(v.Marker ~= -1 and #(coords - v.Pos) < Config.DrawDistance) then + Sleep = 0 + DrawMarker(v.Marker, v.Pos.x, v.Pos.y, v.Pos.z, 0.0, 0.0, 0.0, 0, 0.0, 0.0, v.Size.x, v.Size.y, v.Size.z, v.Color.r, v.Color.g, v.Color.b, 100, false, true, 2, false, false, false, false) + end + end + Wait(Sleep) + end +end) + +-- Activate public marker +CreateThread(function() + while true do + local Sleep = 1500 + local coords = GetEntityCoords(PlayerPedId()) + + for k,v in pairs(Config.PublicZones) do + if #(coords - v.Pos) < v.Size.x/2 then + Sleep = 0 + ESX.ShowHelpNotification(v.Hint) + hintIsShowed = true + if IsControlJustReleased(0, 38) then + ESX.Game.Teleport(PlayerPedId(), v.Teleport) + end + end + end + + Wait(Sleep) + end +end) + +-- Activate menu when player is inside marker +CreateThread(function() + while true do + + local Sleep = 500 + + if ESX.PlayerData.job and ESX.PlayerData.job.name ~= 'unemployed' then + local zones = nil + local job = nil + + for k,v in pairs(Config.Jobs) do + if ESX.PlayerData.job.name == k then + Sleep = 0 + job = v + zones = v.Zones + end + end + + if zones then + local coords = GetEntityCoords(PlayerPedId()) + local currentZone = nil + local zone = nil + local lastZone = nil + + for k,v in pairs(zones) do + -- If we defined a zone from iZone + if v.Zone then + TriggerEvent("izone:isPlayerInZone", v.Zone, function(isIn) + if isIn then + Sleep = 0 + isInMarker = true + currentZone = k + zone = v + return + else + isInMarker = false + end + end) + -- Because we were in a routine + if isInMarker then + break + end + -- Else use radius defined from center + else + local Pos = vector3(v.Pos.x, v.Pos.y, v.Pos.z) + if #(coords - Pos) < v.Size.x then + Sleep = 0 + isInMarker = true + currentZone = k + zone = v + break + else + isInMarker = false + end + end + + end + + if IsControlJustReleased(0, 38) and not menuIsShowed and isInMarker then + if onDuty or zone.Type == "cloakroom" then + TriggerEvent('esx_jobs:action', job, zone, currentZone) + end + end + + -- hide or show top left zone hints + if isInMarker and not menuIsShowed then + hintIsShowed = true + if (onDuty or zone.Type == "cloakroom") and zone.Type ~= "vehdelete" then + hintToDisplay = zone.Hint + ESX.ShowHelpNotification(hintToDisplay) + elseif zone.Type == "vehdelete" and (onDuty) then + local playerPed = PlayerPedId() + + if IsPedInAnyVehicle(playerPed, false) then + local vehicle = GetVehiclePedIsIn(playerPed, false) + local driverPed = GetPedInVehicleSeat(vehicle, -1) + local plate = GetVehicleNumberPlateText(vehicle) + plate = string.gsub(plate, " ", "") + + if playerPed == driverPed then + + for i=1, #myPlate, 1 do + if myPlate[i] == plate then + hintToDisplay = zone.Hint + break + end + end + + else + hintToDisplay = TranslateCap('not_your_vehicle') + ESX.ShowHelpNotification(hintToDisplay) + end + else + hintToDisplay = TranslateCap('in_vehicle') + ESX.ShowHelpNotification(hintToDisplay) + end + hintIsShowed = true + elseif onDuty and zone.Spawner ~= spawner then + hintToDisplay = TranslateCap('wrong_point') + ESX.ShowHelpNotification(hintToDisplay) + end + end + + if isInMarker and not hasAlreadyEnteredMarker then + hasAlreadyEnteredMarker = true + end + + if not isInMarker and hasAlreadyEnteredMarker then + hasAlreadyEnteredMarker = false + TriggerEvent('esx_jobs:hasExitedMarker', zone) + end + end + end + Wait(Sleep) + end +end) + +if Config.RequestIPL then + CreateThread(function() + -- Slaughterer + RemoveIpl("CS1_02_cf_offmission") + RequestIpl("CS1_02_cf_onmission1") + RequestIpl("CS1_02_cf_onmission2") + RequestIpl("CS1_02_cf_onmission3") + RequestIpl("CS1_02_cf_onmission4") + -- Tailor + RequestIpl("id2_14_during_door") + RequestIpl("id2_14_during1") + end) +end +if ESX.PlayerLoaded then refreshBlips() end diff --git a/[esx_addons]/esx_jobs/config.lua b/[esx_addons]/esx_jobs/config.lua new file mode 100644 index 00000000..044d82e5 --- /dev/null +++ b/[esx_addons]/esx_jobs/config.lua @@ -0,0 +1,35 @@ +Config = {} +Config.DrawDistance = 10.0 +Config.Locale = GetConvar('esx:locale', 'en') +Config.Jobs = {} + +Config.MaxCaution = 10000 -- the max caution allowed +Config.RequestIPL = true + +Config.PublicZones = { + + EnterBuilding = { + Pos = vector3(-118.21, -607.14, 35.28), + Size = {x = 3.0, y = 3.0, z = 0.2}, + Color = {r = 50, g = 200, b = 50}, + Marker= 1, + Blip = false, + Name = TranslateCap('reporter_name'), + Type = "teleport", + Hint = TranslateCap('public_enter'), + Teleport = vector3(-139.09,-620.74, 167.82) + }, + + ExitBuilding = { + Pos = vector3( -139.45, -617.32, 167.82), + Size = {x = 3.0, y = 3.0, z = 0.2}, + Color = {r = 50, g = 200, b = 50}, + Marker= 1, + Blip = false, + Name = TranslateCap('reporter_name'), + Type = "teleport", + Hint = TranslateCap('public_leave'), + Teleport = vector3(-113.07, -604.93, 35.28 ), + } + +} diff --git a/[esx_addons]/esx_jobs/esx_jobs.sql b/[esx_addons]/esx_jobs/esx_jobs.sql new file mode 100644 index 00000000..e1d0abc6 --- /dev/null +++ b/[esx_addons]/esx_jobs/esx_jobs.sql @@ -0,0 +1,47 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('caution', 'Caution', 0) +; + +INSERT INTO `jobs` (name, label) VALUES + ('slaughterer', 'Abatteur'), + ('fisherman', 'Pêcheur'), + ('miner', 'Mineur'), + ('lumberjack', 'Bûcheron'), + ('fueler', 'Raffineur'), + ('reporter', 'Journaliste'), + ('tailor', 'Couturier') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('lumberjack', 0, 'employee', 'Employee', 0, '{}', '{}'), + ('fisherman', 0, 'employee', 'Employee', 0, '{}', '{}'), + ('fueler', 0, 'employee', 'Employee', 0, '{}', '{}'), + ('reporter', 0, 'employee', 'Employee', 0, '{}', '{}'), + ('tailor',0,'employee','Employee',0,'{\"mask_1\":0,\"arms\":1,\"glasses_1\":0,\"hair_color_2\":4,\"makeup_1\":0,\"face\":19,\"glasses\":0,\"mask_2\":0,\"makeup_3\":0,\"skin\":29,\"helmet_2\":0,\"lipstick_4\":0,\"sex\":0,\"torso_1\":24,\"makeup_2\":0,\"bags_2\":0,\"chain_2\":0,\"ears_1\":-1,\"bags_1\":0,\"bproof_1\":0,\"shoes_2\":0,\"lipstick_2\":0,\"chain_1\":0,\"tshirt_1\":0,\"eyebrows_3\":0,\"pants_2\":0,\"beard_4\":0,\"torso_2\":0,\"beard_2\":6,\"ears_2\":0,\"hair_2\":0,\"shoes_1\":36,\"tshirt_2\":0,\"beard_3\":0,\"hair_1\":2,\"hair_color_1\":0,\"pants_1\":48,\"helmet_1\":-1,\"bproof_2\":0,\"eyebrows_4\":0,\"eyebrows_2\":0,\"decals_1\":0,\"age_2\":0,\"beard_1\":5,\"shoes\":10,\"lipstick_1\":0,\"eyebrows_1\":0,\"glasses_2\":0,\"makeup_4\":0,\"decals_2\":0,\"lipstick_3\":0,\"age_1\":0}','{\"mask_1\":0,\"arms\":5,\"glasses_1\":5,\"hair_color_2\":4,\"makeup_1\":0,\"face\":19,\"glasses\":0,\"mask_2\":0,\"makeup_3\":0,\"skin\":29,\"helmet_2\":0,\"lipstick_4\":0,\"sex\":1,\"torso_1\":52,\"makeup_2\":0,\"bags_2\":0,\"chain_2\":0,\"ears_1\":-1,\"bags_1\":0,\"bproof_1\":0,\"shoes_2\":1,\"lipstick_2\":0,\"chain_1\":0,\"tshirt_1\":23,\"eyebrows_3\":0,\"pants_2\":0,\"beard_4\":0,\"torso_2\":0,\"beard_2\":6,\"ears_2\":0,\"hair_2\":0,\"shoes_1\":42,\"tshirt_2\":4,\"beard_3\":0,\"hair_1\":2,\"hair_color_1\":0,\"pants_1\":36,\"helmet_1\":-1,\"bproof_2\":0,\"eyebrows_4\":0,\"eyebrows_2\":0,\"decals_1\":0,\"age_2\":0,\"beard_1\":5,\"shoes\":10,\"lipstick_1\":0,\"eyebrows_1\":0,\"glasses_2\":0,\"makeup_4\":0,\"decals_2\":0,\"lipstick_3\":0,\"age_1\":0}'), + ('miner', 0, 'employee', 'Employee', 0, '{"tshirt_2":1,"ears_1":8,"glasses_1":15,"torso_2":0,"ears_2":2,"glasses_2":3,"shoes_2":1,"pants_1":75,"shoes_1":51,"bags_1":0,"helmet_2":0,"pants_2":7,"torso_1":71,"tshirt_1":59,"arms":2,"bags_2":0,"helmet_1":0}', '{}'), + ('slaughterer',0,'employee','Employee',0,'{\"age_1\":0,\"glasses_2\":0,\"beard_1\":5,\"decals_2\":0,\"beard_4\":0,\"shoes_2\":0,\"tshirt_2\":0,\"lipstick_2\":0,\"hair_2\":0,\"arms\":67,\"pants_1\":36,\"skin\":29,\"eyebrows_2\":0,\"shoes\":10,\"helmet_1\":-1,\"lipstick_1\":0,\"helmet_2\":0,\"hair_color_1\":0,\"glasses\":0,\"makeup_4\":0,\"makeup_1\":0,\"hair_1\":2,\"bproof_1\":0,\"bags_1\":0,\"mask_1\":0,\"lipstick_3\":0,\"chain_1\":0,\"eyebrows_4\":0,\"sex\":0,\"torso_1\":56,\"beard_2\":6,\"shoes_1\":12,\"decals_1\":0,\"face\":19,\"lipstick_4\":0,\"tshirt_1\":15,\"mask_2\":0,\"age_2\":0,\"eyebrows_3\":0,\"chain_2\":0,\"glasses_1\":0,\"ears_1\":-1,\"bags_2\":0,\"ears_2\":0,\"torso_2\":0,\"bproof_2\":0,\"makeup_2\":0,\"eyebrows_1\":0,\"makeup_3\":0,\"pants_2\":0,\"beard_3\":0,\"hair_color_2\":4}','{\"age_1\":0,\"glasses_2\":0,\"beard_1\":5,\"decals_2\":0,\"beard_4\":0,\"shoes_2\":0,\"tshirt_2\":0,\"lipstick_2\":0,\"hair_2\":0,\"arms\":72,\"pants_1\":45,\"skin\":29,\"eyebrows_2\":0,\"shoes\":10,\"helmet_1\":-1,\"lipstick_1\":0,\"helmet_2\":0,\"hair_color_1\":0,\"glasses\":0,\"makeup_4\":0,\"makeup_1\":0,\"hair_1\":2,\"bproof_1\":0,\"bags_1\":0,\"mask_1\":0,\"lipstick_3\":0,\"chain_1\":0,\"eyebrows_4\":0,\"sex\":1,\"torso_1\":49,\"beard_2\":6,\"shoes_1\":24,\"decals_1\":0,\"face\":19,\"lipstick_4\":0,\"tshirt_1\":9,\"mask_2\":0,\"age_2\":0,\"eyebrows_3\":0,\"chain_2\":0,\"glasses_1\":5,\"ears_1\":-1,\"bags_2\":0,\"ears_2\":0,\"torso_2\":0,\"bproof_2\":0,\"makeup_2\":0,\"eyebrows_1\":0,\"makeup_3\":0,\"pants_2\":0,\"beard_3\":0,\"hair_color_2\":4}') +; + +INSERT INTO `items` (`name`, `label`, `weight`) VALUES + ('alive_chicken', 'Poulet vivant', 1), + ('slaughtered_chicken', 'Poulet abattu', 1), + ('packaged_chicken', 'Poulet en barquette', 1), + ('fish', 'Poisson', 1), + ('stone', 'Pierre', 1), + ('washed_stone', 'Pierre Lavée', 1), + ('copper', 'Cuivre', 1), + ('iron', 'Fer', 1), + ('gold', 'Or', 1), + ('diamond', 'Diamant', 1), + ('wood', 'Bois', 1), + ('cutted_wood', 'Bois coupé', 1), + ('packaged_plank', 'Paquet de planches', 1), + ('petrol', 'Pétrole', 1), + ('petrol_raffin', 'Pétrole Raffiné', 1), + ('essence', 'Essence', 1), + ('wool', 'Laine', 1), + ('fabric', 'Tissu', 1), + ('clothe', 'Vêtement', 1) +; diff --git a/[esx_addons]/esx_jobs/fxmanifest.lua b/[esx_addons]/esx_jobs/fxmanifest.lua new file mode 100644 index 00000000..6d7a303b --- /dev/null +++ b/[esx_addons]/esx_jobs/fxmanifest.lua @@ -0,0 +1,24 @@ +fx_version 'adamant' + +game 'gta5' + +description 'ESX Jobs' +lua54 'yes' +version '1.9.0' + +shared_scripts { + '@es_extended/imports.lua', + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'jobs/*.lua', +} +server_scripts { + 'server/main.lua', +} + +client_scripts { + 'client/main.lua', +} + +dependency 'es_extended' diff --git a/[esx_addons]/esx_jobs/jobs/fisherman.lua b/[esx_addons]/esx_jobs/jobs/fisherman.lua new file mode 100644 index 00000000..e59d2024 --- /dev/null +++ b/[esx_addons]/esx_jobs/jobs/fisherman.lua @@ -0,0 +1,176 @@ +Config.Jobs.fisherman = { + + BlipInfos = { + Sprite = 68, + Color = 38 + }, + + Vehicles = { + + Truck = { + Spawner = 1, + Hash = 'benson', + Trailer = 'none', + HasCaution = true + }, + + Boat = { + Spawner = 2, + Hash = 'tug', + Trailer = 'none', + HasCaution = true + } + + }, + + Zones = { + + CloakRoom = { + Pos = {x = 868.39, y = -1639.75, z = 30.33}, + Size = {x = 0.8, y = 0.5, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker= 20, + Blip = true, + Name = TranslateCap('fm_fish_locker'), + Type = 'cloakroom', + Hint = TranslateCap('cloak_change'), + GPS = {x = 880.74, y = -1663.96, z = 29.37} + }, + + FishingSpot = { + Pos = {x = 4435.21, y = 4829.60, z = 0.34}, + Size = {x = 100.0, y = 100.0, z = 50.0}, + Color = {r = 50, g = 200, b = 50}, + Marker= 1, + Blip = true, + Name = TranslateCap('fm_fish_area'), + Type = 'work', + Hint = TranslateCap('fm_fish_button'), + GPS = {x = 3859.43, y = 4448.83, z = 0.39}, + Item = { + { + name = TranslateCap('fm_fish'), + db_name= 'fish', + time = 10, + max = 100, + add = 1, + remove = 0, + requires = 'nothing', + requires_name = 'Nothing', + drop = 100 + } + }, + + }, + + BoatSpawner = { + Pos = {x = 3866.268, y = 4463.868, z = 2.72}, + Size = {x = 0.8, y = 0.5, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker= 20, + Blip = true, + Name = TranslateCap('fm_spawnboat_title'), + Type = 'vehspawner', + Spawner = 2, + Hint = TranslateCap('fm_spawnboat'), + Caution = 0, + GPS = {x = 4435.21, y = 4829.60, z = 0.34} + }, + + BoatSpawnPoint = { + Pos = {x = 3888.3, y = 4468.09, z = 0.0}, + Size = {x = 0.8, y = 0.5, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker= -1, + Blip = false, + Name = TranslateCap('fm_boat_title'), + Type = 'vehspawnpt', + Spawner = 2, + GPS = 0, + Heading = 270.1 + }, + + BoatDeletePoint = { + Pos = {x = 3859.43, y = 4448.83, z = 0.39}, + Size = {x = 0.8, y = 0.5, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker= 20, + Blip = false, + Name = TranslateCap('fm_boat_return_title'), + Type = 'vehdelete', + Hint = TranslateCap('fm_boat_return_button'), + Spawner = 2, + Caution = 0, + GPS = {x = -1012.64, y = -1354.62, z = 5.54}, + Teleport = {x = 3867.44, y = 4463.62, z = 1.72} + }, + + VehicleSpawner = { + Pos = {x = 880.74, y = -1663.96, z = 29.37}, + Size = {x = 0.8, y = 0.5, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker= 20, + Blip = false, + Name = TranslateCap('spawn_veh'), + Type = 'vehspawner', + Spawner = 1, + Hint = TranslateCap('spawn_veh_button'), + Caution = 2000, + GPS = {x = 3867.44, y = 4463.62, z = 1.72} + }, + + VehicleSpawnPoint = { + Pos = {x = 859.35, y = -1656.21, z = 29.56}, + Size = {x = 0.8, y = 0.5, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker= 20, + Blip = false, + Name = TranslateCap('service_vh'), + Type = 'vehspawnpt', + Spawner = 1, + GPS = 0, + Heading = 70.1 + }, + + VehicleDeletePoint = { + Pos = {x = 863.23, y = -1718.28, z = 28.63}, + Size = {x = 0.8, y = 0.5, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker= 20, + Blip = false, + Name = TranslateCap('return_vh'), + Type = 'vehdelete', + Hint = TranslateCap('return_vh_button'), + Spawner = 1, + Caution = 2000, + GPS = 0, + Teleport = 0 + }, + + Delivery = { + Pos = {x = -1037.96, y = -1397.09, z = 5.54}, + Size = {x = 0.8, y = 0.5, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker= 20, + Blip = true, + Name = TranslateCap('delivery_point'), + Type = 'delivery', + Spawner = 2, + Hint = TranslateCap('fm_deliver_fish'), + GPS = {x = 3867.44, y = 4463.62, z = 1.72}, + Item = { + { + name = TranslateCap('delivery'), + time = 0.5, + remove = 1, + max = 100, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua + price = 11, + requires = 'fish', + requires_name = TranslateCap('fm_fish'), + drop = 100 + } + } + } + + } +} diff --git a/[esx_addons]/esx_jobs/jobs/fueler.lua b/[esx_addons]/esx_jobs/jobs/fueler.lua new file mode 100644 index 00000000..4f5ee01f --- /dev/null +++ b/[esx_addons]/esx_jobs/jobs/fueler.lua @@ -0,0 +1,177 @@ +Config.Jobs.fueler = { + + BlipInfos = { + Sprite = 436, + Color = 5 + }, + + Vehicles = { + + Truck = { + Spawner = 1, + Hash = 'phantom', + Trailer = 'tanker', + HasCaution = true + } + + }, + + Zones = { + + CloakRoom = { + Pos = {x = 557.93, y = -2327.90, z = 5.82}, + Size = {x = 0.5, y = 0.5, z = 0.8}, + Color = {r = 50, g = 200, b = 50}, + Marker = 20, + Blip = true, + Name = TranslateCap('f_oil_refiner'), + Type = 'cloakroom', + Hint = TranslateCap('cloak_change'), + GPS = {x = 554.59, y = -2314.43, z = 4.86} + }, + + OilFarm = { + Pos = {x = 609.58, y = 2856.74, z = 38.90}, + Size = {x = 20.0, y = 20.0, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker = 1, + Blip = true, + Name = TranslateCap('f_drill_oil'), + Type = 'work', + Item = { + { + name = TranslateCap('f_fuel'), + db_name = 'petrol', + time = 5, + max = 24, + add = 1, + remove = 0, + requires = 'nothing', + requires_name = 'Nothing', + drop = 100 + } + }, + Hint = TranslateCap('f_drillbutton'), + GPS = {x = 2736.94, y = 1417.99, z = 23.48} + }, + + OilRefinement = { + Pos = {x = 2736.94, y = 1417.99, z = 23.48}, + Size = {x = 10.0, y = 10.0, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker = 1, + Blip = true, + Name = TranslateCap('f_fuel_refine'), + Type = 'work', + Item = { + { + name = TranslateCap('f_fuel_refine'), + db_name = 'petrol_raffin', + time = 5, + max = 24, + add = 1, + remove = 2, + requires = 'petrol', + requires_name = TranslateCap('f_fuel'), + drop = 100 + } + }, + Hint = TranslateCap('f_refine_fuel_button'), + GPS = {x = 265.75, y = -3013.39, z = 4.73} + }, + + OilMix = { + Pos = {x = 265.75, y = -3013.39, z = 4.73}, + Size = {x = 10.0, y = 10.0, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker = 1, + Blip = true, + Name = TranslateCap('f_fuel_mixture'), + Type = 'work', + Item = { + { + name = TranslateCap('f_gas'), + db_name = 'essence', + time = 5, + max = 24, + add = 2, + remove = 1, + requires = 'petrol_raffin', + requires_name = TranslateCap('f_fuel_refine'), + drop = 100 + } + }, + Hint = TranslateCap('f_fuel_mixture_button'), + GPS = {x = 491.40, y = -2163.37, z = 4.91} + }, + + VehicleSpawner = { + Pos = {x = 554.59, y = -2314.43, z = 4.86}, + Size = {x = 3.0, y = 3.0, z = 2.0}, + Color = {r = 50, g = 200, b = 50}, + Marker = 1, + Blip = false, + Name = TranslateCap('spawn_veh'), + Type = 'vehspawner', + Spawner = 1, + Hint = TranslateCap('spawn_truck_button'), + Caution = 2000, + GPS = {x = 602.25, y = 2926.62, z = 39.68} + }, + + VehicleSpawnPoint = { + Pos = {x = 570.54, y = -2309.70, z = 4.90}, + Size = {x = 3.0, y = 3.0, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker = -1, + Blip = false, + Name = TranslateCap('service_vh'), + Type = 'vehspawnpt', + Spawner = 1, + GPS = 0, + Heading = 0 + }, + + VehicleDeletePoint = { + Pos = {x = 520.68, y = -2124.21, z = 4.98}, + Size = {x = 5.0, y = 5.0, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker = 1, + Blip = false, + Name = TranslateCap('return_vh'), + Type = 'vehdelete', + Hint = TranslateCap('return_vh_button'), + Spawner = 1, + Caution = 2000, + GPS = 0, + Teleport = 0 + }, + + Delivery = { + Pos = {x = 491.40, y = -2163.37, z = 4.91}, + Color = {r = 50, g = 200, b = 50}, + Size = {x = 10.0, y = 10.0, z = 1.0}, + Marker = 1, + Blip = true, + Name = TranslateCap('f_deliver_gas'), + Type = 'delivery', + Spawner = 1, + Item = { + { + name = TranslateCap('delivery'), + time = 0.5, + remove = 1, + max = 100, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua + price = 61, + requires = 'essence', + requires_name = TranslateCap('f_gas'), + drop = 100 + } + }, + + Hint = TranslateCap('f_deliver_gas_button'), + GPS = {x = 609.58, y = 2856.74, z = 39.49} + } + + } +} diff --git a/[esx_addons]/esx_jobs/jobs/lumberjack.lua b/[esx_addons]/esx_jobs/jobs/lumberjack.lua new file mode 100644 index 00000000..6e9ca68f --- /dev/null +++ b/[esx_addons]/esx_jobs/jobs/lumberjack.lua @@ -0,0 +1,168 @@ +Config.Jobs.lumberjack = { + + BlipInfos = { + Sprite = 237, + Color = 4 + }, + + Vehicles = { + + Truck = { + Spawner = 1, + Hash = 'phantom', + Trailer = 'trailers', + HasCaution = true + } + + }, + + Zones = { + + CloakRoom = { + Pos = {x = 1200.63, y = -1276.87, z = 34.38}, + Size = {x = 0.8, y = 0.5, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker= 20, + Blip = true, + Name = TranslateCap('lj_locker_room'), + Type = 'cloakroom', + Hint = TranslateCap('cloak_change') + }, + + Wood = { + Pos = {x = -534.32, y = 5373.79, z = 69.50}, + Size = {x = 3.0, y = 3.0, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker = 1, + Blip = true, + Name = TranslateCap('lj_mapblip'), + Type = 'work', + Item = { + { + name = TranslateCap('lj_wood'), + db_name = 'wood', + time = 3, + max = 20, + add = 1, + remove = 0, + requires = 'nothing', + requires_name = 'Nothing', + drop = 100 + } + }, + Hint = TranslateCap('lj_pickup') + }, + + CuttedWood = { + Pos = {x = -552.21, y = 5326.90, z = 72.59}, + Size = {x = 3.0, y = 3.0, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker = 1, + Blip = false, + Name = TranslateCap('lj_woodcutting'), + Type = 'work', + Item = { + { + name = TranslateCap('lj_cutwood'), + db_name = 'cutted_wood', + time = 5, + max = 20, + add = 1, + remove = 1, + requires = 'wood', + requires_name = TranslateCap('lj_wood'), + drop = 100 + } + }, + Hint = TranslateCap('lj_cutwood_button') + }, + + Planks = { + Pos = {x = -501.38, y = 5280.53, z = 79.61}, + Size = {x = 3.0, y = 3.0, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker = 1, + Blip = false, + Name = TranslateCap('lj_board'), + Type = 'work', + Item = { + { + name = TranslateCap('lj_planks'), + db_name = 'packaged_plank', + time = 4, + max = 100, + add = 5, + remove = 1, + requires = 'cutted_wood', + requires_name = TranslateCap('lj_cutwood'), + drop = 100 + } + }, + Hint = TranslateCap('lj_pick_boards') + }, + + VehicleSpawner = { + Pos = {x = 1191.96, y = -1261.77, z = 34.17}, + Size = {x = 3.0, y = 3.0, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker = 1, + Blip = false, + Name = TranslateCap('spawn_veh'), + Type = 'vehspawner', + Spawner = 1, + Hint = TranslateCap('spawn_veh_button'), + Caution = 2000 + }, + + VehicleSpawnPoint = { + Pos = {x = 1194.62, y = -1286.95, z = 34.12}, + Size = {x = 3.0, y = 3.0, z = 1.0}, + Marker = -1, + Blip = false, + Name = TranslateCap('service_vh'), + Type = 'vehspawnpt', + Spawner = 1, + Heading = 264.40 + }, + + VehicleDeletePoint = { + Pos = {x = 1216.89, y = -1229.23, z = 34.40}, + Size = {x = 5.0, y = 5.0, z = 1.0}, + Color = {r = 255, g = 0, b = 0}, + Marker = 1, + Blip = false, + Name = TranslateCap('return_vh'), + Type = 'vehdelete', + Hint = TranslateCap('return_vh_button'), + Spawner = 1, + Caution = 2000, + GPS = 0, + Teleport = 0 + }, + + Delivery = { + Pos = {x = 1201.35, y = -1327.51, z = 34.22}, + Color = {r = 50, g = 200, b = 50}, + Size = {x = 5.0, y = 5.0, z = 3.0}, + Marker = 1, + Blip = true, + Name = TranslateCap('delivery_point'), + Type = 'delivery', + Spawner = 1, + Item = { + { + name = TranslateCap('delivery'), + time = 0.5, + remove = 1, + max = 100, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua + price = 13, + requires = 'packaged_plank', + requires_name = TranslateCap('lj_planks'), + drop = 100 + } + }, + Hint = TranslateCap('lj_deliver_button') + } + + } +} diff --git a/[esx_addons]/esx_jobs/jobs/miner.lua b/[esx_addons]/esx_jobs/jobs/miner.lua new file mode 100644 index 00000000..c73d732b --- /dev/null +++ b/[esx_addons]/esx_jobs/jobs/miner.lua @@ -0,0 +1,271 @@ +Config.Jobs.miner = { + + BlipInfos = { + Sprite = 68, + Color = 5 + }, + + Vehicles = { + + Truck = { + Spawner = 1, + Hash = 'rubble', + Trailer = 'none', + HasCaution = true + } + + }, + + Zones = { + + CloakRoom = { + Pos = {x = 892.35, y = -2172.77, z = 31.28}, + Size = {x = 0.8, y = 0.5, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker= 20, + Blip = true, + Name = TranslateCap('m_miner_locker'), + Type = 'cloakroom', + Hint = TranslateCap('cloak_change'), + GPS = {x = 884.86, y = -2176.51, z = 29.51} + }, + + Mine = { + Pos = {x = 2962.40, y = 2746.20, z = 42.39}, + Size = {x = 5.0, y = 5.0, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker = 1, + Blip = true, + Name = TranslateCap('m_rock'), + Type = 'work', + Item = { + { + name = TranslateCap('m_rock'), + db_name = 'stone', + time = 3, + max = 7, + add = 1, + remove = 0, + requires = 'nothing', + requires_name = 'Nothing', + drop = 100 + } + }, + Hint = TranslateCap('m_pickrocks'), + GPS = {x = 289.24, y = 2862.90, z = 42.64} + }, + + StoneWash = { + Pos = {x = 289.24, y = 2862.90, z = 42.64}, + Size = {x = 5.0, y = 5.0, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker = 1, + Blip = true, + Name = TranslateCap('m_washrock'), + Type = 'work', + Item = { + { + name = TranslateCap('m_washrock'), + db_name = 'washed_stone', + time = 5, + max = 7, + add = 1, + remove = 1, + requires = 'stone', + requires_name = TranslateCap('m_rock'), + drop = 100 + } + }, + Hint = TranslateCap('m_rock_button'), + GPS = {x = 1109.14, y = -2007.87, z = 30.01} + }, + + Foundry = { + Pos = {x = 1109.14, y = -2007.87, z = 30.01}, + Size = {x = 5.0, y = 5.0, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker = 1, + Blip = true, + Name = TranslateCap('m_rock_smelting'), + Type = 'work', + Item = { + { + name = TranslateCap('m_copper'), + db_name = 'copper', + time = 4, + max = 56, + add = 8, + remove = 1, + requires = 'washed_stone', + requires_name = TranslateCap('m_washrock'), + drop = 100 + }, + { + name = TranslateCap('m_iron'), + db_name = 'iron', + max = 42, + add = 6, + drop = 100 + }, + { + name = TranslateCap('m_gold'), + db_name = 'gold', + max = 21, + add = 3, + drop = 100 + }, + { + name = TranslateCap('m_diamond'), + db_name = 'diamond', + max = 50, + add = 1, + drop = 5 + } + }, + Hint = TranslateCap('m_melt_button'), + GPS = {x = -169.48, y = -2659.16, z = 5.00} + }, + + VehicleSpawner = { + Pos = {x = 884.86, y = -2176.51, z = 29.51}, + Size = {x = 5.0, y = 5.0, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker = 1, + Blip = false, + Name = TranslateCap('spawn_veh'), + Type = 'vehspawner', + Spawner = 1, + Hint = TranslateCap('spawn_veh_button'), + Caution = 2000, + GPS = {x = 2962.40, y = 2746.20, z = 42.39} + }, + + VehicleSpawnPoint = { + Pos = {x = 879.55, y = -2189.79, z = 29.51}, + Size = {x = 5.0, y = 5.0, z = 1.0}, + Marker = -1, + Blip = false, + Name = TranslateCap('service_vh'), + Type = 'vehspawnpt', + Spawner = 1, + Heading = 90.1, + GPS = 0 + }, + + VehicleDeletePoint = { + Pos = {x = 881.93, y = -2198.01, z = 29.51}, + Size = {x = 5.0, y = 5.0, z = 1.0}, + Color = {r = 255, g = 0, b = 0}, + Marker = 1, + Blip = false, + Name = TranslateCap('return_vh'), + Type = 'vehdelete', + Hint = TranslateCap('return_vh_button'), + Spawner = 1, + Caution = 2000, + GPS = 0, + Teleport = 0 + }, + + CopperDelivery = { + Pos = {x = -169.481, y = -2659.16, z = 5.00103}, + Color = {r = 50, g = 200, b = 50}, + Size = {x = 5.0, y = 5.0, z = 3.0}, + Marker = 1, + Blip = true, + Name = TranslateCap('m_sell_copper'), + Type = 'delivery', + Spawner = 1, + Item = { + { + name = TranslateCap('delivery'), + time = 0.5, + remove = 1, + max = 56, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua + price = 5, + requires = 'copper', + requires_name = TranslateCap('m_copper'), + drop = 100 + } + }, + Hint = TranslateCap('m_deliver_copper'), + GPS = {x = -148.78, y = -1040.38, z = 26.27} + }, + + IronDelivery = { + Pos = {x = -148.78, y = -1040.38, z = 26.27}, + Color = {r = 50, g = 200, b = 50}, + Size = {x = 5.0, y = 5.0, z = 3.0}, + Marker = 1, + Blip = true, + Name = TranslateCap('m_sell_iron'), + Type = 'delivery', + Spawner = 1, + Item = { + { + name = TranslateCap('delivery'), + time = 0.5, + remove = 1, + max = 42, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua + price = 9, + requires = 'iron', + requires_name = TranslateCap('m_iron'), + drop = 100 + } + }, + Hint = TranslateCap('m_deliver_iron'), + GPS = {x = 261.48, y = 207.35, z = 109.28} + }, + + GoldDelivery = { + Pos = {x = 261.48, y = 207.35, z = 109.28}, + Color = {r = 50, g = 200, b = 50}, + Size = {x = 5.0, y = 5.0, z = 3.0}, + Marker = 1, + Blip = true, + Name = TranslateCap('m_sell_gold'), + Type = 'delivery', + Spawner = 1, + Item = { + { + name = TranslateCap('delivery'), + time = 0.5, + remove = 1, + max = 21, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua + price = 25, + requires = 'gold', + requires_name = TranslateCap('m_gold'), + drop = 100 + } + }, + Hint = TranslateCap('m_deliver_gold'), + GPS = {x = -621.04, y = -228.53, z = 37.05} + }, + + DiamondDelivery = { + Pos = {x = -621.04, y = -228.53, z = 37.05}, + Color = {r = 50, g = 200, b = 50}, + Size = {x = 5.0, y = 5.0, z = 3.0}, + Marker = 1, + Blip = true, + Name = TranslateCap('m_sell_diamond'), + Type = 'delivery', + Spawner = 1, + Item = { + { + name = TranslateCap('delivery'), + time = 0.5, + remove = 1, + max = 50, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua + price = 250, + requires = 'diamond', + requires_name = TranslateCap('m_diamond'), + drop = 100 + } + }, + Hint = TranslateCap('m_deliver_diamond'), + GPS = {x = 2962.40, y = 2746.20, z = 42.39} + } + + } +} diff --git a/[esx_addons]/esx_jobs/jobs/slaughterer.lua b/[esx_addons]/esx_jobs/jobs/slaughterer.lua new file mode 100644 index 00000000..df83c3cf --- /dev/null +++ b/[esx_addons]/esx_jobs/jobs/slaughterer.lua @@ -0,0 +1,166 @@ +Config.Jobs.slaughterer = { + + BlipInfos = { + Sprite = 256, + Color = 5 + }, + + Vehicles = { + + Truck = { + Spawner = 1, + Hash = 'benson', + Trailer = 'none', + HasCaution = true + } + }, + + Zones = { + + CloakRoom = { + Pos = {x = -1071.13, y = -2003.78, z = 15.78}, + Size = {x = 0.8, y = 0.5, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker= 20, + Blip = true, + Name = TranslateCap('s_slaughter_locker'), + Type = 'cloakroom', + Hint = TranslateCap('cloak_change') + }, + + AliveChicken = { + Pos = {x = -62.90, y = 6241.46, z = 30.09}, + Size = {x = 3.0, y = 3.0, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker = 1, + Blip = true, + Name = TranslateCap('s_hen'), + Type = 'work', + Item = { + { + name = TranslateCap('s_alive_chicken'), + db_name = 'alive_chicken', + time = 3, + max = 20, + add = 1, + remove = 0, + requires = 'nothing', + requires_name = 'Nothing', + drop = 100 + } + }, + Hint = TranslateCap('s_catch_hen') + }, + + SlaughterHouse = { + Pos = {x = -77.99, y = 6229.06, z = 30.09}, + Size = {x = 3.0, y = 3.0, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker = 1, + Blip = false, + Name = TranslateCap('s_slaughtered'), + Type = 'work', + Item = { + { + name = TranslateCap('s_slaughtered_chicken'), + db_name = 'slaughtered_chicken', + time = 5, + max = 20, + add = 1, + remove = 1, + requires = 'alive_chicken', + requires_name = TranslateCap('s_alive_chicken'), + drop = 100 + } + }, + Hint = TranslateCap('s_chop_animal') + }, + + Packaging = { + Pos = {x = -101.97, y = 6208.79, z = 30.02}, + Size = {x = 3.0, y = 3.0, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker = 1, + Blip = false, + Name = TranslateCap('s_package'), + Type = 'work', + Item = { + { + name = TranslateCap('s_packagechicken'), + db_name = 'packaged_chicken', + time = 4, + max = 100, + add = 5, + remove = 1, + requires = 'slaughtered_chicken', + requires_name = TranslateCap('s_unpackaged'), + drop = 100 + } + }, + Hint = TranslateCap('s_unpackaged_button') + }, + + VehicleSpawner = { + Pos = {x = -1042.94, y = -2023.25, z = 12.16}, + Size = {x = 3.0, y = 3.0, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker = 1, + Blip = false, + Name = TranslateCap('spawn_veh'), + Type = 'vehspawner', + Spawner = 1, + Hint = TranslateCap('spawn_veh_button'), + Caution = 2000 + }, + + VehicleSpawnPoint = { + Pos = {x = -1048.85, y = -2025.32, z = 12.16}, + Size = {x = 3.0, y = 3.0, z = 1.0}, + Marker = -1, + Blip = false, + Name = TranslateCap('service_vh'), + Type = 'vehspawnpt', + Spawner = 1, + Heading = 130.1 + }, + + VehicleDeletePoint = { + Pos = {x = -1061.51, y = -2008.35, z = 12.16}, + Size = {x = 5.0, y = 5.0, z = 1.0}, + Color = {r = 255, g = 0, b = 0}, + Marker = 1, + Blip = false, + Name = TranslateCap('return_vh'), + Type = 'vehdelete', + Hint = TranslateCap('return_vh_button'), + Spawner = 1, + Caution = 2000, + GPS = 0, + Teleport = 0 + }, + + Delivery = { + Pos = {x = -596.15, y = -889.32, z = 24.50}, + Color = {r = 50, g = 200, b = 50}, + Size = {x = 5.0, y = 5.0, z = 1.0}, + Marker = 1, + Blip = true, + Name = TranslateCap('delivery_point'), + Type = 'delivery', + Spawner = 1, + Item = { + { + name = TranslateCap('delivery'), + time = 0.5, + remove = 1, + max = 100, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua + price = 23, + requires = 'packaged_chicken', + requires_name = TranslateCap('s_packagechicken'), + drop = 100 + } + }, + Hint = TranslateCap('s_deliver') + } + } +} diff --git a/[esx_addons]/esx_jobs/jobs/tailor.lua b/[esx_addons]/esx_jobs/jobs/tailor.lua new file mode 100644 index 00000000..2df266ce --- /dev/null +++ b/[esx_addons]/esx_jobs/jobs/tailor.lua @@ -0,0 +1,174 @@ +Config.Jobs.tailor = { + + BlipInfos = { + Sprite = 366, + Color = 4 + }, + + Vehicles = { + + Truck = { + Spawner = 1, + Hash = 'youga2', + Trailer = 'none', + HasCaution = true + } + + }, + + Zones = { + + CloakRoom = { + Pos = {x = 706.73, y = -960.90, z = 30.39}, + Size = {x = 0.8, y = 0.5, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker= 20, + Blip = true, + Name = TranslateCap('dd_dress_locker'), + Type = 'cloakroom', + Hint = TranslateCap('cloak_change'), + GPS = {x = 740.80, y = -970.06, z = 23.46} + }, + + Wool = { + Pos = {x = 1978.92, y = 5171.70, z = 46.63}, + Size = {x = 3.0, y = 3.0, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker = 1, + Blip = true, + Name = TranslateCap('dd_wool'), + Type = 'work', + Item = { + { + name = TranslateCap('dd_wool'), + db_name = 'wool', + time = 3, + max = 40, + add = 1, + remove = 0, + requires = 'nothing', + requires_name = 'Nothing', + drop = 100 + } + }, + Hint = TranslateCap('dd_pickup'), + GPS = {x = 715.95, y = -959.63, z = 29.39} + }, + + Fabric = { + Pos = {x = 715.95, y = -959.63, z = 29.39}, + Size = {x = 3.0, y = 3.0, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker = 1, + Blip = false, + Name = TranslateCap('dd_fabric'), + Type = 'work', + Item = { + { + name = TranslateCap('dd_fabric'), + db_name = 'fabric', + time = 5, + max = 80, + add = 2, + remove = 1, + requires = 'wool', + requires_name = TranslateCap('dd_wool'), + drop = 100 + } + }, + Hint = TranslateCap('dd_makefabric'), + GPS = {x = 712.92, y = -970.58, z = 29.39} + }, + + Clothe = { + Pos = {x = 712.92, y = -970.58, z = 29.39}, + Size = {x = 3.0, y = 3.0, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker = 1, + Blip = false, + Name = TranslateCap('dd_clothing'), + Type = 'work', + Item = { + { + name = TranslateCap('dd_clothing'), + db_name = 'clothe', + time = 4, + max = 40, + add = 1, + remove = 2, + requires = 'fabric', + requires_name = TranslateCap('dd_fabric'), + drop = 100 + } + }, + Hint = TranslateCap('dd_makeclothing'), + GPS = {x = 429.59, y = -807.34, z = 28.49} + }, + + VehicleSpawner = { + Pos = {x = 740.80, y = -970.06, z = 23.46}, + Size = {x = 3.0, y = 3.0, z = 1.0}, + Color = {r = 50, g = 200, b = 50}, + Marker = 1, + Blip = false, + Name = TranslateCap('spawn_veh'), + Type = 'vehspawner', + Spawner = 1, + Hint = TranslateCap('spawn_veh_button'), + Caution = 2000, + GPS = {x = 1978.92, y = 5171.70, z = 46.63} + }, + + VehicleSpawnPoint = { + Pos = {x = 747.31, y = -966.23, z = 23.70}, + Size = {x = 3.0, y = 3.0, z = 1.0}, + Marker = -1, + Blip = false, + Name = TranslateCap('service_vh'), + Type = 'vehspawnpt', + Spawner = 1, + Heading = 270.1, + GPS = 0 + }, + + VehicleDeletePoint = { + Pos = {x = 693.79, y = -963.01, z = 22.82}, + Size = {x = 3.0, y = 3.0, z = 1.0}, + Color = {r = 255, g = 0, b = 0}, + Marker = 1, + Blip = false, + Name = TranslateCap('return_vh'), + Type = 'vehdelete', + Hint = TranslateCap('return_vh_button'), + Spawner = 1, + Caution = 2000, + GPS = 0, + Teleport = 0 + }, + + Delivery = { + Pos = {x = 429.59, y = -807.34, z = 28.49}, + Color = {r = 50, g = 200, b = 50}, + Size = {x = 5.0, y = 5.0, z = 3.0}, + Marker = 1, + Blip = true, + Name = TranslateCap('delivery_point'), + Type = 'delivery', + Spawner = 1, + Item = { + { + name = TranslateCap('delivery'), + time = 0.5, + remove = 1, + max = 100, -- if not present, probably an error at itemQtty >= item.max in esx_jobs_sv.lua + price = 40, + requires = 'clothe', + requires_name = TranslateCap('dd_clothing'), + drop = 100 + } + }, + Hint = TranslateCap('dd_deliver_clothes'), + GPS = {x = 1978.92, y = 5171.70, z = 46.63} + } + } +} diff --git a/[esx_addons]/esx_jobs/locales/br.lua b/[esx_addons]/esx_jobs/locales/br.lua new file mode 100644 index 00000000..0f0450bc --- /dev/null +++ b/[esx_addons]/esx_jobs/locales/br.lua @@ -0,0 +1,115 @@ +Locales['br'] = { + -- Global menus + ['cloakroom'] = 'vestiário', + ['cloak_change'] = 'pressione ~INPUT_PICKUP~ mudar de roupa.', + ['citizen_wear'] = 'retirar uniforme', + ['job_wear'] = 'colocar uniforme', + ['bank_deposit_returned'] = 'um depósito de segurança de $%s foi devolvido a você.', + ['bank_deposit_taken'] = 'um depósito de segurança de $%s foi tirado de você.', + ['caution_afford'] = 'you cannot afford the caution of $%s', + ['foot_work'] = 'você deve estar a pé para poder trabalhar.', + ['next_point'] = 'vá para o próximo passo depois de completar este.', + ['not_your_vehicle'] = 'este não é o seu veículo ou você deve ser um motorista.', + ['in_vehicle'] = 'você deve estar em um veículo.', + ['wrong_point'] = 'você não está no ponto certo de entrega.', + ['max_limit'] = 'você tem o máximo %s', + ['not_enough'] = 'você não tem o suficiente %s para continuar esta tarefa.', + ['spawn_veh'] = 'veiculo Spawnado', + ['spawn_veh_button'] = 'pressione ~INPUT_PICKUP~ chamar o veículo de entrega.', + ['spawn_truck_button'] = 'pressione ~INPUT_PICKUP~ spawnar o caminhão.', + ['spawn_blocked'] = 'an vehicle is blocking the spawnpoint!', + ['service_vh'] = 'veículo de serviço', + ['return_vh'] = 'veiculo devolvido', + ['return_vh_button'] = 'pressione ~INPUT_PICKUP~ para devolver o veiculo.', + ['delivery_point'] = 'ponto de entrega', + ['delivery'] = 'entrega', + ['public_enter'] = 'pressione ~INPUT_PICKUP~ para entrar no prédio.', + ['public_leave'] = 'pressione ~INPUT_PICKUP~ para ir à entrada do edifício.', + + -- Lumber Jack job + ['lj_locker_room'] = 'vestiario Lenhador', + ['lj_mapblip'] = 'pilha de madeira', + ['lj_wood'] = 'madeira', + ['lj_pickup'] = 'pressione ~INPUT_PICKUP~ para recuperar madeira.', + ['lj_woodcutting'] = 'corte de Madeira', + ['lj_cutwood_button'] = 'pressione ~INPUT_PICKUP~ para cortar madeira.', + ['lj_board'] = 'tábua', + ['lj_planks'] = 'tábua embalada', + ['lj_cutwood'] = 'madeira cortada', + ['lj_pick_boards'] = 'pressione ~INPUT_PICKUP~ para recuperar tábuas.', + ['lj_deliver_button'] = 'pressione ~INPUT_PICKUP~ para entregar as tábuas.', + + -- Fisherman + ['fm_fish_locker'] = 'vestiario Pescador', + ['fm_fish'] = 'peixe', + ['fm_fish_area'] = 'area de pesca', + ['fm_fish_button'] = 'pressione ~INPUT_PICKUP~ para pescar.', + ['fm_spawnboat_title'] = 'Spawnar Barco', + ['fm_spawnboat'] = 'pressione ~INPUT_PICKUP~ para chamar um barco.', + ['fm_boat_title'] = 'barco', + ['fm_boat_return_title'] = 'devolver barco', + ['fm_boat_return_button'] = 'Pressione ~INPUT_PICKUP~ para devolver o barco.', + ['fm_deliver_fish'] = 'pressione ~INPUT_PICKUP~ para entregar os peixes.', + + -- Fuel + ['f_oil_refiner'] = 'vestiario Refinador', + ['f_drill_oil'] = 'broca de óleo', + ['f_fuel'] = 'óleo', + ['f_drillbutton'] = 'pressione ~INPUT_PICKUP~ para perfurar.', + ['f_fuel_refine'] = 'refinar óleo', + ['f_refine_fuel_button'] = 'pressione ~INPUT_PICKUP~ para refinar.', + ['f_fuel_mixture'] = 'misturar o óleo refinado', + ['f_gas'] = 'gasolina', + ['f_fuel_mixture_button'] = 'pressione ~INPUT_PICKUP~ para misturar.', + ['f_deliver_gas'] = 'entregar Gasolina', + ['f_deliver_gas_button'] = 'pressione ~INPUT_PICKUP~ para entregar a gasolina.', + + -- Miner + ['m_miner_locker'] = 'vestiario Minerador', + ['m_rock'] = 'pedregulho', + ['m_pickrocks'] = 'pressione ~INPUT_PICKUP~ para obter pedras.', + ['m_washrock'] = 'pedras limpas ', + ['m_rock_button'] = 'pressione ~INPUT_PICKUP~ para lavar as pedras.', + ['m_rock_smelting'] = 'fundição', + ['m_copper'] = 'cobre', + ['m_sell_copper'] = 'vender cobre', + ['m_deliver_copper'] = 'pressione ~INPUT_PICKUP~ para entregar cobre.', + ['m_iron'] = 'ferro', + ['m_sell_iron'] = 'vender ferro', + ['m_deliver_iron'] = 'pressione ~INPUT_PICKUP~ para entregar ferro.', + ['m_gold'] = 'ouro', + ['m_sell_gold'] = 'vender ouro', + ['m_deliver_gold'] = 'pressione ~INPUT_PICKUP~ para entregar ouro.', + ['m_diamond'] = 'diamante', + ['m_sell_diamond'] = 'vender diamante', + ['m_deliver_diamond'] = 'pressione ~INPUT_PICKUP~ para entregar diamantes.', + ['m_melt_button'] = 'pressione ~INPUT_PICKUP~ para derreter as pedras.', + + -- Reporter + ['reporter_name'] = 'globo News', + ['reporter_garage'] = 'pressione ~INPUT_PICKUP~ para descer à garagem.', + + -- Slaughterer + ['s_slaughter_locker'] = 'vestiario Abatedor', + ['s_hen'] = 'galinheiro', + ['s_alive_chicken'] = 'galinha viva', + ['s_catch_hen'] = 'pressione ~INPUT_PICKUP~ para pegar galinha viva.', + ['s_slaughtered_chicken'] = 'frango para ser embalado', + ['s_chop_animal'] = 'pressione ~INPUT_PICKUP~ para cortar as galinhas.', + ['s_slaughtered'] = 'matadouro', + ['s_package'] = 'embalamento', + ['s_packagechicken'] = 'frango na bandeija', + ['s_unpackaged'] = 'frango para ser embalado', + ['s_unpackaged_button'] = 'pressione ~INPUT_PICKUP~ para colocar o frango em uma bandeja.', + ['s_deliver'] = 'pressione ~INPUT_PICKUP~ para entregar as bandejas de frango.', + + -- Dress Designer + ['dd_dress_locker'] = 'vestiario Costureiro', + ['dd_wool'] = 'lã', + ['dd_pickup'] = 'pressione ~INPUT_PICKUP~ para obter lã.', + ['dd_fabric'] = 'tecido', + ['dd_makefabric'] = 'pressione ~INPUT_PICKUP~ para fazer tecido.', + ['dd_clothing'] = 'roupas', + ['dd_makeclothing'] = 'pressione ~INPUT_PICKUP~ para obter roupas.', + ['dd_deliver_clothes'] = 'pressione ~INPUT_PICKUP~ para entregar roupas.', +} diff --git a/[esx_addons]/esx_jobs/locales/cs.lua b/[esx_addons]/esx_jobs/locales/cs.lua new file mode 100644 index 00000000..6c190363 --- /dev/null +++ b/[esx_addons]/esx_jobs/locales/cs.lua @@ -0,0 +1,115 @@ +Locales['cs'] = { + -- Global menus + ['cloakroom'] = 'satna', + ['cloak_change'] = 'stiskni ~INPUT_PICKUP~ pro prevleceni.', + ['citizen_wear'] = 'civilni obleceni', + ['job_wear'] = 'pracovni obleceni', + ['bank_deposit_returned'] = 'bezpecnostni poplatek $%s ti byl vracen.', + ['bank_deposit_taken'] = 'bezpecnostni poplatek ~r~$%s ti byl odebram.', + ['caution_afford'] = 'nemuzes si dovolit kauci $%s', + ['foot_work'] = 'musis byt na nohach, aby jsi mohl pracovat.', + ['next_point'] = 'bez do dalsiho bodu po dokonceni tohoto.', + ['not_your_vehicle'] = 'nejsi ridic tohoto vozidla.', + ['in_vehicle'] = 'musis byt ve vozidle.', + ['wrong_point'] = 'nejsi na spravnem bodu doruceni.', + ['max_limit'] = 'neuneses vic %s', + ['not_enough'] = 'nemas dostatek %s pro pokracovani v tomto ukolu.', + ['spawn_veh'] = 'spawnout vozidlo', + ['spawn_veh_button'] = 'stiksni ~INPUT_PICKUP~ pro privolani dorucovaciho voziidla.', + ['spawn_truck_button'] = 'stiskni ~INPUT_PICKUP~ pro spawnuti trucku.', + ['spawn_blocked'] = 'vozidlo blokuje spawn!', + ['service_vh'] = 'opravit vozidlo', + ['return_vh'] = 'vraceni vozidla', + ['return_vh_button'] = 'stiskni ~INPUT_PICKUP~ pro navrat vozidla.', + ['delivery_point'] = 'dorucovaci bod', + ['delivery'] = 'doruceni', + ['public_enter'] = 'stiskni ~INPUT_PICKUP~ pro vstup do budovy.', + ['public_leave'] = 'stiskni ~INPUT_PICKUP~ pro odchod z budovy.', + + -- Lumber Jack job + ['lj_locker_room'] = 'drevorubcova satna', + ['lj_mapblip'] = 'vyroba dreva', + ['lj_wood'] = 'drevo', + ['lj_pickup'] = 'stiskni ~INPUT_PICKUP~ pro ziskani dreva.', + ['lj_woodcutting'] = 'rezani dreva', + ['lj_cutwood_button'] = 'stiskni ~INPUT_PICKUP~ pro rezani dreva.', + ['lj_board'] = 'prkna', + ['lj_planks'] = 'baleni prken', + ['lj_cutwood'] = 'rezat drevo', + ['lj_pick_boards'] = 'stiskni ~INPUT_PICKUP~ pro ziskani prken.', + ['lj_deliver_button'] = 'stiskni ~INPUT_PICKUP~ pro doruceni prken.', + + -- Fisherman + ['fm_fish_locker'] = 'rybarova satna', + ['fm_fish'] = 'ryba', + ['fm_fish_area'] = 'rybarska oblast', + ['fm_fish_button'] = 'stiskni ~INPUT_PICKUP~ pro rybareni.', + ['fm_spawnboat_title'] = 'spawnout lod', + ['fm_spawnboat'] = 'stiskni ~INPUT_PICKUP~ pro privolani lodi.', + ['fm_boat_title'] = 'lod', + ['fm_boat_return_title'] = 'vraceni lodi', + ['fm_boat_return_button'] = 'stiskni ~INPUT_PICKUP~ pro vraceni lodi.', + ['fm_deliver_fish'] = 'stiskni ~INPUT_PICKUP~ pro doruceni ryby.', + + -- Fuel + ['f_oil_refiner'] = 'satna ropne rafinerie', + ['f_drill_oil'] = 'ropny vrtak', + ['f_fuel'] = 'ropa', + ['f_drillbutton'] = 'stiskni ~INPUT_PICKUP~ pro vrtani.', + ['f_fuel_refine'] = 'refinovat ropu', + ['f_refine_fuel_button'] = 'stiskni ~INPUT_PICKUP~ pro refinovani.', + ['f_fuel_mixture'] = 'mix. rafinovaneho oleje', + ['f_gas'] = 'palivo', + ['f_fuel_mixture_button'] = 'stiskni ~INPUT_PICKUP~ pro smichani ropy.', + ['f_deliver_gas'] = 'doruceni paliva', + ['f_deliver_gas_button'] = 'stiskni ~INPUT_PICKUP~ pro doruceni paliva.', + + -- Miner + ['m_miner_locker'] = 'hornikova satna', + ['m_rock'] = 'kamen', + ['m_pickrocks'] = 'stiskni ~INPUT_PICKUP~ pro ziskani kamenu.', + ['m_washrock'] = 'myti kamenu', + ['m_rock_button'] = 'stiskni ~INPUT_PICKUP~ pro myti kamenu.', + ['m_rock_smelting'] = 'drceni kamenu', + ['m_copper'] = 'med', + ['m_sell_copper'] = 'prodejce medi', + ['m_deliver_copper'] = 'stiskni ~INPUT_PICKUP~ pro doruceni medi.', + ['m_iron'] = 'zelezo', + ['m_sell_iron'] = 'prodejce zeleza', + ['m_deliver_iron'] = 'stiskni ~INPUT_PICKUP~ pro doruceni zeleza.', + ['m_gold'] = 'zlato', + ['m_sell_gold'] = 'zlaty prodejce', + ['m_deliver_gold'] = 'stiskni ~INPUT_PICKUP~ pro doruceni zlata.', + ['m_diamond'] = 'diamant', + ['m_sell_diamond'] = 'diamantovy prodejce', + ['m_deliver_diamond'] = 'stiskni ~INPUT_PICKUP~ pro doruceni diamantu.', + ['m_melt_button'] = 'stiskni ~INPUT_PICKUP~ pro drceni kamenu.', + + -- Reporter + ['reporter_name'] = 'noviny San Andreas', + ['reporter_garage'] = 'stiskni ~INPUT_PICKUP~ pro pristup do garaze.', + + -- Slaughterer + ['s_slaughter_locker'] = 'reznikova satna', + ['s_hen'] = 'kurnik', + ['s_alive_chicken'] = 'zive kure', + ['s_catch_hen'] = 'stiskni ~INPUT_PICKUP~ pro chyceni ziveho kurete.', + ['s_slaughtered_chicken'] = 'kure na zabaleni', + ['s_chop_animal'] = 'stiskni ~INPUT_PICKUP~ pro nasekani kurat.', + ['s_slaughtered'] = 'reznikuv dum', + ['s_package'] = 'baleni', + ['s_packagechicken'] = 'kure v zasobniku', + ['s_unpackaged'] = 'kure k zabaleni', + ['s_unpackaged_button'] = 'stiskni ~INPUT_PICKUP~ pro vlozeni kurete do prihradky.', + ['s_deliver'] = 'stiskni ~INPUT_PICKUP~ pro doruceni kurat v prihradkach.', + + -- Dress Designer + ['dd_dress_locker'] = 'satna navrhare obleceni', + ['dd_wool'] = 'vlna', + ['dd_pickup'] = 'stiskni ~INPUT_PICKUP~ pro ziskani vlny.', + ['dd_fabric'] = 'latka', + ['dd_makefabric'] = 'stiskni ~INPUT_PICKUP~ pro vyrobu latky.', + ['dd_clothing'] = 'obleceni', + ['dd_makeclothing'] = 'stiskni ~INPUT_PICKUP~ pro vyrobu obleceni.', + ['dd_deliver_clothes'] = 'stiskni ~INPUT_PICKUP~ pro doruceni obleceni.', +} diff --git a/[esx_addons]/esx_jobs/locales/de.lua b/[esx_addons]/esx_jobs/locales/de.lua new file mode 100644 index 00000000..69b2437e --- /dev/null +++ b/[esx_addons]/esx_jobs/locales/de.lua @@ -0,0 +1,115 @@ +Locales['de'] = { + -- Global menus + ['cloakroom'] = 'Umkleide', + ['cloak_change'] = 'Drücke [E] to change clothes.', + ['citizen_wear'] = 'Zivilkleidung', + ['job_wear'] = 'Arbeitskleidung', + ['bank_deposit_returned'] = 'Ein Pfand über $%s wurde dir zurückgegeben.', + ['bank_deposit_taken'] = 'Ein Pfand über $%s wurde von dir genommen.', + ['caution_afford'] = 'Du kannst die Kaution über $%s nicht bezahlen', + ['foot_work'] = 'Du musst dafür zu Fuß sein.', + ['next_point'] = 'Gehe zum nächsten Schritt nach diesem.', + ['not_your_vehicle'] = 'Du bist nicht der Fahrer von diesem Fahrzeug.', + ['in_vehicle'] = 'Du musst in einem Fahrzeug sitzen.', + ['wrong_point'] = 'Du bist nicht am richtigen Lieferpunkt.', + ['max_limit'] = 'Du kannst nicht mehr %s tragen', + ['not_enough'] = 'Du hast nicht genug %s um diese Aufgabe weiterhin zu erledigen.', + ['spawn_veh'] = 'Fahrzeug spawnen', + ['spawn_veh_button'] = 'Drücke [E] um ein Lieferfahrzeug zu holen.', + ['spawn_truck_button'] = 'Drücke [E] um einen Truck zu spawnen.', + ['spawn_blocked'] = 'Ein Fahrzeug blockiert den Spawnpoint!', + ['service_vh'] = 'Service Fahrzeug', + ['return_vh'] = 'Fahrzeugrückgabe', + ['return_vh_button'] = 'Drücke [E] um das Fahrzeug zurückzugeben.', + ['delivery_point'] = 'Lieferpunkt', + ['delivery'] = 'Lieferung', + ['public_enter'] = 'Drücke [E] um das Gebäude zu betreten.', + ['public_leave'] = 'Drücke [E] um das Gebäude zu verlassen.', + + -- Lumber Jack job + ['lj_locker_room'] = 'Umkleide', + ['lj_mapblip'] = 'Holzstapel', + ['lj_wood'] = 'Holz', + ['lj_pickup'] = 'Drücke [E] um Holz zu sammeln.', + ['lj_woodcutting'] = 'Holzverarbeitung', + ['lj_cutwood_button'] = 'Drücke [E] um das Holz zu schneiden.', + ['lj_board'] = 'Bretter', + ['lj_planks'] = 'Holz verarbeiten', + ['lj_cutwood'] = 'Holz schneiden', + ['lj_pick_boards'] = 'Drücke [E] um Bretter zu bekommen.', + ['lj_deliver_button'] = 'Drücke [E] um die Bretter zu liefern.', + + -- Fisherman + ['fm_fish_locker'] = 'Umkleide', + ['fm_fish'] = 'Fisch', + ['fm_fish_area'] = 'Fischerzone', + ['fm_fish_button'] = 'Drücke [E] um zu fischen.', + ['fm_spawnboat_title'] = 'Boot spawnen', + ['fm_spawnboat'] = 'Drücke [E] um ein Boot auszuparken.', + ['fm_boat_title'] = 'Boot', + ['fm_boat_return_title'] = 'Bootsrückgabe', + ['fm_boat_return_button'] = 'Drücke [E] um das Boot zurückzugeben.', + ['fm_deliver_fish'] = 'Drücke [E] um den Fisch zu liefern.', + + -- Fuel + ['f_oil_refiner'] = 'Umkleide', + ['f_drill_oil'] = 'Nach Öl bohren', + ['f_fuel'] = 'Öl', + ['f_drillbutton'] = 'Drücke [E] um nach Öl zu bohren.', + ['f_fuel_refine'] = 'Öl verarbeiten', + ['f_refine_fuel_button'] = 'Drücke [E] zum verarbeiten.', + ['f_fuel_mixture'] = 'Öl mischen', + ['f_gas'] = 'Benzin', + ['f_fuel_mixture_button'] = 'Drücke [E] um das Öl zu mixen.', + ['f_deliver_gas'] = 'Benzin liefern', + ['f_deliver_gas_button'] = 'Drücke [E] um Benzin zu liefern.', + + -- Miner + ['m_miner_locker'] = 'Umkleide', + ['m_rock'] = 'Stein', + ['m_pickrocks'] = 'Drücke [E] um Stein abzubauen.', + ['m_washrock'] = 'Steine waschen', + ['m_rock_button'] = 'Drücke [E] um die Steine zu waschen.', + ['m_rock_smelting'] = 'Steine schmelzen', + ['m_copper'] = 'Kupfer', + ['m_sell_copper'] = 'Kupfer Verkäufer', + ['m_deliver_copper'] = 'Drücke [E] um Kupfer zu liefern.', + ['m_iron'] = 'Eisen', + ['m_sell_iron'] = 'Eisen Verkäufer', + ['m_deliver_iron'] = 'Drücke [E] um Eisen zu liefern.', + ['m_gold'] = 'Gold', + ['m_sell_gold'] = 'Gold verkaufen', + ['m_deliver_gold'] = 'Drücke [E] um Gold zu verkaufen.', + ['m_diamond'] = 'Diamant', + ['m_sell_diamond'] = 'Diamanten verkaufen', + ['m_deliver_diamond'] = 'Drücke [E] um die Diamanten zu verkaufen.', + ['m_melt_button'] = 'Drücke [E] um die Steine zu schmelzen.', + + -- Reporter + ['reporter_name'] = 'san Andreas Times', + ['reporter_garage'] = 'Drücke [E] to go down to the garage.', + + -- Slaughterer + ['s_slaughter_locker'] = 'Umkleide', + ['s_hen'] = 'Hühner', + ['s_alive_chicken'] = 'lebende Hühner', + ['s_catch_hen'] = 'Drücke [E] um Hühner zu fangen.', + ['s_slaughtered_chicken'] = 'Hühner verpacken', + ['s_chop_animal'] = 'Drücke [E] um die Hühner zu schneiden.', + ['s_slaughtered'] = 'Schlachthaus', + ['s_package'] = 'Verpackung', + ['s_packagechicken'] = 'Hühnchen in Verpackung', + ['s_unpackaged'] = 'Verpackbereite Hühnchen', + ['s_unpackaged_button'] = 'Drücke [E] um die Hühnchen zu verpacken.', + ['s_deliver'] = 'Drücke [E] um die Hühnchen zu liefern.', + + -- Dress Designer + ['dd_dress_locker'] = 'dress Designer\'s Locker Room', + ['dd_wool'] = 'wolle', + ['dd_pickup'] = 'Drücke [E] um Wolle zu gewinnen.', + ['dd_fabric'] = 'stoff', + ['dd_makefabric'] = 'Drücke [E] zur Herstellung von Stoffen.', + ['dd_clothing'] = 'kleidung', + ['dd_makeclothing'] = 'Drücke [E] um Kleidung herzustellen.', + ['dd_deliver_clothes'] = 'Drücke [E] um Kleidung zu liefern.', + } diff --git a/[esx_addons]/esx_jobs/locales/en.lua b/[esx_addons]/esx_jobs/locales/en.lua new file mode 100644 index 00000000..63dcdf06 --- /dev/null +++ b/[esx_addons]/esx_jobs/locales/en.lua @@ -0,0 +1,119 @@ +Locales['en'] = { + -- Global menus + ['cloakroom'] = 'locker Room', + ['cloak_change'] = 'press [E] to change clothes.', + ['citizen_wear'] = 'civilian clothes', + ['job_wear'] = 'workers clothes', + ['bank_deposit_returned'] = 'a security deposit of $%s was returned to you.', + ['bank_deposit_taken'] = 'a security deposit of $%s was taken from you.', + ['caution_afford'] = 'you cannot afford the caution of $%s', + ['foot_work'] = 'you have to be on foot to be able to work.', + ['next_point'] = 'go to the next step after completing this one.', + ['not_your_vehicle'] = 'you are not the driver of this vehicle.', + ['in_vehicle'] = 'you must sit in a vehicle.', + ['wrong_point'] = 'you are not at the right point of delivery.', + ['onduty'] = "You are On-Duty!", + ['offduty'] = "You are Off-Duty!", + ['no_male_clothing'] = "Warning: Job has no male clothing!", + ['no_female_clothing'] = "Warning: Job has no female clothing!", + ['max_limit'] = 'you cannot carry more %s', + ['not_enough'] = 'you do not have enough %s to continue this task.', + ['spawn_veh'] = 'spawn vehicle', + ['spawn_veh_button'] = 'press [E] to call the delivery vehicle.', + ['spawn_truck_button'] = 'press [E] to spawn the truck.', + ['spawn_blocked'] = 'an vehicle is blocking the spawnpoint!', + ['service_vh'] = 'service vehicle', + ['return_vh'] = 'vehicle return', + ['return_vh_button'] = 'press [E] to return the vehicle.', + ['delivery_point'] = 'delivery point', + ['delivery'] = 'delivery', + ['public_enter'] = 'press [E] to enter the building.', + ['public_leave'] = 'press [E] to go to the entrance of the building.', + + -- Lumber Jack job + ['lj_locker_room'] = "lumberjack's Locker Room", + ['lj_mapblip'] = 'wood pile', + ['lj_wood'] = 'wood', + ['lj_pickup'] = 'press [E] to retrieve wood.', + ['lj_woodcutting'] = 'wood cutting', + ['lj_cutwood_button'] = 'press [E] to cut wood.', + ['lj_board'] = 'boards', + ['lj_planks'] = 'package board', + ['lj_cutwood'] = 'cut wood', + ['lj_pick_boards'] = 'press [E] to retrieve boards.', + ['lj_deliver_button'] = 'press [E] to deliver the boards.', + + -- Fisherman + ['fm_fish_locker'] = 'fishermen\'s Locker Room', + ['fm_fish'] = 'fish', + ['fm_fish_area'] = 'fishing area', + ['fm_fish_button'] = 'press [E] to fish.', + ['fm_spawnboat_title'] = 'spawn boat', + ['fm_spawnboat'] = 'press [E] to call the boat.', + ['fm_boat_title'] = 'boat', + ['fm_boat_return_title'] = 'boat return', + ['fm_boat_return_button'] = 'press [E] to return the boat.', + ['fm_deliver_fish'] = 'press [E] to deliver the fish.', + + -- Fuel + ['f_oil_refiner'] = 'oil Refiner Locker Room', + ['f_drill_oil'] = 'drill for oil', + ['f_fuel'] = 'oil', + ['f_drillbutton'] = 'press [E] to drill.', + ['f_fuel_refine'] = 'refine oil', + ['f_refine_fuel_button'] = 'press [E] to refine.', + ['f_fuel_mixture'] = 'mix refined oil', + ['f_gas'] = 'gas', + ['f_fuel_mixture_button'] = 'press [E] to mix oil.', + ['f_deliver_gas'] = 'deliver Gas', + ['f_deliver_gas_button'] = 'press [E] to deliver gasoline.', + + -- Miner + ['m_miner_locker'] = 'miner\'s Locker Room', + ['m_rock'] = 'rock', + ['m_pickrocks'] = 'press [E] to retrieve rocks.', + ['m_washrock'] = 'rock Washing', + ['m_rock_button'] = 'press [E] to wash the rocks.', + ['m_rock_smelting'] = 'rock Smelting', + ['m_copper'] = 'copper', + ['m_sell_copper'] = 'copper Seller', + ['m_deliver_copper'] = 'press [E] to deliver the copper.', + ['m_iron'] = 'iron', + ['m_sell_iron'] = 'iron Seller', + ['m_deliver_iron'] = 'press [E] to deliver the iron.', + ['m_gold'] = 'gold', + ['m_sell_gold'] = 'gold Seller', + ['m_deliver_gold'] = 'press [E] to deliver the gold.', + ['m_diamond'] = 'diamond', + ['m_sell_diamond'] = 'diamond Seller', + ['m_deliver_diamond'] = 'press [E] to deliver the diamonds.', + ['m_melt_button'] = 'press [E] to melt the rocks.', + + -- Reporter + ['reporter_name'] = 'san Andreas Times', + ['reporter_garage'] = 'press [E] to go down to the garage.', + + -- Slaughterer + ['s_slaughter_locker'] = 'butcher\'s Locker Room', + ['s_hen'] = 'chicken coop', + ['s_alive_chicken'] = 'live Chicken', + ['s_catch_hen'] = 'press [E] to catch live chickens.', + ['s_slaughtered_chicken'] = 'chicken to be packed', + ['s_chop_animal'] = 'press [E] to chop the chickens.', + ['s_slaughtered'] = 'slaughter house', + ['s_package'] = 'packaging', + ['s_packagechicken'] = 'chicken in tray', + ['s_unpackaged'] = 'chicken to be packed', + ['s_unpackaged_button'] = 'press [E] to set the chicken in a tray.', + ['s_deliver'] = 'press [E] to deliver the chicken trays.', + + -- Dress Designer + ['dd_dress_locker'] = 'dress Designer\'s Locker Room', + ['dd_wool'] = 'wool', + ['dd_pickup'] = 'press [E] to retrieve wool.', + ['dd_fabric'] = 'fabric', + ['dd_makefabric'] = 'press [E] to make fabric.', + ['dd_clothing'] = 'clothing', + ['dd_makeclothing'] = 'press [E] to retrieve clothing.', + ['dd_deliver_clothes'] = 'press [E] to deliver the clothes.', +} diff --git a/[esx_addons]/esx_jobs/locales/es.lua b/[esx_addons]/esx_jobs/locales/es.lua new file mode 100644 index 00000000..d3376968 --- /dev/null +++ b/[esx_addons]/esx_jobs/locales/es.lua @@ -0,0 +1,117 @@ +Locales['es'] = { + -- Global menus + ['cloakroom'] = 'guardarropas', + ['cloak_change'] = 'presiona ~INPUT_PICKUP~ para cambiarte la ropa.', + ['citizen_wear'] = 'ropa de civil', + ['job_wear'] = 'ropa de trabajo', + ['bank_deposit_returned'] = 'El deposito de seguro te ha devuelto $%s', + ['bank_deposit_taken'] = 'El deposito te ha tomado ~r~$%s por el seguro del vehiculo', + ['caution_afford'] = 'no puedes pagar el deposito de seguro de $%s', + ['foot_work'] = 'debes estar en pie para trabajar.', + ['next_point'] = 've al siguiente punto tras terminar este.', + ['not_your_vehicle'] = 'no eres el conductor.', + ['in_vehicle'] = 'debes estar en un vehiculo.', + ['wrong_point'] = 'no estas en el punto correcto de entrega.', + ['onduty'] = "Estás en servicio!", + ['offduty'] = "Estás fuera de servicio!", + ['max_limit'] = 'no puedes llevar mas %s', + ['not_enough'] = 'no tienes suficientes %s para continuar esta tarea.', + ['spawn_veh'] = 'spawnear vehiculo', + ['spawn_veh_button'] = 'presiona ~INPUT_PICKUP~ para pedir el vehiculo de entrega.', + ['spawn_truck_button'] = 'presiona ~INPUT_PICKUP~ para spawnear un camion.', + ['spawn_blocked'] = 'el punto de spawn esta bloqueado!', + ['service_vh'] = 'vehiculo de servicio', + ['return_vh'] = 'devolver vehiculo', + ['return_vh_button'] = 'presiona ~INPUT_PICKUP~ para devolver vehiculo.', + ['delivery_point'] = 'punto de entrega', + ['delivery'] = 'entrega', + ['public_enter'] = 'presiona ~INPUT_PICKUP~ para entrar al edificio.', + ['public_leave'] = 'presiona ~INPUT_PICKUP~ para ir a la entrada del edificio.', + + -- Lumber Jack job + ['lj_locker_room'] = 'guardarropas', + ['lj_mapblip'] = 'pila de madera', + ['lj_wood'] = 'madera', + ['lj_pickup'] = 'presiona ~INPUT_PICKUP~ para agarrar madera.', + ['lj_woodcutting'] = 'cortar madera', + ['lj_cutwood_button'] = 'presiona ~INPUT_PICKUP~ para cortar madera.', + ['lj_board'] = 'tablas', + ['lj_planks'] = 'empaquetar', + ['lj_cutwood'] = 'cortar madera', + ['lj_pick_boards'] = 'presiona ~INPUT_PICKUP~ para agarrar tablas.', + ['lj_deliver_button'] = 'presiona ~INPUT_PICKUP~ para entregar tablas.', + + -- Fisherman + ['fm_fish_locker'] = 'guardarropas', + ['fm_fish'] = 'pescar', + ['fm_fish_area'] = 'area de pesca', + ['fm_fish_button'] = 'presiona ~INPUT_PICKUP~ para pescar.', + ['fm_spawnboat_title'] = 'spawnear bote', + ['fm_spawnboat'] = 'presiona ~INPUT_PICKUP~ para pedir un bote.', + ['fm_boat_title'] = 'bote', + ['fm_boat_return_title'] = 'devolver bote', + ['fm_boat_return_button'] = 'presiona ~INPUT_PICKUP~ para devolver un bote.', + ['fm_deliver_fish'] = 'presiona ~INPUT_PICKUP~ para entregar pescados.', + + -- Fuel + ['f_oil_refiner'] = 'guardarropas', + ['f_drill_oil'] = 'agujerear para encontrar petroleo', + ['f_fuel'] = 'petroleo', + ['f_drillbutton'] = 'presiona ~INPUT_PICKUP~ para agujerear.', + ['f_fuel_refine'] = 'refinar petroleo', + ['f_refine_fuel_button'] = 'presiona ~INPUT_PICKUP~ para refinar.', + ['f_fuel_mixture'] = 'mezclar petroleo refinado', + ['f_gas'] = 'gas', + ['f_fuel_mixture_button'] = 'presiona ~INPUT_PICKUP~ para mezclar petroleo.', + ['f_deliver_gas'] = 'entregar gas', + ['f_deliver_gas_button'] = 'presiona ~INPUT_PICKUP~ para entregar gasolina.', + + -- Miner + ['m_miner_locker'] = 'guardarropas', + ['m_rock'] = 'roca', + ['m_pickrocks'] = 'presiona ~INPUT_PICKUP~ para agarrar rocas.', + ['m_washrock'] = 'lavado de rocas', + ['m_rock_button'] = 'presiona ~INPUT_PICKUP~ para lavar rocas.', + ['m_rock_smelting'] = 'derretir rocas', + ['m_copper'] = 'cobre', + ['m_sell_copper'] = 'vender cobre', + ['m_deliver_copper'] = 'presiona ~INPUT_PICKUP~ para entregar el cobre.', + ['m_iron'] = 'hierro', + ['m_sell_iron'] = 'vender hierro', + ['m_deliver_iron'] = 'presiona ~INPUT_PICKUP~ para entregar el hierro.', + ['m_gold'] = 'oro', + ['m_sell_gold'] = 'vender oro', + ['m_deliver_gold'] = 'presiona ~INPUT_PICKUP~ para entregar oro.', + ['m_diamond'] = 'diamantes', + ['m_sell_diamond'] = 'vender diamantes', + ['m_deliver_diamond'] = 'presiona ~INPUT_PICKUP~ para entregar los diamantes.', + ['m_melt_button'] = 'presiona ~INPUT_PICKUP~ para derretir rocas.', + + -- Reporter + ['reporter_name'] = 'periódico San Andreas', + ['reporter_garage'] = 'presiona ~INPUT_PICKUP~ para ir al garage.', + + -- Slaughterer + ['s_slaughter_locker'] = 'guardarropas', + ['s_hen'] = 'Gallinero', + ['s_alive_chicken'] = 'pollos vivos', + ['s_catch_hen'] = 'presiona ~INPUT_PICKUP~ para agarrar pollos vivos.', + ['s_slaughtered_chicken'] = 'pollo listo para empaquetar', + ['s_chop_animal'] = 'presiona ~INPUT_PICKUP~ para cortar los pollos.', + ['s_slaughtered'] = 'matadero', + ['s_package'] = 'empaquetando', + ['s_packagechicken'] = 'pollo en bandeja', + ['s_unpackaged'] = 'pollo para empaquetar', + ['s_unpackaged_button'] = 'presiona ~INPUT_PICKUP~ para poner el pollo en una bandeja.', + ['s_deliver'] = 'presiona ~INPUT_PICKUP~ para entregar bandejas de pollos.', + + -- Dress Designer + ['dd_dress_locker'] = 'guardarropas', + ['dd_wool'] = 'lana', + ['dd_pickup'] = 'presiona ~INPUT_PICKUP~ para agarrar lana.', + ['dd_fabric'] = 'tela', + ['dd_makefabric'] = 'presiona ~INPUT_PICKUP~ para hacer tela.', + ['dd_clothing'] = 'ropa', + ['dd_makeclothing'] = 'presiona ~INPUT_PICKUP~ para agarrar ropa.', + ['dd_deliver_clothes'] = 'presiona ~INPUT_PICKUP~ para entregar ropa.', +} diff --git a/[esx_addons]/esx_jobs/locales/fi.lua b/[esx_addons]/esx_jobs/locales/fi.lua new file mode 100644 index 00000000..21ed6b5c --- /dev/null +++ b/[esx_addons]/esx_jobs/locales/fi.lua @@ -0,0 +1,115 @@ +Locales['fi'] = { + -- Global menus + ['cloakroom'] = 'vaatelokero', + ['cloak_change'] = 'paina ~INPUT_PICKUP~ vaihtaaksesi vaatteet', + ['citizen_wear'] = 'siviilivaatteet', + ['job_wear'] = 'työvaatteet', + ['bank_deposit_returned'] = 'vakuuden summa €%s palautettiin sinulle.', + ['bank_deposit_taken'] = 'vakuuden summa ~r~€%s otettiin sinulta.', + ['caution_afford'] = 'you cannot afford the caution of $%s', + ['foot_work'] = 'sinun täytyy olla jalan, jotta voit työskennellä', + ['next_point'] = 'mene seuraavaan pisteeseen kun olet valmis täällä', + ['not_your_vehicle'] = 'tämä ei ole sinun ajoneuvo tai et ole sen kuski', + ['in_vehicle'] = 'sinun täytyy olla ajoneuvossa', + ['wrong_point'] = 'et ole oikeassa paikassa', + ['max_limit'] = 'sinulla on jo maksimi määrä %s', + ['not_enough'] = 'sinulla ei ole tarpeeksi %s jatkaaksesi täällä.', + ['spawn_veh'] = 'spawnaa ajoneuvo', + ['spawn_veh_button'] = 'paina ~INPUT_PICKUP~ soittaaksesi kuljetus ajoneuvo', + ['spawn_truck_button'] = 'paina ~INPUT_PICKUP~ spawnataksesi rekka.', + ['spawn_blocked'] = 'an vehicle is blocking the spawnpoint!', + ['service_vh'] = 'huolla ajonevuo', + ['return_vh'] = 'palauta ajoneuvo', + ['return_vh_button'] = 'paina ~INPUT_PICKUP~ palautaaksesi ajoneuvo.', + ['delivery_point'] = 'toimituspiste', + ['delivery'] = 'toimitus', + ['public_enter'] = 'paina ~INPUT_PICKUP~ mennäksesi taloon sisälle.', + ['public_leave'] = 'paina ~INPUT_PICKUP~ poistuaksesi talosta.', + + -- Lumber Jack job + ['lj_locker_room'] = 'metsurin Pukulokero', + ['lj_mapblip'] = 'puukasa', + ['lj_wood'] = 'puu', + ['lj_pickup'] = 'paina ~INPUT_PICKUP~ kerätäksesi puita', + ['lj_woodcutting'] = 'puun hakkuu', + ['lj_cutwood_button'] = 'paina ~INPUT_PICKUP~ pilkkoaksesi puita.', + ['lj_board'] = 'lankkuja', + ['lj_planks'] = 'paketoituja lankkuja', + ['lj_cutwood'] = 'pilko puita', + ['lj_pick_boards'] = 'paina ~INPUT_PICKUP~ saadaksesi lankkuja', + ['lj_deliver_button'] = 'paina ~INPUT_PICKUP~ toimitaaksesi lankut.', + + -- Fisherman + ['fm_fish_locker'] = 'kalastajan Pukulokero', + ['fm_fish'] = 'kala', + ['fm_fish_area'] = 'kalastus alue', + ['fm_fish_button'] = 'paina ~INPUT_PICKUP~ kalastaaksesi', + ['fm_spawnboat_title'] = 'spawnaa laiva', + ['fm_spawnboat'] = 'paina ~INPUT_PICKUP~ soittaaksesi laiva.', + ['fm_boat_title'] = 'laiva', + ['fm_boat_return_title'] = 'laivan palautus', + ['fm_boat_return_button'] = 'paina ~INPUT_PICKUP~ palautaaksesi laiva', + ['fm_deliver_fish'] = 'paina ~INPUT_PICKUP~ myydäksesi kalat', + + -- Fuel + ['f_oil_refiner'] = 'öljynjalostajan Pukulokero', + ['f_drill_oil'] = 'poraa että saat öljyä', + ['f_fuel'] = 'öljy', + ['f_drillbutton'] = 'paina ~INPUT_PICKUP~ porataksesi', + ['f_fuel_refine'] = 'puhdista öljy', + ['f_refine_fuel_button'] = 'paina ~INPUT_PICKUP~ puhdistaaksesi', + ['f_fuel_mixture'] = 'sekoita puhdistettu öljy', + ['f_gas'] = 'polttoöljy', + ['f_fuel_mixture_button'] = 'paina ~INPUT_PICKUP~ sekoita', + ['f_deliver_gas'] = 'toimita polttoöljy', + ['f_deliver_gas_button'] = 'paina ~INPUT_PICKUP~ myydäksesi Polttoöljyä', + + -- Miner + ['m_miner_locker'] = 'kaivostyöläisen Pukulokero', + ['m_rock'] = 'kivi', + ['m_pickrocks'] = 'paina ~INPUT_PICKUP~ louhiaksesi kiviä.', + ['m_washrock'] = 'puhdistettu kivi', + ['m_rock_button'] = 'paina ~INPUT_PICKUP~ puhdistaaksesi kiviä', + ['m_rock_smelting'] = 'sulatus', + ['m_copper'] = 'kupari', + ['m_sell_copper'] = 'myy kupari', + ['m_deliver_copper'] = 'paina ~INPUT_PICKUP~ myydäksesi kuparit', + ['m_iron'] = 'metalli', + ['m_sell_iron'] = 'myy metalli', + ['m_deliver_iron'] = 'paina ~INPUT_PICKUP~ myydäksesi metallit', + ['m_gold'] = 'kulta', + ['m_sell_gold'] = 'myy kulta', + ['m_deliver_gold'] = 'paina ~INPUT_PICKUP~ myydäksesi kullat', + ['m_diamond'] = 'timantti', + ['m_sell_diamond'] = 'myy timantti', + ['m_deliver_diamond'] = 'paina ~INPUT_PICKUP~ myydäksesi timantit', + ['m_melt_button'] = 'paina ~INPUT_PICKUP~ sulattaaksesi kivet', + + -- Reporter + ['reporter_name'] = 'san Andreas Times', + ['reporter_garage'] = 'paina ~INPUT_PICKUP~ mennäksesi alas talliin', + + -- Slaughterer + ['s_slaughter_locker'] = 'teurastajan Pukulokero', + ['s_hen'] = 'kanakoppi', + ['s_alive_chicken'] = 'elävä kana', + ['s_catch_hen'] = 'paina ~INPUT_PICKUP~ ottaaksesi kana kiinni', + ['s_slaughtered_chicken'] = 'teurasta kana', + ['s_chop_animal'] = 'paina ~INPUT_PICKUP~ teurastaaksesi kanoja.', + ['s_slaughtered'] = 'teurastamo', + ['s_package'] = 'paketointi', + ['s_packagechicken'] = 'kananfilee', + ['s_unpackaged'] = 'kana paketoitavaksi', + ['s_unpackaged_button'] = 'paina ~INPUT_PICKUP~ laittaaksesi kanoja pakettiin', + ['s_deliver'] = 'paina ~INPUT_PICKUP~ myydäksesi kananfileet', + + -- Dress Designer + ['dd_dress_locker'] = 'vaatevalmistajan Pukulokero', + ['dd_wool'] = 'villa', + ['dd_pickup'] = 'paina ~INPUT_PICKUP~ kerätäksesi villaa', + ['dd_fabric'] = 'kangas', + ['dd_makefabric'] = 'paina ~INPUT_PICKUP~ tehdäksesi kangasta', + ['dd_clothing'] = 'asuste', + ['dd_makeclothing'] = 'paina ~INPUT_PICKUP~ tehdäksesi asusteita', + ['dd_deliver_clothes'] = 'paina ~INPUT_PICKUP~ myydäksesi asusteita', +} diff --git a/[esx_addons]/esx_jobs/locales/fr.lua b/[esx_addons]/esx_jobs/locales/fr.lua new file mode 100644 index 00000000..3e878903 --- /dev/null +++ b/[esx_addons]/esx_jobs/locales/fr.lua @@ -0,0 +1,115 @@ +Locales['fr'] = { + -- Global menus + ['cloakroom'] = 'vestiaire', + ['cloak_change'] = 'appuyez sur ~INPUT_PICKUP~ pour vous changer.', + ['citizen_wear'] = 'tenue civile', + ['job_wear'] = 'tenue de travail', + ['bank_deposit_returned'] = 'une caution de $%s vous a été rendue.', + ['bank_deposit_taken'] = 'une caution de $%s vous a été prélevée.', + ['caution_afford'] = 'vous ne pouvez pas payer la caution de $%s', + ['foot_work'] = 'vous devez être à pied pour pouvoir travailler.', + ['next_point'] = 'rendez-vous à la prochaine étape après avoir complété celle-ci.', + ['not_your_vehicle'] = 'ce n\'est pas votre véhicule ou vous devez être conducteur.', + ['in_vehicle'] = 'vous devez être dans un véhicule.', + ['wrong_point'] = 'vous n\'êtes pas au bon point de livraison.', + ['max_limit'] = 'vous avez le maximum de %s', + ['not_enough'] = 'vous n\'avez plus assez de %s pour continuer cette tâche.', + ['spawn_veh'] = 'spawner véhicule de fonction', + ['spawn_veh_button'] = 'appuyez sur ~INPUT_PICKUP~ pour appeler le véhicule de livraison.', + ['spawn_truck_button'] = 'appuyez sur ~INPUT_PICKUP~ pour appeler le camion.', + ['spawn_blocked'] = 'un véhicule bloque le point de spawn!', + ['service_vh'] = 'véhicule de fonction', + ['return_vh'] = 'suppression du véhicule', + ['return_vh_button'] = 'appuyez sur ~INPUT_PICKUP~ pour rendre le véhicule.', + ['delivery_point'] = 'point de livraison', + ['delivery'] = 'livraison', + ['public_enter'] = 'appuyez sur ~INPUT_PICKUP~ pour entrer dans l\'immeuble.', + ['public_leave'] = 'appuyez sur ~INPUT_PICKUP~ pour aller à l\'entrée de l\'immeuble.', + + -- Lumber Jack job + ['lj_locker_room'] = 'vestiaire du bûcheron', + ['lj_mapblip'] = 'tas de bois', + ['lj_wood'] = 'bois', + ['lj_pickup'] = 'appuyez sur ~INPUT_PICKUP~ pour récupérer du bois.', + ['lj_woodcutting'] = 'découpe du bois', + ['lj_cutwood_button'] = 'appuyez sur ~INPUT_PICKUP~ pour couper du bois.', + ['lj_board'] = 'planches', + ['lj_planks'] = 'paquet de planche', + ['lj_cutwood'] = 'bois coupé', + ['lj_pick_boards'] = 'appuyez sur ~INPUT_PICKUP~ pour récupérer des planches.', + ['lj_deliver_button'] = 'appuyez sur ~INPUT_PICKUP~ pour livrer les planches.', + + -- Fisherman + ['fm_fish_locker'] = 'vestiaire du pêcheur', + ['fm_fish'] = 'poisson', + ['fm_fish_area'] = 'zone de pêche', + ['fm_fish_button'] = 'appuyez sur ~INPUT_PICKUP~ pour pêcher.', + ['fm_spawnboat_title'] = 'spawner bateau', + ['fm_spawnboat'] = 'appuyez sur ~INPUT_PICKUP~ pour appeler le bateau.', + ['fm_boat_title'] = 'bateau', + ['fm_boat_return_title'] = 'suppression du bateau', + ['fm_boat_return_button'] = 'appuyez sur ~INPUT_PICKUP~ pour rendre le bateau.', + ['fm_deliver_fish'] = 'appuyez sur ~INPUT_PICKUP~ pour livrer le poisson.', + + -- Fuel + ['f_oil_refiner'] = 'vestiaire du raffineur', + ['f_drill_oil'] = 'extraction le pétrole', + ['f_fuel'] = 'pétrole', + ['f_drillbutton'] = 'appuyez sur ~INPUT_PICKUP~ pour forer.', + ['f_fuel_refine'] = 'pétrol raffiné', + ['f_refine_fuel_button'] = 'appuyez sur ~INPUT_PICKUP~ pour raffiner le pétrole.', + ['f_fuel_mixture'] = 'mélange', + ['f_gas'] = 'essence', + ['f_fuel_mixture_button'] = 'appuyez sur ~INPUT_PICKUP~ pour mélanger.', + ['f_deliver_gas'] = 'livraison d\'essence.', + ['f_deliver_gas_button'] = 'appuyez sur ~INPUT_PICKUP~ pour livrer l\'essence.', + + -- Miner + ['m_miner_locker'] = 'vestiaire du mineur', + ['m_rock'] = 'rocher', + ['m_pickrocks'] = 'appuyez sur ~INPUT_PICKUP~ pour récupérer des rochers.', + ['m_washrock'] = 'roche lavée', + ['m_rock_button'] = 'appuyez sur ~INPUT_PICKUP~ pour laver les roches.', + ['m_rock_smelting'] = 'fonderie', + ['m_copper'] = 'cuivre', + ['m_sell_copper'] = 'revente de cuivre', + ['m_deliver_copper'] = 'appuyez sur ~INPUT_PICKUP~ pour livrer le cuivre.', + ['m_iron'] = 'fer', + ['m_sell_iron'] = 'revente de fer', + ['m_deliver_iron'] = 'appuyez sur ~INPUT_PICKUP~ pour livrer le fer.', + ['m_gold'] = 'or', + ['m_sell_gold'] = 'revente d\'or', + ['m_deliver_gold'] = 'appuyez sur ~INPUT_PICKUP~ pour livrer l\'or\'.', + ['m_diamond'] = 'diamant', + ['m_sell_diamond'] = 'revente de diamants', + ['m_deliver_diamond'] = 'appuyez sur ~INPUT_PICKUP~ pour livrer les diamants.', + ['m_melt_button'] = 'appuyez sur ~INPUT_PICKUP~ pour fondre les roches.', + + -- Reporter + ['reporter_name'] = 'le Maclerait Libéré', + ['reporter_garage'] = 'appuyez sur ~INPUT_PICKUP~ pour descendre au garage.', + + -- Slaughterer + ['s_slaughter_locker'] = 'vestiaire de l\'abatteur', + ['s_hen'] = 'poulailler', + ['s_alive_chicken'] = 'poulet vivant', + ['s_catch_hen'] = 'appuyez sur ~INPUT_PICKUP~ pour attrapper des poulets vivants.', + ['s_slaughtered_chicken'] = 'poulet à conditionner', + ['s_chop_animal'] = 'appuyez sur ~INPUT_PICKUP~ pour dépecer les poulets.', + ['s_slaughtered'] = 'abattoir', + ['s_package'] = 'emballage', + ['s_packagechicken'] = 'poulet en barquette', + ['s_unpackaged'] = 'poulet à conditionner', + ['s_unpackaged_button'] = 'appuyez sur ~INPUT_PICKUP~ pour conditionner le poulet en barquette.', + ['s_deliver'] = 'appuyez sur ~INPUT_PICKUP~ pour livrer les barquettes de poulet.', + + -- Dress Designer + ['dd_dress_locker'] = 'vestiaire du couturier', + ['dd_wool'] = 'laine', + ['dd_pickup'] = 'appuyez sur ~INPUT_PICKUP~ pour récupérer de la laine.', + ['dd_fabric'] = 'tissu', + ['dd_makefabric'] = 'appuyez sur ~INPUT_PICKUP~ pour fabriquer du tissu.', + ['dd_clothing'] = 'vêtement', + ['dd_makeclothing'] = 'appuyez sur ~INPUT_PICKUP~ pour récupérer des vêtements.', + ['dd_deliver_clothes'] = 'appuyez sur ~INPUT_PICKUP~ pour livrer les vêtements.', +} diff --git a/[esx_addons]/esx_jobs/locales/hu.lua b/[esx_addons]/esx_jobs/locales/hu.lua new file mode 100644 index 00000000..4d0d718f --- /dev/null +++ b/[esx_addons]/esx_jobs/locales/hu.lua @@ -0,0 +1,119 @@ +Locales["hu"] = { + -- Global menus + ["cloakroom"] = "Öltözö szoba", + ["cloak_change"] = "Nyomj [E] gombot a ruha választáshos.", + ["citizen_wear"] = "Civil ruha", + ["job_wear"] = "Munka ruha", + ["bank_deposit_returned"] = "Visszakaptál $%s letétet.", + ["bank_deposit_taken"] = "Biztonsági letétet ~r~$%s fizettél.", + ["caution_afford"] = "nem engedheted meg magadnak az óvatosságot $%s", + ["foot_work"] = "gyalog kell dolgoznod.", + ["next_point"] = "Menj a következö lépéshez ha ezzel kész vagy.", + ["not_your_vehicle"] = "Ez nem a te kocsid vagy soförnek kell lenned.", + ["in_vehicle"] = "kocsiban kell ülnöd.", + ["wrong_point"] = "nem a megfelelö szállítási ponton vagy.", + ["onduty"] = "Szolgálatban vagy!", + ["offduty"] = "Nem vagy szolgálatban!", + ["no_male_clothing"] = "Figyelmeztetés: A munkának nincs férfi ruházata", + ["no_female_clothing"] = "Figyelmeztetés: A munkának nincs női ruházata!", + ["max_limit"] = "nem tudsz többet szállítani %s", + ["not_enough"] = "Nincs elég %s hogy folytasd.", + ["spawn_veh"] = "Autó lekérés", + ["spawn_veh_button"] = "Nyomj [E] hogy lekérd a szállító autót.", + ["spawn_truck_button"] = "Nyomj [E] hogy lekérd az autót.", + ["spawn_blocked"] = "egy autó elzárja a lekérési pontot!", + ["service_vh"] = "munka autó", + ["return_vh"] = "autó visszakérés", + ["return_vh_button"] = "Nyomj [E] gombot hogy vissza add az autót.", + ["delivery_point"] = "szállítási pont", + ["delivery"] = "szállítás", + ["public_enter"] = "nyomj [E] gombot hogy belépj az épületbe.", + ["public_leave"] = "nyomj [E] gombot hogy kilépj az épületböl.", + + -- Lumber Jack job + ["lj_locker_room"] = "favágó Öltözö szoba", + ["lj_mapblip"] = "farakás", + ["lj_wood"] = "fa", + ["lj_pickup"] = "nyomj [E] gombot hogy kiszedd a fát.", + ["lj_woodcutting"] = "favágás", + ["lj_cutwood_button"] = "nyomj [E] gombot a favágáshoz.", + ["lj_board"] = "táblák", + ["lj_planks"] = "tábla csomagolás", + ["lj_cutwood"] = "favágás", + ["lj_pick_boards"] = "nyomj [E] gombot hogy kiszedd a táblát.", + ["lj_deliver_button"] = "nyomj [E] gombot hogy leszállítsd a táblát.", + + -- Fisherman + ["fm_fish_locker"] = "horgász Öltözö szoba", + ["fm_fish"] = "hal", + ["fm_fish_area"] = "horgászati terület", + ["fm_fish_button"] = "nyomjd [E] gombot a horgászathoz.", + ["fm_spawnboat_title"] = "hajó lekérés", + ["fm_spawnboat"] = "nyomjd [E] gombot hogy hívd a hajót.", + ["fm_boat_title"] = "hajó", + ["fm_boat_return_title"] = "visszetérés a hajóra", + ["fm_boat_return_button"] = "nyomj [E] gombot hogy visszatért a hajóra.", + ["fm_deliver_fish"] = "nyomj [E] gombot hogy leszállítsd a halat.", + + -- Fuel + ["f_oil_refiner"] = "olajfinomító Öltözö szoba", + ["f_drill_oil"] = "olaj fúrása", + ["f_fuel"] = "olaj", + ["f_drillbutton"] = "nyomj [E] gombot a fúráshoz.", + ["f_fuel_refine"] = "olaj finomítás", + ["f_refine_fuel_button"] = "nyomj [E] gombot a finomításhoz.", + ["f_fuel_mixture"] = "újra finomított olaj mix", + ["f_gas"] = "gáz", + ["f_fuel_mixture_button"] = "nyomj [E] gombot a mixeléshez.", + ["f_deliver_gas"] = "gáz szállítás", + ["f_deliver_gas_button"] = "nyomj [E] gombot hogy leszállítsd a gázt.", + + -- Miner + ["m_miner_locker"] = "bányász Öltözö szoba", + ["m_rock"] = "kő", + ["m_pickrocks"] = "nyomj [E] gombot hogy kiszedd a követ.", + ["m_washrock"] = "kő mosás", + ["m_rock_button"] = "nyomj [E] gombot a kövek mosásához.", + ["m_rock_smelting"] = "kő olvasztás", + ["m_copper"] = "réz", + ["m_sell_copper"] = "réz eladás", + ["m_deliver_copper"] = "nyomj [E] gombot a réz eladásához.", + ["m_iron"] = "vas", + ["m_sell_iron"] = "vas eladás", + ["m_deliver_iron"] = "nyomj [E] gombot hogy leszállítsd a vasat.", + ["m_gold"] = "arany", + ["m_sell_gold"] = "arany eladás", + ["m_deliver_gold"] = "nyomj [E] gombot hogy leszállítsd az aranyat.", + ["m_diamond"] = "gyémánt", + ["m_sell_diamond"] = "gyémánt eladás", + ["m_deliver_diamond"] = "nyomj [E] gombot hogy leszállítsd a gyémántot.", + ["m_melt_button"] = "nyomj [E] gombot a szikla olvasztáshoz.", + + -- Reporter + ["reporter_name"] = "Fivem hírek", + ["reporter_garage"] = "nyomj [E] gombot a garázshoz.", + + -- Slaughterer + ["s_slaughter_locker"] = "hentes Öltözö szoba", + ["s_hen"] = "csírkefarm", + ["s_alive_chicken"] = "élő csírke", + ["s_catch_hen"] = "nyomj [E] gombot hogy megfogj egy csírkét.", + ["s_slaughtered_chicken"] = "csírke csomagolás", + ["s_chop_animal"] = "nyomj [E] gombot a csírkék csomagolásához.", + ["s_slaughtered"] = "Hentes ház", + ["s_package"] = "csomagolás", + ["s_packagechicken"] = "csírke a tálcán", + ["s_unpackaged"] = "csírke kicsomagolás", + ["s_unpackaged_button"] = "nyomj [E] gombot hogy kitedd egy tálcára a csírkét.", + ["s_deliver"] = "nyomj [E] gombot hogy leszállítsd a csírketálat.", + + -- Dress Designer + ["dd_dress_locker"] = "ruha tervező Öltözö szoba", + ["dd_wool"] = "gyapjú", + ["dd_pickup"] = "nyomj [E] gombot hogy kivedd a gyapjút.", + ["dd_fabric"] = "szövet", + ["dd_makefabric"] = "nyomj [E] gombot hogy szövetet készíts.", + ["dd_clothing"] = "ruha", + ["dd_makeclothing"] = "nyomj [E] gombot hogy kivedd a ruhát.", + ["dd_deliver_clothes"] = "nyomj [E] gombot hogy leszállítsd a ruhát.", +} diff --git a/[esx_addons]/esx_jobs/locales/nl.lua b/[esx_addons]/esx_jobs/locales/nl.lua new file mode 100644 index 00000000..5bb34ff6 --- /dev/null +++ b/[esx_addons]/esx_jobs/locales/nl.lua @@ -0,0 +1,116 @@ +Locales['nl'] = { + -- Global menus + ['cloakroom'] = 'Kleedkamer', + ['cloak_change'] = 'Druk op ~INPUT_PICKUP~ om je werkkleding aan/uit te doen.', + ['citizen_wear'] = 'Burgerkleding', + ['job_wear'] = 'Werkkleding', + ['bank_deposit_returned'] = 'a security deposit of $%s was returned to you.', + ['bank_deposit_taken'] = 'a security deposit of ~r~$%s was taken from you.', + ['foot_work'] = 'Je moet uit een voertuig zijn om te werken', + ['next_point'] = 'Ga naar de volgende stap zodra je klaar bent met deze.', + ['not_your_vehicle'] = 'Dit is niet jou voertuig of je moet de bestuurder zijn.', + ['in_vehicle'] = 'Je moet in een voertuig zitten', + ['wrong_point'] = 'Je bent bij het verkeerde afleverpunt', + ['max_limit'] = 'Je hebt al het maximale %s bij je', + ['not_enough'] = 'Je hebt niet genoeg %s om het werk te voltooien', + ['spawn_veh'] = 'Pak werkvoertuig', + ['spawn_veh_button'] = 'Druk op ~INPUT_PICKUP~ om je werkvoertuig op te roepen', + ['spawn_truck_button'] = 'Druk op ~INPUT_PICKUP~ om een vrachtwagen te pakken', + ['spawn_blocked'] = 'Een voertuig blokkerd het spawnpoint!', + ['service_vh'] = 'service voertuig', + ['return_vh'] = 'Voertuig terug zetten', + ['return_vh_button'] = 'Druk op ~INPUT_PICKUP~ om het voertuig terug te zetten', + ['delivery_point'] = 'Afleverpunt', + ['delivery'] = 'Afleveren', + ['public_enter'] = 'Druk op ~INPUT_PICKUP~ om het gebouw te betreden', + ['public_leave'] = 'Druk op ~INPUT_PICKUP~ om het gebouw te verlaten', + + -- Lumber Jack job + ['lj_locker_room'] = 'Houthakker kleedkamer', + ['lj_mapblip'] = 'Houthandel', + ['lj_wood'] = 'Hout', + ['lj_pickup'] = 'Druk op ~INPUT_PICKUP~ om hout op te halen', + ['lj_cutwood'] = 'Het hout word gezaagd', + ['lj_cutwood_button'] = 'Druk op ~INPUT_PICKUP~ om het hout te zagen', + ['lj_board'] = 'Plaken', + ['lj_planks'] = 'pakket met planken', + ['lj_pick_boards'] = 'Druk op ~INPUT_PICKUP~ om hout te zagen', + ['lj_deliver_button'] = 'Druk op ~INPUT_PICKUP~ om het hout te leveren', + + -- Fisherman + ['fm_fish_locker'] = 'Vissers kleedkamer', + ['fm_fish'] = 'Vis', + ['fm_fish_area'] = 'Vis gebied', + ['fm_fish_button'] = 'Druk op ~INPUT_PICKUP~ om te beginnen met vissen', + ['fm_spawnboat_title'] = 'Pak een vissersboot', + ['fm_spawnboat'] = 'Druk op ~INPUT_PICKUP~ om de boot op te roepen', + ['fm_boat_title'] = 'boot', + ['fm_boat_return_title'] = 'Boot terugzetten', + ['fm_boat_return_button'] = 'Druk op ~INPUT_PICKUP~ om de boot terug te zetten', + ['fm_deliver_fish'] = 'Druk op ~INPUT_PICKUP~ om de vis af te leveren', + + -- Fuel + ['f_oil_refiner'] = 'Olie transporteur kleedkamer', + ['f_drill_oil'] = 'Olieboor', + ['f_fuel'] = 'Olie', + ['f_drillbutton'] = 'Druk op ~INPUT_PICKUP~ om te beginnen met olie boren', + ['f_fuel_refine'] = 'olie raffineren', + ['f_refine_fuel_button'] = 'Druk op ~INPUT_PICKUP~ om te raffineren', + ['f_fuel_mixture'] = 'mix geraffineerde olie', + ['f_gas'] = 'Brandstof', + ['f_fuel_mixture_button'] = 'Druk op ~INPUT_PICKUP~ om olie te mixen', + ['f_deliver_gas'] = 'Brandstof afleveren', + ['f_deliver_gas_button'] = 'Druk op ~INPUT_PICKUP~ om de brandstof af te leveren', + ['caution_afford'] = 'Je hebt onvoldoende Geld opzak om een voertuig te leasen!', + + -- Miner + ['m_miner_locker'] = 'Kleedkamer', + ['m_rock'] = 'Metaal erts', + ['m_pickrocks'] = 'Druk op ~INPUT_PICKUP~ om erts te verzamelen', + ['m_washrock'] = 'erts verwerken', + ['m_rock_button'] = 'Druk op ~INPUT_PICKUP~ om de erts te verwerken', + ['m_rock_smelting'] = 'erts omsmelten', + ['m_copper'] = 'Koper', + ['m_sell_copper'] = 'Koper verkopen', + ['m_deliver_copper'] = 'druk op ~INPUT_PICKUP~ om Koper te verkopen', + ['m_iron'] = 'Aluminium', + ['m_sell_iron'] = 'Aluminium verkoop', + ['m_deliver_iron'] = 'Drup op ~INPUT_PICKUP~ om Aluminium te verkopen', + ['m_gold'] = 'Goud', + ['m_sell_gold'] = 'Goud verkopen', + ['m_deliver_gold'] = 'Druk op ~INPUT_PICKUP~ om Goud te verkopen', + ['m_diamond'] = 'Diamant', + ['m_sell_diamond'] = 'Diamanten verkopen', + ['m_deliver_diamond'] = 'Druk op ~INPUT_PICKUP~ om Diamant te verkopen', + ['m_melt_button'] = 'Druk op ~INPUT_PICKUP~ om de erts om te smelten', + + -- Reporter + ['reporter_locker'] = 'Kleedkamer', + ['reporter_name'] = 'OmroepZeeland', + ['reporter_garage'] = 'Druk op ~INPUT_PICKUP~ om nara de garage te gaan', + + -- Slaughterer + ['s_slaughter_locker'] = 'Kûppen kleedkamer', + ['s_hen'] = 'Kûppenhok', + ['s_alive_chicken'] = 'Levende Kûppen', + ['s_catch_hen'] = 'Druk op ~INPUT_PICKUP~ om levende Kûppen te vangen', + ['s_slaughtered_chicken'] = 'Kûppen om te verpakken', + ['s_chop_animal'] = 'Druk op ~INPUT_PICKUP~ om de Kûppen te slachten', + ['s_slaughtered'] = 'Slachthuis', + ['s_package'] = 'verpakken', + ['s_packagechicken'] = 'krat met Kûpfilet', + ['s_unpackaged'] = 'Kûppen om te verpakken', + ['s_unpackaged_button'] = 'Druk op ~INPUT_PICKUP~ om de Kûpfilet in de krat te doen', + ['s_deliver'] = 'Druk op ~INPUT_PICKUP~ om de kratten met Kûppen af te leveren', + + -- Dress Designer + ['dd_dress_locker'] = 'kleding ontwerper kleedkamer', + ['dd_wool'] = 'wol', + ['dd_pickup'] = 'Druk op ~INPUT_PICKUP~ om schapenwol te verzamelen', + ['dd_fabric'] = 'kleding stof', + ['dd_makefabric'] = 'Druk op ~INPUT_PICKUP~ om van wol kleding stof te maken', + ['dd_clothing'] = 'Kleding', + ['dd_makeclothing'] = 'Druk op ~INPUT_PICKUP~ om kleding te maken', + ['dd_deliver_clothes'] = 'Druk op ~INPUT_PICKUP~ om kleding af te leveren', +} + \ No newline at end of file diff --git a/[esx_addons]/esx_jobs/locales/si.lua b/[esx_addons]/esx_jobs/locales/si.lua new file mode 100644 index 00000000..d2a4d33e --- /dev/null +++ b/[esx_addons]/esx_jobs/locales/si.lua @@ -0,0 +1,119 @@ +Locales['si'] = { + -- Globalni meniji + ['cloakroom'] = 'garderoba', + ['cloak_change'] = "pritisnite [E], da se preoblečete.", + ['citizen_wear'] = 'civilna oblačila', + ['job_wear'] = 'delavska oblačila', + ['bank_deposit_returned'] = 'vrnjen vam je bil varnostni depozit v višini $%s.', + ['bank_deposit_taken'] = 'od vas je bil prevzet varnostni depozit v višini $%s.', + ['caution_afford'] = 'ne morete si privoščiti varščine v višini $%s', + ['foot_work'] = 'da lahko delate, morate hoditi peš.', + ['next_point'] = 'pojdi na naslednji korak, ko zaključiš tega.', + ['not_your_vehicle'] = 'niste voznik tega vozila', + ['in_vehicle'] = 'morate sedeti v vozilu.', + ['wrong_point'] = 'niste na pravem mestu dostave', + ['onduty'] = "Ste v službi!", + ['offduty'] = "Ste izven službe!", + ['no_male_clothing'] = "Opozorilo: Delo nima moških oblačil!", + ['no_female_clothing'] = "Opozorilo: Job nima ženskih oblačil!", + ['max_limit'] = "ne morete nositi več %s", + ['not_enough'] = "za nadaljevanje te naloge nimate dovolj %s.", + ['spawn_veh'] = 'spawn vehicle', + ['spawn_veh_button'] = 'pritisnite [E], da pokličete dostavno vozilo.', + ['spawn_truck_button'] = 'pritisnite [E], da prikličete tovornjak.', + ['spawn_blocked'] = 'vozilo blokira točko izločanja!', + ['service_vh'] = 'servisno vozilo', + ['return_vh'] = 'vrnitev vozila', + ['return_vh_button'] = 'pritisnite [E] za vrnitev vozila.', + ['delivery_point'] = 'mesto dostave', + ['delivery'] = 'dostava', + ['public_enter'] = "pritisnite [E] za vstop v stavbo.", + ['public_leave'] = "pritisnite [E], da greste do vhoda v stavbo.", + + -- delovno mesto za podajalca lesa + ['lj_locker_room'] = "drvarjeva garderoba", + ['lj_mapblip'] = 'kup lesa', + ['lj_wood'] = 'les', + ['lj_pickup'] = "pritisnite [E] za pobiranje lesa.", + ['lj_woodcutting'] = 'rezanje lesa', + ['lj_cutwood_button'] = 'pritisnite [E] za rezanje lesa.', + ['lj_board'] = 'deske', + ['lj_planks'] = 'paketna plošča', + ['lj_cutwood'] = 'reži les', + ['lj_pick_boards'] = 'pritisnite [E] za pobiranje desk.', + ['lj_deliver_button'] = 'pritisnite [E] za dostavo desk.', + + -- ribič + ['fm_fish_locker'] = 'garderoba ribiča', + ['fm_fish'] = 'ribe', + ['fm_fish_area'] = 'območje ribolova', + ['fm_fish_button'] = 'pritisnite [E] za ribolov.', + ['fm_spawnboat_title'] = 'drstilna ladja', + ['fm_spawnboat'] = 'pritisnite [E], da prikličete čoln', + ['fm_boat_title'] = 'čoln', + ['fm_boat_return_title'] = 'vrnitev čolna', + ['fm_boat_return_button'] = "pritisnite [E] za vrnitev čolna.", + ['fm_deliver_fish'] = 'pritisnite [E] za dostavo rib.', + + -- gorivo + ['f_oil_refiner'] = 'omara za rafiniranje nafte', + ['f_drill_oil'] = 'vrtanje za nafto', + ['f_fuel'] = 'nafta', + ['f_drillbutton'] = 'pritisnite [E] za vrtanje.', + ['f_fuel_refine'] = 'rafinirati nafto', + ['f_refine_fuel_button'] = 'pritisni [E] za rafiniranje.', + ['f_fuel_mixture'] = 'zmešaj rafinirano olje', + ['f_gas'] = 'plin', + ['f_fuel_mixture_button'] = 'pritisnite [E] za mešanje olja.', + ['f_deliver_gas'] = 'dostavi plin', + ['f_deliver_gas_button'] = 'pritisnite [E] za dostavo bencina.', + + -- rudar + ['m_miner_locker'] = 'rudarjeva garderoba', + ['m_rock'] = 'kamen', + ['m_pickrocks'] = 'pritisnite [E] za dostavo kamenja.', + ['m_washrock'] = 'pranje kamenja', + ['m_rock_button'] = 'pritisnite [E], da operete skale.', + ['m_rock_smelting'] = 'taljenje kamenja', + ['m_copper'] = 'baker', + ['m_sell_copper'] = 'prodajalec bakra', + ['m_deliver_copper'] = 'pritisnite [E] za dostavo bakra.', + ['m_iron'] = 'železo', + ['m_sell_iron'] = 'prodajalec železa', + ['m_deliver_iron'] = 'pritisnite [E], da dostavite železo', + ['m_gold'] = 'zlato', + ['m_sell_gold'] = 'prodajalec zlata', + ['m_deliver_gold'] = 'pritisnite [E] za dostavo zlata', + ['m_diamond'] = 'diamant', + ['m_sell_diamond'] = 'prodajalec diamantov', + ['m_deliver_diamond'] = 'pritisnite [E] za dostavo diamantov', + ['m_melt_button'] = 'pritisnite [E] za taljenje kamnov.', + + -- Reporter + ['ime_poročevalca'] = 'san Andreas Times', + ['reporter_garage'] = 'pritisnite [E], da se spustite v garažo.', + + -- klavec + ['s_slaughter_locker'] = 'mesarjeva garderoba', + ['s_hen'] = 'kokošnjak', + ['s_alive_chicken'] = 'živi piščanec', + ['s_catch_hen'] = 'pritisnite [E] za lovljenje živih piščancev.', + ['s_slaughtered_chicken'] = 'piščanec za pakiranje', + ['s_chop_animal'] = 'pritisnite [E], da razkosate piščance', + ['s_slaughtered'] = 'klavnica', + ['s_package'] = 'pakiranje', + ['s_packagechicken'] = 'piščanec v pladnju', + ['s_unpackaged'] = "piščanec za pakiranje", + ['s_unpackaged_button'] = 'pritisnite [E], da piščanca postavite na pladenj.', + ['s_deliver'] = "pritisnite [E], da dostavite piščančje pladnje.", + + -- Oblikovalec oblačil + ['dd_dress_locker'] = 'garderoba oblikovalca', + ['dd_wool'] = 'volna', + ['dd_pickup'] = 'pritisnite [E] za prevzem volne.', + ['dd_fabric'] = 'tkanina', + ['dd_makefabric'] = 'pritisnite [E] za izdelavo tkanine.', + ['dd_clothing'] = 'oblačila', + ['dd_makeclothing'] = 'pritisnite [E], da pridobite oblačila.', + ['dd_deliver_clothes'] = 'pritisnite [E], da dostavite oblačila.', +} diff --git a/[esx_addons]/esx_jobs/locales/sv.lua b/[esx_addons]/esx_jobs/locales/sv.lua new file mode 100644 index 00000000..1f839554 --- /dev/null +++ b/[esx_addons]/esx_jobs/locales/sv.lua @@ -0,0 +1,115 @@ +Locales['sv'] = { + -- Global menus + ['cloakroom'] = 'omklädningsrum', + ['cloak_change'] = 'tryck ~INPUT_PICKUP~ för att byta kläder.', + ['citizen_wear'] = 'civilkläder', + ['job_wear'] = 'arbetskläder', + ['bank_deposit_returned'] = 'en deposition på %s SEK har återvänts till dig.', + ['bank_deposit_taken'] = 'en deposition på ~r~%s SEK togs från dig.', + ['caution_afford'] = 'you cannot afford the caution of $%s', + ['foot_work'] = 'du måste vara till fots för att kunna arbeta.', + ['next_point'] = 'gå till nästa steg efter att du har avslutat här.', + ['not_your_vehicle'] = 'det här är inte ditt fordon eller så måste du vara föraren.', + ['in_vehicle'] = 'du måste sitta i ett fordon!', + ['wrong_point'] = 'du är inte på rätt leveranspunkt!', + ['max_limit'] = 'du kan inte bära mer %s', + ['not_enough'] = 'du har inte tillräckligt med %s för att fortsätta denna uppgift.', + ['spawn_veh'] = 'spawna fordon', + ['spawn_veh_button'] = 'tryck ~INPUT_PICKUP~ för att ringa leveransfordonet.', + ['spawn_truck_button'] = 'tryck ~INPUT_PICKUP~ för att spawna bilen.', + ['spawn_blocked'] = 'ett fordon blockerar spawnpointen!', + ['service_vh'] = 'service fordon', + ['return_vh'] = 'lämna service fordon', + ['return_vh_button'] = 'tryck ~INPUT_PICKUP~ för att ge tillbaka fordonet.', + ['delivery_point'] = 'leveranspunkt', + ['delivery'] = 'leverans', + ['public_enter'] = 'tryck ~INPUT_PICKUP~ för att gå in i byggnaden.', + ['public_leave'] = 'tryck ~INPUT_PICKUP~ för att lämna byggnaden.', + + -- Lumber Jack job + ['lj_locker_room'] = 'skogshuggare omklädningsrum', + ['lj_mapblip'] = 'trähög', + ['lj_wood'] = 'träd', + ['lj_pickup'] = 'tryck ~INPUT_PICKUP~ för att hämta trä.', + ['lj_woodcutting'] = 'trädfällning', + ['lj_cutwood_button'] = 'tryck ~INPUT_PICKUP~ för att hugga trä.', + ['lj_board'] = 'brädor', + ['lj_planks'] = 'brädpaket', + ['lj_cutwood'] = 'hugg trä', + ['lj_pick_boards'] = 'tryck ~INPUT_PICKUP~ för att hämta brädorna.', + ['lj_deliver_button'] = 'tryck ~INPUT_PICKUP~ för att sälja brädorna.', + + -- Fisherman + ['fm_fish_locker'] = 'fiskarens omklädningsrum', + ['fm_fish'] = 'fisk', + ['fm_fish_area'] = 'fiskeoområde', + ['fm_fish_button'] = 'tryck ~INPUT_PICKUP~ för att fiska.', + ['fm_spawnboat_title'] = 'spawn boat', + ['fm_spawnboat'] = 'tryck ~INPUT_PICKUP~ för att spawna båten.', + ['fm_boat_title'] = 'båt', + ['fm_boat_return_title'] = 'lämna tillbaka båt', + ['fm_boat_return_button'] = 'tryck ~INPUT_PICKUP~ för att återvända båten.', + ['fm_deliver_fish'] = 'tryck ~INPUT_PICKUP~ för att sälja fisk.', + + -- Fuel + ['f_oil_refiner'] = 'ojeraffinaderi Omklädningsrum', + ['f_drill_oil'] = 'borra efter olja', + ['f_fuel'] = 'olja', + ['f_drillbutton'] = 'tryck ~INPUT_PICKUP~ för att borra efter olja.', + ['f_fuel_refine'] = 'raffinera oljan', + ['f_refine_fuel_button'] = 'tryck ~INPUT_PICKUP~ för att raffinera olja.', + ['f_fuel_mixture'] = 'blanda raffinerad olja', + ['f_gas'] = 'gas', + ['f_fuel_mixture_button'] = 'tryck ~INPUT_PICKUP~ för att mixa olja.', + ['f_deliver_gas'] = 'leverera gas', + ['f_deliver_gas_button'] = 'tryck ~INPUT_PICKUP~ för att sälja bensin.', + + -- Miner + ['m_miner_locker'] = 'Gruvarbetarnas Omklädningsrum', + ['m_rock'] = 'sten', + ['m_pickrocks'] = 'tryck ~INPUT_PICKUP~ för att hämta sten.', + ['m_washrock'] = 'sten tvättning', + ['m_rock_button'] = 'tryck ~INPUT_PICKUP~ för att tvätta sten.', + ['m_rock_smelting'] = 'stensmältning', + ['m_copper'] = 'koppar', + ['m_sell_copper'] = 'kopparsäljare', + ['m_deliver_copper'] = 'tryck ~INPUT_PICKUP~ för att sälja koppar.', + ['m_iron'] = 'järn', + ['m_sell_iron'] = 'järnsäljare', + ['m_deliver_iron'] = 'tryck ~INPUT_PICKUP~ för att sälja järn.', + ['m_gold'] = 'guld', + ['m_sell_gold'] = 'guldsäljare', + ['m_deliver_gold'] = 'tryck ~INPUT_PICKUP~ för att sälja guld.', + ['m_diamond'] = 'diamant', + ['m_sell_diamond'] = 'diamantsäljare', + ['m_deliver_diamond'] = 'tryck ~INPUT_PICKUP~ för att sälja diamant.', + ['m_melt_button'] = 'tryck ~INPUT_PICKUP~ för att smälta sten.', + + -- Reporter + ['reporter_name'] = 'aftonbladet', + ['reporter_garage'] = 'tryck ~INPUT_PICKUP~ för att gå ner till garaget.', + + -- Slaughterer + ['s_slaughter_locker'] = 'slaktarens omklädningsrum', + ['s_hen'] = 'hönshus', + ['s_alive_chicken'] = 'levande Kyckling', + ['s_catch_hen'] = 'tryck ~INPUT_PICKUP~ för att fånga en kyckling.', + ['s_slaughtered_chicken'] = 'kyckling som ska packas', + ['s_chop_animal'] = 'tryck ~INPUT_PICKUP~ för att slakta kycklingar.', + ['s_slaughtered'] = 'slaktarhus', + ['s_package'] = 'förpackning', + ['s_packagechicken'] = 'kyckling i förpackning', + ['s_unpackaged'] = 'kyckling väntar på att förpackas', + ['s_unpackaged_button'] = 'tryck ~INPUT_PICKUP~ för att packa kycklingen.', + ['s_deliver'] = 'tryck ~INPUT_PICKUP~ för att sälja kycklingsförpackningar.', + + -- Dress Designer + ['dd_dress_locker'] = 'Klädesdesigners omklädningsrum', + ['dd_wool'] = 'ull', + ['dd_pickup'] = 'tryck ~INPUT_PICKUP~ för att skörda ull.', + ['dd_fabric'] = 'tyg', + ['dd_makefabric'] = 'tryck ~INPUT_PICKUP~ för att framställa tyg.', + ['dd_clothing'] = 'plagg', + ['dd_makeclothing'] = 'tryck ~INPUT_PICKUP~ för att hämta kläder.', + ['dd_deliver_clothes'] = 'tryck ~INPUT_PICKUP~ för att sälja plagg.', +} diff --git a/[esx_addons]/esx_jobs/localization/br_esx_jobs.sql b/[esx_addons]/esx_jobs/localization/br_esx_jobs.sql new file mode 100644 index 00000000..9ac91f3b --- /dev/null +++ b/[esx_addons]/esx_jobs/localization/br_esx_jobs.sql @@ -0,0 +1,47 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('caution', 'Deposito', 0) +; + +INSERT INTO `jobs` (name, label) VALUES + ('slaughterer', 'Abatedor'), + ('fisherman', 'Pescador'), + ('miner', 'Minerador'), + ('lumberjack', 'Lenhador'), + ('fueler', 'Refinador'), + ('reporter', 'Jornalista'), + ('tailor', 'Costureiro') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('lumberjack', 0, 'employee', 'Temporario', 0, '{}', '{}'), + ('fisherman', 0, 'employee', 'Temporario', 0, '{}', '{}'), + ('fueler', 0, 'employee', 'Temporario', 0, '{}', '{}'), + ('reporter', 0, 'employee', 'Temporario', 0, '{}', '{}'), + ('tailor',0, 'employee','Temporario',0,'{\"mask_1\":0,\"arms\":1,\"glasses_1\":0,\"hair_color_2\":4,\"makeup_1\":0,\"face\":19,\"glasses\":0,\"mask_2\":0,\"makeup_3\":0,\"skin\":29,\"helmet_2\":0,\"lipstick_4\":0,\"sex\":0,\"torso_1\":24,\"makeup_2\":0,\"bags_2\":0,\"chain_2\":0,\"ears_1\":-1,\"bags_1\":0,\"bproof_1\":0,\"shoes_2\":0,\"lipstick_2\":0,\"chain_1\":0,\"tshirt_1\":0,\"eyebrows_3\":0,\"pants_2\":0,\"beard_4\":0,\"torso_2\":0,\"beard_2\":6,\"ears_2\":0,\"hair_2\":0,\"shoes_1\":36,\"tshirt_2\":0,\"beard_3\":0,\"hair_1\":2,\"hair_color_1\":0,\"pants_1\":48,\"helmet_1\":-1,\"bproof_2\":0,\"eyebrows_4\":0,\"eyebrows_2\":0,\"decals_1\":0,\"age_2\":0,\"beard_1\":5,\"shoes\":10,\"lipstick_1\":0,\"eyebrows_1\":0,\"glasses_2\":0,\"makeup_4\":0,\"decals_2\":0,\"lipstick_3\":0,\"age_1\":0}','{\"mask_1\":0,\"arms\":5,\"glasses_1\":5,\"hair_color_2\":4,\"makeup_1\":0,\"face\":19,\"glasses\":0,\"mask_2\":0,\"makeup_3\":0,\"skin\":29,\"helmet_2\":0,\"lipstick_4\":0,\"sex\":1,\"torso_1\":52,\"makeup_2\":0,\"bags_2\":0,\"chain_2\":0,\"ears_1\":-1,\"bags_1\":0,\"bproof_1\":0,\"shoes_2\":1,\"lipstick_2\":0,\"chain_1\":0,\"tshirt_1\":23,\"eyebrows_3\":0,\"pants_2\":0,\"beard_4\":0,\"torso_2\":0,\"beard_2\":6,\"ears_2\":0,\"hair_2\":0,\"shoes_1\":42,\"tshirt_2\":4,\"beard_3\":0,\"hair_1\":2,\"hair_color_1\":0,\"pants_1\":36,\"helmet_1\":-1,\"bproof_2\":0,\"eyebrows_4\":0,\"eyebrows_2\":0,\"decals_1\":0,\"age_2\":0,\"beard_1\":5,\"shoes\":10,\"lipstick_1\":0,\"eyebrows_1\":0,\"glasses_2\":0,\"makeup_4\":0,\"decals_2\":0,\"lipstick_3\":0,\"age_1\":0}'), + ('miner', 0, 'employee', 'Temporario', 0, '{"tshirt_2":1,"ears_1":8,"glasses_1":15,"torso_2":0,"ears_2":2,"glasses_2":3,"shoes_2":1,"pants_1":75,"shoes_1":51,"bags_1":0,"helmet_2":0,"pants_2":7,"torso_1":71,"tshirt_1":59,"arms":2,"bags_2":0,"helmet_1":0}', '{}'), + ('slaughterer',0,'employee','Temporario',0,'{\"age_1\":0,\"glasses_2\":0,\"beard_1\":5,\"decals_2\":0,\"beard_4\":0,\"shoes_2\":0,\"tshirt_2\":0,\"lipstick_2\":0,\"hair_2\":0,\"arms\":67,\"pants_1\":36,\"skin\":29,\"eyebrows_2\":0,\"shoes\":10,\"helmet_1\":-1,\"lipstick_1\":0,\"helmet_2\":0,\"hair_color_1\":0,\"glasses\":0,\"makeup_4\":0,\"makeup_1\":0,\"hair_1\":2,\"bproof_1\":0,\"bags_1\":0,\"mask_1\":0,\"lipstick_3\":0,\"chain_1\":0,\"eyebrows_4\":0,\"sex\":0,\"torso_1\":56,\"beard_2\":6,\"shoes_1\":12,\"decals_1\":0,\"face\":19,\"lipstick_4\":0,\"tshirt_1\":15,\"mask_2\":0,\"age_2\":0,\"eyebrows_3\":0,\"chain_2\":0,\"glasses_1\":0,\"ears_1\":-1,\"bags_2\":0,\"ears_2\":0,\"torso_2\":0,\"bproof_2\":0,\"makeup_2\":0,\"eyebrows_1\":0,\"makeup_3\":0,\"pants_2\":0,\"beard_3\":0,\"hair_color_2\":4}','{\"age_1\":0,\"glasses_2\":0,\"beard_1\":5,\"decals_2\":0,\"beard_4\":0,\"shoes_2\":0,\"tshirt_2\":0,\"lipstick_2\":0,\"hair_2\":0,\"arms\":72,\"pants_1\":45,\"skin\":29,\"eyebrows_2\":0,\"shoes\":10,\"helmet_1\":-1,\"lipstick_1\":0,\"helmet_2\":0,\"hair_color_1\":0,\"glasses\":0,\"makeup_4\":0,\"makeup_1\":0,\"hair_1\":2,\"bproof_1\":0,\"bags_1\":0,\"mask_1\":0,\"lipstick_3\":0,\"chain_1\":0,\"eyebrows_4\":0,\"sex\":1,\"torso_1\":49,\"beard_2\":6,\"shoes_1\":24,\"decals_1\":0,\"face\":19,\"lipstick_4\":0,\"tshirt_1\":9,\"mask_2\":0,\"age_2\":0,\"eyebrows_3\":0,\"chain_2\":0,\"glasses_1\":5,\"ears_1\":-1,\"bags_2\":0,\"ears_2\":0,\"torso_2\":0,\"bproof_2\":0,\"makeup_2\":0,\"eyebrows_1\":0,\"makeup_3\":0,\"pants_2\":0,\"beard_3\":0,\"hair_color_2\":4}') +; + +INSERT INTO `items` (`name`, `label`, `weight`) VALUES + ('alive_chicken', 'Frango Vivo', 1), + ('slaughtered_chicken', 'Frango Abatido', 1), + ('packaged_chicken', 'Frango na Bandeja', 1), + ('fish', 'Peixe', 1), + ('stone', 'Pedra', 1), + ('washed_stone', 'Pedra Limpa', 1), + ('copper', 'Cobre', 1), + ('iron', 'Ferro', 1), + ('gold', 'Ouro', 1), + ('diamond', 'Diamante', 1), + ('wood', 'Madeira', 1), + ('cutted_wood', 'Madeira Cortada', 1), + ('packaged_plank', 'Tábua Embalada', 1), + ('petrol', 'Petroleo', 1), + ('petrol_raffin', 'Petroleo Refinado', 1), + ('essence', 'Gasolina', 1), + ('wool', 'Lã', 1), + ('fabric', 'Tecido', 1), + ('clothe', 'Roupa', 1) +; diff --git a/[esx_addons]/esx_jobs/localization/de_esx_jobs.sql b/[esx_addons]/esx_jobs/localization/de_esx_jobs.sql new file mode 100644 index 00000000..69f77184 --- /dev/null +++ b/[esx_addons]/esx_jobs/localization/de_esx_jobs.sql @@ -0,0 +1,47 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('caution', 'Caution', 0) +; + +INSERT INTO `jobs` (name, label) VALUES + ('slaughterer', 'Schlachterei'), + ('fisherman', 'Fischerei'), + ('miner', 'Bergbau'), + ('lumberjack', 'Holzbetrieb'), + ('fueler', 'Raffinerie'), + ('reporter', 'Kanal 7'), + ('tailor', 'Schneiderei') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('lumberjack', 0, 'employee', 'Mitarbeiter', 0, '{}', '{}'), + ('fisherman', 0, 'employee', 'Mitarbeiter', 0, '{}', '{}'), + ('fueler', 0, 'employee', 'Mitarbeiter', 0, '{}', '{}'), + ('reporter', 0, 'employee', 'Mitarbeiter', 0, '{}', '{}'), + ('tailor', 0, 'employee', 'Mitarbeiter', 0,'{\"mask_1\":0,\"arms\":1,\"glasses_1\":0,\"hair_color_2\":4,\"makeup_1\":0,\"face\":19,\"glasses\":0,\"mask_2\":0,\"makeup_3\":0,\"skin\":29,\"helmet_2\":0,\"lipstick_4\":0,\"sex\":0,\"torso_1\":24,\"makeup_2\":0,\"bags_2\":0,\"chain_2\":0,\"ears_1\":-1,\"bags_1\":0,\"bproof_1\":0,\"shoes_2\":0,\"lipstick_2\":0,\"chain_1\":0,\"tshirt_1\":0,\"eyebrows_3\":0,\"pants_2\":0,\"beard_4\":0,\"torso_2\":0,\"beard_2\":6,\"ears_2\":0,\"hair_2\":0,\"shoes_1\":36,\"tshirt_2\":0,\"beard_3\":0,\"hair_1\":2,\"hair_color_1\":0,\"pants_1\":48,\"helmet_1\":-1,\"bproof_2\":0,\"eyebrows_4\":0,\"eyebrows_2\":0,\"decals_1\":0,\"age_2\":0,\"beard_1\":5,\"shoes\":10,\"lipstick_1\":0,\"eyebrows_1\":0,\"glasses_2\":0,\"makeup_4\":0,\"decals_2\":0,\"lipstick_3\":0,\"age_1\":0}','{\"mask_1\":0,\"arms\":5,\"glasses_1\":5,\"hair_color_2\":4,\"makeup_1\":0,\"face\":19,\"glasses\":0,\"mask_2\":0,\"makeup_3\":0,\"skin\":29,\"helmet_2\":0,\"lipstick_4\":0,\"sex\":1,\"torso_1\":52,\"makeup_2\":0,\"bags_2\":0,\"chain_2\":0,\"ears_1\":-1,\"bags_1\":0,\"bproof_1\":0,\"shoes_2\":1,\"lipstick_2\":0,\"chain_1\":0,\"tshirt_1\":23,\"eyebrows_3\":0,\"pants_2\":0,\"beard_4\":0,\"torso_2\":0,\"beard_2\":6,\"ears_2\":0,\"hair_2\":0,\"shoes_1\":42,\"tshirt_2\":4,\"beard_3\":0,\"hair_1\":2,\"hair_color_1\":0,\"pants_1\":36,\"helmet_1\":-1,\"bproof_2\":0,\"eyebrows_4\":0,\"eyebrows_2\":0,\"decals_1\":0,\"age_2\":0,\"beard_1\":5,\"shoes\":10,\"lipstick_1\":0,\"eyebrows_1\":0,\"glasses_2\":0,\"makeup_4\":0,\"decals_2\":0,\"lipstick_3\":0,\"age_1\":0}'), + ('miner', 0, 'employee', 'Mitarbeiter', 0, '{"tshirt_2":1,"ears_1":8,"glasses_1":15,"torso_2":0,"ears_2":2,"glasses_2":3,"shoes_2":1,"pants_1":75,"shoes_1":51,"bags_1":0,"helmet_2":0,"pants_2":7,"torso_1":71,"tshirt_1":59,"arms":2,"bags_2":0,"helmet_1":0}', '{}'), + ('slaughterer',0,'employee','Mitarbeiter', 0,'{\"age_1\":0,\"glasses_2\":0,\"beard_1\":5,\"decals_2\":0,\"beard_4\":0,\"shoes_2\":0,\"tshirt_2\":0,\"lipstick_2\":0,\"hair_2\":0,\"arms\":67,\"pants_1\":36,\"skin\":29,\"eyebrows_2\":0,\"shoes\":10,\"helmet_1\":-1,\"lipstick_1\":0,\"helmet_2\":0,\"hair_color_1\":0,\"glasses\":0,\"makeup_4\":0,\"makeup_1\":0,\"hair_1\":2,\"bproof_1\":0,\"bags_1\":0,\"mask_1\":0,\"lipstick_3\":0,\"chain_1\":0,\"eyebrows_4\":0,\"sex\":0,\"torso_1\":56,\"beard_2\":6,\"shoes_1\":12,\"decals_1\":0,\"face\":19,\"lipstick_4\":0,\"tshirt_1\":15,\"mask_2\":0,\"age_2\":0,\"eyebrows_3\":0,\"chain_2\":0,\"glasses_1\":0,\"ears_1\":-1,\"bags_2\":0,\"ears_2\":0,\"torso_2\":0,\"bproof_2\":0,\"makeup_2\":0,\"eyebrows_1\":0,\"makeup_3\":0,\"pants_2\":0,\"beard_3\":0,\"hair_color_2\":4}','{\"age_1\":0,\"glasses_2\":0,\"beard_1\":5,\"decals_2\":0,\"beard_4\":0,\"shoes_2\":0,\"tshirt_2\":0,\"lipstick_2\":0,\"hair_2\":0,\"arms\":72,\"pants_1\":45,\"skin\":29,\"eyebrows_2\":0,\"shoes\":10,\"helmet_1\":-1,\"lipstick_1\":0,\"helmet_2\":0,\"hair_color_1\":0,\"glasses\":0,\"makeup_4\":0,\"makeup_1\":0,\"hair_1\":2,\"bproof_1\":0,\"bags_1\":0,\"mask_1\":0,\"lipstick_3\":0,\"chain_1\":0,\"eyebrows_4\":0,\"sex\":1,\"torso_1\":49,\"beard_2\":6,\"shoes_1\":24,\"decals_1\":0,\"face\":19,\"lipstick_4\":0,\"tshirt_1\":9,\"mask_2\":0,\"age_2\":0,\"eyebrows_3\":0,\"chain_2\":0,\"glasses_1\":5,\"ears_1\":-1,\"bags_2\":0,\"ears_2\":0,\"torso_2\":0,\"bproof_2\":0,\"makeup_2\":0,\"eyebrows_1\":0,\"makeup_3\":0,\"pants_2\":0,\"beard_3\":0,\"hair_color_2\":4}') +; + +INSERT INTO `items` (`name`, `label`, `weight`) VALUES + ('alive_chicken', 'lebendes Huhn', 1), + ('slaughtered_chicken', 'geschlachtetes Huhn', 1), + ('packaged_chicken', 'Hähnchenfilet', 1), + ('fish', 'Fisch', 1), + ('stone', 'Felsbrocken', 1), + ('washed_stone', 'gewaschener Felsbrocken', 1), + ('copper', 'Kupfer', 1), + ('iron', 'Eisen', 1), + ('gold', 'Gold', 1), + ('diamond', 'Diamant', 1), + ('wood', 'Holz', 1), + ('cutted_wood', 'Holzstämme', 1), + ('packaged_plank', 'Bretterpaket', 1), + ('petrol', 'Öl', 1), + ('petrol_raffin', 'bearbeitetes Öl', 1), + ('essence', 'Benzin', 1), + ('wool', 'Wolle', 1), + ('fabric', 'Tuch', 1), + ('clothe', 'Kleidung', 1) +; diff --git a/[esx_addons]/esx_jobs/localization/en_esx_jobs.sql b/[esx_addons]/esx_jobs/localization/en_esx_jobs.sql new file mode 100644 index 00000000..3fd484cf --- /dev/null +++ b/[esx_addons]/esx_jobs/localization/en_esx_jobs.sql @@ -0,0 +1,47 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('caution', 'caution', 0) +; + +INSERT INTO `jobs` (name, label) VALUES + ('slaughterer', 'Butcher'), + ('fisherman', 'Fisherman'), + ('miner', 'Miner'), + ('lumberjack', 'Lumberjack'), + ('fueler', 'Fueler'), + ('reporter', 'Reporter'), + ('tailor', 'Tailor') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('lumberjack', 0, 'employee', 'Employee', 0, '{}', '{}'), + ('fisherman', 0, 'employee', 'Employee', 0, '{}', '{}'), + ('fueler', 0, 'employee', 'Employee', 0, '{}', '{}'), + ('reporter', 0, 'employee', 'Employee', 0, '{}', '{}'), + ('tailor', 0, 'employee', 'Employee', 0, '{\"mask_1\":0,\"arms\":1,\"glasses_1\":0,\"hair_color_2\":4,\"makeup_1\":0,\"face\":19,\"glasses\":0,\"mask_2\":0,\"makeup_3\":0,\"skin\":29,\"helmet_2\":0,\"lipstick_4\":0,\"sex\":0,\"torso_1\":24,\"makeup_2\":0,\"bags_2\":0,\"chain_2\":0,\"ears_1\":-1,\"bags_1\":0,\"bproof_1\":0,\"shoes_2\":0,\"lipstick_2\":0,\"chain_1\":0,\"tshirt_1\":0,\"eyebrows_3\":0,\"pants_2\":0,\"beard_4\":0,\"torso_2\":0,\"beard_2\":6,\"ears_2\":0,\"hair_2\":0,\"shoes_1\":36,\"tshirt_2\":0,\"beard_3\":0,\"hair_1\":2,\"hair_color_1\":0,\"pants_1\":48,\"helmet_1\":-1,\"bproof_2\":0,\"eyebrows_4\":0,\"eyebrows_2\":0,\"decals_1\":0,\"age_2\":0,\"beard_1\":5,\"shoes\":10,\"lipstick_1\":0,\"eyebrows_1\":0,\"glasses_2\":0,\"makeup_4\":0,\"decals_2\":0,\"lipstick_3\":0,\"age_1\":0}','{\"mask_1\":0,\"arms\":5,\"glasses_1\":5,\"hair_color_2\":4,\"makeup_1\":0,\"face\":19,\"glasses\":0,\"mask_2\":0,\"makeup_3\":0,\"skin\":29,\"helmet_2\":0,\"lipstick_4\":0,\"sex\":1,\"torso_1\":52,\"makeup_2\":0,\"bags_2\":0,\"chain_2\":0,\"ears_1\":-1,\"bags_1\":0,\"bproof_1\":0,\"shoes_2\":1,\"lipstick_2\":0,\"chain_1\":0,\"tshirt_1\":23,\"eyebrows_3\":0,\"pants_2\":0,\"beard_4\":0,\"torso_2\":0,\"beard_2\":6,\"ears_2\":0,\"hair_2\":0,\"shoes_1\":42,\"tshirt_2\":4,\"beard_3\":0,\"hair_1\":2,\"hair_color_1\":0,\"pants_1\":36,\"helmet_1\":-1,\"bproof_2\":0,\"eyebrows_4\":0,\"eyebrows_2\":0,\"decals_1\":0,\"age_2\":0,\"beard_1\":5,\"shoes\":10,\"lipstick_1\":0,\"eyebrows_1\":0,\"glasses_2\":0,\"makeup_4\":0,\"decals_2\":0,\"lipstick_3\":0,\"age_1\":0}'), + ('miner', 0, 'employee', 'Employee', 0, '{"tshirt_2":1,"ears_1":8,"glasses_1":15,"torso_2":0,"ears_2":2,"glasses_2":3,"shoes_2":1,"pants_1":75,"shoes_1":51,"bags_1":0,"helmet_2":0,"pants_2":7,"torso_1":71,"tshirt_1":59,"arms":2,"bags_2":0,"helmet_1":0}', '{}'), + ('slaughterer', 0, 'employee', 'Employee', 0, '{\"age_1\":0,\"glasses_2\":0,\"beard_1\":5,\"decals_2\":0,\"beard_4\":0,\"shoes_2\":0,\"tshirt_2\":0,\"lipstick_2\":0,\"hair_2\":0,\"arms\":67,\"pants_1\":36,\"skin\":29,\"eyebrows_2\":0,\"shoes\":10,\"helmet_1\":-1,\"lipstick_1\":0,\"helmet_2\":0,\"hair_color_1\":0,\"glasses\":0,\"makeup_4\":0,\"makeup_1\":0,\"hair_1\":2,\"bproof_1\":0,\"bags_1\":0,\"mask_1\":0,\"lipstick_3\":0,\"chain_1\":0,\"eyebrows_4\":0,\"sex\":0,\"torso_1\":56,\"beard_2\":6,\"shoes_1\":12,\"decals_1\":0,\"face\":19,\"lipstick_4\":0,\"tshirt_1\":15,\"mask_2\":0,\"age_2\":0,\"eyebrows_3\":0,\"chain_2\":0,\"glasses_1\":0,\"ears_1\":-1,\"bags_2\":0,\"ears_2\":0,\"torso_2\":0,\"bproof_2\":0,\"makeup_2\":0,\"eyebrows_1\":0,\"makeup_3\":0,\"pants_2\":0,\"beard_3\":0,\"hair_color_2\":4}','{\"age_1\":0,\"glasses_2\":0,\"beard_1\":5,\"decals_2\":0,\"beard_4\":0,\"shoes_2\":0,\"tshirt_2\":0,\"lipstick_2\":0,\"hair_2\":0,\"arms\":72,\"pants_1\":45,\"skin\":29,\"eyebrows_2\":0,\"shoes\":10,\"helmet_1\":-1,\"lipstick_1\":0,\"helmet_2\":0,\"hair_color_1\":0,\"glasses\":0,\"makeup_4\":0,\"makeup_1\":0,\"hair_1\":2,\"bproof_1\":0,\"bags_1\":0,\"mask_1\":0,\"lipstick_3\":0,\"chain_1\":0,\"eyebrows_4\":0,\"sex\":1,\"torso_1\":49,\"beard_2\":6,\"shoes_1\":24,\"decals_1\":0,\"face\":19,\"lipstick_4\":0,\"tshirt_1\":9,\"mask_2\":0,\"age_2\":0,\"eyebrows_3\":0,\"chain_2\":0,\"glasses_1\":5,\"ears_1\":-1,\"bags_2\":0,\"ears_2\":0,\"torso_2\":0,\"bproof_2\":0,\"makeup_2\":0,\"eyebrows_1\":0,\"makeup_3\":0,\"pants_2\":0,\"beard_3\":0,\"hair_color_2\":4}') +; + +INSERT INTO `items` (`name`, `label`, `weight`) VALUES + ('alive_chicken', 'Living chicken', 1), + ('slaughtered_chicken', 'Slaughtered chicken', 1), + ('packaged_chicken', 'Chicken fillet', 1), + ('fish', 'Fish', 1), + ('stone', 'Stone', 1), + ('washed_stone', 'Washed stone', 1), + ('copper', 'Copper', 1), + ('iron', 'Iron', 1), + ('gold', 'Gold', 1), + ('diamond', 'Diamond', 1), + ('wood', 'Wood', 1), + ('cutted_wood', 'Cut wood', 1), + ('packaged_plank', 'Packaged wood', 1), + ('petrol', 'Oil', 1), + ('petrol_raffin', 'Processed oil', 1), + ('essence', 'Gas', 1), + ('wool', 'Wool', 1), + ('fabric', 'Fabric', 1), + ('clothe', 'Cloth', 1) +; diff --git a/[esx_addons]/esx_jobs/localization/es_esx_jobs.sql b/[esx_addons]/esx_jobs/localization/es_esx_jobs.sql new file mode 100644 index 00000000..900741c1 --- /dev/null +++ b/[esx_addons]/esx_jobs/localization/es_esx_jobs.sql @@ -0,0 +1,47 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('caution', 'Precaución', 0) +; + +INSERT INTO `jobs` (name, label) VALUES + ('slaughterer', 'Carnicero'), + ('fisherman', 'Pescador'), + ('miner', 'Minero'), + ('lumberjack', 'Leñador'), + ('fueler', 'Camionero'), + ('reporter', 'Repartidor'), + ('tailor', 'Sastre') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('lumberjack', 0, 'employee', 'Trabajador', 0, '{}', '{}'), + ('fisherman', 0, 'employee', 'Trabajador', 0, '{}', '{}'), + ('fueler', 0, 'employee', 'Trabajador', 0, '{}', '{}'), + ('reporter', 0, 'employee', 'Trabajador', 0, '{}', '{}'), + ('tailor', 0, 'employee', 'Trabajador', 0, '{\"mask_1\":0,\"arms\":1,\"glasses_1\":0,\"hair_color_2\":4,\"makeup_1\":0,\"face\":19,\"glasses\":0,\"mask_2\":0,\"makeup_3\":0,\"skin\":29,\"helmet_2\":0,\"lipstick_4\":0,\"sex\":0,\"torso_1\":24,\"makeup_2\":0,\"bags_2\":0,\"chain_2\":0,\"ears_1\":-1,\"bags_1\":0,\"bproof_1\":0,\"shoes_2\":0,\"lipstick_2\":0,\"chain_1\":0,\"tshirt_1\":0,\"eyebrows_3\":0,\"pants_2\":0,\"beard_4\":0,\"torso_2\":0,\"beard_2\":6,\"ears_2\":0,\"hair_2\":0,\"shoes_1\":36,\"tshirt_2\":0,\"beard_3\":0,\"hair_1\":2,\"hair_color_1\":0,\"pants_1\":48,\"helmet_1\":-1,\"bproof_2\":0,\"eyebrows_4\":0,\"eyebrows_2\":0,\"decals_1\":0,\"age_2\":0,\"beard_1\":5,\"shoes\":10,\"lipstick_1\":0,\"eyebrows_1\":0,\"glasses_2\":0,\"makeup_4\":0,\"decals_2\":0,\"lipstick_3\":0,\"age_1\":0}','{\"mask_1\":0,\"arms\":5,\"glasses_1\":5,\"hair_color_2\":4,\"makeup_1\":0,\"face\":19,\"glasses\":0,\"mask_2\":0,\"makeup_3\":0,\"skin\":29,\"helmet_2\":0,\"lipstick_4\":0,\"sex\":1,\"torso_1\":52,\"makeup_2\":0,\"bags_2\":0,\"chain_2\":0,\"ears_1\":-1,\"bags_1\":0,\"bproof_1\":0,\"shoes_2\":1,\"lipstick_2\":0,\"chain_1\":0,\"tshirt_1\":23,\"eyebrows_3\":0,\"pants_2\":0,\"beard_4\":0,\"torso_2\":0,\"beard_2\":6,\"ears_2\":0,\"hair_2\":0,\"shoes_1\":42,\"tshirt_2\":4,\"beard_3\":0,\"hair_1\":2,\"hair_color_1\":0,\"pants_1\":36,\"helmet_1\":-1,\"bproof_2\":0,\"eyebrows_4\":0,\"eyebrows_2\":0,\"decals_1\":0,\"age_2\":0,\"beard_1\":5,\"shoes\":10,\"lipstick_1\":0,\"eyebrows_1\":0,\"glasses_2\":0,\"makeup_4\":0,\"decals_2\":0,\"lipstick_3\":0,\"age_1\":0}'), + ('miner', 0, 'employee', 'Trabajador', 0, '{"tshirt_2":1,"ears_1":8,"glasses_1":15,"torso_2":0,"ears_2":2,"glasses_2":3,"shoes_2":1,"pants_1":75,"shoes_1":51,"bags_1":0,"helmet_2":0,"pants_2":7,"torso_1":71,"tshirt_1":59,"arms":2,"bags_2":0,"helmet_1":0}', '{}'), + ('slaughterer', 0, 'employee', 'Trabajador', 0, '{\"age_1\":0,\"glasses_2\":0,\"beard_1\":5,\"decals_2\":0,\"beard_4\":0,\"shoes_2\":0,\"tshirt_2\":0,\"lipstick_2\":0,\"hair_2\":0,\"arms\":67,\"pants_1\":36,\"skin\":29,\"eyebrows_2\":0,\"shoes\":10,\"helmet_1\":-1,\"lipstick_1\":0,\"helmet_2\":0,\"hair_color_1\":0,\"glasses\":0,\"makeup_4\":0,\"makeup_1\":0,\"hair_1\":2,\"bproof_1\":0,\"bags_1\":0,\"mask_1\":0,\"lipstick_3\":0,\"chain_1\":0,\"eyebrows_4\":0,\"sex\":0,\"torso_1\":56,\"beard_2\":6,\"shoes_1\":12,\"decals_1\":0,\"face\":19,\"lipstick_4\":0,\"tshirt_1\":15,\"mask_2\":0,\"age_2\":0,\"eyebrows_3\":0,\"chain_2\":0,\"glasses_1\":0,\"ears_1\":-1,\"bags_2\":0,\"ears_2\":0,\"torso_2\":0,\"bproof_2\":0,\"makeup_2\":0,\"eyebrows_1\":0,\"makeup_3\":0,\"pants_2\":0,\"beard_3\":0,\"hair_color_2\":4}','{\"age_1\":0,\"glasses_2\":0,\"beard_1\":5,\"decals_2\":0,\"beard_4\":0,\"shoes_2\":0,\"tshirt_2\":0,\"lipstick_2\":0,\"hair_2\":0,\"arms\":72,\"pants_1\":45,\"skin\":29,\"eyebrows_2\":0,\"shoes\":10,\"helmet_1\":-1,\"lipstick_1\":0,\"helmet_2\":0,\"hair_color_1\":0,\"glasses\":0,\"makeup_4\":0,\"makeup_1\":0,\"hair_1\":2,\"bproof_1\":0,\"bags_1\":0,\"mask_1\":0,\"lipstick_3\":0,\"chain_1\":0,\"eyebrows_4\":0,\"sex\":1,\"torso_1\":49,\"beard_2\":6,\"shoes_1\":24,\"decals_1\":0,\"face\":19,\"lipstick_4\":0,\"tshirt_1\":9,\"mask_2\":0,\"age_2\":0,\"eyebrows_3\":0,\"chain_2\":0,\"glasses_1\":5,\"ears_1\":-1,\"bags_2\":0,\"ears_2\":0,\"torso_2\":0,\"bproof_2\":0,\"makeup_2\":0,\"eyebrows_1\":0,\"makeup_3\":0,\"pants_2\":0,\"beard_3\":0,\"hair_color_2\":4}') +; + +INSERT INTO `items` (`name`, `label`, `weight`) VALUES + ('alive_chicken', 'Pollo vivo', 1), + ('slaughtered_chicken', 'Pollo sacrificado', 1), + ('packaged_chicken', 'Filete de pollo', 1), + ('fish', 'Pez', 1), + ('stone', 'Piedra', 1), + ('washed_stone', 'Piedra pulida', 1), + ('copper', 'Cobre', 1), + ('iron', 'Hierro', 1), + ('gold', 'Oro', 1), + ('diamond', 'Diamante', 1), + ('wood', 'Madera', 1), + ('cutted_wood', 'Madera cortada', 1), + ('packaged_plank', 'Madera empaquetada', 1), + ('petrol', 'Gasolina', 1), + ('petrol_raffin', 'Gasolina destilada', 1), + ('essence', 'Gas', 1), + ('wool', 'Lana', 1), + ('fabric', 'Tela', 1), + ('clothe', 'Paño', 1) +; diff --git a/[esx_addons]/esx_jobs/localization/fi_esx_jobs.sql b/[esx_addons]/esx_jobs/localization/fi_esx_jobs.sql new file mode 100644 index 00000000..b66f1c4f --- /dev/null +++ b/[esx_addons]/esx_jobs/localization/fi_esx_jobs.sql @@ -0,0 +1,47 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('caution', 'caution', 0) +; + +INSERT INTO `jobs` (name, label) VALUES + ('slaughterer', 'Teurastaja'), + ('fisherman', 'Kalastaja'), + ('miner', 'Kaivostyöläinen'), + ('lumberjack', 'Metsuri'), + ('fueler', 'Öljynjalostaja'), + ('reporter', 'Journalisti'), + ('tailor', 'Räätäli') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('lumberjack', 0, 'interim', 'Työläinen', 0, '{}', '{}'), + ('fisherman', 0, 'interim', 'Työläinen', 0, '{}', '{}'), + ('fueler', 0, 'interim', 'Työläinen', 0, '{}', '{}'), + ('reporter', 0, 'employee', 'Työläinen', 0, '{}', '{}'), + ('tailor', 0, 'interim', 'Työläinen', 0, '{\"mask_1\":0,\"arms\":1,\"glasses_1\":0,\"hair_color_2\":4,\"makeup_1\":0,\"face\":19,\"glasses\":0,\"mask_2\":0,\"makeup_3\":0,\"skin\":29,\"helmet_2\":0,\"lipstick_4\":0,\"sex\":0,\"torso_1\":24,\"makeup_2\":0,\"bags_2\":0,\"chain_2\":0,\"ears_1\":-1,\"bags_1\":0,\"bproof_1\":0,\"shoes_2\":0,\"lipstick_2\":0,\"chain_1\":0,\"tshirt_1\":0,\"eyebrows_3\":0,\"pants_2\":0,\"beard_4\":0,\"torso_2\":0,\"beard_2\":6,\"ears_2\":0,\"hair_2\":0,\"shoes_1\":36,\"tshirt_2\":0,\"beard_3\":0,\"hair_1\":2,\"hair_color_1\":0,\"pants_1\":48,\"helmet_1\":-1,\"bproof_2\":0,\"eyebrows_4\":0,\"eyebrows_2\":0,\"decals_1\":0,\"age_2\":0,\"beard_1\":5,\"shoes\":10,\"lipstick_1\":0,\"eyebrows_1\":0,\"glasses_2\":0,\"makeup_4\":0,\"decals_2\":0,\"lipstick_3\":0,\"age_1\":0}','{\"mask_1\":0,\"arms\":5,\"glasses_1\":5,\"hair_color_2\":4,\"makeup_1\":0,\"face\":19,\"glasses\":0,\"mask_2\":0,\"makeup_3\":0,\"skin\":29,\"helmet_2\":0,\"lipstick_4\":0,\"sex\":1,\"torso_1\":52,\"makeup_2\":0,\"bags_2\":0,\"chain_2\":0,\"ears_1\":-1,\"bags_1\":0,\"bproof_1\":0,\"shoes_2\":1,\"lipstick_2\":0,\"chain_1\":0,\"tshirt_1\":23,\"eyebrows_3\":0,\"pants_2\":0,\"beard_4\":0,\"torso_2\":0,\"beard_2\":6,\"ears_2\":0,\"hair_2\":0,\"shoes_1\":42,\"tshirt_2\":4,\"beard_3\":0,\"hair_1\":2,\"hair_color_1\":0,\"pants_1\":36,\"helmet_1\":-1,\"bproof_2\":0,\"eyebrows_4\":0,\"eyebrows_2\":0,\"decals_1\":0,\"age_2\":0,\"beard_1\":5,\"shoes\":10,\"lipstick_1\":0,\"eyebrows_1\":0,\"glasses_2\":0,\"makeup_4\":0,\"decals_2\":0,\"lipstick_3\":0,\"age_1\":0}'), + ('miner', 0, 'interim', 'Työläinen', 0, '{"tshirt_2":1,"ears_1":8,"glasses_1":15,"torso_2":0,"ears_2":2,"glasses_2":3,"shoes_2":1,"pants_1":75,"shoes_1":51,"bags_1":0,"helmet_2":0,"pants_2":7,"torso_1":71,"tshirt_1":59,"arms":2,"bags_2":0,"helmet_1":0}', '{}'), + ('slaughterer', 0, 'interim', 'Työläinen', 0, '{\"age_1\":0,\"glasses_2\":0,\"beard_1\":5,\"decals_2\":0,\"beard_4\":0,\"shoes_2\":0,\"tshirt_2\":0,\"lipstick_2\":0,\"hair_2\":0,\"arms\":67,\"pants_1\":36,\"skin\":29,\"eyebrows_2\":0,\"shoes\":10,\"helmet_1\":-1,\"lipstick_1\":0,\"helmet_2\":0,\"hair_color_1\":0,\"glasses\":0,\"makeup_4\":0,\"makeup_1\":0,\"hair_1\":2,\"bproof_1\":0,\"bags_1\":0,\"mask_1\":0,\"lipstick_3\":0,\"chain_1\":0,\"eyebrows_4\":0,\"sex\":0,\"torso_1\":56,\"beard_2\":6,\"shoes_1\":12,\"decals_1\":0,\"face\":19,\"lipstick_4\":0,\"tshirt_1\":15,\"mask_2\":0,\"age_2\":0,\"eyebrows_3\":0,\"chain_2\":0,\"glasses_1\":0,\"ears_1\":-1,\"bags_2\":0,\"ears_2\":0,\"torso_2\":0,\"bproof_2\":0,\"makeup_2\":0,\"eyebrows_1\":0,\"makeup_3\":0,\"pants_2\":0,\"beard_3\":0,\"hair_color_2\":4}','{\"age_1\":0,\"glasses_2\":0,\"beard_1\":5,\"decals_2\":0,\"beard_4\":0,\"shoes_2\":0,\"tshirt_2\":0,\"lipstick_2\":0,\"hair_2\":0,\"arms\":72,\"pants_1\":45,\"skin\":29,\"eyebrows_2\":0,\"shoes\":10,\"helmet_1\":-1,\"lipstick_1\":0,\"helmet_2\":0,\"hair_color_1\":0,\"glasses\":0,\"makeup_4\":0,\"makeup_1\":0,\"hair_1\":2,\"bproof_1\":0,\"bags_1\":0,\"mask_1\":0,\"lipstick_3\":0,\"chain_1\":0,\"eyebrows_4\":0,\"sex\":1,\"torso_1\":49,\"beard_2\":6,\"shoes_1\":24,\"decals_1\":0,\"face\":19,\"lipstick_4\":0,\"tshirt_1\":9,\"mask_2\":0,\"age_2\":0,\"eyebrows_3\":0,\"chain_2\":0,\"glasses_1\":5,\"ears_1\":-1,\"bags_2\":0,\"ears_2\":0,\"torso_2\":0,\"bproof_2\":0,\"makeup_2\":0,\"eyebrows_1\":0,\"makeup_3\":0,\"pants_2\":0,\"beard_3\":0,\"hair_color_2\":4}') +; + +INSERT INTO `items` (`name`, `label`, `weight`) VALUES + ('alive_chicken', 'Elävä kana', 1), + ('slaughtered_chicken', 'Teurastettu kana', 1), + ('packaged_chicken', 'Kananfilee', 1), + ('fish', 'Kala', 1), + ('stone', 'Kivi', 1), + ('washed_stone', 'Puhdistettu Kivi', 1), + ('copper', 'Kupari', 1), + ('iron', 'Rauta', 1), + ('gold', 'Kulta', 1), + ('diamond', 'Timantti', 1), + ('wood', 'Puu', 1), + ('cutted_wood', 'Pilkottu Puu', 1), + ('packaged_plank', 'Paketoitu Lankku', 1), + ('petrol', 'Öljy', 1), + ('petrol_raffin', 'Prosessoitu Öljy', 1), + ('essence', 'Polttoöljy', 1), + ('wool', 'Villa', 1), + ('fabric', 'Kangas', 1), + ('clothe', 'Vaate', 1) +; diff --git a/[esx_addons]/esx_jobs/localization/hu_esx_jobs.sql b/[esx_addons]/esx_jobs/localization/hu_esx_jobs.sql new file mode 100644 index 00000000..f83f8386 --- /dev/null +++ b/[esx_addons]/esx_jobs/localization/hu_esx_jobs.sql @@ -0,0 +1,47 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('caution', 'caution', 0) +; + +INSERT INTO `jobs` (name, label) VALUES + ('slaughterer', 'Hentes'), + ('fisherman', 'Halász'), + ('miner', 'Bányász'), + ('lumberjack', 'Favágó'), + ('fueler', 'Üzemanyagtöltő'), + ('reporter', 'Riporter'), + ('tailor', 'Szabó') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('lumberjack', 0, 'employee', 'Munkavállaló', 0, '{}', '{}'), + ('fisherman', 0, 'employee', 'Munkavállaló', 0, '{}', '{}'), + ('fueler', 0, 'employee', 'Munkavállaló', 0, '{}', '{}'), + ('reporter', 0, 'employee', 'Munkavállaló', 0, '{}', '{}'), + ('tailor', 0, 'employee', 'Munkavállaló', 0, '{\"mask_1\":0,\"arms\":1,\"glasses_1\":0,\"hair_color_2\":4,\"makeup_1\":0,\"face\":19,\"glasses\":0,\"mask_2\":0,\"makeup_3\":0,\"skin\":29,\"helmet_2\":0,\"lipstick_4\":0,\"sex\":0,\"torso_1\":24,\"makeup_2\":0,\"bags_2\":0,\"chain_2\":0,\"ears_1\":-1,\"bags_1\":0,\"bproof_1\":0,\"shoes_2\":0,\"lipstick_2\":0,\"chain_1\":0,\"tshirt_1\":0,\"eyebrows_3\":0,\"pants_2\":0,\"beard_4\":0,\"torso_2\":0,\"beard_2\":6,\"ears_2\":0,\"hair_2\":0,\"shoes_1\":36,\"tshirt_2\":0,\"beard_3\":0,\"hair_1\":2,\"hair_color_1\":0,\"pants_1\":48,\"helmet_1\":-1,\"bproof_2\":0,\"eyebrows_4\":0,\"eyebrows_2\":0,\"decals_1\":0,\"age_2\":0,\"beard_1\":5,\"shoes\":10,\"lipstick_1\":0,\"eyebrows_1\":0,\"glasses_2\":0,\"makeup_4\":0,\"decals_2\":0,\"lipstick_3\":0,\"age_1\":0}','{\"mask_1\":0,\"arms\":5,\"glasses_1\":5,\"hair_color_2\":4,\"makeup_1\":0,\"face\":19,\"glasses\":0,\"mask_2\":0,\"makeup_3\":0,\"skin\":29,\"helmet_2\":0,\"lipstick_4\":0,\"sex\":1,\"torso_1\":52,\"makeup_2\":0,\"bags_2\":0,\"chain_2\":0,\"ears_1\":-1,\"bags_1\":0,\"bproof_1\":0,\"shoes_2\":1,\"lipstick_2\":0,\"chain_1\":0,\"tshirt_1\":23,\"eyebrows_3\":0,\"pants_2\":0,\"beard_4\":0,\"torso_2\":0,\"beard_2\":6,\"ears_2\":0,\"hair_2\":0,\"shoes_1\":42,\"tshirt_2\":4,\"beard_3\":0,\"hair_1\":2,\"hair_color_1\":0,\"pants_1\":36,\"helmet_1\":-1,\"bproof_2\":0,\"eyebrows_4\":0,\"eyebrows_2\":0,\"decals_1\":0,\"age_2\":0,\"beard_1\":5,\"shoes\":10,\"lipstick_1\":0,\"eyebrows_1\":0,\"glasses_2\":0,\"makeup_4\":0,\"decals_2\":0,\"lipstick_3\":0,\"age_1\":0}'), + ('miner', 0, 'employee', 'Munkavállaló', 0, '{"tshirt_2":1,"ears_1":8,"glasses_1":15,"torso_2":0,"ears_2":2,"glasses_2":3,"shoes_2":1,"pants_1":75,"shoes_1":51,"bags_1":0,"helmet_2":0,"pants_2":7,"torso_1":71,"tshirt_1":59,"arms":2,"bags_2":0,"helmet_1":0}', '{}'), + ('slaughterer', 0, 'employee', 'Munkavállaló', 0, '{\"age_1\":0,\"glasses_2\":0,\"beard_1\":5,\"decals_2\":0,\"beard_4\":0,\"shoes_2\":0,\"tshirt_2\":0,\"lipstick_2\":0,\"hair_2\":0,\"arms\":67,\"pants_1\":36,\"skin\":29,\"eyebrows_2\":0,\"shoes\":10,\"helmet_1\":-1,\"lipstick_1\":0,\"helmet_2\":0,\"hair_color_1\":0,\"glasses\":0,\"makeup_4\":0,\"makeup_1\":0,\"hair_1\":2,\"bproof_1\":0,\"bags_1\":0,\"mask_1\":0,\"lipstick_3\":0,\"chain_1\":0,\"eyebrows_4\":0,\"sex\":0,\"torso_1\":56,\"beard_2\":6,\"shoes_1\":12,\"decals_1\":0,\"face\":19,\"lipstick_4\":0,\"tshirt_1\":15,\"mask_2\":0,\"age_2\":0,\"eyebrows_3\":0,\"chain_2\":0,\"glasses_1\":0,\"ears_1\":-1,\"bags_2\":0,\"ears_2\":0,\"torso_2\":0,\"bproof_2\":0,\"makeup_2\":0,\"eyebrows_1\":0,\"makeup_3\":0,\"pants_2\":0,\"beard_3\":0,\"hair_color_2\":4}','{\"age_1\":0,\"glasses_2\":0,\"beard_1\":5,\"decals_2\":0,\"beard_4\":0,\"shoes_2\":0,\"tshirt_2\":0,\"lipstick_2\":0,\"hair_2\":0,\"arms\":72,\"pants_1\":45,\"skin\":29,\"eyebrows_2\":0,\"shoes\":10,\"helmet_1\":-1,\"lipstick_1\":0,\"helmet_2\":0,\"hair_color_1\":0,\"glasses\":0,\"makeup_4\":0,\"makeup_1\":0,\"hair_1\":2,\"bproof_1\":0,\"bags_1\":0,\"mask_1\":0,\"lipstick_3\":0,\"chain_1\":0,\"eyebrows_4\":0,\"sex\":1,\"torso_1\":49,\"beard_2\":6,\"shoes_1\":24,\"decals_1\":0,\"face\":19,\"lipstick_4\":0,\"tshirt_1\":9,\"mask_2\":0,\"age_2\":0,\"eyebrows_3\":0,\"chain_2\":0,\"glasses_1\":5,\"ears_1\":-1,\"bags_2\":0,\"ears_2\":0,\"torso_2\":0,\"bproof_2\":0,\"makeup_2\":0,\"eyebrows_1\":0,\"makeup_3\":0,\"pants_2\":0,\"beard_3\":0,\"hair_color_2\":4}') +; + +INSERT INTO `items` (`name`, `label`, `weight`) VALUES + ('alive_chicken', 'Élő csirke', 1), + ('slaughtered_chicken', 'Levágott csirke', 1), + ('packaged_chicken', 'Csirkefilé', 1), + ('fish', 'Hal', 1), + ('stone', 'Kő', 1), + ('washed_stone', 'Mosott kő', 1), + ('copper', 'Réz', 1), + ('iron', 'Vas', 1), + ('gold', 'Arany', 1), + ('diamond', 'Gyémánt', 1), + ('wood', 'Fa', 1), + ('cutted_wood', 'Vágott fa', 1), + ('packaged_plank', 'Csomagolt wood', 1), + ('petrol', 'Olaj', 1), + ('petrol_raffin', 'Feldolgozott oil', 1), + ('essence', 'Gáz', 1), + ('wool', 'Gyapjú', 1), + ('fabric', 'Szövet', 1), + ('clothe', 'Ruha', 1) +; diff --git a/[esx_addons]/esx_jobs/localization/si_esx_jobs.sql b/[esx_addons]/esx_jobs/localization/si_esx_jobs.sql new file mode 100644 index 00000000..88f0c0bc --- /dev/null +++ b/[esx_addons]/esx_jobs/localization/si_esx_jobs.sql @@ -0,0 +1,47 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('caution', 'caution', 0) +; + +INSERT INTO `jobs` (name, label) VALUES + ('slaughterer', 'Mesar'), + ('fisherman', 'Ribic'), + ('miner', 'Rudar'), + ('lumberjack', 'Gozdar'), + ('fueler', 'Gorivnik'), + ('reporter', 'Novinar'), + ('tailor', 'Krojac') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('lumberjack', 0, 'employee', 'Delavec', 0, '{}', '{}'), + ('fisherman', 0, 'employee', 'Delavec', 0, '{}', '{}'), + ('fueler', 0, 'employee', 'Delavec', 0, '{}', '{}'), + ('reporter', 0, 'employee', 'Delavec', 0, '{}', '{}'), + ('tailor', 0, 'employee', 'Delavec', 0, '{\"mask_1\":0,\"arms\":1,\"glasses_1\":0,\"hair_color_2\":4,\"makeup_1\":0,\"face\":19,\"glasses\":0,\"mask_2\":0,\"makeup_3\":0,\"skin\":29,\"helmet_2\":0,\"lipstick_4\":0,\"sex\":0,\"torso_1\":24,\"makeup_2\":0,\"bags_2\":0,\"chain_2\":0,\"ears_1\":-1,\"bags_1\":0,\"bproof_1\":0,\"shoes_2\":0,\"lipstick_2\":0,\"chain_1\":0,\"tshirt_1\":0,\"eyebrows_3\":0,\"pants_2\":0,\"beard_4\":0,\"torso_2\":0,\"beard_2\":6,\"ears_2\":0,\"hair_2\":0,\"shoes_1\":36,\"tshirt_2\":0,\"beard_3\":0,\"hair_1\":2,\"hair_color_1\":0,\"pants_1\":48,\"helmet_1\":-1,\"bproof_2\":0,\"eyebrows_4\":0,\"eyebrows_2\":0,\"decals_1\":0,\"age_2\":0,\"beard_1\":5,\"shoes\":10,\"lipstick_1\":0,\"eyebrows_1\":0,\"glasses_2\":0,\"makeup_4\":0,\"decals_2\":0,\"lipstick_3\":0,\"age_1\":0}','{\"mask_1\":0,\"arms\":5,\"glasses_1\":5,\"hair_color_2\":4,\"makeup_1\":0,\"face\":19,\"glasses\":0,\"mask_2\":0,\"makeup_3\":0,\"skin\":29,\"helmet_2\":0,\"lipstick_4\":0,\"sex\":1,\"torso_1\":52,\"makeup_2\":0,\"bags_2\":0,\"chain_2\":0,\"ears_1\":-1,\"bags_1\":0,\"bproof_1\":0,\"shoes_2\":1,\"lipstick_2\":0,\"chain_1\":0,\"tshirt_1\":23,\"eyebrows_3\":0,\"pants_2\":0,\"beard_4\":0,\"torso_2\":0,\"beard_2\":6,\"ears_2\":0,\"hair_2\":0,\"shoes_1\":42,\"tshirt_2\":4,\"beard_3\":0,\"hair_1\":2,\"hair_color_1\":0,\"pants_1\":36,\"helmet_1\":-1,\"bproof_2\":0,\"eyebrows_4\":0,\"eyebrows_2\":0,\"decals_1\":0,\"age_2\":0,\"beard_1\":5,\"shoes\":10,\"lipstick_1\":0,\"eyebrows_1\":0,\"glasses_2\":0,\"makeup_4\":0,\"decals_2\":0,\"lipstick_3\":0,\"age_1\":0}'), + ('miner', 0, 'employee', 'Delavec', 0, '{"tshirt_2":1,"ears_1":8,"glasses_1":15,"torso_2":0,"ears_2":2,"glasses_2":3,"shoes_2":1,"pants_1":75,"shoes_1":51,"bags_1":0,"helmet_2":0,"pants_2":7,"torso_1":71,"tshirt_1":59,"arms":2,"bags_2":0,"helmet_1":0}', '{}'), + ('slaughterer', 0, 'employee', 'Delavec', 0, '{\"age_1\":0,\"glasses_2\":0,\"beard_1\":5,\"decals_2\":0,\"beard_4\":0,\"shoes_2\":0,\"tshirt_2\":0,\"lipstick_2\":0,\"hair_2\":0,\"arms\":67,\"pants_1\":36,\"skin\":29,\"eyebrows_2\":0,\"shoes\":10,\"helmet_1\":-1,\"lipstick_1\":0,\"helmet_2\":0,\"hair_color_1\":0,\"glasses\":0,\"makeup_4\":0,\"makeup_1\":0,\"hair_1\":2,\"bproof_1\":0,\"bags_1\":0,\"mask_1\":0,\"lipstick_3\":0,\"chain_1\":0,\"eyebrows_4\":0,\"sex\":0,\"torso_1\":56,\"beard_2\":6,\"shoes_1\":12,\"decals_1\":0,\"face\":19,\"lipstick_4\":0,\"tshirt_1\":15,\"mask_2\":0,\"age_2\":0,\"eyebrows_3\":0,\"chain_2\":0,\"glasses_1\":0,\"ears_1\":-1,\"bags_2\":0,\"ears_2\":0,\"torso_2\":0,\"bproof_2\":0,\"makeup_2\":0,\"eyebrows_1\":0,\"makeup_3\":0,\"pants_2\":0,\"beard_3\":0,\"hair_color_2\":4}','{\"age_1\":0,\"glasses_2\":0,\"beard_1\":5,\"decals_2\":0,\"beard_4\":0,\"shoes_2\":0,\"tshirt_2\":0,\"lipstick_2\":0,\"hair_2\":0,\"arms\":72,\"pants_1\":45,\"skin\":29,\"eyebrows_2\":0,\"shoes\":10,\"helmet_1\":-1,\"lipstick_1\":0,\"helmet_2\":0,\"hair_color_1\":0,\"glasses\":0,\"makeup_4\":0,\"makeup_1\":0,\"hair_1\":2,\"bproof_1\":0,\"bags_1\":0,\"mask_1\":0,\"lipstick_3\":0,\"chain_1\":0,\"eyebrows_4\":0,\"sex\":1,\"torso_1\":49,\"beard_2\":6,\"shoes_1\":24,\"decals_1\":0,\"face\":19,\"lipstick_4\":0,\"tshirt_1\":9,\"mask_2\":0,\"age_2\":0,\"eyebrows_3\":0,\"chain_2\":0,\"glasses_1\":5,\"ears_1\":-1,\"bags_2\":0,\"ears_2\":0,\"torso_2\":0,\"bproof_2\":0,\"makeup_2\":0,\"eyebrows_1\":0,\"makeup_3\":0,\"pants_2\":0,\"beard_3\":0,\"hair_color_2\":4}') +; + +INSERT INTO `items` (`name`, `label`, `weight`) VALUES + ('alive_chicken', 'Living chicken', 1), + ('slaughtered_chicken', 'Slaughtered chicken', 1), + ('packaged_chicken', 'Chicken fillet', 1), + ('fish', 'Fish', 1), + ('stone', 'Stone', 1), + ('washed_stone', 'Washed stone', 1), + ('copper', 'Copper', 1), + ('iron', 'Iron', 1), + ('gold', 'Gold', 1), + ('diamond', 'Diamond', 1), + ('wood', 'Wood', 1), + ('cutted_wood', 'Cut wood', 1), + ('packaged_plank', 'Packaged wood', 1), + ('petrol', 'Oil', 1), + ('petrol_raffin', 'Processed oil', 1), + ('essence', 'Gas', 1), + ('wool', 'Wool', 1), + ('fabric', 'Fabric', 1), + ('clothe', 'Cloth', 1) +; diff --git a/[esx_addons]/esx_jobs/localization/sv_esx_jobs.sql b/[esx_addons]/esx_jobs/localization/sv_esx_jobs.sql new file mode 100644 index 00000000..b7a243a3 --- /dev/null +++ b/[esx_addons]/esx_jobs/localization/sv_esx_jobs.sql @@ -0,0 +1,47 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('caution', 'caution', 0) +; + +INSERT INTO `jobs` (name, label) VALUES + ('slaughterer', 'Slaktare'), + ('fisherman', 'Fiskare'), + ('miner', 'Gruvarbetare'), + ('lumberjack', 'Skogshuggare'), + ('fueler', 'Bensintankare'), + ('reporter', 'Reporter'), + ('tailor', 'Skräddare') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('lumberjack', 0, 'employee', 'Anställd', 0, '{}', '{}'), + ('fisherman', 0, 'employee', 'Anställd', 0, '{}', '{}'), + ('fueler', 0, 'employee', 'Anställd', 0, '{}', '{}'), + ('reporter', 0, 'employee', 'Anställd', 0, '{}', '{}'), + ('tailor', 0, 'employee', 'Anställd', 0, '{\"mask_1\":0,\"arms\":1,\"glasses_1\":0,\"hair_color_2\":4,\"makeup_1\":0,\"face\":19,\"glasses\":0,\"mask_2\":0,\"makeup_3\":0,\"skin\":29,\"helmet_2\":0,\"lipstick_4\":0,\"sex\":0,\"torso_1\":24,\"makeup_2\":0,\"bags_2\":0,\"chain_2\":0,\"ears_1\":-1,\"bags_1\":0,\"bproof_1\":0,\"shoes_2\":0,\"lipstick_2\":0,\"chain_1\":0,\"tshirt_1\":0,\"eyebrows_3\":0,\"pants_2\":0,\"beard_4\":0,\"torso_2\":0,\"beard_2\":6,\"ears_2\":0,\"hair_2\":0,\"shoes_1\":36,\"tshirt_2\":0,\"beard_3\":0,\"hair_1\":2,\"hair_color_1\":0,\"pants_1\":48,\"helmet_1\":-1,\"bproof_2\":0,\"eyebrows_4\":0,\"eyebrows_2\":0,\"decals_1\":0,\"age_2\":0,\"beard_1\":5,\"shoes\":10,\"lipstick_1\":0,\"eyebrows_1\":0,\"glasses_2\":0,\"makeup_4\":0,\"decals_2\":0,\"lipstick_3\":0,\"age_1\":0}','{\"mask_1\":0,\"arms\":5,\"glasses_1\":5,\"hair_color_2\":4,\"makeup_1\":0,\"face\":19,\"glasses\":0,\"mask_2\":0,\"makeup_3\":0,\"skin\":29,\"helmet_2\":0,\"lipstick_4\":0,\"sex\":1,\"torso_1\":52,\"makeup_2\":0,\"bags_2\":0,\"chain_2\":0,\"ears_1\":-1,\"bags_1\":0,\"bproof_1\":0,\"shoes_2\":1,\"lipstick_2\":0,\"chain_1\":0,\"tshirt_1\":23,\"eyebrows_3\":0,\"pants_2\":0,\"beard_4\":0,\"torso_2\":0,\"beard_2\":6,\"ears_2\":0,\"hair_2\":0,\"shoes_1\":42,\"tshirt_2\":4,\"beard_3\":0,\"hair_1\":2,\"hair_color_1\":0,\"pants_1\":36,\"helmet_1\":-1,\"bproof_2\":0,\"eyebrows_4\":0,\"eyebrows_2\":0,\"decals_1\":0,\"age_2\":0,\"beard_1\":5,\"shoes\":10,\"lipstick_1\":0,\"eyebrows_1\":0,\"glasses_2\":0,\"makeup_4\":0,\"decals_2\":0,\"lipstick_3\":0,\"age_1\":0}'), + ('miner', 0, 'employee', 'Anställd', 0, '{"tshirt_2":1,"ears_1":8,"glasses_1":15,"torso_2":0,"ears_2":2,"glasses_2":3,"shoes_2":1,"pants_1":75,"shoes_1":51,"bags_1":0,"helmet_2":0,"pants_2":7,"torso_1":71,"tshirt_1":59,"arms":2,"bags_2":0,"helmet_1":0}', '{}'), + ('slaughterer', 0, 'employee', 'Anställd', 0, '{\"age_1\":0,\"glasses_2\":0,\"beard_1\":5,\"decals_2\":0,\"beard_4\":0,\"shoes_2\":0,\"tshirt_2\":0,\"lipstick_2\":0,\"hair_2\":0,\"arms\":67,\"pants_1\":36,\"skin\":29,\"eyebrows_2\":0,\"shoes\":10,\"helmet_1\":-1,\"lipstick_1\":0,\"helmet_2\":0,\"hair_color_1\":0,\"glasses\":0,\"makeup_4\":0,\"makeup_1\":0,\"hair_1\":2,\"bproof_1\":0,\"bags_1\":0,\"mask_1\":0,\"lipstick_3\":0,\"chain_1\":0,\"eyebrows_4\":0,\"sex\":0,\"torso_1\":56,\"beard_2\":6,\"shoes_1\":12,\"decals_1\":0,\"face\":19,\"lipstick_4\":0,\"tshirt_1\":15,\"mask_2\":0,\"age_2\":0,\"eyebrows_3\":0,\"chain_2\":0,\"glasses_1\":0,\"ears_1\":-1,\"bags_2\":0,\"ears_2\":0,\"torso_2\":0,\"bproof_2\":0,\"makeup_2\":0,\"eyebrows_1\":0,\"makeup_3\":0,\"pants_2\":0,\"beard_3\":0,\"hair_color_2\":4}','{\"age_1\":0,\"glasses_2\":0,\"beard_1\":5,\"decals_2\":0,\"beard_4\":0,\"shoes_2\":0,\"tshirt_2\":0,\"lipstick_2\":0,\"hair_2\":0,\"arms\":72,\"pants_1\":45,\"skin\":29,\"eyebrows_2\":0,\"shoes\":10,\"helmet_1\":-1,\"lipstick_1\":0,\"helmet_2\":0,\"hair_color_1\":0,\"glasses\":0,\"makeup_4\":0,\"makeup_1\":0,\"hair_1\":2,\"bproof_1\":0,\"bags_1\":0,\"mask_1\":0,\"lipstick_3\":0,\"chain_1\":0,\"eyebrows_4\":0,\"sex\":1,\"torso_1\":49,\"beard_2\":6,\"shoes_1\":24,\"decals_1\":0,\"face\":19,\"lipstick_4\":0,\"tshirt_1\":9,\"mask_2\":0,\"age_2\":0,\"eyebrows_3\":0,\"chain_2\":0,\"glasses_1\":5,\"ears_1\":-1,\"bags_2\":0,\"ears_2\":0,\"torso_2\":0,\"bproof_2\":0,\"makeup_2\":0,\"eyebrows_1\":0,\"makeup_3\":0,\"pants_2\":0,\"beard_3\":0,\"hair_color_2\":4}') +; + +INSERT INTO `items` (`name`, `label`, `weight`) VALUES + ('alive_chicken', 'Levande kyckling', 1), + ('slaughtered_chicken', 'Slaktad kyckling', 1), + ('packaged_chicken', 'Paketerad kyckling', 1), + ('fish', 'Fisk', 1), + ('stone', 'Sten', 1), + ('washed_stone', 'Tvättad sten', 1), + ('copper', 'Koppar', 1), + ('iron', 'Järn', 1), + ('gold', 'Guld', 1), + ('diamond', 'Diamant', 1), + ('wood', 'Trä', 1), + ('cutted_wood', 'Sågat trä', 1), + ('packaged_plank', 'Paketerad trä', 1), + ('petrol', 'Råolja', 1), + ('petrol_raffin', 'Raffinerad olja', 1), + ('essence', 'Gas', 1), + ('wool', 'Ull', 1), + ('fabric', 'Textil', 1), + ('clothe', 'Tyg', 1) +; diff --git a/[esx_addons]/esx_jobs/server/main.lua b/[esx_addons]/esx_jobs/server/main.lua new file mode 100644 index 00000000..4a493c8f --- /dev/null +++ b/[esx_addons]/esx_jobs/server/main.lua @@ -0,0 +1,132 @@ +local playersWorking = {} + +CreateThread(function() + while true do + Wait(1000) + local timeNow = os.clock() + + for playerId,data in pairs(playersWorking) do + Wait(0) + local xPlayer = ESX.GetPlayerFromId(playerId) + + -- is player still online? + if xPlayer then + local distance = #(xPlayer.getCoords(true) - data.zoneCoords) + + -- player still within zone limits? + if distance <= data.zoneMaxDistance then + -- calculate the elapsed time + local timeElapsed = timeNow - data.time + + if timeElapsed > data.jobItem[1].time then + data.time = os.clock() + + for k,v in ipairs(data.jobItem) do + local itemQtty, requiredItemQtty = 0, 0 + + if v.name ~= TranslateCap('delivery') then + itemQtty = xPlayer.getInventoryItem(v.db_name).count + end + + if data.jobItem[1].requires ~= 'nothing' then + requiredItemQtty = xPlayer.getInventoryItem(data.jobItem[1].requires).count + end + + if v.name ~= TranslateCap('delivery') and itemQtty >= v.max then + xPlayer.showNotification(TranslateCap('max_limit', v.name)) + playersWorking[playerId] = nil + elseif v.requires ~= 'nothing' and requiredItemQtty <= 0 then + xPlayer.showNotification(TranslateCap('not_enough', data.jobItem[1].requires_name)) + playersWorking[playerId] = nil + else + if v.name ~= TranslateCap('delivery') then + -- chances to drop the item + if v.drop == 100 then + xPlayer.addInventoryItem(v.db_name, v.add) + else + local chanceToDrop = math.random(100) + if chanceToDrop <= v.drop then + xPlayer.addInventoryItem(v.db_name, v.add) + end + end + else + xPlayer.addMoney(v.price, "Job Payment") + end + end + end + + if data.jobItem[1].requires ~= 'nothing' then + local itemToRemoveQtty = xPlayer.getInventoryItem(data.jobItem[1].requires).count + if itemToRemoveQtty > 0 then + xPlayer.removeInventoryItem(data.jobItem[1].requires, data.jobItem[1].remove) + end + end + end + else + playersWorking[playerId] = nil + end + else + playersWorking[playerId] = nil + end + end + end +end) + +RegisterServerEvent('esx_jobs:startWork', function(zoneIndex, zoneKey) + if not playersWorking[source] then + local xPlayer = ESX.GetPlayerFromId(source) + + if xPlayer then + local jobObject = Config.Jobs[xPlayer.job.name] + + if jobObject then + local jobZone = jobObject.Zones[zoneKey] + + if jobZone and jobZone.Item then + playersWorking[source] = { + jobItem = jobZone.Item, + zoneCoords = vector3(jobZone.Pos.x, jobZone.Pos.y, jobZone.Pos.z), + zoneMaxDistance = jobZone.Size.x, + time = os.clock() + } + end + end + end + end +end) + +RegisterServerEvent('esx_jobs:stopWork', function() + if playersWorking[source] then + playersWorking[source] = nil + end +end) + +RegisterNetEvent('esx_jobs:caution', function(cautionType, cautionAmount, spawnPoint, vehicle) + local xPlayer = ESX.GetPlayerFromId(source) + + if cautionType == 'take' then + if cautionAmount <= Config.MaxCaution and cautionAmount >= 0 then + TriggerEvent('esx_addonaccount:getAccount', 'caution', xPlayer.identifier, function(account) + if xPlayer.getAccount('bank').money >= cautionAmount then + xPlayer.removeAccountMoney('bank', cautionAmount, "Caution Fine") + account.addMoney(cautionAmount) + xPlayer.showNotification(TranslateCap('bank_deposit_taken', ESX.Math.GroupDigits(cautionAmount))) + TriggerClientEvent('esx_jobs:spawnJobVehicle', xPlayer.source, spawnPoint, vehicle) + else + xPlayer.showNotification(TranslateCap('caution_afford', ESX.Math.GroupDigits(cautionAmount))) + end + end) + end + elseif cautionType == 'give_back' then + if cautionAmount <= 1 and cautionAmount > 0 then + TriggerEvent('esx_addonaccount:getAccount', 'caution', xPlayer.identifier, function(account) + local caution = account.money + local toGive = ESX.Math.Round(caution * cautionAmount) + + xPlayer.addAccountMoney('bank', toGive, "Caution Return") + account.removeMoney(toGive) + TriggerClientEvent('esx:showNotification', source, TranslateCap('bank_deposit_returned', ESX.Math.GroupDigits(toGive))) + end) + end + end +end) diff --git a/[esx_addons]/esx_license/.editorconfig b/[esx_addons]/esx_license/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_license/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_license/LICENSE b/[esx_addons]/esx_license/LICENSE new file mode 100644 index 00000000..6a52769c --- /dev/null +++ b/[esx_addons]/esx_license/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_license + Copyright (C) 2015-2023 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 . + +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_license Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_license/README.md b/[esx_addons]/esx_license/README.md new file mode 100644 index 00000000..90cee8f9 --- /dev/null +++ b/[esx_addons]/esx_license/README.md @@ -0,0 +1,34 @@ +# esx_license + +## Download & Installation + +### Using [fvm](https://github.com/qlaffont/fvm-installer) +``` +fvm install --save --folder=esx esx-org/esx_license +``` + +### Using Git +``` +cd resources +git clone https://github.com/ESX-Org/esx_license [esx]/esx_license +``` + +### Manually +- Download https://github.com/ESX-Org/esx_license/archive/master.zip +- Put it in the `[esx]` directory + +## Installation +- Import `esx_license.sql` in your database +- Add this to your `server.cfg`: + +``` +start esx_license +``` + +### Available triggers +- `'esx_license:addLicense', function(target, type, cb)` +- `'esx_license:removeLicense', function(target, type, cb)` +- `'esx_license:getLicense', function(source, cb, type)` (callback) +- `'esx_license:getLicenses', function(source, cb, target)` (callback) +- `'esx_license:checkLicense', function(source, cb, target, type)` (callback) +- `'esx_license:getLicensesList', function(source, cb)` (callback) diff --git a/[esx_addons]/esx_license/config.lua b/[esx_addons]/esx_license/config.lua new file mode 100644 index 00000000..236b1f29 --- /dev/null +++ b/[esx_addons]/esx_license/config.lua @@ -0,0 +1,5 @@ +Config = {} + +Config.allowedJobs = { + ['police'] = true +} \ No newline at end of file diff --git a/[esx_addons]/esx_license/esx_license.sql b/[esx_addons]/esx_license/esx_license.sql new file mode 100644 index 00000000..9cb2eb68 --- /dev/null +++ b/[esx_addons]/esx_license/esx_license.sql @@ -0,0 +1,18 @@ + + +CREATE TABLE `licenses` ( + `type` varchar(60) NOT NULL, + `label` varchar(60) NOT NULL, + + PRIMARY KEY (`type`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `user_licenses` ( + `id` int NOT NULL AUTO_INCREMENT, + `type` varchar(60) NOT NULL, + `owner` VARCHAR(60) NOT NULL, + + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + diff --git a/[esx_addons]/esx_license/fxmanifest.lua b/[esx_addons]/esx_license/fxmanifest.lua new file mode 100644 index 00000000..e515dc8a --- /dev/null +++ b/[esx_addons]/esx_license/fxmanifest.lua @@ -0,0 +1,14 @@ +fx_version 'adamant' + +game 'gta5' + +description 'ESX License' +lua54 'yes' +version '1.9.0' + +server_scripts { + '@es_extended/imports.lua', + '@oxmysql/lib/MySQL.lua', + 'config.lua', + 'server/main.lua' +} diff --git a/[esx_addons]/esx_license/server/main.lua b/[esx_addons]/esx_license/server/main.lua new file mode 100644 index 00000000..89f2efe8 --- /dev/null +++ b/[esx_addons]/esx_license/server/main.lua @@ -0,0 +1,157 @@ +local licenses = {} + +MySQL.ready(function() + local p = promise.new() + MySQL.query('SELECT type, label FROM licenses', function(result) + licenses = result + p:resolve(true) + end) + Citizen.Await(p) + ESX.Trace('[esx_license] : ' .. #licenses .. ' Loaded.') +end) + +---@param identifier target identifier +---@param licenseType license type +---@param cb callback function +local function AddLicense(identifier, licenseType, cb) + MySQL.insert('INSERT INTO user_licenses (type, owner) VALUES (?, ?)', {licenseType, identifier}, function(rowsChanged) + if cb then + cb(rowsChanged) + end + end) +end + +---@param identifier target identifier +---@param licenseType license type +---@param cb callback function +local function RemoveLicense(identifier, licenseType, cb) + MySQL.update('DELETE FROM user_licenses WHERE type = ? AND owner = ?', {licenseType, identifier}, function(rowsChanged) + if cb then + cb(rowsChanged) + end + end) +end + +---@param licenseType license type +---@param cb callback function +local function GetLicense(licenseType, cb) + MySQL.scalar('SELECT label FROM licenses WHERE type = ?', {licenseType}, function(result) + if cb then + cb({type = licenseType, label = result}) + end + end) +end + +---@param identifier target identifier +---@param cb callback function +local function GetLicenses(identifier, cb) + MySQL.query('SELECT user_licenses.type, licenses.label FROM user_licenses LEFT JOIN licenses ON user_licenses.type = licenses.type WHERE owner = ?', {identifier}, + function(result) + if cb then + cb(result) + end + end) +end + +---@param identifier target identifier +---@param licenseType license type +---@param cb callback function +local function CheckLicense(identifier, licenseType, cb) + MySQL.scalar('SELECT type FROM user_licenses WHERE type = ? AND owner = ?', {licenseType, identifier}, function(result) + if cb then + if result then + cb(true) + else + cb(false) + end + end + end) +end + +local function GetLicensesList(cb) + cb(licenses) +end + +local function isValidLicense(licenseType) + local flag = false + for i=1,#licenses do + if licenses[i].type == licenseType then + flag = true + break + end + end + return flag +end + +AddEventHandler('esx_license:addLicense', function(target, licenseType, cb) + local xPlayer = ESX.GetPlayerFromId(target) + if xPlayer then + if isValidLicense(licenseType) then + AddLicense(xPlayer.getIdentifier(), licenseType, cb) + else + print('[esx_license] : missing license type in db ' .. licenseType .. ' or someone try to use lua executor id : ' .. target) + end + end +end) + +RegisterNetEvent('esx_license:removeLicense') +AddEventHandler('esx_license:removeLicense', function(target, licenseType, cb) + local xPlayer = ESX.GetPlayerFromId(source) + if xPlayer then + if Config.allowedJobs[xPlayer.getJob().name] then + local xTarget = ESX.GetPlayerFromId(target) + if xTarget then + RemoveLicense(xTarget.getIdentifier(), licenseType, cb) + end + else + xPlayer.showNotification('Your job is not allowed to remove the license', 'error', 3000) + end + end +end) + +AddEventHandler('esx_license:getLicense', function(licenseType, cb) + GetLicense(licenseType, cb) +end) + +AddEventHandler('esx_license:getLicenses', function(target, cb) + local xPlayer = ESX.GetPlayerFromId(target) + if xPlayer then + GetLicenses(xPlayer.getIdentifier(), cb) + end +end) + +AddEventHandler('esx_license:checkLicense', function(target, licenseType, cb) + local xPlayer = ESX.GetPlayerFromId(target) + if xPlayer then + CheckLicense(xPlayer.getIdentifier(), licenseType, cb) + end +end) + +AddEventHandler('esx_license:getLicensesList', function(cb) + GetLicensesList(cb) +end) + +ESX.RegisterServerCallback('esx_license:getLicense', function(source, cb, licenseType) + local xPlayer = ESX.GetPlayerFromId(source) + if xPlayer then + GetLicense(licenseType, cb) + end +end) + +ESX.RegisterServerCallback('esx_license:getLicenses', function(source, cb, target) + local xPlayer = ESX.GetPlayerFromId(target) + if xPlayer then + GetLicenses(xPlayer.getIdentifier(), cb) + end +end) + +ESX.RegisterServerCallback('esx_license:checkLicense', function(source, cb, target, licenseType) + local xPlayer = ESX.GetPlayerFromId(target) + if xPlayer then + CheckLicense(xPlayer.getIdentifier(), licenseType, cb) + end +end) + +ESX.RegisterServerCallback('esx_license:getLicensesList', function(source, cb) + GetLicensesList(cb) +end) \ No newline at end of file diff --git a/[esx_addons]/esx_lscustom/.editorconfig b/[esx_addons]/esx_lscustom/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_lscustom/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_lscustom/LICENSE b/[esx_addons]/esx_lscustom/LICENSE new file mode 100644 index 00000000..da132c68 --- /dev/null +++ b/[esx_addons]/esx_lscustom/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_lscustom + Copyright (C) 2015-2023 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 . + +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_lscustom Copyright (C) 2015-2023 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 +. + + 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 +. diff --git a/[esx_addons]/esx_lscustom/README.md b/[esx_addons]/esx_lscustom/README.md new file mode 100644 index 00000000..26aea734 --- /dev/null +++ b/[esx_addons]/esx_lscustom/README.md @@ -0,0 +1,17 @@ +# esx_lscustom + +## Requirements + +- [esx_vehicleshop](https://github.com/ESX-Org/esx_vehicleshop) + +## Legal + +esx_lscustoms - The best LS Custom out there for FX + +Copyright (C) 2015-2023 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/. \ No newline at end of file diff --git a/[esx_addons]/esx_lscustom/client/main.lua b/[esx_addons]/esx_lscustom/client/main.lua new file mode 100644 index 00000000..feeff260 --- /dev/null +++ b/[esx_addons]/esx_lscustom/client/main.lua @@ -0,0 +1,578 @@ +local Vehicles, myCar = {}, {} +local lsMenuIsShowed, HintDisplayed, isInLSMarker = false, false, false + +RegisterNetEvent('esx:playerLoaded') +AddEventHandler('esx:playerLoaded', function() + ESX.TriggerServerCallback('esx_lscustom:getVehiclesPrices', function(vehicles) + Vehicles = vehicles + end) +end) + +RegisterNetEvent('esx_lscustom:installMod') +AddEventHandler('esx_lscustom:installMod', function() + local vehicle = GetVehiclePedIsIn(PlayerPedId(), false) + local NetId = NetworkGetNetworkIdFromEntity(vehicle) + myCar = ESX.Game.GetVehicleProperties(vehicle) + TriggerServerEvent('esx_lscustom:refreshOwnedVehicle', myCar, NetId) +end) + +RegisterNetEvent('esx_lscustom:restoreMods', function(netId, props) + local xVehicle = NetworkGetEntityFromNetworkId(netId) + if props ~= nil then + if DoesEntityExist(xVehicle) then + ESX.Game.SetVehicleProperties(xVehicle, props) + end + end +end) + +RegisterNetEvent('esx_lscustom:cancelInstallMod') +AddEventHandler('esx_lscustom:cancelInstallMod', function() + local vehicle = GetVehiclePedIsIn(PlayerPedId(), false) + if (GetPedInVehicleSeat(vehicle, -1) ~= PlayerPedId()) then + vehicle = GetPlayersLastVehicle(PlayerPedId()) + end + ESX.Game.SetVehicleProperties(vehicle, myCar) + if not (myCar.modTurbo) then + ToggleVehicleMod(vehicle, 18, false) + end + if not (myCar.modXenon) then + ToggleVehicleMod(vehicle, 22, false) + end + if not (myCar.windowTint) then + SetVehicleWindowTint(vehicle, 0) + end +end) + +AddEventHandler('onClientResourceStop', function(resource) + if resource == GetCurrentResourceName() then + if lsMenuIsShowed then + TriggerEvent('esx_lscustom:cancelInstallMod') + end + end +end) + +AddEventHandler('onResourceStop', function(resource) + if resource == GetCurrentResourceName() then + if lsMenuIsShowed then + TriggerEvent('esx_lscustom:cancelInstallMod') + end + end +end) + +function OpenLSMenu(elems, menuName, menuTitle, parent) + ESX.UI.Menu.Open('default', GetCurrentResourceName(), menuName, { + title = menuTitle, + align = 'top-left', + elements = elems + }, function(data, menu) + local isRimMod, found = false, false + local vehicle = GetVehiclePedIsIn(PlayerPedId(), false) + + if data.current.modType == "modFrontWheels" then + isRimMod = true + end + + for k, v in pairs(Config.Menus) do + + if k == data.current.modType or isRimMod then + + if data.current.label == TranslateCap('by_default') or string.match(data.current.label, TranslateCap('installed')) then + ESX.ShowNotification(TranslateCap('already_own', data.current.label)) + myCar = ESX.Game.GetVehicleProperties(vehicle) + TriggerServerEvent('esx_lscustom:refreshOwnedVehicle', myCar, NetworkGetNetworkIdFromEntity(vehicle)) + else + local vehiclePrice = 50000 + + for i = 1, #Vehicles, 1 do + if GetEntityModel(vehicle) == joaat(Vehicles[i].model) then + vehiclePrice = Vehicles[i].price + break + end + end + + if isRimMod then + price = math.floor(vehiclePrice * data.current.price / 100) + TriggerServerEvent('esx_lscustom:buyMod', price) + elseif v.modType == 11 or v.modType == 12 or v.modType == 13 or v.modType == 15 or v.modType == 16 then + price = math.floor(vehiclePrice * v.price[data.current.modNum + 1] / 100) + TriggerServerEvent('esx_lscustom:buyMod', price) + elseif v.modType == 17 then + price = math.floor(vehiclePrice * v.price[1] / 100) + TriggerServerEvent('esx_lscustom:buyMod', price) + else + price = math.floor(vehiclePrice * v.price / 100) + TriggerServerEvent('esx_lscustom:buyMod', price) + end + end + + menu.close() + found = true + break + end + + end + + if not found then + GetAction(data.current) + end + end, function(data, menu) -- on cancel + menu.close() + TriggerEvent('esx_lscustom:cancelInstallMod') + + local playerPed = PlayerPedId() + local vehicle = GetVehiclePedIsIn(playerPed, false) + SetVehicleDoorsShut(vehicle, false) + + if parent == nil then + lsMenuIsShowed = false + local vehicle = GetVehiclePedIsIn(PlayerPedId(), false) + FreezeEntityPosition(vehicle, false) + TriggerServerEvent('esx_lscustom:stopModing', myCar.plate) + myCar = {} + end + end, function(data, menu) -- on change + UpdateMods(data.current) + end) +end + +function UpdateMods(data) + local vehicle = GetVehiclePedIsIn(PlayerPedId(), false) + + if data.modType then + local props = {} + + if data.wheelType then + props['wheels'] = data.wheelType + + if GetVehicleClass(vehicle) == 8 then -- Fix bug wheels for bikes. + props['modBackWheels'] = data.modNum + end + + ESX.Game.SetVehicleProperties(vehicle, props) + props = {} + elseif data.modType == 'neonColor' then + if data.modNum[1] == 0 and data.modNum[2] == 0 and data.modNum[3] == 0 then + props['neonEnabled'] = {false, false, false, false} + else + props['neonEnabled'] = {true, true, true, true} + end + ESX.Game.SetVehicleProperties(vehicle, props) + props = {} + elseif data.modType == 'tyreSmokeColor' then + props['modSmokeEnabled'] = true + ESX.Game.SetVehicleProperties(vehicle, props) + props = {} + elseif data.modType == 'xenonColor' then + if data.modNum then + props['modXenon'] = true + else + props['modXenon'] = false + end + ESX.Game.SetVehicleProperties(vehicle, props) + props = {} + end + + props[data.modType] = data.modNum + ESX.Game.SetVehicleProperties(vehicle, props) + end +end + +function GetAction(data) + local elements = {} + local menuName = '' + local menuTitle = '' + local parent = nil + + local playerPed = PlayerPedId() + local vehicle = GetVehiclePedIsIn(playerPed, false) + local currentMods = ESX.Game.GetVehicleProperties(vehicle) + if data.value == 'modSpeakers' or data.value == 'modTrunk' or data.value == 'modHydrolic' or data.value == + 'modEngineBlock' or data.value == 'modAirFilter' or data.value == 'modStruts' or data.value == 'modTank' then + SetVehicleDoorOpen(vehicle, 4, false) + SetVehicleDoorOpen(vehicle, 5, false) + elseif data.value == 'modDoorSpeaker' then + SetVehicleDoorOpen(vehicle, 0, false) + SetVehicleDoorOpen(vehicle, 1, false) + SetVehicleDoorOpen(vehicle, 2, false) + SetVehicleDoorOpen(vehicle, 3, false) + else + SetVehicleDoorsShut(vehicle, false) + end + + local vehiclePrice = 50000 + + for i = 1, #Vehicles, 1 do + if GetEntityModel(vehicle) == joaat(Vehicles[i].model) then + vehiclePrice = Vehicles[i].price + break + end + end + + for k, v in pairs(Config.Menus) do + + if data.value == k then + + menuName = k + menuTitle = v.label + parent = v.parent + + if v.modType then + + if v.modType == 22 or v.modType == 'xenonColor' then + table.insert(elements, { + label = " " .. TranslateCap('by_default'), + modType = k, + modNum = false + }) + elseif v.modType == 'neonColor' or v.modType == 'tyreSmokeColor' then -- disable neon + table.insert(elements, { + label = " " .. TranslateCap('by_default'), + modType = k, + modNum = {0, 0, 0} + }) + elseif v.modType == 'color1' or v.modType == 'color2' or v.modType == 'pearlescentColor' or v.modType == + 'wheelColor' then + local num = myCar[v.modType] + table.insert(elements, { + label = " " .. TranslateCap('by_default'), + modType = k, + modNum = num + }) + elseif v.modType == 17 then + table.insert(elements, { + label = " " .. TranslateCap('no_turbo'), + modType = k, + modNum = false + }) + elseif v.modType == 23 then + table.insert(elements, { + label = " " .. TranslateCap('by_default'), + modType = "modFrontWheels", + modNum = -1, + wheelType = -1, + price = Config.DefaultWheelsPriceMultiplier + }) + else + table.insert(elements, { + label = " " .. TranslateCap('by_default'), + modType = k, + modNum = -1 + }) + end + + if v.modType == 14 then -- HORNS + for j = 0, 51, 1 do + local _label = '' + if j == currentMods.modHorns then + _label = GetHornName(j) .. ' - ' .. TranslateCap('installed') .. + '' + else + price = math.floor(vehiclePrice * v.price / 100) + _label = GetHornName(j) .. ' - $' .. price .. ' ' + end + table.insert(elements, { + label = _label, + modType = k, + modNum = j + }) + end + elseif v.modType == 'plateIndex' then -- PLATES + for j = 0, 4, 1 do + local _label = '' + if j == currentMods.plateIndex then + _label = GetPlatesName(j) .. ' - ' .. TranslateCap('installed') .. + '' + else + price = math.floor(vehiclePrice * v.price / 100) + _label = GetPlatesName(j) .. ' - $' .. price .. ' ' + end + table.insert(elements, { + label = _label, + modType = k, + modNum = j + }) + end + elseif v.modType == 22 then -- NEON + local _label = '' + if currentMods.modXenon then + _label = TranslateCap('neon') .. ' - ' .. TranslateCap('installed') .. '' + else + price = math.floor(vehiclePrice * v.price / 100) + _label = TranslateCap('neon') .. ' - $' .. price .. ' ' + end + table.insert(elements, { + label = _label, + modType = k, + modNum = true + }) + elseif v.modType == 'xenonColor' then -- XENON COLOR + local xenonColors = GetXenonColors() + price = math.floor(vehiclePrice * v.price / 100) + for i = 1, #xenonColors, 1 do + table.insert(elements, { + label = xenonColors[i].label .. ' - $' .. price .. '', + modType = k, + modNum = xenonColors[i].index + }) + end + elseif v.modType == 'neonColor' or v.modType == 'tyreSmokeColor' then -- NEON & SMOKE COLOR + local neons = GetNeons() + price = math.floor(vehiclePrice * v.price / 100) + for i = 1, #neons, 1 do + table.insert(elements, { + label = '' .. neons[i].label .. ' - $' .. price .. '', + modType = k, + modNum = {neons[i].r, neons[i].g, neons[i].b} + }) + end + elseif v.modType == 'color1' or v.modType == 'color2' or v.modType == 'pearlescentColor' or v.modType == + 'wheelColor' then -- RESPRAYS + local colors = GetColors(data.color) + for j = 1, #colors, 1 do + local _label = '' + price = math.floor(vehiclePrice * v.price / 100) + _label = colors[j].label .. ' - $' .. price .. ' ' + table.insert(elements, { + label = _label, + modType = k, + modNum = colors[j].index + }) + end + elseif v.modType == 'windowTint' then -- WINDOWS TINT + for j = 1, 5, 1 do + local _label = '' + if j == currentMods.modHorns then + _label = GetWindowName(j) .. ' - ' .. TranslateCap('installed') .. + '' + else + price = math.floor(vehiclePrice * v.price / 100) + _label = GetWindowName(j) .. ' - $' .. price .. ' ' + end + table.insert(elements, { + label = _label, + modType = k, + modNum = j + }) + end + elseif v.modType == 23 then -- WHEELS RIM & TYPE + local props = {} + + props['wheels'] = v.wheelType + ESX.Game.SetVehicleProperties(vehicle, props) + + local modCount = GetNumVehicleMods(vehicle, v.modType) + for j = 0, modCount, 1 do + local modName = GetModTextLabel(vehicle, v.modType, j) + if modName then + local _label = '' + if j == currentMods.modFrontWheels then + _label = GetLabelText(modName) .. ' - ' .. + TranslateCap('installed') .. '' + else + price = math.floor(vehiclePrice * v.price / 100) + _label = GetLabelText(modName) .. ' - $' .. price .. + ' ' + end + table.insert(elements, { + label = _label, + modType = 'modFrontWheels', + modNum = j, + wheelType = v.wheelType, + price = v.price + }) + end + end + elseif v.modType == 11 or v.modType == 12 or v.modType == 13 or v.modType == 15 or v.modType == 16 then + SetVehicleModKit(vehicle, 0) + local modCount = GetNumVehicleMods(vehicle, v.modType) -- UPGRADES + for j = 0, modCount, 1 do + local _label = '' + if j == currentMods[k] then + _label = + TranslateCap('level', j + 1) .. ' - ' .. TranslateCap('installed') .. + '' + else + price = math.floor(vehiclePrice * v.price[j + 1] / 100) + _label = TranslateCap('level', j + 1) .. ' - $' .. price .. ' ' + end + table.insert(elements, { + label = _label, + modType = k, + modNum = j + }) + if j == modCount - 1 then + break + end + end + elseif v.modType == 17 then -- TURBO + local _label = '' + if currentMods[k] then + _label = 'Turbo - ' .. TranslateCap('installed') .. '' + else + _label = + 'Turbo - $' .. math.floor(vehiclePrice * v.price[1] / 100) .. + ' ' + end + table.insert(elements, { + label = _label, + modType = k, + modNum = true + }) + else + local modCount = GetNumVehicleMods(vehicle, v.modType) -- BODYPARTS + for j = 0, modCount, 1 do + local modName = GetModTextLabel(vehicle, v.modType, j) + if modName then + local _label = '' + if j == currentMods[k] then + _label = GetLabelText(modName) .. ' - ' .. + TranslateCap('installed') .. '' + else + price = math.floor(vehiclePrice * v.price / 100) + _label = GetLabelText(modName) .. ' - $' .. price .. + ' ' + end + table.insert(elements, { + label = _label, + modType = k, + modNum = j + }) + end + end + end + else + if data.value == 'primaryRespray' or data.value == 'secondaryRespray' or data.value == + 'pearlescentRespray' or data.value == 'modFrontWheelsColor' then + for i = 1, #Config.Colors, 1 do + if data.value == 'primaryRespray' then + table.insert(elements, { + label = Config.Colors[i].label, + value = 'color1', + color = Config.Colors[i].value + }) + elseif data.value == 'secondaryRespray' then + table.insert(elements, { + label = Config.Colors[i].label, + value = 'color2', + color = Config.Colors[i].value + }) + elseif data.value == 'pearlescentRespray' then + table.insert(elements, { + label = Config.Colors[i].label, + value = 'pearlescentColor', + color = Config.Colors[i].value + }) + elseif data.value == 'modFrontWheelsColor' then + table.insert(elements, { + label = Config.Colors[i].label, + value = 'wheelColor', + color = Config.Colors[i].value + }) + end + end + else + for l, w in pairs(v) do + if l ~= 'label' and l ~= 'parent' then + table.insert(elements, { + label = w, + value = l + }) + end + end + end + end + break + end + end + + table.sort(elements, function(a, b) + return a.label < b.label + end) + + OpenLSMenu(elements, menuName, menuTitle, parent) +end + +-- Blips +CreateThread(function() + for k, v in pairs(Config.Zones) do + local blip = AddBlipForCoord(v.Pos.x, v.Pos.y, v.Pos.z) + + SetBlipSprite(blip, 72) + SetBlipScale(blip, 0.8) + SetBlipAsShortRange(blip, true) + + BeginTextCommandSetBlipName('STRING') + AddTextComponentSubstringPlayerName(v.Name) + EndTextCommandSetBlipName(blip) + end +end) + +-- Activate menu when player is inside marker +CreateThread(function() + while true do + local Sleep = 1500 + local Near = false + local playerPed = PlayerPedId() + + if IsPedInAnyVehicle(playerPed, false) then + local coords = GetEntityCoords(playerPed) + local currentZone, zone, lastZone + + if (ESX.PlayerData.job and ESX.PlayerData.job.name == 'mechanic') or not Config.IsMechanicJobOnly then + for k, v in pairs(Config.Zones) do + local zonePos = vector3(v.Pos.x, v.Pos.y, v.Pos.z) + if #(coords - zonePos) < 10.0 then + Near = true + Sleep = 0 + if not lsMenuIsShowed then + if not HintDisplayed then + HintDisplayed = true + ESX.TextUI(v.Hint) + end + if IsControlJustReleased(0, 38) then + lsMenuIsShowed = true + + local vehicle = GetVehiclePedIsIn(playerPed, false) + FreezeEntityPosition(vehicle, true) + myCar = ESX.Game.GetVehicleProperties(vehicle) + + local netId = NetworkGetNetworkIdFromEntity(vehicle) + TriggerServerEvent('esx_lscustom:startModing', myCar, netId) + + ESX.UI.Menu.CloseAll() + GetAction({ + value = 'main' + }) + + -- Prevent Free Tunning Bug + CreateThread(function() + while true do + local Sleep = 1000 + if lsMenuIsShowed then + Sleep = 0 + DisableControlAction(2, 288, true) + DisableControlAction(2, 289, true) + DisableControlAction(2, 170, true) + DisableControlAction(2, 167, true) + DisableControlAction(2, 168, true) + DisableControlAction(2, 23, true) + DisableControlAction(0, 75, true) -- Disable exit vehicle + DisableControlAction(27, 75, true) -- Disable exit vehicle + end + Wait(Sleep) + end + end) + end + end + end + end + if not Near and HintDisplayed then + HintDisplayed = false + ESX.HideUI() + end + end + end + Wait(Sleep) + end +end) diff --git a/[esx_addons]/esx_lscustom/config.lua b/[esx_addons]/esx_lscustom/config.lua new file mode 100644 index 00000000..d3e6f83e --- /dev/null +++ b/[esx_addons]/esx_lscustom/config.lua @@ -0,0 +1,940 @@ +Config = {} +Config.DrawDistance = 10.0 +Config.Locale = GetConvar('esx:locale', 'en') +Config.IsMechanicJobOnly = false + +Config.Zones = { + + ls1 = { + Pos = { x = -337.38, y = -136.92, z = 38.57}, + Size = {x = 3.0, y = 3.0, z = 0.2}, + Color = {r = 204, g = 204, b = 0}, + Marker= 1, + Name = TranslateCap('blip_name'), + Hint = TranslateCap('press_custom') + }, + + ls2 = { + Pos = { x = -1155.53, y = -2007.18, z = 12.74}, + Size = {x = 3.0, y = 3.0, z = 0.2}, + Color = {r = 204, g = 204, b = 0}, + Marker= 1, + Name = TranslateCap('blip_name'), + Hint = TranslateCap('press_custom') + }, + + ls3 = { + Pos = { x = 731.81, y = -1088.82, z = 21.73}, + Size = {x = 3.0, y = 3.0, z = 0.2}, + Color = {r = 204, g = 204, b = 0}, + Marker= 1, + Name = TranslateCap('blip_name'), + Hint = TranslateCap('press_custom') + }, + + ls4 = { + Pos = { x = 1175.04, y = 2640.21, z = 37.32}, + Size = {x = 3.0, y = 3.0, z = 0.2}, + Color = {r = 204, g = 204, b = 0}, + Marker= 1, + Name = TranslateCap('blip_name'), + Hint = TranslateCap('press_custom') + }, + + ls5 = { + Pos = { x = 110.99, y = 6626.39, z = 30.89}, + Size = {x = 3.0, y = 3.0, z = 0.2}, + Color = {r = 204, g = 204, b = 0}, + Marker= 1, + Name = TranslateCap('blip_name'), + Hint = TranslateCap('press_custom') + } + +} + +Config.Colors = { + {label = TranslateCap('black'), value = 'black'}, + {label = TranslateCap('white'), value = 'white'}, + {label = TranslateCap('grey'), value = 'grey'}, + {label = TranslateCap('red'), value = 'red'}, + {label = TranslateCap('pink'), value = 'pink'}, + {label = TranslateCap('blue'), value = 'blue'}, + {label = TranslateCap('yellow'), value = 'yellow'}, + {label = TranslateCap('green'), value = 'green'}, + {label = TranslateCap('orange'), value = 'orange'}, + {label = TranslateCap('brown'), value = 'brown'}, + {label = TranslateCap('purple'), value = 'purple'}, + {label = TranslateCap('chrome'), value = 'chrome'}, + {label = TranslateCap('gold'), value = 'gold'} +} + +Config.DefaultWheelsPriceMultiplier = 2 + +function GetColors(color) + local colors = {} + if color == 'black' then + colors = { + { index = 0, label = TranslateCap('black')}, + { index = 1, label = TranslateCap('graphite')}, + { index = 2, label = TranslateCap('black_metallic')}, + { index = 3, label = TranslateCap('caststeel')}, + { index = 11, label = TranslateCap('black_anth')}, + { index = 12, label = TranslateCap('matteblack')}, + { index = 15, label = TranslateCap('darknight')}, + { index = 16, label = TranslateCap('deepblack')}, + { index = 21, label = TranslateCap('oil')}, + { index = 147, label = TranslateCap('carbon')} + } + elseif color == 'white' then + colors = { + { index = 106, label = TranslateCap('vanilla')}, + { index = 107, label = TranslateCap('creme')}, + { index = 111, label = TranslateCap('white')}, + { index = 112, label = TranslateCap('polarwhite')}, + { index = 113, label = TranslateCap('beige')}, + { index = 121, label = TranslateCap('mattewhite')}, + { index = 122, label = TranslateCap('snow')}, + { index = 131, label = TranslateCap('cotton')}, + { index = 132, label = TranslateCap('alabaster')}, + { index = 134, label = TranslateCap('purewhite')} + } + elseif color == 'grey' then + colors = { + { index = 4, label = TranslateCap('silver')}, + { index = 5, label = TranslateCap('metallicgrey')}, + { index = 6, label = TranslateCap('laminatedsteel')}, + { index = 7, label = TranslateCap('darkgray')}, + { index = 8, label = TranslateCap('rockygray')}, + { index = 9, label = TranslateCap('graynight')}, + { index = 10, label = TranslateCap('aluminum')}, + { index = 13, label = TranslateCap('graymat')}, + { index = 14, label = TranslateCap('lightgrey')}, + { index = 17, label = TranslateCap('asphaltgray')}, + { index = 18, label = TranslateCap('grayconcrete')}, + { index = 19, label = TranslateCap('darksilver')}, + { index = 20, label = TranslateCap('magnesite')}, + { index = 22, label = TranslateCap('nickel')}, + { index = 23, label = TranslateCap('zinc')}, + { index = 24, label = TranslateCap('dolomite')}, + { index = 25, label = TranslateCap('bluesilver')}, + { index = 26, label = TranslateCap('titanium')}, + { index = 66, label = TranslateCap('steelblue')}, + { index = 93, label = TranslateCap('champagne')}, + { index = 144, label = TranslateCap('grayhunter')}, + { index = 156, label = TranslateCap('grey')} + } + elseif color == 'red' then + colors = { + { index = 27, label = TranslateCap('red')}, + { index = 28, label = TranslateCap('torino_red')}, + { index = 29, label = TranslateCap('poppy')}, + { index = 30, label = TranslateCap('copper_red')}, + { index = 31, label = TranslateCap('cardinal')}, + { index = 32, label = TranslateCap('brick')}, + { index = 33, label = TranslateCap('garnet')}, + { index = 34, label = TranslateCap('cabernet')}, + { index = 35, label = TranslateCap('candy')}, + { index = 39, label = TranslateCap('matte_red')}, + { index = 40, label = TranslateCap('dark_red')}, + { index = 43, label = TranslateCap('red_pulp')}, + { index = 44, label = TranslateCap('bril_red')}, + { index = 46, label = TranslateCap('pale_red')}, + { index = 143, label = TranslateCap('wine_red')}, + { index = 150, label = TranslateCap('volcano')} + } + elseif color == 'pink' then + colors = { + { index = 135, label = TranslateCap('electricpink')}, + { index = 136, label = TranslateCap('salmon')}, + { index = 137, label = TranslateCap('sugarplum')} + } + elseif color == 'blue' then + colors = { + { index = 54, label = TranslateCap('topaz')}, + { index = 60, label = TranslateCap('light_blue')}, + { index = 61, label = TranslateCap('galaxy_blue')}, + { index = 62, label = TranslateCap('dark_blue')}, + { index = 63, label = TranslateCap('azure')}, + { index = 64, label = TranslateCap('navy_blue')}, + { index = 65, label = TranslateCap('lapis')}, + { index = 67, label = TranslateCap('blue_diamond')}, + { index = 68, label = TranslateCap('surfer')}, + { index = 69, label = TranslateCap('pastel_blue')}, + { index = 70, label = TranslateCap('celeste_blue')}, + { index = 73, label = TranslateCap('rally_blue')}, + { index = 74, label = TranslateCap('blue_paradise')}, + { index = 75, label = TranslateCap('blue_night')}, + { index = 77, label = TranslateCap('cyan_blue')}, + { index = 78, label = TranslateCap('cobalt')}, + { index = 79, label = TranslateCap('electric_blue')}, + { index = 80, label = TranslateCap('horizon_blue')}, + { index = 82, label = TranslateCap('metallic_blue')}, + { index = 83, label = TranslateCap('aquamarine')}, + { index = 84, label = TranslateCap('blue_agathe')}, + { index = 85, label = TranslateCap('zirconium')}, + { index = 86, label = TranslateCap('spinel')}, + { index = 87, label = TranslateCap('tourmaline')}, + { index = 127, label = TranslateCap('paradise')}, + { index = 140, label = TranslateCap('bubble_gum')}, + { index = 141, label = TranslateCap('midnight_blue')}, + { index = 146, label = TranslateCap('forbidden_blue')}, + { index = 157, label = TranslateCap('glacier_blue')} + } + elseif color == 'yellow' then + colors = { + { index = 42, label = TranslateCap('yellow')}, + { index = 88, label = TranslateCap('wheat')}, + { index = 89, label = TranslateCap('raceyellow')}, + { index = 91, label = TranslateCap('paleyellow')}, + { index = 126, label = TranslateCap('lightyellow')} + } + elseif color == 'green' then + colors = { + { index = 49, label = TranslateCap('met_dark_green')}, + { index = 50, label = TranslateCap('rally_green')}, + { index = 51, label = TranslateCap('pine_green')}, + { index = 52, label = TranslateCap('olive_green')}, + { index = 53, label = TranslateCap('light_green')}, + { index = 55, label = TranslateCap('lime_green')}, + { index = 56, label = TranslateCap('forest_green')}, + { index = 57, label = TranslateCap('lawn_green')}, + { index = 58, label = TranslateCap('imperial_green')}, + { index = 59, label = TranslateCap('green_bottle')}, + { index = 92, label = TranslateCap('citrus_green')}, + { index = 125, label = TranslateCap('green_anis')}, + { index = 128, label = TranslateCap('khaki')}, + { index = 133, label = TranslateCap('army_green')}, + { index = 151, label = TranslateCap('dark_green')}, + { index = 152, label = TranslateCap('hunter_green')}, + { index = 155, label = TranslateCap('matte_foilage_green')} + } + elseif color == 'orange' then + colors = { + { index = 36, label = TranslateCap('tangerine')}, + { index = 38, label = TranslateCap('orange')}, + { index = 41, label = TranslateCap('matteorange')}, + { index = 123, label = TranslateCap('lightorange')}, + { index = 124, label = TranslateCap('peach')}, + { index = 130, label = TranslateCap('pumpkin')}, + { index = 138, label = TranslateCap('orangelambo')} + } + elseif color == 'brown' then + colors = { + { index = 45, label = TranslateCap('copper')}, + { index = 47, label = TranslateCap('lightbrown')}, + { index = 48, label = TranslateCap('darkbrown')}, + { index = 90, label = TranslateCap('bronze')}, + { index = 94, label = TranslateCap('brownmetallic')}, + { index = 95, label = TranslateCap('expresso')}, + { index = 96, label = TranslateCap('chocolate')}, + { index = 97, label = TranslateCap('terracotta')}, + { index = 98, label = TranslateCap('marble')}, + { index = 99, label = TranslateCap('sand')}, + { index = 100, label = TranslateCap('sepia')}, + { index = 101, label = TranslateCap('bison')}, + { index = 102, label = TranslateCap('palm')}, + { index = 103, label = TranslateCap('caramel')}, + { index = 104, label = TranslateCap('rust')}, + { index = 105, label = TranslateCap('chestnut')}, + { index = 108, label = TranslateCap('brown')}, + { index = 109, label = TranslateCap('hazelnut')}, + { index = 110, label = TranslateCap('shell')}, + { index = 114, label = TranslateCap('mahogany')}, + { index = 115, label = TranslateCap('cauldron')}, + { index = 116, label = TranslateCap('blond')}, + { index = 129, label = TranslateCap('gravel')}, + { index = 153, label = TranslateCap('darkearth')}, + { index = 154, label = TranslateCap('desert')} + } + elseif color == 'purple' then + colors = { + { index = 71, label = TranslateCap('indigo')}, + { index = 72, label = TranslateCap('deeppurple')}, + { index = 76, label = TranslateCap('darkviolet')}, + { index = 81, label = TranslateCap('amethyst')}, + { index = 142, label = TranslateCap('mysticalviolet')}, + { index = 145, label = TranslateCap('purplemetallic')}, + { index = 148, label = TranslateCap('matteviolet')}, + { index = 149, label = TranslateCap('mattedeeppurple')} + } + elseif color == 'chrome' then + colors = { + { index = 117, label = TranslateCap('brushedchrome')}, + { index = 118, label = TranslateCap('blackchrome')}, + { index = 119, label = TranslateCap('brushedaluminum')}, + { index = 120, label = TranslateCap('chrome')} + } + elseif color == 'gold' then + colors = { + { index = 37, label = TranslateCap('gold')}, + { index = 158, label = TranslateCap('puregold')}, + { index = 159, label = TranslateCap('brushedgold')}, + { index = 160, label = TranslateCap('lightgold')} + } + end + return colors +end + +function GetWindowName(index) + if (index == 1) then + return "Pure Black" + elseif (index == 2) then + return "Darksmoke" + elseif (index == 3) then + return "Lightsmoke" + elseif (index == 4) then + return "Limo" + elseif (index == 5) then + return "Green" + else + return "Unknown" + end +end + +function GetHornName(index) + if (index == 0) then + return "Truck Horn" + elseif (index == 1) then + return "Cop Horn" + elseif (index == 2) then + return "Clown Horn" + elseif (index == 3) then + return "Musical Horn 1" + elseif (index == 4) then + return "Musical Horn 2" + elseif (index == 5) then + return "Musical Horn 3" + elseif (index == 6) then + return "Musical Horn 4" + elseif (index == 7) then + return "Musical Horn 5" + elseif (index == 8) then + return "Sad Trombone" + elseif (index == 9) then + return "Classical Horn 1" + elseif (index == 10) then + return "Classical Horn 2" + elseif (index == 11) then + return "Classical Horn 3" + elseif (index == 12) then + return "Classical Horn 4" + elseif (index == 13) then + return "Classical Horn 5" + elseif (index == 14) then + return "Classical Horn 6" + elseif (index == 15) then + return "Classical Horn 7" + elseif (index == 16) then + return "Scale - Do" + elseif (index == 17) then + return "Scale - Re" + elseif (index == 18) then + return "Scale - Mi" + elseif (index == 19) then + return "Scale - Fa" + elseif (index == 20) then + return "Scale - Sol" + elseif (index == 21) then + return "Scale - La" + elseif (index == 22) then + return "Scale - Ti" + elseif (index == 23) then + return "Scale - Do" + elseif (index == 24) then + return "Jazz Horn 1" + elseif (index == 25) then + return "Jazz Horn 2" + elseif (index == 26) then + return "Jazz Horn 3" + elseif (index == 27) then + return "Jazz Horn Loop" + elseif (index == 28) then + return "Star Spangled Banner 1" + elseif (index == 29) then + return "Star Spangled Banner 2" + elseif (index == 30) then + return "Star Spangled Banner 3" + elseif (index == 31) then + return "Star Spangled Banner 4" + elseif (index == 32) then + return "Classical Horn 8 Loop" + elseif (index == 33) then + return "Classical Horn 9 Loop" + elseif (index == 34) then + return "Classical Horn 10 Loop" + elseif (index == 35) then + return "Classical Horn 8" + elseif (index == 36) then + return "Classical Horn 9" + elseif (index == 37) then + return "Classical Horn 10" + elseif (index == 38) then + return "Funeral Loop" + elseif (index == 39) then + return "Funeral" + elseif (index == 40) then + return "Spooky Loop" + elseif (index == 41) then + return "Spooky" + elseif (index == 42) then + return "San Andreas Loop" + elseif (index == 43) then + return "San Andreas" + elseif (index == 44) then + return "Liberty City Loop" + elseif (index == 45) then + return "Liberty City" + elseif (index == 46) then + return "Festive 1 Loop" + elseif (index == 47) then + return "Festive 1" + elseif (index == 48) then + return "Festive 2 Loop" + elseif (index == 49) then + return "Festive 2" + elseif (index == 50) then + return "Festive 3 Loop" + elseif (index == 51) then + return "Festive 3" + else + return "Unknown Horn" + end +end + +function GetNeons() + local neons = { + {label = TranslateCap('white'), r = 255, g = 255, b = 255}, + {label = "Slate Gray", r = 112, g = 128, b = 144}, + {label = "Blue", r = 0, g = 0, b = 255}, + {label = "Light Blue", r = 0, g = 150, b = 255}, + {label = "Navy Blue", r = 0, g = 0, b = 128}, + {label = "Sky Blue", r = 135, g = 206, b = 235}, + {label = "Turquoise", r = 0, g = 245, b = 255}, + {label = "Mint Green", r = 50, g = 255, b = 155}, + {label = "Lime Green", r = 0, g = 255, b = 0}, + {label = "Olive", r = 128, g = 128, b = 0}, + {label = TranslateCap('yellow'), r = 255, g = 255, b = 0}, + {label = TranslateCap('gold'), r = 255, g = 215, b = 0}, + {label = TranslateCap('orange'), r = 255, g = 165, b = 0}, + {label = TranslateCap('wheat'), r = 245, g = 222, b = 179}, + {label = TranslateCap('red'), r = 255, g = 0, b = 0}, + {label = TranslateCap('pink'), r = 255, g = 161, b = 211}, + {label = TranslateCap('brightpink'), r = 255, g = 0, b = 255}, + {label = TranslateCap('purple'), r = 153, g = 0, b = 153}, + {label = "Ivory", r = 41, g = 36, b = 33} + } + + return neons +end + +function GetXenonColors() + local xenonColors = { + {label = TranslateCap('neon'), index = -1}, + {label = TranslateCap('white'), index = 0}, + {label = TranslateCap('blue'), index = 1}, + {label = TranslateCap('electric_blue'), index = 2}, + {label = TranslateCap('mintgreen'), index = 3}, + {label = TranslateCap('lime_green'), index = 4}, + {label = TranslateCap('yellow'), index = 5}, + {label = TranslateCap('goldenshower'), index = 6}, + {label = TranslateCap('orange'), index = 7}, + {label = TranslateCap('red'), index = 8}, + {label = TranslateCap('ponypink'), index = 9}, + {label = TranslateCap('hotpink'), index = 10}, + {label = TranslateCap('purple'), index = 11}, + {label = TranslateCap('blacklight'), index = 11}, + } + + return xenonColors +end + +function GetPlatesName(index) + if (index == 0) then + return TranslateCap('blue_on_white_1') + elseif (index == 1) then + return TranslateCap('yellow_on_black') + elseif (index == 2) then + return TranslateCap('yellow_blue') + elseif (index == 3) then + return TranslateCap('blue_on_white_2') + elseif (index == 4) then + return TranslateCap('blue_on_white_3') + end +end + +Config.Menus = { + main = { + label = 'LS CUSTOMS', + parent = nil, + upgrades = TranslateCap('upgrades'), + cosmetics = TranslateCap('cosmetics') + }, + upgrades = { + label = TranslateCap('upgrades'), + parent = 'main', + modEngine = TranslateCap('engine'), + modBrakes = TranslateCap('brakes'), + modTransmission = TranslateCap('transmission'), + modSuspension = TranslateCap('suspension'), + modArmor = TranslateCap('armor'), + modTurbo = TranslateCap('turbo') + }, + modEngine = { + label = TranslateCap('engine'), + parent = 'upgrades', + modType = 11, + price = {13.95, 27.9, 55.8, 111.6, 139.53} + }, + modBrakes = { + label = TranslateCap('brakes'), + parent = 'upgrades', + modType = 12, + price = {4.65, 9.3, 13.95, 18.6} + }, + modTransmission = { + label = TranslateCap('transmission'), + parent = 'upgrades', + modType = 13, + price = {13.95, 20.93, 46.51, 63.55} + }, + modSuspension = { + label = TranslateCap('suspension'), + parent = 'upgrades', + modType = 15, + price = {3.72, 7.44, 14.88, 29.77, 40.2} + }, + modArmor = { + label = TranslateCap('armor'), + parent = 'upgrades', + modType = 16, + price = {69.77, 116.28, 130.00, 150.00, 180.00, 190.00} + }, + modTurbo = { + label = TranslateCap('turbo'), + parent = 'upgrades', + modType = 17, + price = {55.81} + }, + cosmetics = { + label = TranslateCap('cosmetics'), + parent = 'main', + bodyparts = TranslateCap('bodyparts'), + windowTint = TranslateCap('windowtint'), + modHorns = TranslateCap('horns'), + neonColor = TranslateCap('neons'), + resprays = TranslateCap('respray'), + -- modXenon = TranslateCap('headlights'), + xenonColor = TranslateCap('headlights'), + plateIndex = TranslateCap('licenseplates'), + wheels = TranslateCap('wheels'), + modPlateHolder = TranslateCap('modplateholder'), + modVanityPlate = TranslateCap('modvanityplate'), + modTrimA = TranslateCap('interior'), + modOrnaments = TranslateCap('trim'), + modDashboard = TranslateCap('dashboard'), + modDial = TranslateCap('speedometer'), + modDoorSpeaker = TranslateCap('door_speakers'), + modSeats = TranslateCap('seats'), + modSteeringWheel = TranslateCap('steering_wheel'), + modShifterLeavers = TranslateCap('gear_lever'), + modAPlate = TranslateCap('quarter_deck'), + modSpeakers = TranslateCap('speakers'), + modTrunk = TranslateCap('trunk'), + modHydrolic = TranslateCap('hydraulic'), + modEngineBlock = TranslateCap('engine_block'), + modAirFilter = TranslateCap('air_filter'), + modStruts = TranslateCap('struts'), + modArchCover = TranslateCap('arch_cover'), + modAerials = TranslateCap('aerials'), + modTrimB = TranslateCap('wings'), + modTank = TranslateCap('fuel_tank'), + modWindows = TranslateCap('windows'), + modLivery = TranslateCap('stickers') + }, + + modPlateHolder = { + label = TranslateCap('modplateholder'), + parent = 'cosmetics', + modType = 25, + price = 3.49 + }, + modVanityPlate = { + label = TranslateCap('modvanityplate'), + parent = 'cosmetics', + modType = 26, + price = 1.1 + }, + modTrimA = { + label = TranslateCap('interior'), + parent = 'cosmetics', + modType = 27, + price = 6.98 + }, + modOrnaments = { + label = TranslateCap('trim'), + parent = 'cosmetics', + modType = 28, + price = 0.9 + }, + modDashboard = { + label = TranslateCap('dashboard'), + parent = 'cosmetics', + modType = 29, + price = 4.65 + }, + modDial = { + label = TranslateCap('speedometer'), + parent = 'cosmetics', + modType = 30, + price = 4.19 + }, + modDoorSpeaker = { + label = TranslateCap('door_speakers'), + parent = 'cosmetics', + modType = 31, + price = 5.58 + }, + modSeats = { + label = TranslateCap('seats'), + parent = 'cosmetics', + modType = 32, + price = 4.65 + }, + modSteeringWheel = { + label = TranslateCap('steering_wheel'), + parent = 'cosmetics', + modType = 33, + price = 4.19 + }, + modShifterLeavers = { + label = TranslateCap('gear_lever'), + parent = 'cosmetics', + modType = 34, + price = 3.26 + }, + modAPlate = { + label = TranslateCap('quarter_deck'), + parent = 'cosmetics', + modType = 35, + price = 4.19 + }, + modSpeakers = { + label = TranslateCap('speakers'), + parent = 'cosmetics', + modType = 36, + price = 6.98 + }, + modTrunk = { + label = TranslateCap('trunk'), + parent = 'cosmetics', + modType = 37, + price = 5.58 + }, + modHydrolic = { + label = TranslateCap('hydraulic'), + parent = 'cosmetics', + modType = 38, + price = 5.12 + }, + modEngineBlock = { + label = TranslateCap('engine_block'), + parent = 'cosmetics', + modType = 39, + price = 5.12 + }, + modAirFilter = { + label = TranslateCap('air_filter'), + parent = 'cosmetics', + modType = 40, + price = 3.72 + }, + modStruts = { + label = TranslateCap('struts'), + parent = 'cosmetics', + modType = 41, + price = 6.51 + }, + modArchCover = { + label = TranslateCap('arch_cover'), + parent = 'cosmetics', + modType = 42, + price = 4.19 + }, + modAerials = { + label = TranslateCap('aerials'), + parent = 'cosmetics', + modType = 43, + price = 1.12 + }, + modTrimB = { + label = TranslateCap('wings'), + parent = 'cosmetics', + modType = 44, + price = 6.05 + }, + modTank = { + label = TranslateCap('fuel_tank'), + parent = 'cosmetics', + modType = 45, + price = 4.19 + }, + modWindows = { + label = TranslateCap('windows'), + parent = 'cosmetics', + modType = 46, + price = 4.19 + }, + modLivery = { + label = TranslateCap('stickers'), + parent = 'cosmetics', + modType = 48, + price = 9.3 + }, + + wheels = { + label = TranslateCap('wheels'), + parent = 'cosmetics', + modFrontWheelsTypes = TranslateCap('wheel_type'), + modFrontWheelsColor = TranslateCap('wheel_color'), + tyreSmokeColor = TranslateCap('tiresmoke') + }, + modFrontWheelsTypes = { + label = TranslateCap('wheel_type'), + parent = 'wheels', + modFrontWheelsType0 = TranslateCap('sport'), + modFrontWheelsType1 = TranslateCap('muscle'), + modFrontWheelsType2 = TranslateCap('lowrider'), + modFrontWheelsType3 = TranslateCap('suv'), + modFrontWheelsType4 = TranslateCap('allterrain'), + modFrontWheelsType5 = TranslateCap('tuning'), + modFrontWheelsType6 = TranslateCap('motorcycle'), + modFrontWheelsType7 = TranslateCap('highend') + }, + modFrontWheelsType0 = { + label = TranslateCap('sport'), + parent = 'modFrontWheelsTypes', + modType = 23, + wheelType = 0, + price = 4.65 + }, + modFrontWheelsType1 = { + label = TranslateCap('muscle'), + parent = 'modFrontWheelsTypes', + modType = 23, + wheelType = 1, + price = 4.19 + }, + modFrontWheelsType2 = { + label = TranslateCap('lowrider'), + parent = 'modFrontWheelsTypes', + modType = 23, + wheelType = 2, + price = 4.65 + }, + modFrontWheelsType3 = { + label = TranslateCap('suv'), + parent = 'modFrontWheelsTypes', + modType = 23, + wheelType = 3, + price = 4.19 + }, + modFrontWheelsType4 = { + label = TranslateCap('allterrain'), + parent = 'modFrontWheelsTypes', + modType = 23, + wheelType = 4, + price = 4.19 + }, + modFrontWheelsType5 = { + label = TranslateCap('tuning'), + parent = 'modFrontWheelsTypes', + modType = 23, + wheelType = 5, + price = 5.12 + }, + modFrontWheelsType6 = { + label = TranslateCap('motorcycle'), + parent = 'modFrontWheelsTypes', + modType = 23, + wheelType = 6, + price = 3.26 + }, + modFrontWheelsType7 = { + label = TranslateCap('highend'), + parent = 'modFrontWheelsTypes', + modType = 23, + wheelType = 7, + price = 5.12 + }, + modFrontWheelsColor = { + label = TranslateCap('wheel_color'), + parent = 'wheels' + }, + wheelColor = { + label = TranslateCap('wheel_color'), + parent = 'modFrontWheelsColor', + modType = 'wheelColor', + price = 0.66 + }, + plateIndex = { + label = TranslateCap('licenseplates'), + parent = 'cosmetics', + modType = 'plateIndex', + price = 1.1 + }, + resprays = { + label = TranslateCap('respray'), + parent = 'cosmetics', + primaryRespray = TranslateCap('primary'), + secondaryRespray = TranslateCap('secondary'), + pearlescentRespray = TranslateCap('pearlescent'), + }, + primaryRespray = { + label = TranslateCap('primary'), + parent = 'resprays', + }, + secondaryRespray = { + label = TranslateCap('secondary'), + parent = 'resprays', + }, + pearlescentRespray = { + label = TranslateCap('pearlescent'), + parent = 'resprays', + }, + color1 = { + label = TranslateCap('primary'), + parent = 'primaryRespray', + modType = 'color1', + price = 1.12 + }, + color2 = { + label = TranslateCap('secondary'), + parent = 'secondaryRespray', + modType = 'color2', + price = 0.66 + }, + pearlescentColor = { + label = TranslateCap('pearlescent'), + parent = 'pearlescentRespray', + modType = 'pearlescentColor', + price = 0.88 + }, + modXenon = { + label = TranslateCap('headlights'), + parent = 'cosmetics', + modType = 22, + price = 3.72 + }, + xenonColor = { + label = TranslateCap('headlights'), + parent = 'cosmetics', + modType = 'xenonColor', + price = 3.72 + }, + bodyparts = { + label = TranslateCap('bodyparts'), + parent = 'cosmetics', + modFender = TranslateCap('leftfender'), + modRightFender = TranslateCap('rightfender'), + modSpoilers = TranslateCap('spoilers'), + modSideSkirt = TranslateCap('sideskirt'), + modFrame = TranslateCap('cage'), + modHood = TranslateCap('hood'), + modGrille = TranslateCap('grille'), + modRearBumper = TranslateCap('rearbumper'), + modFrontBumper = TranslateCap('frontbumper'), + modExhaust = TranslateCap('exhaust'), + modRoof = TranslateCap('roof') + }, + modSpoilers = { + label = TranslateCap('spoilers'), + parent = 'bodyparts', + modType = 0, + price = 4.65 + }, + modFrontBumper = { + label = TranslateCap('frontbumper'), + parent = 'bodyparts', + modType = 1, + price = 5.12 + }, + modRearBumper = { + label = TranslateCap('rearbumper'), + parent = 'bodyparts', + modType = 2, + price = 5.12 + }, + modSideSkirt = { + label = TranslateCap('sideskirt'), + parent = 'bodyparts', + modType = 3, + price = 4.65 + }, + modExhaust = { + label = TranslateCap('exhaust'), + parent = 'bodyparts', + modType = 4, + price = 5.12 + }, + modFrame = { + label = TranslateCap('cage'), + parent = 'bodyparts', + modType = 5, + price = 5.12 + }, + modGrille = { + label = TranslateCap('grille'), + parent = 'bodyparts', + modType = 6, + price = 3.72 + }, + modHood = { + label = TranslateCap('hood'), + parent = 'bodyparts', + modType = 7, + price = 4.88 + }, + modFender = { + label = TranslateCap('leftfender'), + parent = 'bodyparts', + modType = 8, + price = 5.12 + }, + modRightFender = { + label = TranslateCap('rightfender'), + parent = 'bodyparts', + modType = 9, + price = 5.12 + }, + modRoof = { + label = TranslateCap('roof'), + parent = 'bodyparts', + modType = 10, + price = 5.58 + }, + windowTint = { + label = TranslateCap('windowtint'), + parent = 'cosmetics', + modType = 'windowTint', + price = 1.12 + }, + modHorns = { + label = TranslateCap('horns'), + parent = 'cosmetics', + modType = 14, + price = 1.12 + }, + neonColor = { + label = TranslateCap('neons'), + parent = 'cosmetics', + modType = 'neonColor', + price = 1.12 + }, + tyreSmokeColor = { + label = TranslateCap('tiresmoke'), + parent = 'wheels', + modType = 'tyreSmokeColor', + price = 1.12 + } + +} diff --git a/[esx_addons]/esx_lscustom/fxmanifest.lua b/[esx_addons]/esx_lscustom/fxmanifest.lua new file mode 100644 index 00000000..6d2e6fbc --- /dev/null +++ b/[esx_addons]/esx_lscustom/fxmanifest.lua @@ -0,0 +1,24 @@ +fx_version 'adamant' + +game 'gta5' + +description 'ESX LS Customs' +lua54 'yes' +version '1.9.0' + +shared_script '@es_extended/imports.lua' + +server_scripts { + '@oxmysql/lib/MySQL.lua', + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'server/main.lua' +} + +client_scripts { + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'client/main.lua' +} diff --git a/[esx_addons]/esx_lscustom/locales/br.lua b/[esx_addons]/esx_lscustom/locales/br.lua new file mode 100644 index 00000000..9b6763e0 --- /dev/null +++ b/[esx_addons]/esx_lscustom/locales/br.lua @@ -0,0 +1,276 @@ +Locales['br'] = { + ['by_default'] = 'default', + ['installed'] = 'instalado', + ['already_own'] = 'já possuis: %s', + ['not_enough_money'] = 'sem dinheiro!', + ['purchased'] = 'tu compraste esta peça!', + ['press_custom'] = 'pressiona ~INPUT_PICKUP~ para personalizar o veiculo.', + ['level'] = 'level %s', + ['neon'] = 'neon', + ['blip_name'] = 'los Santos Customs', +-- Paint Colors + -- Black + ['black'] = 'preto', + ['graphite'] = 'preto grafit', + ['black_metallic'] = 'preto metalico', + ['caststeel'] = 'aço fundido', + ['black_anth'] = 'antracite Preto', + ['matteblack'] = 'preto fosco', + ['darknight'] = 'noite escura', + ['deepblack'] = 'preto profundo', + ['oil'] = 'preto oleo', + ['carbon'] = 'preto carbono', + -- White + ['white'] = 'branco', + ['vanilla'] = 'baunilha', + ['creme'] = 'creme', + ['polarwhite'] = 'branco polar', + ['beige'] = 'bege', + ['mattewhite'] = 'branco fosco', + ['snow'] = 'branco neve', + ['cotton'] = 'branco algodao', + ['alabaster'] = 'branco alabastro', + ['purewhite'] = 'branco puro', + -- Grey + ['grey'] = 'cinzento', + ['silver'] = 'prata', + ['metallicgrey'] = 'cinza metalizado', + ['laminatedsteel'] = 'aço laminado', + ['darkgray'] = 'cinza escuro', + ['rockygray'] = 'cinza rochoso', + ['graynight'] = 'noite cinzenta', + ['aluminum'] = 'alumínio', + ['graymat'] = 'cinza fosco', + ['lightgrey'] = 'cinza claro', + ['asphaltgray'] = 'asfalto Cinza', + ['grayconcrete'] = 'cinza concreto', + ['darksilver'] = 'prata escura', + ['magnesite'] = 'magnesita', + ['nickel'] = 'níquel', + ['zinc'] = 'zinco', + ['dolomite'] = 'dolomite', + ['bluesilver'] = 'prata azul', + ['titanium'] = 'titânio', + ['steelblue'] = 'aço azul', + ['champagne'] = 'champanhe', + ['grayhunter'] = 'caçador cinzento', + -- Red + ['red'] = 'vermelho', + ['torino_red'] = 'vermelho torino', + ['poppy'] = 'vermelho papoila', + ['copper_red'] = 'vermelho cobre', + ['cardinal'] = 'vermelho cardeal', + ['brick'] = 'vermelho tijolo', + ['garnet'] = 'vermelho granada', + ['cabernet'] = 'vermelho cabernet', + ['candy'] = 'vermelho doce', + ['matte_red'] = 'vermelho fosco', + ['dark_red'] = 'vermelho escuro', + ['red_pulp'] = 'polpa vermelha', + ['bril_red'] = 'vermelho brilhante', + ['pale_red'] = 'vermelho pálido', + ['wine_red'] = 'vermelho vinho', + ['volcano'] = 'vermelho vulcão', + -- Pink + ['pink'] = 'rosa', + ['electricpink'] = 'rosa elétrica', + ['brightpink'] = 'rosa brilhante', + ['salmon'] = 'rosa salmão', + ['sugarplum'] = 'ameixa doce', + -- Blue + ['blue'] = 'azul', + ['topaz'] = 'azul topázio', + ['light_blue'] = 'azul claro', + ['galaxy_blue'] = 'azul galáxia', + ['dark_blue'] = 'azul escuro', + ['azure'] = 'azure', + ['navy_blue'] = 'azul marinho', + ['lapis'] = 'lápis lazúli', + ['blue_diamond'] = 'azul diamante', + ['surfer'] = 'azul surfista', + ['pastel_blue'] = 'azul pastel', + ['celeste_blue'] = 'azul celeste', + ['rally_blue'] = 'azul rally', + ['blue_paradise'] = 'azul paraíso', + ['blue_night'] = 'azul noite', + ['cyan_blue'] = 'azul ciano', + ['cobalt'] = 'azul cobalto', + ['electric_blue'] = 'azul elétrico', + ['horizon_blue'] = 'azul horizonte', + ['metallic_blue'] = 'azul metálico', + ['aquamarine'] = 'azul aquamarino', + ['blue_agathe'] = 'azul ágata', + ['zirconium'] = 'azul zircônio', + ['spinel'] = 'azul espinel', + ['tourmaline'] = 'azul turmalina', + ['paradise'] = 'azul paraíso', + ['bubble_gum'] = 'azul pastilha', + ['midnight_blue'] = 'azul meia-noite', + ['forbidden_blue'] = 'azul proibido', + ['glacier_blue'] = 'azul glaciar', + -- Yellow + ['yellow'] = 'amarelo', + ['wheat'] = 'amarelo trigo', + ['raceyellow'] = 'amarelo corrida', + ['paleyellow'] = 'amarelo pálido', + ['lightyellow'] = 'amarelo claro', + -- Green + ['green'] = 'verde', + ['met_dark_green'] = 'verde escuro metálico', + ['rally_green'] = 'verde rally', + ['pine_green'] = 'verde pinho', + ['olive_green'] = 'verde oliva', + ['light_green'] = 'verde claro', + ['lime_green'] = 'verde lima', + ['forest_green'] = 'verde floresta', + ['lawn_green'] = 'verde relva', + ['imperial_green'] = 'verde imperial', + ['green_bottle'] = 'verde garrafa', + ['citrus_green'] = 'verde cítrico', + ['green_anis'] = 'verde anis', + ['khaki'] = 'verde Khaki', + ['army_green'] = 'verde tropa', + ['dark_green'] = 'verde escuro', + ['hunter_green'] = 'verde caça', + ['matte_foilage_green'] = 'verde fosco', + -- Orange + ['orange'] = 'laranja', + ['tangerine'] = 'laranja tangerina', + ['matteorange'] = 'laranja fosco', + ['lightorange'] = 'laranja claro', + ['peach'] = 'laranja pessego', + ['pumpkin'] = 'laranja abóbora', + ['orangelambo'] = 'laranja lambo', + -- Brown + ['brown'] = 'castanho', + ['copper'] = 'castanho cobre', + ['lightbrown'] = 'castanho claro', + ['darkbrown'] = 'castanho escuro', + ['Bronze'] = 'bronze', + ['brownmetallic'] = 'castanho metálico', + ['expresso'] = 'castanho expresso', + ['chocolate'] = 'castanho chocolate', + ['terracotta'] = 'castanho Terracota', + ['marble'] = 'castanho mármore', + ['sand'] = 'castanho areia', + ['sepia'] = 'castanho sepia', + ['bison'] = 'castanho Bisonte', + ['palm'] = 'castanho palma', + ['caramel'] = 'castanho caramelo', + ['rust'] = 'castanho ferrugem', + ['chestnut'] = 'castanho fruto-seco', + ['hazelnut'] = 'castanho avelã', + ['shell'] = 'castanho concha', + ['mahogany'] = 'castanho mogno', + ['cauldron'] = 'castanho caldeirão', + ['blond'] = 'castanho loiro', + ['gravel'] = 'castanho gravilha', + ['darkearth'] = 'castanho escuro', + ['desert'] = 'castanho deserto', + -- Purple + ['purple'] = 'roxo', + ['indigo'] = 'roxo indigo', + ['deeppurple'] = 'roxo profundo', + ['darkviolet'] = 'violeta negro', + ['amethyst'] = 'roxo ametista', + ['mysticalviolet'] = 'violeta mística', + ['purplemetallic'] = 'roxo metálico', + ['matteviolet'] = 'violeta fosco', + ['mattedeeppurple'] = 'roxo fosco', + -- Chrome + ['chrome'] = 'cromado', + ['brushedchrome'] = 'cromado escovado', + ['blackchrome'] = 'cromado Preto', + ['brushedaluminum'] = 'alumínio escovado', + -- Metal + ['gold'] = 'ouro', + ['puregold'] = 'ouro puro', + ['brushedgold'] = 'ouro escovado', + ['lightgold'] = 'ouro brilhante', +-- License Plates + ['blue_on_white_1'] = 'azul e cinza 1', + ['yellow_on_black'] = 'amarelo e Preto', + ['yellow_blue'] = 'amarelo e azul', + ['blue_on_white_2'] = 'azul e cinza 2', + ['blue_on_white_3'] = 'azul no cinza 3', +-- Upgrades + ['upgrades'] = 'upgrades', + ['engine'] = 'motor', + ['brakes'] = 'travões', + ['transmission'] = 'transmissão', + ['suspension'] = 'suspensão', + ['armor'] = 'armadura', + ['turbo'] = 'turbo', + ['no_turbo'] = 'sem turbo', +-- Cosmetics + ['cosmetics'] = 'cosméticos', + -- Body Parts + ['bodyparts'] = 'chaparia', + ['leftfender'] = 'para-choque esquerdo', + ['rightfender'] = 'para-choque direito', + ['spoilers'] = 'alarão', + ['sideskirt'] = 'saias laterais', + ['cage'] = 'santantônio', + ['hood'] = 'capô', + ['grille'] = 'grade', + ['rearbumper'] = 'para-choque traseiro', + ['frontbumper'] = 'para-choque dianteiro', + ['exhaust'] = 'escape', + ['roof'] = 'teto', + -- Paint + ['respray'] = 'pintura', + ['primary'] = 'primário', + ['secondary'] = 'secundário', + ['pearlescent'] = 'perolado', + -- Misc + ['headlights'] = 'faróis dianteiros', + ['licenseplates'] = 'matricula', + ['windowtint'] = 'pelicula de vidro', + ['horns'] = 'buzinas', + -- Neon + ['neons'] = 'neons', + -- Wheels + ['wheels'] = 'rodas', + ['tiresmoke'] = 'fumaça de pneu', + ['wheel_type'] = 'tipo de roda', + ['wheel_color'] = 'cor de roda', + ['sport'] = 'desportivo', + ['muscle'] = 'muscle', + ['lowrider'] = 'lowrider', + ['suv'] = 'suv', + ['allterrain'] = 'todo terreno', + ['tuning'] = 'tuning', + ['motorcycle'] = 'motociclo', + ['highend'] = 'high end', + + ['modplateholder'] = 'placa - atrás', + ['modvanityplate'] = 'placa - frente', + ['interior'] = 'interior', + ['trim'] = 'trim', + ['dashboard'] = 'painel', + ['speedometer'] = 'velocímetro', + ['door_speakers'] = 'colunas da porta', + ['seats'] = 'bancos', + ['steering_wheel'] = 'volante', + ['gear_lever'] = 'manete de veloçidades', + ['quarter_deck'] = 'quarter-deck', + ['speakers'] = 'colunas', + ['trunk'] = 'bagagem', + ['hydraulic'] = 'hidráulico', + ['engine_block'] = 'bloco do motor', + ['air_filter'] = 'filtro de ar', + ['struts'] = 'suportes do motor', + ['arch_cover'] = 'cobertura de arco', + ['aerials'] = 'antenas', + ['wings'] = 'wings', + ['fuel_tank'] = 'tanque de combustível', + ['windows'] = 'janelas', + ['stickers'] = 'autocolantes', + +-- Xenon Colors + ['mintgreen'] = 'Mint Green', + ['goldenshower'] = 'Golden Shower', + ['ponypink'] = 'Pony Pink', + ['hotpink'] = 'Hot Pink', + ['blacklight'] = 'Blacklight', +} diff --git a/[esx_addons]/esx_lscustom/locales/de.lua b/[esx_addons]/esx_lscustom/locales/de.lua new file mode 100644 index 00000000..fe04d692 --- /dev/null +++ b/[esx_addons]/esx_lscustom/locales/de.lua @@ -0,0 +1,276 @@ +Locales['de'] = { + ['by_default'] = 'Standard', + ['installed'] = 'Installiert', + ['already_own'] = 'Sie besitzen bereits: %s', + ['not_enough_money'] = 'Du kannst dir diese mod nicht leisten', + ['purchased'] = 'Du hast diese Mod gekauft!', + ['press_custom'] = 'Drücke [E] um dein Fahrzeug auf zu Tunen', + ['level'] = 'level %s', + ['neon'] = 'Neon', + ['blip_name'] = 'Tuning', +-- Paint Colors + -- Black + ['black'] = 'black', + ['graphite'] = 'graphite', + ['black_metallic'] = 'black Metallic', + ['caststeel'] = 'cast Steel', + ['black_anth'] = 'black Anthracite', + ['matteblack'] = 'matte Black', + ['darknight'] = 'dark Night', + ['deepblack'] = 'deep Black', + ['oil'] = 'oil', + ['carbon'] = 'carbon', + -- White + ['white'] = 'white', + ['vanilla'] = 'vanilla', + ['creme'] = 'creme', + ['polarwhite'] = 'polar White', + ['beige'] = 'beige', + ['mattewhite'] = 'matte White', + ['snow'] = 'snow', + ['cotton'] = 'cotton', + ['alabaster'] = 'alabaster', + ['purewhite'] = 'pure White', + -- Grey + ['grey'] = 'grey', + ['silver'] = 'silver', + ['metallicgrey'] = 'metallic Grey', + ['laminatedsteel'] = 'laminated Steel', + ['darkgray'] = 'dark Grey', + ['rockygray'] = 'rocky Grey', + ['graynight'] = 'gray Night', + ['aluminum'] = 'aluminum', + ['graymat'] = 'matte Grey', + ['lightgrey'] = 'light Grey', + ['asphaltgray'] = 'asphalt Grey', + ['grayconcrete'] = 'concrete Grey', + ['darksilver'] = 'dark Silver', + ['magnesite'] = 'magnesite', + ['nickel'] = 'nickel', + ['zinc'] = 'zinc', + ['dolomite'] = 'dolomite', + ['bluesilver'] = 'blue Silver', + ['titanium'] = 'titanium', + ['steelblue'] = 'steel Blue', + ['champagne'] = 'champagne', + ['grayhunter'] = 'grey Hunter', + -- Red + ['red'] = 'red', + ['torino_red'] = 'torino Red', + ['poppy'] = 'poppy', + ['copper_red'] = 'copper Red', + ['cardinal'] = 'cardinal Red', + ['brick'] = 'brick Red', + ['garnet'] = 'Garnet', + ['cabernet'] = 'cabernet Red', + ['candy'] = 'candy Red', + ['matte_red'] = 'matte Red', + ['dark_red'] = 'dark Red', + ['red_pulp'] = 'red Pulp', + ['bril_red'] = 'brilliant Red', + ['pale_red'] = 'pale Red', + ['wine_red'] = 'wine Red', + ['volcano'] = 'Volcano', + -- Pink + ['pink'] = 'pink', + ['electricpink'] = 'electric Pink', + ['brightpink'] = 'bright Pink', + ['salmon'] = 'salmon', + ['sugarplum'] = 'sugar Plum', + -- Blue + ['blue'] = 'blue', + ['topaz'] = 'topaz', + ['light_blue'] = 'light Blue', + ['galaxy_blue'] = 'galaxy Blue', + ['dark_blue'] = 'dark Blue', + ['azure'] = 'azure', + ['navy_blue'] = 'navy Blue', + ['lapis'] = 'lapis Lazuli', + ['blue_diamond'] = 'blue Diamond', + ['surfer'] = 'surfer', + ['pastel_blue'] = 'pastel Blue', + ['celeste_blue'] = 'celeste Blue', + ['rally_blue'] = 'rally Blue', + ['blue_paradise'] = 'blue Paradise', + ['blue_night'] = 'blue Night', + ['cyan_blue'] = 'cyan Blue', + ['cobalt'] = 'cobalt', + ['electric_blue'] = 'electric Blue', + ['horizon_blue'] = 'horizon Blue', + ['metallic_blue'] = 'metallic Blue', + ['aquamarine'] = 'aquamarine', + ['blue_agathe'] = 'blue Agathe', + ['zirconium'] = 'zirconium', + ['spinel'] = 'spinel', + ['tourmaline'] = 'tourmaline', + ['paradise'] = 'paradise', + ['bubble_gum'] = 'bubble Gum', + ['midnight_blue'] = 'midnight Blue', + ['forbidden_blue'] = 'forbidden Blue', + ['glacier_blue'] = 'glacier Blue', + -- Yellow + ['yellow'] = 'yellow', + ['wheat'] = 'wheat', + ['raceyellow'] = 'race Yellow', + ['paleyellow'] = 'pale Yellow', + ['lightyellow'] = 'light Yellow', + -- Green + ['green'] = 'green', + ['met_dark_green'] = 'metallic Dark Green', + ['rally_green'] = 'Rally Green', + ['pine_green'] = 'pine Green', + ['olive_green'] = 'olive Green', + ['light_green'] = 'Light Green', + ['lime_green'] = 'lime green', + ['forest_green'] = 'forest Green', + ['lawn_green'] = 'lawn Green', + ['imperial_green'] = 'imperial Green', + ['green_bottle'] = 'breen Bottle', + ['citrus_green'] = 'citrus Green', + ['green_anis'] = 'green Anis', + ['khaki'] = 'Khaki', + ['army_green'] = 'army Green', + ['dark_green'] = 'dark Green', + ['hunter_green'] = 'hunter Green', + ['matte_foilage_green'] = 'matte Foilage Green', + -- Orange + ['orange'] = 'orange', + ['tangerine'] = 'Tangerine', + ['matteorange'] = 'Matte Orange', + ['lightorange'] = 'Light Orange', + ['peach'] = 'Peach', + ['pumpkin'] = 'Pumpkin', + ['orangelambo'] = 'Orange Lambo', + -- Brown + ['brown'] = 'brown', + ['copper'] = 'Copper', + ['lightbrown'] = 'Light Brown', + ['darkbrown'] = 'Dark Brown', + ['bronze'] = 'Bronze', + ['brownmetallic'] = 'Brown Metallic', + ['expresso'] = 'Expresso', + ['chocolate'] = 'Chocolate', + ['terracotta'] = 'Terracotta', + ['marble'] = 'Marble', + ['sand'] = 'Sand', + ['sepia'] = 'Sepia', + ['bison'] = 'Bison', + ['palm'] = 'Palm', + ['caramel'] = 'Caramel', + ['rust'] = 'Rust', + ['chestnut'] = 'Chestnut', + ['hazelnut'] = 'Hazelnut', + ['shell'] = 'Shell', + ['mahogany'] = 'Mahogany', + ['cauldron'] = 'Cauldron', + ['blond'] = 'Blond', + ['gravel'] = 'Gravel', + ['darkearth'] = 'Dark Earth', + ['desert'] = 'Desert', + -- Purple + ['purple'] = 'purple', + ['indigo'] = 'Indigo', + ['deeppurple'] = 'Deep Purple', + ['darkviolet'] = 'Dark Violet', + ['amethyst'] = 'Amethyst', + ['mysticalviolet'] = 'Mystic Violet', + ['purplemetallic'] = 'Purple Metallic', + ['matteviolet'] = 'Matte Violet', + ['mattedeeppurple'] = 'Matte Deep Purple', + -- Chrome + ['chrome'] = 'chrome', + ['brushedchrome'] = 'brushed Chrome', + ['blackchrome'] = 'black Chrome', + ['brushedaluminum'] = 'brushed Aluminum', + -- Metal + ['gold'] = 'gold', + ['puregold'] = 'pure Gold', + ['brushedgold'] = 'brushed Gold', + ['lightgold'] = 'light Gold', +-- License Plates + ['blue_on_white_1'] = 'blau auf weiß 1', + ['yellow_on_black'] = 'gelb auf schwarz', + ['yellow_blue'] = 'gelb auf blau', + ['blue_on_white_2'] = 'blau auf weiß 2', + ['blue_on_white_3'] = 'blau auf weiß 3', +-- Upgrades + ['upgrades'] = 'Upgrades', + ['engine'] = 'Motor', + ['brakes'] = 'bremsen', + ['transmission'] = 'Getriebe', + ['suspension'] = 'Suspension', + ['armor'] = 'Panzerung', + ['turbo'] = 'Turbo', + ['no_turbo'] = 'kein Turbo', +-- Cosmetics + ['cosmetics'] = 'Zubehör', + -- Body Parts + ['bodyparts'] = 'Karroserie Teile', + ['leftfender'] = 'linker Kotflügel', + ['rightfender'] = 'rechter Kotflügel', + ['spoilers'] = 'Spoiler', + ['sideskirt'] = 'Seitenschweller', + ['cage'] = 'Käfig', + ['hood'] = 'Motorhaube', + ['grille'] = 'Gitter', + ['rearbumper'] = 'hintere Stoßstange', + ['frontbumper'] = 'Frontstoßstange', + ['exhaust'] = 'Auspuff', + ['roof'] = 'Dach', + -- Paint + ['respray'] = 'Lackierung', + ['primary'] = 'Primär', + ['secondary'] = 'Sekundär', + ['pearlescent'] = 'Perlglanz', + -- Misc + ['headlights'] = 'Scheinwerfer', + ['licenseplates'] = 'Nummernschild', + ['windowtint'] = 'Fenstertönung', + ['horns'] = 'Hörner', + -- Neon + ['neons'] = 'neons', + -- Wheels + ['wheels'] = 'Räder', + ['tiresmoke'] = 'Reifenrauch', + ['wheel_type'] = 'Rad-Typ', + ['wheel_color'] = 'Radfarbe', + ['sport'] = 'Sport', + ['muscle'] = 'Muskel', + ['lowrider'] = 'Lowrider', + ['suv'] = 'SUV', + ['allterrain'] = 'alles Gelände', + ['tuning'] = 'tuning', + ['motorcycle'] = 'Motorrad', + ['highend'] = 'High End', + + ['modplateholder'] = 'Platte - Zurück', + ['modvanityplate'] = 'Platte - Vorne', + ['interior'] = 'interior', + ['trim'] = 'trim', + ['dashboard'] = 'dashboard', + ['speedometer'] = 'Tachometer', + ['door_speakers'] = 'Türlautsprecher', + ['seats'] = 'Sitze', + ['steering_wheel'] = 'Lenkrad', + ['gear_lever'] = 'Schalthebel', + ['quarter_deck'] = 'Achterdeck', + ['speakers'] = 'Lautsprecher', + ['trunk'] = 'Kofferraum', + ['hydraulic'] = 'hydraulisch', + ['engine_block'] = 'Motorblock', + ['air_filter'] = 'air filter', + ['struts'] = 'Streben', + ['arch_cover'] = 'Bogenabdeckung', + ['aerials'] = 'Antennen', + ['wings'] = 'Flügel', + ['fuel_tank'] = 'Treibstofftank', + ['windows'] = 'Fenster', + ['stickers'] = 'Designs', + +-- Xenon Colors + ['mintgreen'] = 'Mint Green', + ['goldenshower'] = 'Golden Shower', + ['ponypink'] = 'Pony Pink', + ['hotpink'] = 'Hot Pink', + ['blacklight'] = 'Blacklight', +} diff --git a/[esx_addons]/esx_lscustom/locales/en.lua b/[esx_addons]/esx_lscustom/locales/en.lua new file mode 100644 index 00000000..937538d5 --- /dev/null +++ b/[esx_addons]/esx_lscustom/locales/en.lua @@ -0,0 +1,276 @@ +Locales['en'] = { + ['by_default'] = 'default', + ['installed'] = 'installed', + ['already_own'] = 'you already own: %s', + ['not_enough_money'] = 'you cannot afford this mod!', + ['purchased'] = 'you have purchased the mod!', + ['press_custom'] = 'press ~b~[E]~s~ to Personalise Your Vehicle', + ['level'] = 'level %s', + ['neon'] = 'neon', + ['blip_name'] = 'los Santos Customs', +-- Paint Colors + -- Black + ['black'] = 'black', + ['graphite'] = 'graphite', + ['black_metallic'] = 'black Metallic', + ['caststeel'] = 'cast Steel', + ['black_anth'] = 'black Anthracite', + ['matteblack'] = 'matte Black', + ['darknight'] = 'dark Night', + ['deepblack'] = 'deep Black', + ['oil'] = 'oil', + ['carbon'] = 'carbon', + -- White + ['white'] = 'white', + ['vanilla'] = 'vanilla', + ['creme'] = 'creme', + ['polarwhite'] = 'polar White', + ['beige'] = 'beige', + ['mattewhite'] = 'matte White', + ['snow'] = 'snow', + ['cotton'] = 'cotton', + ['alabaster'] = 'alabaster', + ['purewhite'] = 'pure White', + -- Grey + ['grey'] = 'grey', + ['silver'] = 'silver', + ['metallicgrey'] = 'metallic Grey', + ['laminatedsteel'] = 'laminated Steel', + ['darkgray'] = 'dark Grey', + ['rockygray'] = 'rocky Grey', + ['graynight'] = 'gray Night', + ['aluminum'] = 'aluminum', + ['graymat'] = 'matte Grey', + ['lightgrey'] = 'light Grey', + ['asphaltgray'] = 'asphalt Grey', + ['grayconcrete'] = 'concrete Grey', + ['darksilver'] = 'dark Silver', + ['magnesite'] = 'magnesite', + ['nickel'] = 'nickel', + ['zinc'] = 'zinc', + ['dolomite'] = 'dolomite', + ['bluesilver'] = 'blue Silver', + ['titanium'] = 'titanium', + ['steelblue'] = 'steel Blue', + ['champagne'] = 'champagne', + ['grayhunter'] = 'grey Hunter', + -- Red + ['red'] = 'red', + ['torino_red'] = 'torino Red', + ['poppy'] = 'poppy', + ['copper_red'] = 'copper Red', + ['cardinal'] = 'cardinal Red', + ['brick'] = 'brick Red', + ['garnet'] = 'Garnet', + ['cabernet'] = 'cabernet Red', + ['candy'] = 'candy Red', + ['matte_red'] = 'matte Red', + ['dark_red'] = 'dark Red', + ['red_pulp'] = 'red Pulp', + ['bril_red'] = 'brilliant Red', + ['pale_red'] = 'pale Red', + ['wine_red'] = 'wine Red', + ['volcano'] = 'Volcano', + -- Pink + ['pink'] = 'pink', + ['electricpink'] = 'electric Pink', + ['brightpink'] = 'bright Pink', + ['salmon'] = 'salmon', + ['sugarplum'] = 'sugar Plum', + -- Blue + ['blue'] = 'blue', + ['topaz'] = 'topaz', + ['light_blue'] = 'light Blue', + ['galaxy_blue'] = 'galaxy Blue', + ['dark_blue'] = 'dark Blue', + ['azure'] = 'azure', + ['navy_blue'] = 'navy Blue', + ['lapis'] = 'lapis Lazuli', + ['blue_diamond'] = 'blue Diamond', + ['surfer'] = 'surfer', + ['pastel_blue'] = 'pastel Blue', + ['celeste_blue'] = 'celeste Blue', + ['rally_blue'] = 'rally Blue', + ['blue_paradise'] = 'blue Paradise', + ['blue_night'] = 'blue Night', + ['cyan_blue'] = 'cyan Blue', + ['cobalt'] = 'cobalt', + ['electric_blue'] = 'electric Blue', + ['horizon_blue'] = 'horizon Blue', + ['metallic_blue'] = 'metallic Blue', + ['aquamarine'] = 'aquamarine', + ['blue_agathe'] = 'blue Agathe', + ['zirconium'] = 'zirconium', + ['spinel'] = 'spinel', + ['tourmaline'] = 'tourmaline', + ['paradise'] = 'paradise', + ['bubble_gum'] = 'bubble Gum', + ['midnight_blue'] = 'midnight Blue', + ['forbidden_blue'] = 'forbidden Blue', + ['glacier_blue'] = 'glacier Blue', + -- Yellow + ['yellow'] = 'yellow', + ['wheat'] = 'wheat', + ['raceyellow'] = 'race Yellow', + ['paleyellow'] = 'pale Yellow', + ['lightyellow'] = 'light Yellow', + -- Green + ['green'] = 'green', + ['met_dark_green'] = 'metallic Dark Green', + ['rally_green'] = 'Rally Green', + ['pine_green'] = 'pine Green', + ['olive_green'] = 'olive Green', + ['light_green'] = 'Light Green', + ['lime_green'] = 'lime green', + ['forest_green'] = 'forest Green', + ['lawn_green'] = 'lawn Green', + ['imperial_green'] = 'imperial Green', + ['green_bottle'] = 'breen Bottle', + ['citrus_green'] = 'citrus Green', + ['green_anis'] = 'green Anis', + ['khaki'] = 'Khaki', + ['army_green'] = 'army Green', + ['dark_green'] = 'dark Green', + ['hunter_green'] = 'hunter Green', + ['matte_foilage_green'] = 'matte Foilage Green', + -- Orange + ['orange'] = 'orange', + ['tangerine'] = 'Tangerine', + ['matteorange'] = 'Matte Orange', + ['lightorange'] = 'Light Orange', + ['peach'] = 'Peach', + ['pumpkin'] = 'Pumpkin', + ['orangelambo'] = 'Orange Lambo', + -- Brown + ['brown'] = 'brown', + ['copper'] = 'Copper', + ['lightbrown'] = 'Light Brown', + ['darkbrown'] = 'Dark Brown', + ['bronze'] = 'Bronze', + ['brownmetallic'] = 'Brown Metallic', + ['expresso'] = 'Expresso', + ['chocolate'] = 'Chocolate', + ['terracotta'] = 'Terracotta', + ['marble'] = 'Marble', + ['sand'] = 'Sand', + ['sepia'] = 'Sepia', + ['bison'] = 'Bison', + ['palm'] = 'Palm', + ['caramel'] = 'Caramel', + ['rust'] = 'Rust', + ['chestnut'] = 'Chestnut', + ['hazelnut'] = 'Hazelnut', + ['shell'] = 'Shell', + ['mahogany'] = 'Mahogany', + ['cauldron'] = 'Cauldron', + ['blond'] = 'Blond', + ['gravel'] = 'Gravel', + ['darkearth'] = 'Dark Earth', + ['desert'] = 'Desert', + -- Purple + ['purple'] = 'purple', + ['indigo'] = 'Indigo', + ['deeppurple'] = 'Deep Purple', + ['darkviolet'] = 'Dark Violet', + ['amethyst'] = 'Amethyst', + ['mysticalviolet'] = 'Mystic Violet', + ['purplemetallic'] = 'Purple Metallic', + ['matteviolet'] = 'Matte Violet', + ['mattedeeppurple'] = 'Matte Deep Purple', + -- Chrome + ['chrome'] = 'chrome', + ['brushedchrome'] = 'brushed Chrome', + ['blackchrome'] = 'black Chrome', + ['brushedaluminum'] = 'brushed Aluminum', + -- Metal + ['gold'] = 'gold', + ['puregold'] = 'pure Gold', + ['brushedgold'] = 'brushed Gold', + ['lightgold'] = 'light Gold', +-- License Plates + ['blue_on_white_1'] = 'blue on white 1', + ['yellow_on_black'] = 'yellow on black', + ['yellow_blue'] = 'yellow on blue', + ['blue_on_white_2'] = 'blue on white 2', + ['blue_on_white_3'] = 'blue on white 3', +-- Upgrades + ['upgrades'] = 'upgrades', + ['engine'] = 'engine', + ['brakes'] = 'brakes', + ['transmission'] = 'transmission', + ['suspension'] = 'suspension', + ['armor'] = 'armor', + ['turbo'] = 'turbo', + ['no_turbo'] = 'no turbo', +-- Cosmetics + ['cosmetics'] = 'cosmetics', + -- Body Parts + ['bodyparts'] = 'body Parts', + ['leftfender'] = 'left fender', + ['rightfender'] = 'right fender', + ['spoilers'] = 'spoilers', + ['sideskirt'] = 'side skirts', + ['cage'] = 'cage', + ['hood'] = 'hood', + ['grille'] = 'grille', + ['rearbumper'] = 'rear bumper', + ['frontbumper'] = 'front bumper', + ['exhaust'] = 'exhaust', + ['roof'] = 'roof', + -- Paint + ['respray'] = 'respray', + ['primary'] = 'primary', + ['secondary'] = 'secondary', + ['pearlescent'] = 'pearlescent', + -- Misc + ['headlights'] = 'headlights', + ['licenseplates'] = 'license Plate', + ['windowtint'] = 'window Tint', + ['horns'] = 'horns', + -- Neon + ['neons'] = 'neons', + -- Wheels + ['wheels'] = 'wheels', + ['tiresmoke'] = 'tire smoke', + ['wheel_type'] = 'wheel type', + ['wheel_color'] = 'wheel color', + ['sport'] = 'sport', + ['muscle'] = 'muscle', + ['lowrider'] = 'lowrider', + ['suv'] = 'SUV', + ['allterrain'] = 'all terrain', + ['tuning'] = 'tuning', + ['motorcycle'] = 'motorcycle', + ['highend'] = 'high end', + + ['modplateholder'] = 'plate - Back', + ['modvanityplate'] = 'plate - Front', + ['interior'] = 'interior', + ['trim'] = 'trim', + ['dashboard'] = 'dashboard', + ['speedometer'] = 'speedometer', + ['door_speakers'] = 'door speakers', + ['seats'] = 'seats', + ['steering_wheel'] = 'steering wheel', + ['gear_lever'] = 'gear lever', + ['quarter_deck'] = 'quarter-deck', + ['speakers'] = 'speakers', + ['trunk'] = 'trunk', + ['hydraulic'] = 'hydraulic', + ['engine_block'] = 'engine block', + ['air_filter'] = 'air filter', + ['struts'] = 'struts', + ['arch_cover'] = 'arch cover', + ['aerials'] = 'aerials', + ['wings'] = 'wings', + ['fuel_tank'] = 'fuel tank', + ['windows'] = 'windows', + ['stickers'] = 'Livery', + +-- Xenon Colors + ['mintgreen'] = 'Mint Green', + ['goldenshower'] = 'Golden Shower', + ['ponypink'] = 'Pony Pink', + ['hotpink'] = 'Hot Pink', + ['blacklight'] = 'Blacklight', +} diff --git a/[esx_addons]/esx_lscustom/locales/es.lua b/[esx_addons]/esx_lscustom/locales/es.lua new file mode 100644 index 00000000..a21c1999 --- /dev/null +++ b/[esx_addons]/esx_lscustom/locales/es.lua @@ -0,0 +1,276 @@ +Locales['es'] = { + ['by_default'] = 'Por defecto', + ['installed'] = 'Instalado', + ['already_own'] = 'Ya tienes: %s~', + ['not_enough_money'] = '¡No tienes suficiente dinero!', + ['purchased'] = '¡Comprado!', + ['press_custom'] = 'Pulsa [E] para personalizar tu vehiculo.', + ['level'] = 'Nivel %s', + ['neon'] = 'Neón', + ['blip_name'] = 'los Santos Customs', +-- Paint Colors + -- Black + ['black'] = 'negro', + ['graphite'] = 'grafito', + ['black_metallic'] = 'negro metalizado', + ['caststeel'] = 'acero fundido', + ['black_anth'] = 'antracita negro', + ['matteblack'] = 'negro mate', + ['darknight'] = 'noche oscura', + ['deepblack'] = 'negro profundo', + ['oil'] = 'petróleo', + ['carbon'] = 'carbon', + -- White + ['white'] = 'blanco', + ['vanilla'] = 'vainilla', + ['creme'] = 'crema', + ['polarwhite'] = 'blanco polar', + ['beige'] = 'café', + ['mattewhite'] = 'blanco mate', + ['snow'] = 'nieve', + ['cotton'] = 'algodón', + ['alabaster'] = 'alabastro', + ['purewhite'] = 'blanco puro', + -- Grey + ['grey'] = 'gris', + ['silver'] = 'plata', + ['metallicgrey'] = 'gris metalizado', + ['laminatedsteel'] = 'acero laminado', + ['darkgray'] = 'gris oscuro', + ['rockygray'] = 'gris rocoso', + ['graynight'] = 'noche gris', + ['aluminum'] = 'noche gris', + ['graymat'] = 'gris mate', + ['lightgrey'] = 'gris claro', + ['asphaltgray'] = 'asfalto gris', + ['grayconcrete'] = 'hormigón gris', + ['darksilver'] = 'plateado oscuro', + ['magnesite'] = 'magnesita', + ['nickel'] = 'níquel', + ['zinc'] = 'zinc', + ['dolomite'] = 'dolomita', + ['bluesilver'] = 'azul plata', + ['titanium'] = 'titanio', + ['steelblue'] = 'azul acero', + ['champagne'] = 'champán', + ['grayhunter'] = 'cazador gris', + -- Red + ['red'] = 'rojo', + ['torino_red'] = 'rojo torino', + ['poppy'] = 'amapola', + ['copper_red'] = 'rojo cobre', + ['cardinal'] = 'cardenal rojo', + ['brick'] = 'ladrillo rojo', + ['garnet'] = 'Granate', + ['cabernet'] = 'rojo cabernet', + ['candy'] = 'caramelo rojo', + ['matte_red'] = 'rojo mate', + ['dark_red'] = 'rojo oscuro', + ['red_pulp'] = 'pulpa roja', + ['bril_red'] = 'rojo brillante', + ['pale_red'] = 'rojo pálido', + ['wine_red'] = 'vino rojo', + ['volcano'] = 'Volcán', + -- Pink + ['pink'] = 'rosa', + ['electricpink'] = 'rosa electrico', + ['brightpink'] = 'Rosa brillante', + ['salmon'] = 'salmón', + ['sugarplum'] = 'Ciruela de azúcar', + -- Blue + ['blue'] = 'azul', + ['topaz'] = 'topacio', + ['light_blue'] = 'azul claro', + ['galaxy_blue'] = 'galaxia azul', + ['dark_blue'] = 'azul oscuro', + ['azure'] = 'azul intenso', + ['navy_blue'] = 'azul marino', + ['lapis'] = 'lapislázuli', + ['blue_diamond'] = 'diamante azul', + ['surfer'] = 'azul surfista', + ['pastel_blue'] = 'azul pastel', + ['celeste_blue'] = 'celeste azul', + ['rally_blue'] = 'rally azul', + ['blue_paradise'] = 'paraíso azul', + ['blue_night'] = 'noche azul', + ['cyan_blue'] = 'azul cian', + ['cobalt'] = 'cobalto', + ['electric_blue'] = 'azul eléctrico', + ['horizon_blue'] = 'horizonte azul', + ['metallic_blue'] = 'azúl metálico', + ['aquamarine'] = 'aguamarina', + ['blue_agathe'] = 'ágata azul', + ['zirconium'] = 'circonio', + ['spinel'] = 'espinela', + ['tourmaline'] = 'turmalina', + ['paradise'] = 'paraíso', + ['bubble_gum'] = 'chicle', + ['midnight_blue'] = 'azul medianoche', + ['forbidden_blue'] = 'azul prohibido', + ['glacier_blue'] = 'azul glaciar', + -- Yellow + ['yellow'] = 'amarillo', + ['wheat'] = 'trigo', + ['raceyellow'] = 'raza amarilla', + ['paleyellow'] = 'amarillo pálido', + ['lightyellow'] = 'amarillo claro', + -- Green + ['green'] = 'verde', + ['met_dark_green'] = 'verde oscuro metalizado', + ['rally_green'] = 'Rally verde', + ['pine_green'] = 'verde pino', + ['olive_green'] = 'verde oliva', + ['light_green'] = 'Verde claro', + ['lime_green'] = 'verde lima', + ['forest_green'] = 'verde bosque', + ['lawn_green'] = 'verde césped', + ['imperial_green'] = 'verde imperial', + ['green_bottle'] = 'verde botella', + ['citrus_green'] = 'verde cítrico', + ['green_anis'] = 'verde anis', + ['khaki'] = 'Caqui', + ['army_green'] = 'verde ejercito', + ['dark_green'] = 'verde oscuro', + ['hunter_green'] = 'cazador verde', + ['matte_foilage_green'] = 'verde mate', + -- Orange + ['orange'] = 'naranja', + ['tangerine'] = 'mandarina', + ['matteorange'] = 'naranja mate', + ['lightorange'] = 'naranja claro', + ['peach'] = 'melocotón', + ['pumpkin'] = 'Calabaza', + ['orangelambo'] = 'lambo naranja', + -- Brown + ['brown'] = 'marrón', + ['copper'] = 'cobre', + ['lightbrown'] = 'Marrón claro', + ['darkbrown'] = 'Marrón oscuro', + ['bronze'] = 'Bronce', + ['brownmetallic'] = 'Marrón metalizado', + ['espresso'] = 'café', + ['chocolate'] = 'Chocolate', + ['terracotta'] = 'Terracota', + ['marble'] = 'Mármol', + ['sand'] = 'Arena', + ['sepia'] = 'Sepia', + ['bison'] = 'Bisonte', + ['palm'] = 'Palma', + ['caramel'] = 'Caramelo', + ['rust'] = 'Moho', + ['chestnut'] = 'castaña', + ['hazelnut'] = 'Avellana', + ['shell'] = 'Cáscara', + ['mahogany'] = 'Caoba', + ['cauldron'] = 'Caldera', + ['blond'] = 'Rubio', + ['gravel'] = 'Grava', + ['darkearth'] = 'Tierra oscura', + ['desert'] = 'Desierto', + -- Purple + ['purple'] = 'púrpura', + ['indigo'] = 'Índigo', + ['deeppurple'] = 'Morado oscuro', + ['darkviolet'] = 'Violeta oscuro', + ['amethyst'] = 'Amatista', + ['mysticalviolet'] = 'Violeta mística', + ['purplemetallic'] = 'Púrpura metalizado', + ['matteviolet'] = 'Violeta mate', + ['mattedeeppurple'] = 'morado oscuro mate', + -- Chrome + ['chrome'] = 'cromado', + ['brushedchrome'] = 'cepillado', + ['blackchrome'] = 'negro', + ['brushedaluminum'] = 'aluminio cepillado', + -- Metal + ['gold'] = 'dorado', + ['puregold'] = 'dorado puro', + ['brushedgold'] = 'dorado cepillado', + ['lightgold'] = 'dorado claro', +-- License Plates + ['blue_on_white_1'] = 'azul sobre blanco 1', + ['yellow_on_black'] = 'amarillo sobre negro', + ['yellow_blue'] = 'amarillo sobre azul', + ['blue_on_white_2'] = 'azul sobre blanco 2', + ['blue_on_white_3'] = 'azul sobre blanco 3', +-- Upgrades + ['upgrades'] = 'mejoras', + ['engine'] = 'motor', + ['brakes'] = 'frenos', + ['transmission'] = 'transmisión', + ['suspension'] = 'suspension', + ['armor'] = 'blindaje', + ['turbo'] = 'turbo', + ['no_turbo'] = 'no turbo', +-- Cosmetics + ['cosmetics'] = 'cosméticos', + -- Body Parts + ['bodyparts'] = 'partes del cuerpo', + ['leftfender'] = 'guardabarros izquierdo', + ['rightfender'] = 'guardabarros derecho', + ['spoilers'] = 'alerón', + ['sideskirt'] = 'faldones laterales', + ['cage'] = 'interior', + ['hood'] = 'capó', + ['grille'] = 'grille', + ['rearbumper'] = 'parachoques trasero', + ['frontbumper'] = 'parachoques delantero', + ['exhaust'] = 'escape', + ['roof'] = 'techo', + -- Paint + ['respray'] = 'pintura', + ['primary'] = 'primario', + ['secondary'] = 'secundario', + ['pearlescent'] = 'nacarado', + -- Misc + ['headlights'] = 'faros', + ['licenseplates'] = 'matrícula', + ['windowtint'] = 'color de ventanas', + ['horns'] = 'claxon', + -- Neon + ['neons'] = 'neones', + -- Wheels + ['wheels'] = 'ruedas', + ['tiresmoke'] = 'humo de las ruedas', + ['wheel_type'] = 'tipo de ruedas', + ['wheel_color'] = 'color de ruedas', + ['sport'] = 'deportivo', + ['muscle'] = 'muscle', + ['lowrider'] = 'lowrider', + ['suv'] = 'sUV', + ['allterrain'] = 'all terrain', + ['tuning'] = 'tuning', + ['motorcycle'] = 'motocicleta', + ['highend'] = 'gama alta', + + ['modplateholder'] = 'matrícula - Trasera', + ['modvanityplate'] = 'matrícula - Frontal', + ['interior'] = 'interior', + ['trim'] = 'trim', + ['dashboard'] = 'dashboard', + ['speedometer'] = 'velocímetro', + ['door_speakers'] = 'altavoces de la puerta', + ['seats'] = 'asientos', + ['steering_wheel'] = 'volante', + ['gear_lever'] = 'palanca de cambios', + ['quarter_deck'] = 'quarter-deck', + ['speakers'] = 'altavoces', + ['trunk'] = 'trunk', + ['hydraulic'] = 'hidráulico', + ['engine_block'] = 'bloque de motor', + ['air_filter'] = 'filtro de aire', + ['struts'] = 'puntales de coche', + ['arch_cover'] = 'cubierta', + ['aerials'] = 'antenas', + ['wings'] = 'wings', + ['fuel_tank'] = 'depósito de combustible', + ['windows'] = 'ventanas', + ['stickers'] = 'calcomanías', + +-- Xenon Colors + ['mintgreen'] = 'Menta verde', + ['goldenshower'] = 'Baño de oro', + ['ponypink'] = 'Poni rosa', + ['hotpink'] = 'Rosa caliente', + ['blacklight'] = 'Luz negra', +} diff --git a/[esx_addons]/esx_lscustom/locales/et.lua b/[esx_addons]/esx_lscustom/locales/et.lua new file mode 100644 index 00000000..a6c0743f --- /dev/null +++ b/[esx_addons]/esx_lscustom/locales/et.lua @@ -0,0 +1,269 @@ +Locales['et'] = { + ['by_default'] = 'Tavaline', + ['installed'] = 'Lisatud', + ['already_own'] = 'Sa juba omad seda: ~b~%s~s~', + ['not_enough_money'] = 'Sa ei saa seda modi lisada kuna sul pole piisavalt raha!', + ['purchased'] = 'Sa ostsid modi!', + ['press_custom'] = 'Vajuta ~g~[E]~s~, et tuunida sõidukit.', + ['level'] = 'Level %s', + ['neon'] = 'Neoon', + ['blip_name'] = 'Mehaanik', +-- Värvid + -- Must + ['black'] = 'Must', + ['graphite'] = 'Grafiit', + ['black_metallic'] = 'Metallne Must', + ['caststeel'] = 'Valatud Teras', + ['black_anth'] = 'Antratsiitmust', + ['matteblack'] = 'Mattmust', + ['darknight'] = 'Must Öö', + ['deepblack'] = 'Sügav Must', + ['oil'] = 'Oil must', + ['carbon'] = 'Süsinik must', + -- Valge + ['white'] = 'Valge', + ['vanilla'] = 'Vanilla', + ['creme'] = 'Kreem valge', + ['polarwhite'] = 'Polaar valge', + ['beige'] = 'Beez', + ['mattewhite'] = 'Matt valge', + ['snow'] = 'Lumivalge', + ['cotton'] = 'Puuvill', + ['alabaster'] = 'Alabaster valge', + ['purewhite'] = 'Puhas valge', + -- Hall + ['grey'] = 'Hall', + ['silver'] = 'Hõbe', + ['metallicgrey'] = 'Metallne Hall', + ['laminatedsteel'] = 'Lamineeritud Teras', + ['darkgray'] = 'Tumehall', + ['rockygray'] = 'Kivine Hall', + ['graynight'] = 'Öö Hall', + ['aluminum'] = 'Alumiinium Hall', + ['graymat'] = 'Matthall', + ['lightgrey'] = 'Helehall', + ['asphaltgray'] = 'Asfalt Hall', + ['grayconcrete'] = 'Hall Betoon', + ['darksilver'] = 'Tume Hõbe', + ['magnesite'] = 'Magnesiit Hall', + ['nickel'] = 'Nikli Hall', + ['zinc'] = 'Tsink Hall', + ['dolomite'] = 'Dolomiit Hall', + ['bluesilver'] = 'Sinine Hõbe', + ['titanium'] = 'Titaanium', + ['steelblue'] = 'Sini-hall Teras', + ['champagne'] = 'Šampuse Hall', + ['grayhunter'] = 'Küttija Hall', + -- Punane + ['red'] = 'Punane', + ['torino_red'] = 'Torino Punane', + ['poppy'] = 'Mooni Punane', + ['copper_red'] = 'Vask Punane', + ['cardinal'] = 'Kardinal Punane', + ['brick'] = 'Telliskivi Punane', + ['garnet'] = 'Granaat Punane', + ['cabernet'] = 'Cabernet Punane', + ['candy'] = 'Kommi Punane', + ['matte_red'] = 'Mattpunane', + ['dark_red'] = 'Tumepunane', + ['red_pulp'] = 'Liha Punane', + ['bril_red'] = 'Briljant Punane', + ['pale_red'] = 'Kahvatu Punane', + ['wine_red'] = 'Veini Punane', + ['volcano'] = 'Vulkaani Punane', + -- Roosa + ['pink'] = 'Roosa', + ['electricpink'] = 'Elektri roosa', + ['brightpink'] = 'Erkroosa', + ['salmon'] = 'Lõhe Roosa', + ['sugarplum'] = 'Magus Ploom', + -- Sinine + ['blue'] = 'Sinine', + ['topaz'] = 'Topaas Sinine', + ['light_blue'] = 'Helesinine', + ['galaxy_blue'] = 'Galaktika Sinine', + ['dark_blue'] = 'Tumesinine', + ['azure'] = 'Taevasina Sinine', + ['navy_blue'] = 'Mereväe Sinine', + ['lapis'] = 'Lapis Sinine', + ['blue_diamond'] = 'Sinine Teemant', + ['surfer'] = 'Surfari Sinine', + ['pastel_blue'] = 'Pastell Sinine', + ['celeste_blue'] = 'Celeste Sinine', + ['rally_blue'] = 'Ralli Sinine', + ['blue_paradise'] = 'Sinine Paradiis', + ['blue_night'] = 'Öö Sinine', + ['cyan_blue'] = 'Tsuaansinine', + ['cobalt'] = 'Kobalt Sinine', + ['electric_blue'] = 'Elektri Sinine', + ['horizon_blue'] = 'Horisondi Sinine', + ['metallic_blue'] = 'Metallne Sinine', + ['aquamarine'] = 'Akvamariin Sinine', + ['blue_agathe'] = 'Agathe Sinine', + ['zirconium'] = 'Tsirkoonium Sinine', + ['spinel'] = 'Spinell Sinine', + ['tourmaline'] = 'Turmaliin Sinine', + ['paradise'] = 'Paradiisi Sinine', + ['bubble_gum'] = 'Nätsu Sinine', + ['midnight_blue'] = 'Kesköö Sinine', + ['forbidden_blue'] = 'Keelatud Sinine', + ['glacier_blue'] = 'Liustiku Sinine', + -- Kollane + ['yellow'] = 'Kollane', + ['wheat'] = 'Nisukollane', + ['raceyellow'] = 'Ralli Kollane', + ['paleyellow'] = 'Kahvatu Kollane', + ['lightyellow'] = 'Helekollane', + -- Green + ['green'] = 'Roheline', + ['met_dark_green'] = 'Tumeroheline Metall', + ['rally_green'] = 'Ralli Roheline', + ['pine_green'] = 'Kuuse Roheline', + ['olive_green'] = 'Oliivi Roheline', + ['light_green'] = 'Hele Roheline', + ['lime_green'] = 'Laimi Roheline', + ['forest_green'] = 'Metsa Roheline', + ['lawn_green'] = 'Muru Roheline', + ['imperial_green'] = 'Keiserlik Roheline', + ['green_bottle'] = 'Klaaspudeli Roheline', + ['citrus_green'] = 'Tsitruse Roheline', + ['green_anis'] = 'Roheline Aniis', + ['khaki'] = 'Khaki Roheline', + ['army_green'] = 'Sõjaväe Roheline', + ['dark_green'] = 'Tumeroheline', + ['hunter_green'] = 'Jahi Roheline', + ['matte_foilage_green'] = 'Matt Lehestiku Roheline', + -- Orange + ['orange'] = 'Oranž', + ['tangerine'] = 'Mandariini Oranž', + ['matteorange'] = 'Mattoranž', + ['lightorange'] = 'Heleoranž', + ['peach'] = 'Virsiku Oranž', + ['pumpkin'] = 'Kõrvitsa Oranž', + ['orangelambo'] = 'Oranž Lamborghini', + -- Brown + ['brown'] = 'Pruun', + ['copper'] = 'Vask', + ['lightbrown'] = 'Helepruun', + ['darkbrown'] = 'Tumepruun', + ['bronze'] = 'Pronks', + ['brownmetallic'] = 'Pruun Metall', + ['espresso'] = 'Espresso Pruun', + ['chocolate'] = 'Šokolaadi Pruun', + ['terracotta'] = 'Terrakota Pruun', + ['marble'] = 'Pruun Marmor', + ['sand'] = 'Pruun Liiv', + ['sepia'] = 'Pruun Seepia', + ['bison'] = 'Piisoni Pruun', + ['palm'] = 'Pruun Palm', + ['caramel'] = 'Pruun Karamell', + ['rust'] = 'Pruun Rooste', + ['chestnut'] = 'Pruun Kastan', + ['hazelnut'] = 'Pruun Sarapuupähkel', + ['shell'] = 'Pruun Karp', + ['mahogany'] = 'Pruun Mahagon', + ['cauldron'] = 'Pruun Kastrul', + ['blond'] = 'Blond', + ['gravel'] = 'Kruus', + ['darkearth'] = 'Tume Maa', + ['desert'] = 'Kõrb', + -- Purple + ['purple'] = 'Lilla', + ['indigo'] = 'Indigo', + ['deeppurple'] = 'Sügav Lilla', + ['darkviolet'] = 'Tume Violett', + ['amethyst'] = 'Ametüst', + ['mysticalviolet'] = 'Müstiline Violett', + ['purplemetallic'] = 'Lilla Metall', + ['matteviolet'] = 'Mattviolett', + ['mattedeeppurple'] = 'Matt Sügav Lilla', + -- Chrome + ['chrome'] = 'Kroom', + ['brushedchrome'] = 'Harjatud Kroom', + ['blackchrome'] = 'Must Kroom', + ['brushedaluminum'] = 'Harjatud Alumiinium', + -- Metal + ['gold'] = 'Kuld', + ['puregold'] = 'Puhas Kuld', + ['brushedgold'] = 'Harjatud Kuld', + ['lightgold'] = 'Õrn Kuld', +-- License Plates + ['blue_on_white_1'] = 'Sinine Valge peal 1', + ['yellow_on_black'] = 'Kollane Musta peal', + ['yellow_blue'] = 'Kollane Sinise peal', + ['blue_on_white_2'] = 'Sinine Valge peal 2', + ['blue_on_white_3'] = 'Sinine Valge peal 3', +-- Upgrades + ['upgrades'] = 'Uuendused', + ['engine'] = 'Mootor', + ['brakes'] = 'Pidurid', + ['transmission'] = 'Käigukast', + ['suspension'] = 'Vedrustus', + ['armor'] = 'Kere', + ['turbo'] = 'Turbo', + ['no_turbo'] = 'Turbo eemaldatud', +-- Cosmetics + ['cosmetics'] = 'Kosmeetikud', + -- Body Parts + ['bodyparts'] = 'Auto osad', + ['leftfender'] = 'Vasakpoolne Poritiib', + ['rightfender'] = 'Parempoolne Poritiib', + ['spoilers'] = 'Spoilerid', + ['sideskirt'] = 'Küljekarbid', + ['cage'] = 'Puur', + ['hood'] = 'Kapott', + ['grille'] = 'Võre', + ['rearbumper'] = 'Taga Stange', + ['frontbumper'] = 'Esi Stange', + ['exhaust'] = 'Summuti', + ['roof'] = 'Katus', + -- Paint + ['respray'] = 'Ülevärvimine/Värv', + ['primary'] = 'Esmane', + ['secondary'] = 'Sekundaarne', + ['pearlescent'] = 'Läige', + -- Misc + ['headlights'] = 'Esituled', + ['licenseplates'] = 'Numbrimärk', + ['windowtint'] = 'Toonaknad', + ['horns'] = 'Signaal', + -- Neon + ['neons'] = 'Neoonid/Ledid', + -- Wheels + ['wheels'] = 'Rattad', + ['tiresmoke'] = 'Rehvi Toss', + ['wheel_type'] = 'Ratta Tüüp', + ['wheel_color'] = 'Ratta Värv', + ['sport'] = 'Sport', + ['muscle'] = 'Muskel', + ['lowrider'] = 'lowrider', + ['suv'] = 'SUV', + ['allterrain'] = 'Igal Maastikul', + ['tuning'] = 'Tuuner', + ['motorcycle'] = 'Mootorrattad', + ['highend'] = 'Tipptasemel', + + ['modplateholder'] = 'Numbrimärk - Taga', + ['modvanityplate'] = 'Numbrimärk - Ees', + ['interior'] = 'Sisustus', + ['trim'] = 'Polstrid', + ['dashboard'] = 'Armatuur', + ['speedometer'] = 'Spidomeeter', + ['door_speakers'] = 'Ukse Kõlarid', + ['seats'] = 'Istmed', + ['steering_wheel'] = 'Rool', + ['gear_lever'] = 'Käigukang', + ['quarter_deck'] = 'Sõiduki Kast', + ['speakers'] = 'Kõlarid', + ['trunk'] = 'Bagasnik', + ['hydraulic'] = 'Hüdraulika', + ['engine_block'] = 'Mootoriplokk', + ['air_filter'] = 'Õhu Filtrid', + ['struts'] = 'Tugipostid', + ['arch_cover'] = 'Kaare kate', + ['aerials'] = 'Areaalid', + ['wings'] = 'Tiivad', + ['fuel_tank'] = 'Tankimispaak', + ['windows'] = 'Aknad', + ['stickers'] = 'Kleepsud', +} diff --git a/[esx_addons]/esx_lscustom/locales/fr.lua b/[esx_addons]/esx_lscustom/locales/fr.lua new file mode 100644 index 00000000..22a52b91 --- /dev/null +++ b/[esx_addons]/esx_lscustom/locales/fr.lua @@ -0,0 +1,276 @@ +Locales['fr'] = { + ['by_default'] = 'par défaut', + ['installed'] = 'installé', + ['already_own'] = 'vous possédez déjà: %s', + ['not_enough_money'] = 'vous n\'avez pas assez d\'argent!', + ['purchased'] = 'achat effectué!', + ['press_custom'] = 'appuyez sur ~INPUT_PICKUP~ pour personnaliser le véhicule.', + ['level'] = 'niveau %s', + ['neon'] = 'neon', + ['blip_name'] = 'los Santos Customs', +-- Paint Colors + -- Black + ['black'] = 'noir', + ['graphite'] = 'graphite', + ['black_metallic'] = 'noir Méttallisé', + ['caststeel'] = 'acier Fondu', + ['black_anth'] = 'noir Anthracite', + ['matteblack'] = 'noir Mat', + ['darknight'] = 'nuit Sombre', + ['deepblack'] = 'noir Profond', + ['oil'] = 'pétrol', + ['carbon'] = 'carbon', + -- White + ['white'] = 'blanc', + ['vanilla'] = 'vanille', + ['creme'] = 'crème', + ['polarwhite'] = 'blanc Polair', + ['beige'] = 'beige', + ['mattewhite'] = 'blanc Mat', + ['snow'] = 'neige', + ['cotton'] = 'coton', + ['alabaster'] = 'albâtre', + ['purewhite'] = 'blanc Pure', + -- Grey + ['grey'] = 'gris', + ['silver'] = 'Argenté', + ['metallicgrey'] = 'Gris Métallisé', + ['laminatedsteel'] = 'Acier Laminé', + ['darkgray'] = 'Gris Foncé', + ['rockygray'] = 'Gris Rocheux', + ['graynight'] = 'Gris Nuit', + ['aluminum'] = 'Aluminium', + ['graymat'] = 'Gris Mat', + ['lightgrey'] = 'Gris Clair', + ['asphaltgray'] = 'Gris Bitume', + ['grayconcrete'] = 'Gris Béton', + ['darksilver'] = 'Argent Sombre', + ['magnesite'] = 'Magnésite', + ['nickel'] = 'nickel', + ['zinc'] = 'zinc', + ['dolomite'] = 'dolomite', + ['bluesilver'] = 'Argent Bleuté', + ['titanium'] = 'Titane', + ['steelblue'] = 'Acier Bleui', + ['champagne'] = 'Champagne', + ['grayhunter'] = 'Gris Chasseur', + -- Red + ['red'] = 'rouge', + ['torino_red'] = 'Rouge Turin', + ['poppy'] = 'Coquelicot', + ['copper_red'] = 'Rouge Cuivré', + ['cardinal'] = 'Rouge Cardinal', + ['brick'] = 'Rouge Brique', + ['garnet'] = 'Grenat', + ['cabernet'] = 'Pourpre', + ['candy'] = 'Framboise', + ['matte_red'] = 'Rouge Mat', + ['dark_red'] = 'Rouge Foncé', + ['red_pulp'] = 'Rouge Pulpeux', + ['bril_red'] = 'Rouge Brillant', + ['pale_red'] = 'Rouge Pale', + ['wine_red'] = 'Rouge Vin', + ['volcano'] = 'Volcano', + -- Pink + ['pink'] = 'rose', + ['electricpink'] = 'rose Electrique', + ['brightpink'] = 'rose pétant', + ['salmon'] = 'rose Saumon', + ['sugarplum'] = 'rose Dragée', + -- Blue + ['blue'] = 'bleu', + ['topaz'] = 'topaze', + ['light_blue'] = 'bleu clair', + ['galaxy_blue'] = 'bleu galaxy', + ['dark_blue'] = 'bleu foncé', + ['azure'] = 'bleu azur', + ['navy_blue'] = 'bleu marine', + ['lapis'] = 'lapis lazuli', + ['blue_diamond'] = 'bleu diamant', + ['surfer'] = 'surfer', + ['pastel_blue'] = 'pastel', + ['celeste_blue'] = 'bleu celeste', + ['rally_blue'] = 'bleu rally', + ['blue_paradise'] = 'bleu paradis', + ['blue_night'] = 'bleu nuit', + ['cyan_blue'] = 'bleu cyan', + ['cobalt'] = 'cobalt', + ['electric_blue'] = 'bleu electrique', + ['horizon_blue'] = 'bleu horizon', + ['metallic_blue'] = 'bleu métallisé', + ['aquamarine'] = 'aigue marine', + ['blue_agathe'] = 'bleu agathe', + ['zirconium'] = 'zirconium', + ['spinel'] = 'spinelle', + ['tourmaline'] = 'tourmaline', + ['paradise'] = 'paradis', + ['bubble_gum'] = 'bubble gum', + ['midnight_blue'] = 'bleu minuit', + ['forbidden_blue'] = 'bleu interdit', + ['glacier_blue'] = 'bleu glacier', + -- Yellow + ['yellow'] = 'jaune', + ['wheat'] = 'Jaune Blé', + ['raceyellow'] = 'Jaune Rally', + ['paleyellow'] = 'Jaune Clair', + ['lightyellow'] = 'Jaune Pâle', + -- Green + ['green'] = 'vert', + ['met_dark_green'] = 'Vert Foncé', + ['rally_green'] = 'Vert Rally', + ['pine_green'] = 'Vert Sapin', + ['olive_green'] = 'Vert Olive', + ['light_green'] = 'Vert Clair', + ['lime_green'] = 'Vert Lime', + ['forest_green'] = 'Vert Forêt', + ['lawn_green'] = 'Vert Pelouse', + ['imperial_green'] = 'Vert Impérial', + ['green_bottle'] = 'Vert Bouteille', + ['citrus_green'] = 'Vert Citrus', + ['green_anis'] = 'Vert Anis', + ['khaki'] = 'Kaki', + ['army_green'] = 'Vert Army', + ['dark_green'] = 'Vert Sombre', + ['hunter_green'] = 'Vert Chasseur', + ['matte_foilage_green'] = 'Amarylisse', + -- Orange + ['orange'] = 'orange', + ['tangerine'] = 'Tangerine', + ['matteorange'] = 'Orange Mat', + ['lightorange'] = 'Orange Clair', + ['peach'] = 'Pèche', + ['pumpkin'] = 'Citrouille', + ['orangelambo'] = 'Orange Lambo', + -- Brown + ['brown'] = 'marron', + ['copper'] = 'Cuivre', + ['lightbrown'] = 'Marronclair', + ['darkbrown'] = 'Marron Foncé', + ['bronze'] = 'Bronze', + ['brownmetallic'] = 'Marron Métallisé', + ['expresso'] = 'Expresso', + ['chocolate'] = 'Chocolat', + ['terracotta'] = 'Terre Cuite', + ['marble'] = 'Marbre', + ['sand'] = 'Sable', + ['sepia'] = 'Sépia', + ['bison'] = 'Bison', + ['palm'] = 'Palmier', + ['caramel'] = 'Caramel', + ['rust'] = 'Rouille', + ['chestnut'] = 'Chataigne', + ['hazelnut'] = 'Noisette', + ['shell'] = 'Coquillage', + ['mahogany'] = 'Acajou', + ['cauldron'] = 'Chaudron', + ['blond'] = 'Blond', + ['gravel'] = 'Gravillon', + ['darkearth'] = 'Terre Foncé', + ['desert'] = 'Désert', + -- Purple + ['purple'] = 'violet', + ['indigo'] = 'Indigo', + ['deeppurple'] = 'Violet Profond', + ['darkviolet'] = 'Violet Foncé', + ['amethyst'] = 'Améthyste', + ['mysticalviolet'] = 'Violet Mystique', + ['purplemetallic'] = 'Violet Métallisé', + ['matteviolet'] = 'Violet Mat', + ['mattedeeppurple'] = 'Violet Profond Mat', + -- Chrome + ['chrome'] = 'chrome', + ['brushedchrome'] = 'chrome Brossé', + ['blackchrome'] = 'chrome Noir', + ['brushedaluminum'] = 'aluminum Brossé', + -- Metal + ['gold'] = 'or', + ['puregold'] = 'Or Pure', + ['brushedgold'] = 'Or Brossé', + ['lightgold'] = 'Or Clair', +-- License Plates + ['blue_on_white_1'] = 'bleu sur fond Blanc 1', + ['yellow_on_black'] = 'jaune sur fond Noir', + ['yellow_blue'] = 'jaune sur fond Bleu', + ['blue_on_white_2'] = 'bleu sur fond Blanc 2', + ['blue_on_white_3'] = 'bleu sur fond Blanc 3', +-- Upgrades + ['upgrades'] = 'upgrades', + ['engine'] = 'moteur', + ['brakes'] = 'freins', + ['transmission'] = 'transmission', + ['suspension'] = 'suspension', + ['armor'] = 'armure', + ['turbo'] = 'turbo', + ['no_turbo'] = 'pas de turbo', +-- Cosmetics + ['cosmetics'] = 'cosmétiques', + -- Body Parts + ['bodyparts'] = 'carosserie', + ['leftfender'] = 'aile gauche', + ['rightfender'] = 'aile droite', + ['spoilers'] = 'aileron', + ['sideskirt'] = 'bas de caisse', + ['cage'] = 'cage', + ['hood'] = 'capot', + ['grille'] = 'grille', + ['rearbumper'] = 'pare-choc arrière', + ['frontbumper'] = 'pare-choc avant', + ['exhaust'] = 'pot d\'échappement', + ['roof'] = 'toit', + -- Paint + ['respray'] = 'peinture', + ['primary'] = 'primaire', + ['secondary'] = 'secondaire', + ['pearlescent'] = 'nacré', + -- Misc + ['headlights'] = 'phares', + ['licenseplates'] = 'plaque', + ['windowtint'] = 'fenêtres', + ['horns'] = 'klaxon', + -- Neon + ['neons'] = 'néons', + -- Wheels + ['wheels'] = 'roues', + ['tiresmoke'] = 'fumée des pneus', + ['wheel_type'] = 'types de Jantes', + ['wheel_color'] = 'couleurs jantes', + ['sport'] = 'Jantes Sport', + ['muscle'] = 'Jantes Muscle', + ['lowrider'] = 'Jantes Lowrider', + ['suv'] = 'Jantes SUV', + ['allterrain'] = 'Jantes Tout-terrain', + ['tuning'] = 'Jantes Tuning', + ['motorcycle'] = 'Jantes Moto', + ['highend'] = 'Jantes Haut de gamme', + + ['modplateholder'] = 'plaque - Arrière', + ['modvanityplate'] = 'plate - Avant', + ['interior'] = 'intérieur', + ['trim'] = 'accessoires', + ['dashboard'] = 'tableau de bord', + ['speedometer'] = 'compteur de vitesse', + ['door_speakers'] = 'haut-parleurs - portières', + ['seats'] = 'sièges', + ['steering_wheel'] = 'volant', + ['gear_lever'] = 'levier de vitesse', + ['quarter_deck'] = 'plage arrière', + ['speakers'] = 'haut-parleurs', + ['trunk'] = 'coffre', + ['hydraulic'] = 'suspension hydraulique', + ['engine_block'] = 'bloc moteur', + ['air_filter'] = 'filtre à air', + ['struts'] = 'entretoises', + ['arch_cover'] = 'pare-boue des ailes', + ['aerials'] = 'antennes', + ['wings'] = 'ailes', + ['fuel_tank'] = 'bouchon du réservoir', + ['windows'] = 'fenêtres', + ['stickers'] = 'autocollants', + +-- Xenon Colors + ['mintgreen'] = 'Mint Green', + ['goldenshower'] = 'Golden Shower', + ['ponypink'] = 'Pony Pink', + ['hotpink'] = 'Hot Pink', + ['blacklight'] = 'Blacklight', +} diff --git a/[esx_addons]/esx_lscustom/locales/hu.lua b/[esx_addons]/esx_lscustom/locales/hu.lua new file mode 100644 index 00000000..70e492ed --- /dev/null +++ b/[esx_addons]/esx_lscustom/locales/hu.lua @@ -0,0 +1,276 @@ +Locales['hu'] = { + ['by_default'] = 'alapértelmezett', + ['installed'] = 'telepítve', + ['already_own'] = 'már használod: %s', + ['not_enough_money'] = 'nincs pénzed erre az alkatrészre!', + ['purchased'] = 'megvásároltad ezt az alkatrészt!', + ['press_custom'] = 'nyomd meg az ~INPUT_PICKUP~ betüt a jármü tuningolásához.', + ['level'] = 'szint %s', + ['neon'] = 'neon', + ['blip_name'] = 'Tuning mühely', +-- Paint Colors + -- Black + ['black'] = 'fekete', + ['graphite'] = 'grafit', + ['black_metallic'] = 'metál fekete', + ['caststeel'] = 'fényezett acél', + ['black_anth'] = 'antraktív fekete', + ['matteblack'] = 'matt fekete', + ['darknight'] = 'éjsötét', + ['deepblack'] = 'mély fekete', + ['oil'] = 'olaj', + ['carbon'] = 'karbon', + -- White + ['white'] = 'fehér', + ['vanilla'] = 'vanilla', + ['creme'] = 'krém', + ['polarwhite'] = 'polár fehér', + ['beige'] = 'bézs', + ['mattewhite'] = 'matt fehér', + ['snow'] = 'hó', + ['cotton'] = 'pamut fehér', + ['alabaster'] = 'alabástrom', + ['purewhite'] = 'tiszta fehér', + -- Grey + ['grey'] = 'szürke', + ['silver'] = 'ezüst', + ['metallicgrey'] = 'metál szürke', + ['laminatedsteel'] = 'laminált acél szürke', + ['darkgray'] = 'sötétszürkeszürke', + ['rockygray'] = 'sziklás szürke', + ['graynight'] = 'éjszürke', + ['aluminum'] = 'alumínium szürke', + ['graymat'] = 'matt szürke', + ['lightgrey'] = 'világos szürke', + ['asphaltgray'] = 'aszfalt szürke', + ['grayconcrete'] = 'beton szürke', + ['darksilver'] = 'sötét ezüst', + ['magnesite'] = 'magnezit szürke', + ['nickel'] = 'nikkel szürke', + ['zinc'] = 'cink szürke', + ['dolomite'] = 'dolomit szürke', + ['bluesilver'] = 'kék ezüst', + ['titanium'] = 'titán szürke', + ['steelblue'] = 'kék acél', + ['champagne'] = 'pezsgö szürke', + ['grayhunter'] = 'vadász szürke', + -- Red + ['red'] = 'piros', + ['torino_red'] = 'torinó piros', + ['poppy'] = 'mák piros', + ['copper_red'] = 'rézvörös', + ['cardinal'] = 'bíbor piros', + ['brick'] = 'tégla vörös', + ['garnet'] = 'gránit vörös', + ['cabernet'] = 'kabernetabernet piros', + ['candy'] = 'cukorka piros', + ['matte_red'] = 'matt piros', + ['dark_red'] = 'sötét piros', + ['red_pulp'] = 'pép vörös', + ['bril_red'] = 'ragyogó piros', + ['pale_red'] = 'halvány piros', + ['wine_red'] = 'bor vörös', + ['volcano'] = 'Vulkán', + -- Pink + ['pink'] = 'rózsaszín', + ['electricpink'] = 'elektromos rózsaszín', + ['brightpink'] = 'világos rózsaszín', + ['salmon'] = 'lazac rózsaszín', + ['sugarplum'] = 'cukorka rózsaszín', + -- Blue + ['blue'] = 'kék', + ['topaz'] = 'topáz kék', + ['light_blue'] = 'világos kék', + ['galaxy_blue'] = 'galaktikus kék', + ['dark_blue'] = 'sötét Blue', + ['azure'] = 'azúr kék', + ['navy_blue'] = 'hadi kék', + ['lapis'] = 'lazurit kék', + ['blue_diamond'] = 'gyémánt kék', + ['surfer'] = 'szörf kék', + ['pastel_blue'] = 'pasztel kék', + ['celeste_blue'] = 'keleszt kék', + ['rally_blue'] = 'rally kék', + ['blue_paradise'] = 'paradicsom kék', + ['blue_night'] = 'kék éjszaka', + ['cyan_blue'] = 'cián kék', + ['cobalt'] = 'kobalt kék', + ['electric_blue'] = 'elektromos kék', + ['horizon_blue'] = 'horizont kék', + ['metallic_blue'] = 'metál kék', + ['aquamarine'] = 'akvamarin kék', + ['blue_agathe'] = 'kék agát', + ['zirconium'] = 'cirkónium kék', + ['spinel'] = 'spinell kék', + ['tourmaline'] = 'turmalin kék', + ['paradise'] = 'parádia kék', + ['bubble_gum'] = 'rágógumi kék', + ['midnight_blue'] = 'éjkék', + ['forbidden_blue'] = 'tiltott kék', + ['glacier_blue'] = 'gleccser kék', + -- Yellow + ['yellow'] = 'sárga', + ['wheat'] = 'búza sárga', + ['raceyellow'] = 'verseny sárga', + ['paleyellow'] = 'halványsárga', + ['lightyellow'] = 'világos sárga', + -- Green + ['green'] = 'zöld', + ['met_dark_green'] = 'metál sötétzöld', + ['rally_green'] = 'rally zöld', + ['pine_green'] = 'fenyö zöld', + ['olive_green'] = 'oliva zöld', + ['light_green'] = 'világos zöld', + ['lime_green'] = 'lime zöld', + ['forest_green'] = 'erdö zöld', + ['lawn_green'] = 'gyep zöld', + ['imperial_green'] = 'birodalmi zöld', + ['green_bottle'] = 'üveg zöld', + ['citrus_green'] = 'citrus zöld', + ['green_anis'] = 'zöld ánizs', + ['khaki'] = 'khaki zöld', + ['army_green'] = 'katonai zöld', + ['dark_green'] = 'sötét zöld', + ['hunter_green'] = 'vadász zöld', + ['matte_foilage_green'] = 'matt lombozat zöld', + -- Orange + ['orange'] = 'narancssárga', + ['tangerine'] = 'mandarin sárga', + ['matteorange'] = 'matt narancssárga', + ['lightorange'] = 'világos narancssárga', + ['peach'] = 'öszibarack narancssárga', + ['pumpkin'] = 'tök narancssárga', + ['orangelambo'] = 'lambo narancssárga', + -- Brown + ['brown'] = 'barna', + ['copper'] = 'réz', + ['lightbrown'] = 'világos barna', + ['darkbrown'] = 'sötét barna', + ['bronze'] = 'bronz', + ['brownmetallic'] = 'metál barna', + ['espresso'] = 'eszpresszó barna', + ['chocolate'] = 'csokoládé barna', + ['terracotta'] = 'terrakotta', + ['marble'] = 'márvány', + ['sand'] = 'homok barnca', + ['sepia'] = 'Szépia barna', + ['bison'] = 'bölény barna', + ['palm'] = 'tenyér barna', + ['caramel'] = 'karamella barna', + ['rust'] = 'rozsda barna', + ['chestnut'] = 'gesztenye barna', + ['hazelnut'] = 'mogyoró barna', + ['shell'] = 'héj barna', + ['mahogany'] = 'mahagóni barna', + ['cauldron'] = 'üst barna', + ['blond'] = 'szökés barna', + ['gravel'] = 'kavics barna', + ['darkearth'] = 'sötét föld barna', + ['desert'] = 'sivatag barna', + -- Purple + ['purple'] = 'lila', + ['indigo'] = 'Indigó', + ['deeppurple'] = 'mély lila', + ['darkviolet'] = 'sötét lila', + ['amethyst'] = 'ametiszt lila', + ['mysticalviolet'] = 'misztikus lila', + ['purplemetallic'] = 'metál lila', + ['matteviolet'] = 'matt lila', + ['mattedeeppurple'] = 'mély matt lila', + -- Chrome + ['chrome'] = 'króm', + ['brushedchrome'] = 'csiszolt króm', + ['blackchrome'] = 'króm fekete', + ['brushedaluminum'] = 'szálcsiszolt alumínium', + -- Metal + ['gold'] = 'arany', + ['puregold'] = 'tiszta arany', + ['brushedgold'] = 'csiszolt arany', + ['lightgold'] = 'világos arany', +-- License Plates + ['blue_on_white_1'] = 'kék és fehér 1', + ['yellow_on_black'] = 'sárga és fekete', + ['yellow_blue'] = 'sárga és kék', + ['blue_on_white_2'] = 'kék és fehér 2', + ['blue_on_white_3'] = 'kék és fehér 3', +-- Upgrades + ['upgrades'] = 'fejlesztések', + ['engine'] = 'motor', + ['brakes'] = 'fék', + ['transmission'] = 'váltó', + ['suspension'] = 'lengéscsillapító', + ['armor'] = 'páncél', + ['turbo'] = 'turbó', + ['no_turbo'] = 'turbó nélkül', +-- Cosmetics + ['cosmetics'] = 'kozmetika', + -- Body Parts + ['bodyparts'] = 'karosszéria elemek', + ['leftfender'] = 'bal oldali sárvédö', + ['rightfender'] = 'jobb oldali sárvédö', + ['spoilers'] = 'spoilerek', + ['sideskirt'] = 'oldalsó szoknyák', + ['cage'] = 'kaszni', + ['hood'] = 'motorháztetö', + ['grille'] = 'rács', + ['rearbumper'] = 'hátsó lökhárító', + ['frontbumper'] = 'elsö lökhárító', + ['exhaust'] = 'kipufogó', + ['roof'] = 'tetö', + -- Paint + ['respray'] = 'átfestés', + ['primary'] = 'elsödleges', + ['secondary'] = 'másodlagos', + ['pearlescent'] = 'gyöngyházfényü', + -- Misc + ['headlights'] = 'fényszórók', + ['licenseplates'] = 'rendszámtábla', + ['windowtint'] = 'ablak üveg szín', + ['horns'] = 'dudák', + -- Neon + ['neons'] = 'neonok', + -- Wheels + ['wheels'] = 'kerekek', + ['tiresmoke'] = 'gumi füst', + ['wheel_type'] = 'kerék típus', + ['wheel_color'] = 'kerék szín', + ['sport'] = 'sport kerék', + ['muscle'] = 'izomautó kerék', + ['lowrider'] = 'lowrider kerék', + ['suv'] = 'utcai terepjáró kerék', + ['allterrain'] = 'terepjáró kerék', + ['tuning'] = 'tuning kerék', + ['motorcycle'] = 'motorbicikli kerék', + ['highend'] = 'magas szintü kerék', + + ['modplateholder'] = 'rendszámtábla - hátsó', + ['modvanityplate'] = 'rendszámtábla - elsö', + ['interior'] = 'belsö', + ['trim'] = 'állapot', + ['dashboard'] = 'müszerfal', + ['speedometer'] = 'sebességmérö', + ['door_speakers'] = 'ajtó hangszórók', + ['seats'] = 'ülések', + ['steering_wheel'] = 'kormánykerék', + ['gear_lever'] = 'váltókar', + ['quarter_deck'] = 'hátsó fedélzet', + ['speakers'] = 'hangszórók', + ['trunk'] = 'csomagtartó', + ['hydraulic'] = 'hidraulika', + ['engine_block'] = 'motorblokk', + ['air_filter'] = 'légszürö', + ['struts'] = 'merevítés', + ['arch_cover'] = 'arch borító', + ['aerials'] = 'antennák', + ['wings'] = 'szárnyak', + ['fuel_tank'] = 'üzemanyag tartály', + ['windows'] = 'ablakok', + ['stickers'] = 'matricák', + +-- Xenon Colors + ['mintgreen'] = 'Mint Green', + ['goldenshower'] = 'Golden Shower', + ['ponypink'] = 'Pony Pink', + ['hotpink'] = 'Hot Pink', + ['blacklight'] = 'Blacklight', +} diff --git a/[esx_addons]/esx_lscustom/locales/it.lua b/[esx_addons]/esx_lscustom/locales/it.lua new file mode 100644 index 00000000..e65ea29a --- /dev/null +++ b/[esx_addons]/esx_lscustom/locales/it.lua @@ -0,0 +1,276 @@ +Locales['it'] = { + ['by_default'] = 'default', + ['installed'] = 'installato', + ['already_own'] = 'possiedi già: %s', + ['not_enough_money'] = 'non puoi permetterti questa mod!', + ['purchased'] = 'hai acquistato la mod!', + ['press_custom'] = 'premi ~b~[E]~s~ per personalizzare il tuo veicolo', + ['level'] = 'livello %s', + ['neon'] = 'neon', + ['blip_name'] = 'los Santos Customs', +-- Paint Colors + -- Black + ['black'] = 'nero', + ['graphite'] = 'grafite', + ['black_metallic'] = 'nero metallico', + ['caststeel'] = 'acciaio fuso', + ['black_anth'] = 'nero antacite', + ['matteblack'] = 'nero opaco', + ['darknight'] = 'notte oscura', + ['deepblack'] = 'nero profondo', + ['oil'] = 'olio', + ['carbon'] = 'carbonio', + -- White + ['white'] = 'bianco', + ['vanilla'] = 'vaniglia', + ['creme'] = 'crema', + ['polarwhite'] = 'bianco polare', + ['beige'] = 'beige', + ['mattewhite'] = 'bianco opaco', + ['snow'] = 'neve', + ['cotton'] = 'cotone', + ['alabaster'] = 'alabastro', + ['purewhite'] = 'bianco puro', + -- Grey + ['grey'] = 'grigio', + ['silver'] = 'argento', + ['metallicgrey'] = 'grigio metallico', + ['laminatedsteel'] = 'acciaio laminato', + ['darkgray'] = 'grigio scuro', + ['rockygray'] = 'grigio roccioso', + ['graynight'] = 'grigio notte', + ['aluminum'] = 'alluminio', + ['graymat'] = 'grigio opaco', + ['lightgrey'] = 'grigio chiaro', + ['asphaltgray'] = 'grigio asfalto', + ['grayconcrete'] = 'grigio cemento', + ['darksilver'] = 'argento scuro', + ['magnesite'] = 'magnesite', + ['nickel'] = 'nickel', + ['zinc'] = 'zinco', + ['dolomite'] = 'dolomite', + ['bluesilver'] = 'argento blu', + ['titanium'] = 'titanio', + ['steelblue'] = 'blu acciaio', + ['champagne'] = 'champagne', + ['grayhunter'] = 'grigio cacciatore', + -- Red + ['red'] = 'rosso', + ['torino_red'] = 'rosso torino', + ['poppy'] = 'papavero', + ['copper_red'] = 'rosso rame', + ['cardinal'] = 'rosso cardinale', + ['brick'] = 'rosso mattone', + ['garnet'] = 'Granato', + ['cabernet'] = 'rosso cabernet', + ['candy'] = 'caramella rossa', + ['matte_red'] = 'rosso opaco', + ['dark_red'] = 'rosso scuro', + ['red_pulp'] = 'polpa rossa', + ['bril_red'] = 'rosso brillante', + ['pale_red'] = 'rosso pallido', + ['wine_red'] = 'vino rosso', + ['volcano'] = 'vulcano', + -- Pink + ['pink'] = 'rosa', + ['electricpink'] = 'rosa elettrico', + ['brightpink'] = 'rosa brillante', + ['salmon'] = 'rosa salmone', + ['sugarplum'] = 'rosa prugna', + -- Blue + ['blue'] = 'blu', + ['topaz'] = 'blu topazio', + ['light_blue'] = 'azzurro', + ['galaxy_blue'] = 'blu galassia', + ['dark_blue'] = 'blu scuro', + ['azure'] = 'azzurro', + ['navy_blue'] = 'blu marino', + ['lapis'] = 'blu lapislazzulo', + ['blue_diamond'] = 'blu diamante', + ['surfer'] = 'surfista', + ['pastel_blue'] = 'blu pastello', + ['celeste_blue'] = 'blu celeste', + ['rally_blue'] = 'rally Blue', + ['blue_paradise'] = 'blu Paradiso', + ['blue_night'] = 'blu notte', + ['cyan_blue'] = 'blu ciano', + ['cobalt'] = 'cobalto', + ['electric_blue'] = 'blue elettrico', + ['horizon_blue'] = 'blu orizzonte', + ['metallic_blue'] = 'blu metallico', + ['aquamarine'] = 'acquamarina', + ['blue_agathe'] = 'blu agata', + ['zirconium'] = 'zirconio', + ['spinel'] = 'spinello', + ['tourmaline'] = 'tormalina', + ['paradise'] = 'paradiso', + ['bubble_gum'] = 'blu gomma', + ['midnight_blue'] = 'blu mezzanotte', + ['forbidden_blue'] = 'blu proibito', + ['glacier_blue'] = 'blu glaciale', + -- Yellow + ['yellow'] = 'giallo', + ['wheat'] = 'giallo grano', + ['raceyellow'] = 'giallo gara', + ['paleyellow'] = 'giallo pallido', + ['lightyellow'] = 'giallo chiaro', + -- Green + ['green'] = 'verde', + ['met_dark_green'] = 'verde scuro metallico', + ['rally_green'] = 'verde Rally', + ['pine_green'] = 'verde pino', + ['olive_green'] = 'verde oliva', + ['light_green'] = 'verde chiaro', + ['lime_green'] = 'verde lime', + ['forest_green'] = 'verde foresta', + ['lawn_green'] = 'verde prato', + ['imperial_green'] = 'verde imperiale', + ['green_bottle'] = 'verde bottiglia', + ['citrus_green'] = 'verde agrumi', + ['green_anis'] = 'verde anici', + ['khaki'] = 'cachi', + ['army_green'] = 'verde militare', + ['dark_green'] = 'verde scuro', + ['hunter_green'] = 'verde cacciatore', + ['matte_foilage_green'] = 'verde foglia', + -- Orange + ['orange'] = 'arancione', + ['tangerine'] = 'mandarino', + ['matteorange'] = 'arancio opaco', + ['lightorange'] = 'arancione chiaro', + ['peach'] = 'pesca', + ['pumpkin'] = 'zucca', + ['orangelambo'] = 'arancione Lambo', + -- Brown + ['brown'] = 'marrone', + ['copper'] = 'rame', + ['lightbrown'] = 'marrone chiaro', + ['darkbrown'] = 'marrone scuro', + ['bronze'] = 'Bronzo', + ['brownmetallic'] = 'marrone metallico', + ['expresso'] = 'Espresso', + ['chocolate'] = 'cioccolato', + ['terracotta'] = 'Terracotta', + ['marble'] = 'Marmo', + ['sand'] = 'Sabbia', + ['sepia'] = 'Seppia', + ['bison'] = 'Bisonte', + ['palm'] = 'Palmo', + ['caramel'] = 'Caramello', + ['rust'] = 'Ruggine', + ['chestnut'] = 'Castagna', + ['hazelnut'] = 'nocciola', + ['shell'] = 'guscio', + ['mahogany'] = 'Mogano', + ['cauldron'] = 'marrone calderone', + ['blond'] = 'marrone biondo', + ['gravel'] = 'marrone ghiaia', + ['darkearth'] = 'marrone terra scura', + ['desert'] = 'deserto', + -- Purple + ['purple'] = 'viola', + ['indigo'] = 'Indaco', + ['deeppurple'] = 'viola intenso', + ['darkviolet'] = 'viola scuro', + ['amethyst'] = 'emetista', + ['mysticalviolet'] = 'viola mistico', + ['purplemetallic'] = 'viola metallico', + ['matteviolet'] = 'viola opaco', + ['mattedeeppurple'] = 'viola intenso opaco', + -- Chrome + ['chrome'] = 'cromato', + ['brushedchrome'] = 'cromato spazzolato', + ['blackchrome'] = 'nero gromato', + ['brushedaluminum'] = 'alluminio spazzolato', + -- Metal + ['gold'] = 'oro', + ['puregold'] = 'oro puro', + ['brushedgold'] = 'oro spazzolato', + ['lightgold'] = 'oro chiaro', +-- License Plates + ['blue_on_white_1'] = 'blu su bianco 1', + ['yellow_on_black'] = 'giallo su nero', + ['yellow_blue'] = 'giallo su blu', + ['blue_on_white_2'] = 'blu su bianco 2', + ['blue_on_white_3'] = 'blu su bianco 3', +-- Upgrades + ['upgrades'] = 'aggiornamenti', + ['engine'] = 'motore', + ['brakes'] = 'freni', + ['transmission'] = 'trasmissione', + ['suspension'] = 'ssospensione', + ['armor'] = 'armatura', + ['turbo'] = 'turbo', + ['no_turbo'] = 'no turbo', +-- Cosmetics + ['cosmetics'] = 'cosmetici', + -- Body Parts + ['bodyparts'] = 'parti del corpo', + ['leftfender'] = 'parafango sinistro', + ['rightfender'] = 'parafango destro', + ['spoilers'] = 'spoiler', + ['sideskirt'] = 'gonna laterale', + ['cage'] = 'gabbia', + ['hood'] = 'cappuccio', + ['grille'] = 'griglia', + ['rearbumper'] = 'paraurti posteriore', + ['frontbumper'] = 'paraurti anteriore', + ['exhaust'] = 'scarico', + ['roof'] = 'tetto', + -- Paint + ['respray'] = 'verici', + ['primary'] = 'primaria', + ['secondary'] = 'secondaria', + ['pearlescent'] = 'perlescente', + -- Misc + ['headlights'] = 'fari', + ['licenseplates'] = 'targa', + ['windowtint'] = 'tinta finestrino', + ['horns'] = 'clacson', + -- Neon + ['neons'] = 'neons', + -- Wheels + ['wheels'] = 'ruote', + ['tiresmoke'] = 'fumo pneumatici', + ['wheel_type'] = 'tipo di ruota', + ['wheel_color'] = 'colore cerchione', + ['sport'] = 'sport', + ['muscle'] = 'muscle', + ['lowrider'] = 'lowrider', + ['suv'] = 'SUV', + ['allterrain'] = 'tutti i terreni', + ['tuning'] = 'tuning', + ['motorcycle'] = 'moto', + ['highend'] = 'fascia alta', + + ['modplateholder'] = 'targa - posteriore', + ['modvanityplate'] = 'targa - anteriore', + ['interior'] = 'interni', + ['trim'] = 'trim', + ['dashboard'] = 'cruscotto', + ['speedometer'] = 'tachimetro', + ['door_speakers'] = 'casse audio', + ['seats'] = 'sedili', + ['steering_wheel'] = 'volante', + ['gear_lever'] = 'leva del cambio', + ['quarter_deck'] = 'quarter-deck', + ['speakers'] = 'altoparlanti', + ['trunk'] = 'tronco', + ['hydraulic'] = 'idraulica', + ['engine_block'] = 'blocco motore', + ['air_filter'] = 'filtro aria', + ['struts'] = 'puntoni', + ['arch_cover'] = 'cover', + ['aerials'] = 'antenne', + ['wings'] = 'ali', + ['fuel_tank'] = 'serbatoio carburante', + ['windows'] = 'finestrini', + ['stickers'] = 'Livrea', + +-- Xenon Colors + ['mintgreen'] = 'Mint Green', + ['goldenshower'] = 'Golden Shower', + ['ponypink'] = 'Pony Pink', + ['hotpink'] = 'Hot Pink', + ['blacklight'] = 'Blacklight', +} diff --git a/[esx_addons]/esx_lscustom/locales/pl.lua b/[esx_addons]/esx_lscustom/locales/pl.lua new file mode 100644 index 00000000..8039a6f3 --- /dev/null +++ b/[esx_addons]/esx_lscustom/locales/pl.lua @@ -0,0 +1,276 @@ +Locales['pl'] = { + ['by_default'] = 'domyślna', + ['installed'] = 'zainstalowane', + ['already_own'] = 'już posiadasz: %s', + ['not_enough_money'] = 'nie masz wystarczająco pieniędzy!', + ['purchased'] = 'zakupiłeś!', + ['press_custom'] = 'naciśnij ~INPUT_PICKUP~ aby spersonalizować swój pojazd.', + ['level'] = 'level %s', + ['neon'] = 'neon', + ['blip_name'] = 'los Santos Customs', +-- Paint Colors + -- Black + ['black'] = 'czarny', + ['graphite'] = 'grafit', + ['black_metallic'] = 'metaliczny czarny', + ['caststeel'] = 'kuta stal', + ['black_anth'] = 'czarny Antracyt', + ['matteblack'] = 'matowa czerń', + ['darknight'] = 'ciemna noc', + ['deepblack'] = 'głęboka czerń', + ['oil'] = 'olej', + ['carbon'] = 'carbon', + -- White + ['white'] = 'biały', + ['vanilla'] = 'wanilliowy', + ['creme'] = 'kremowy', + ['polarwhite'] = 'polarny biały', + ['beige'] = 'beżowy', + ['mattewhite'] = 'matowy biały', + ['snow'] = 'snieżny', + ['cotton'] = 'bawełna', + ['alabaster'] = 'alabastrowy', + ['purewhite'] = 'czysty biały', + -- Grey + ['grey'] = 'szary', + ['silver'] = 'srebro', + ['metallicgrey'] = 'metaliczny szary', + ['laminatedsteel'] = 'laminowana stal', + ['darkgray'] = 'ciemny szary', + ['rockygray'] = 'skalisty szary', + ['graynight'] = 'szara noc', + ['aluminum'] = 'aluminium', + ['graymat'] = 'matowy szary', + ['lightgrey'] = 'jasny szary', + ['asphaltgray'] = 'asfaltowy szary', + ['grayconcrete'] = 'betonowy szary', + ['darksilver'] = 'ciemny szary', + ['magnesite'] = 'magnesite', + ['nickel'] = 'nikiel', + ['zinc'] = 'cynk', + ['dolomite'] = 'dolomite', + ['bluesilver'] = 'niebieski srebrzysty', + ['titanium'] = 'titanium', + ['steelblue'] = 'niebieska stal', + ['champagne'] = 'szampanowy', + ['grayhunter'] = 'grey Hunter', + -- Red + ['red'] = 'czerwony', + ['torino_red'] = 'turyńska czerwień', + ['poppy'] = 'makowy czerwień', + ['copper_red'] = 'miedziany czerwień', + ['cardinal'] = 'kardynałowy czerwień', + ['brick'] = 'ceglana czerwień', + ['garnet'] = 'granat', + ['cabernet'] = 'cabernet Red', + ['candy'] = 'cukierkowa czerwień', + ['matte_red'] = 'matowa czerwień', + ['dark_red'] = 'ciemna czerwień', + ['red_pulp'] = 'red Pulp', + ['bril_red'] = 'brilliant Red', + ['pale_red'] = 'blady czerwony', + ['wine_red'] = 'winiana czerwień', + ['volcano'] = 'wulkanowy', + -- Pink + ['pink'] = 'różowy', + ['electricpink'] = 'elektryczny różowy', + ['brightpink'] = 'jasny Różowy', + ['salmon'] = 'łososiowy', + ['sugarplum'] = 'sugar Plum', + -- Niebieski + ['blue'] = 'niebieski', + ['topaz'] = 'topaz', + ['light_blue'] = 'jasny niebieski', + ['galaxy_blue'] = 'galaktyczny niebieski', + ['dark_blue'] = 'ciemny niebieski', + ['azure'] = 'azure', + ['navy_blue'] = 'granatowy', + ['lapis'] = 'lapis Lazuli', + ['blue_diamond'] = 'niebieski diament', + ['surfer'] = 'surfer', + ['pastel_blue'] = 'pastelowy niebieski', + ['celeste_blue'] = 'celeste Blue', + ['rally_blue'] = 'rally Blue', + ['blue_paradise'] = 'blue Paradise', + ['blue_night'] = 'niebieska noc', + ['cyan_blue'] = 'cyankowy', + ['cobalt'] = 'kobaltowy', + ['electric_blue'] = 'elektryczny miebieski', + ['horizon_blue'] = 'horizon Blue', + ['metallic_blue'] = 'metaliczny niebieski', + ['aquamarine'] = 'akwamaryn', + ['blue_agathe'] = 'blue Agathe', + ['zirconium'] = 'zirconium', + ['spinel'] = 'spinel', + ['tourmaline'] = 'tourmaline', + ['paradise'] = 'paradise', + ['bubble_gum'] = 'guma balonowa', + ['midnight_blue'] = 'midnight Blue', + ['forbidden_blue'] = 'forbidden Blue', + ['glacier_blue'] = 'glacier Blue', + -- Yellow + ['yellow'] = 'żółty', + ['wheat'] = 'pszenica', + ['raceyellow'] = 'wyścigowy żółty', + ['paleyellow'] = 'jasnożółty', + ['lightyellow'] = 'jasny żółty', + -- Green + ['green'] = 'zielony', + ['met_dark_green'] = 'metaliczny ciemny zielony', + ['rally_green'] = 'rally Green', + ['pine_green'] = 'pine Green', + ['olive_green'] = 'zielona oliwka', + ['light_green'] = 'jasny zielony', + ['lime_green'] = 'lime green', + ['forest_green'] = 'forest Green', + ['lawn_green'] = 'lawn Green', + ['imperial_green'] = 'imperial Green', + ['green_bottle'] = 'breen Bottle', + ['citrus_green'] = 'cytrusowy Zielony', + ['green_anis'] = 'zielony anyż', + ['khaki'] = 'khaki', + ['army_green'] = 'zieleń wojskowa', + ['dark_green'] = 'ciemny zielony', + ['hunter_green'] = 'hunter Green', + ['matte_foilage_green'] = 'matte Foilage Green', + -- Orange + ['orange'] = 'pomarańczowy', + ['tangerine'] = 'tangerine', + ['matteorange'] = 'matowy Pomarańczowy', + ['lightorange'] = 'jasny Pomarańczowy', + ['peach'] = 'brzoskwiniowy ', + ['pumpkin'] = 'dynia', + ['orangelambo'] = 'orange Lambo', + -- Brown + ['brown'] = 'brązowy', + ['copper'] = 'medziany', + ['lightbrown'] = 'jasny brązowy', + ['darkbrown'] = 'ciemny brąz', + ['bronze'] = 'brąz', + ['brownmetallic'] = 'metaliczny brązowy', + ['expresso'] = 'expresso', + ['chocolate'] = 'czekoladowy', + ['terracotta'] = 'terakota', + ['marble'] = 'marmur', + ['sand'] = 'piasek', + ['sepia'] = 'sepia', + ['bison'] = 'bison', + ['palm'] = 'palma', + ['caramel'] = 'karmel', + ['rust'] = 'rdza ', + ['chestnut'] = 'orzechowy', + ['hazelnut'] = 'orzech laskowy', + ['shell'] = 'shell', + ['mahogany'] = 'mahogany', + ['cauldron'] = 'cauldron', + ['blond'] = 'blond', + ['gravel'] = 'żwir', + ['darkearth'] = 'ciemna ziemia', + ['desert'] = 'pustynia', + -- Purple + ['purple'] = 'fioletowy', + ['indigo'] = 'indygo', + ['deeppurple'] = 'głęboki fiolet', + ['darkviolet'] = 'ciemny fiolet', + ['amethyst'] = 'ametyst', + ['mysticalviolet'] = 'mystic Violet', + ['purplemetallic'] = 'metaliczny fiolet', + ['matteviolet'] = 'matowy fiolet', + ['mattedeeppurple'] = 'matowy głęboki fiolet', + -- Chrome + ['chrome'] = 'chrom', + ['brushedchrome'] = 'oczyszczony chrom', + ['blackchrome'] = 'czarny chrom', + ['brushedaluminum'] = 'szczotkowane aluminium', + -- Metal + ['gold'] = 'Złoto', + ['puregold'] = 'czyste złoto', + ['brushedgold'] = 'szczotkowane złoto', + ['lightgold'] = 'jasne złoto', +-- License Plates + ['blue_on_white_1'] = 'niebieskie na białym 1', + ['yellow_on_black'] = 'żółte na czarnym', + ['yellow_blue'] = 'żółte na niebieskim', + ['blue_on_white_2'] = 'niebieskie na białym 2', + ['blue_on_white_3'] = 'niebieskie na białym 3', +-- Upgrades + ['upgrades'] = 'ulepszenia', + ['engine'] = 'silnik', + ['brakes'] = 'hamulce', + ['transmission'] = 'skrzynia biegów', + ['suspension'] = 'zawieszenie', + ['armor'] = 'opancerzenie', + ['turbo'] = 'turbo', + ['no_turbo'] = 'bez turbo', +-- Cosmetics + ['cosmetics'] = 'kosmetyczne', + -- Body parts + ['bodyparts'] = 'karoseria', + ['leftfender'] = 'lewy błotnik', + ['rightfender'] = 'prawy błotnik', + ['spoilers'] = 'spojler', + ['sideskirt'] = 'progi', + ['cage'] = 'bagażnik', + ['hood'] = 'maska', + ['grille'] = 'gril', + ['rearbumper'] = 'tylny zderzak ', + ['frontbumper'] = 'przedni zderzak', + ['exhaust'] = 'wydech', + ['roof'] = 'dach', + -- Paint + ['respray'] = 'przefarbuj', + ['primary'] = 'pierwszy', + ['secondary'] = 'drugi', + ['pearlescent'] = 'perła', + -- Misc + ['headlights'] = 'reflektory', + ['licenseplates'] = 'tablice rejestracyjne', + ['windowtint'] = 'odcień okna', + ['horns'] = 'klakson', + -- Neon + ['neons'] = 'neony', + -- Wheels + ['wheels'] = 'koła', + ['tiresmoke'] = 'dym spod opon', + ['wheel_type'] = 'typ koła', + ['wheel_color'] = 'kolor koła', + ['sport'] = 'sportowe', + ['muscle'] = 'muscle', + ['lowrider'] = 'lowrider', + ['suv'] = 'sUV', + ['allterrain'] = 'terenowe', + ['tuning'] = 'tuner', + ['motorcycle'] = 'motocykle', + ['highend'] = 'high end', + + ['modplateholder'] = 'tablica - Tył', + ['modvanityplate'] = 'tablica - Przód', + ['interior'] = 'wnętrze', + ['trim'] = 'wykończenie', + ['dashboard'] = 'deska rozdzielcza', + ['speedometer'] = 'prędkościomierz', + ['door_speakers'] = 'drzwi', + ['seats'] = 'siedzenia', + ['steering_wheel'] = 'kierownica', + ['gear_lever'] = 'dżwignia zmiany biegów', + ['quarter_deck'] = 'quarter-deck', + ['speakers'] = 'głośniki', + ['trunk'] = 'bagażnik', + ['hydraulic'] = 'hydraulika', + ['engine_block'] = 'blok silnika', + ['air_filter'] = 'filtr powietrza', + ['struts'] = 'podpórka', + ['arch_cover'] = 'arch cover', + ['aerials'] = 'anteny', + ['wings'] = 'skrzydełka ', + ['fuel_tank'] = 'zbiornik paliwa', + ['windows'] = 'okna', + ['stickers'] = 'naklejki', + +-- Xenon Colors + ['mintgreen'] = 'Mint Green', + ['goldenshower'] = 'Golden Shower', + ['ponypink'] = 'Pony Pink', + ['hotpink'] = 'Hot Pink', + ['blacklight'] = 'Blacklight', +} diff --git a/[esx_addons]/esx_lscustom/locales/si.lua b/[esx_addons]/esx_lscustom/locales/si.lua new file mode 100644 index 00000000..8d8a9b70 --- /dev/null +++ b/[esx_addons]/esx_lscustom/locales/si.lua @@ -0,0 +1,276 @@ +Locales['si'] = { + ['by_default'] = 'privzeto', + ['installed'] = 'nameščen', + ['already_own'] = 'že imaš: %s', + ['not_enough_money'] = 'tega modusa si ne moreš privoščiti!', + ['purchased'] = 'kupili ste mod!', + ['press_custom'] = 'pritisnite ~INPUT_PICKUP~, da personalizirate~ svoje vozilo.', + ['level'] = 'raven %s', + ['neon'] = 'neon', + ['blip_name'] = 'los Santos Customs', +-- Barve barve + -- črna + ['black'] = 'black', + ['graphite'] = 'grafit', + ['black_metallic'] = 'črna kovinska', + ['caststeel'] = 'jeklena litina', + ['black_anth'] = 'črni antracit', + ['matteblack'] = 'mat črna', + ['darknight'] = 'temna noč', + ['deepblack'] = 'globoka črna', + ['oil'] = 'olje', + ['carbon'] = 'ogljik', + -- bela + ['white'] = 'bela', + ['vanilla'] = 'vanilija', + ['creme'] = 'creme', + ['polarwhite'] = 'polarna bela', + ['beige'] = 'bež', + ['mattewhite'] = 'mat bela', + ['snow'] = 'sneg', + ['cotton'] = 'bombaž', + ['alabaster'] = 'alabaster', + ['purewhite'] = 'čista bela', + -- siva + ['grey'] = 'siva', + ['silver'] = 'srebrna', + ['metallicgrey'] = 'kovinsko siva', + ['laminatedsteel'] = 'laminirano jeklo', + ['darkgray'] = 'temno siva', + ['rockygray'] = 'kamnito siva', + ['graynight'] = 'siva noč', + ['aluminium'] = 'aluminij', + ['graymat'] = 'mat siva', + ['lightgrey'] = 'svetlo siva', + ['asphaltgray'] = 'asfaltno siva', + ['grayconcrete'] = 'betonsko siva', + ['darksilver'] = 'temno srebrna', + ['magnezit'] = 'magnezit', + ['nickel'] = 'nikelj', + ['cink'] = 'cink', + ['dolomit'] = 'dolomit', + ['bluesilver'] = 'modro srebro', + ['titanium'] = 'titan', + ['steelblue'] = 'jekleno modra', + ['champagne'] = 'šampanjec', + ['grayhunter'] = 'sivi lovec', + -- rdeča + ['red'] = 'rdeča', + ['torino_red'] = 'torinsko rdeča', + ['poppy'] = 'mak', + ['copper_red'] = 'bakrena rdeča', + ['cardinal'] = 'kardinalsko rdeča', + ['brick'] = 'opečnato rdeča', + ['garnet'] = 'granatna', + ['cabernet'] = 'kabernetno rdeča', + ['candy'] = 'rdeča sladkarija', + ['matte_red'] = 'mat rdeča', + ['dark_red'] = 'temno rdeča', + ['red_pulp'] = 'rdeča celuloza', + ['bril_red'] = 'briljantna rdeča', + ['pale_red'] = 'bleda rdeča', + ['wine_red'] = 'vinsko rdeča', + ['volcano'] = 'vulkan', + -- roza + ['pink'] = 'roza', + ['electricpink'] = 'električno roza', + ['brightpink'] = 'svetlo rožnata', + ['salmon'] = 'losos', + ['sugarplum'] = 'sladkorna sliva', + -- modra + ['blue'] = 'modra', + ['topaz'] = 'topaz', + ['light_blue'] = 'svetlo modra', + ['galaxy_blue'] = 'galaxy Blue', + ['dark_blue'] = 'temno modra', + ['azure'] = 'azurna', + ['navy_blue'] = 'mornarsko modra', + ['lapis'] = 'lapis Lazuli', + ['blue_diamond'] = 'modri diamant', + ['surfer'] = 'surfer', + ['pastel_blue'] = 'pastelno modra', + ['celeste_blue'] = 'celeste Blue', + ['rally_blue'] = 'rally Blue', + ['blue_paradise'] = 'modri raj', + ['blue_night'] = 'modra noč', + ['cyan_blue'] = 'cyan Blue', + ['cobalt'] = 'kobalt', + ['electric_blue'] = 'električno modra', + ['horizon_blue'] = 'horizontalna modra', + ['metallic_blue'] = 'kovinsko modra', + ['aquamarine'] = 'akvamarin', + ['blue_agathe'] = 'modra Agathe', + ['zirconium'] = 'cirkonij', + ['spinel'] = 'spinel', + ['tourmaline'] = 'turmalin', + ['paradise'] = 'raj', + ['bubble_gum'] = 'žvečilni gumi', + ['midnight_blue'] = 'polnočno modra', + ['forbidden_blue'] = 'prepovedana modra', + ['glacier_blue'] = 'ledeniško modra', + -- rumena + ['yellow'] = 'rumena', + ['wheat'] = 'pšenica', + ['raceyellow'] = 'race Yellow', + ['paleyellow'] = 'bledo rumena', + ['lightyellow'] = 'svetlo rumena', + -- zelena + ['green'] = 'zelen', + ['met_dark_green'] = 'kovinska temno zelena', + ['rally_green'] = 'rally zelena', + ['pine_green'] = 'zelena borovničeva', + ['olive_green'] = 'olivno zelena', + ['light_green'] = 'svetlo zelena', + ['lime_green'] = 'limetno zelena', + ['forest_green'] = 'gozdna zelena', + ['lawn_green'] = 'travnata zelena', + ['imperial_green'] = 'imperialna zelena', + ['green_bottle'] = 'breen Bottle', + ['citrus_green'] = 'zelena citrusov', + ['green_anis'] = 'zeleni anis', + ['khaki'] = 'kaki', + ['army_green'] = 'army Green', + ['dark_green'] = 'temno zelena', + ['hunter_green'] = 'lovsko zelena', + ['matte_foilage_green'] = 'matirana zelena folija', + -- oranžna + ['orange'] = 'oranžna', + ['tangerine'] = 'oranžna', + ['matteorange'] = 'mat oranžna', + ['lightorange'] = 'svetlo oranžna', + ['peach'] = 'Peach', + ['pumpkin'] = 'Buča', + ['orangelambo'] = 'Orange Lambo', + -- rjava + ['brown'] = 'rjava', + ['copper'] = 'bakrena', + ['lightbrown'] = 'svetlo rjava', + ['darkbrown'] = 'Temno rjava', + ['bronze'] = 'bronasta', + ['brownmetallic'] = 'Brown Metallic', + ['expresso'] = 'Expresso', + ['chocolate'] = 'Čokolada', + ['terracotta'] = 'Terracotta', + ['marble'] = 'Marmor', + ['sand'] = 'Pesek', + ['sepia'] = 'Sepija', + ['bison'] = 'Bizon', + ['palm'] = 'Palm', + ['caramel'] = 'Karamel', + ['rust'] = 'Rust', + ["kostanj"] = "Kostanj", + ['hazelnut'] = 'Lešnik', + ['shell'] = 'lupina', + ['mahagoni'] = 'Mahagoni', + ['cauldron'] = 'Kotel', + ['blond'] = 'blond', + ['gravel'] = 'Gravel', + ['darkearth'] = 'Temna Zemlja', + ['desert'] = 'Desert', + -- vijolična + ['purple'] = 'vijolična', + ['indigo'] = 'Indigo', + ['deeppurple'] = 'Deep Purple', + ['darkviolet'] = 'Temno vijolična', + ['ametist'] = 'Ametist', + ['mysticalviolet'] = 'mistična vijolična', + ['purplemetallic'] = 'vijolična kovinska', + ['matteviolet'] = 'matirana vijolična', + ['mattedeeppurple'] = 'matirano globoko vijolična', + -- Chrome + ['chrome'] = 'krom', + ['brushedchrome'] = 'brušeni krom', + ['blackchrome'] = 'črni krom', + ['brushedaluminum'] = 'brušeni aluminij', + -- kovina + ['gold'] = 'zlato', + ['puregold'] = 'čisto zlato', + ['brushedgold'] = 'brušeno zlato', + ['lightgold'] = 'svetlo zlato', +-- registrske tablice + ['blue_on_white_1'] = 'modra na beli 1', + ['yellow_on_black'] = 'rumena na črni', + ['yellow_blue'] = 'rumena na modri', + ['blue_on_white_2'] = 'modra na beli 2', + ['blue_on_white_3'] = 'modra na beli 3', +-- nadgradnje + ['upgrades'] = 'nadgradnje', + ['engine'] = 'motor', + ['brakes'] = 'brakes', + ['transmisija'] = 'transmisija', + ['suspension'] = 'vzmetenje', + ['armor'] = 'armor', + ['turbo'] = 'turbo', + ['no_turbo'] = 'brez turba', +-- kozmetika + ['cosmetics'] = 'kozmetika', + -- Deli telesa + ['bodyparts'] = 'deli telesa', + ['leftfender'] = 'levi blatnik', + ['rightfender'] = 'desni blatnik', + ['spoilers'] = 'spojlerji', + ['sideskirt'] = 'stranska krila', + ['cage'] = 'kletka', + ['hood'] = 'maska', + ['grille'] = 'rešetka', + ['rearbumper'] = 'zadnji odbijač', + ['frontbumper'] = 'prednji odbijač', + ['exhaust'] = 'izpuh', + ['roof'] = 'streha', + -- barva + ['respray'] = 'ponovno lakiranje', + ['primary'] = 'primary', + ["secondary"] = "secondary", + ['pearlescent'] = 'biserno', + -- Razno + ['headlights'] = 'žarometi', + ['licenseplates'] = 'registrska tablica', + ['windowtint'] = 'barvni odtenek oken', + ['horns'] = 'horns', + -- Neon + ['neons'] = 'neons', + -- kolesa + ['wheels'] = 'wheels', + ['tiresmoke'] = 'dim iz pnevmatik', + ['wheel_type'] = 'tip kolesa', + ['wheel_color'] = 'barva kolesa', + ['sport'] = 'sport', + ['muscle'] = 'muscle', + ['lowrider'] = 'lowrider', + ['suv'] = 'SUV', + ['allterrain'] = 'terenski', + ['tuning'] = 'tuning', + ['motorcycle'] = 'motorno kolo', + ['highend'] = 'vrhunski', + + ['modplateholder'] = 'plate - Back', + ['modvanityplate'] = 'plate - Front', + ['interior'] = 'notranjost', + ["trim"] = "trim", + ['dashboard'] = 'armaturna plošča', + ['speedometer'] = 'merilnik hitrosti', + ['door_speakers'] = 'vratni zvočniki', + ["seats"] = "seats", + ['steering_wheel'] = 'volan', + ['gear_lever'] = 'prestavna ročica', + ['quarter_deck'] = 'četrtinska paluba', + ['speakers'] = 'zvočniki', + ['trunk'] = 'prtljažnik', + ['hydraulic'] = 'hidravlični', + ['engine_block'] = 'blok motorja', + ['air_filter'] = 'zračni filter', + ['struts'] = 'opore', + ['arch_cover'] = 'pokrov loka', + ['aerials'] = 'antene', + ['wings'] = 'wings', + ['fuel_tank'] = 'rezervoar za gorivo', + ['windows'] = 'okna', + ['stickers'] = 'nalepke', + +-- Xenon Colors + ['mintgreen'] = 'Mint Green', + ['goldenshower'] = 'Golden Shower', + ['ponypink'] = 'Pony Pink', + ['hotpink'] = 'Hot Pink', + ['blacklight'] = 'Blacklight', +} diff --git a/[esx_addons]/esx_lscustom/server/main.lua b/[esx_addons]/esx_lscustom/server/main.lua new file mode 100644 index 00000000..7ab91939 --- /dev/null +++ b/[esx_addons]/esx_lscustom/server/main.lua @@ -0,0 +1,109 @@ +local Vehicles +local Customs = {} + +RegisterNetEvent('esx_lscustom:startModing', function(props, netId) + local src = tostring(source) + if Customs[src] then + Customs[src][tostring(props.plate)] = {props = props, netId = netId} + else + Customs[src] = {} + Customs[src][tostring(props.plate)] = {props = props, netId = netId} + end +end) + +RegisterNetEvent('esx_lscustom:stopModing', function(plate) + local src = tostring(source) + if Customs[src] then + Customs[src][tostring(plate)] = nil + end +end) + +AddEventHandler('esx:playerDropped', function(src) + src = tostring(src) + local playersCount = #ESX.GetExtendedPlayers() + if Customs[src] then + for k,v in pairs(Customs[src]) do + local entity = NetworkGetEntityFromNetworkId(v.netId) + if DoesEntityExist(entity) then + if playersCount > 0 then + TriggerClientEvent('esx_lscustom:restoreMods', -1, v.netId, v.props) + else + DeleteEntity(entity) + end + end + end + Customs[src] = nil + end +end) + +RegisterServerEvent('esx_lscustom:buyMod') +AddEventHandler('esx_lscustom:buyMod', function(price) + local source = source + local xPlayer = ESX.GetPlayerFromId(source) + price = tonumber(price) + + if Config.IsMechanicJobOnly then + local societyAccount + + TriggerEvent('esx_addonaccount:getSharedAccount', 'society_mechanic', function(account) + societyAccount = account + end) + + if price < societyAccount.money then + TriggerClientEvent('esx_lscustom:installMod', source) + TriggerClientEvent('esx:showNotification', source, TranslateCap('purchased')) + societyAccount.removeMoney(price) + else + TriggerClientEvent('esx_lscustom:cancelInstallMod', source) + TriggerClientEvent('esx:showNotification', source, TranslateCap('not_enough_money')) + end + else + if price < xPlayer.getMoney() then + TriggerClientEvent('esx_lscustom:installMod', source) + TriggerClientEvent('esx:showNotification', source, TranslateCap('purchased')) + xPlayer.removeMoney(price, "LSC Purchase") + else + TriggerClientEvent('esx_lscustom:cancelInstallMod', source) + TriggerClientEvent('esx:showNotification', source, TranslateCap('not_enough_money')) + end + end +end) + +RegisterServerEvent('esx_lscustom:refreshOwnedVehicle') +AddEventHandler('esx_lscustom:refreshOwnedVehicle', function(vehicleProps, netId) + local src = tostring(source) + local xPlayer = ESX.GetPlayerFromId(source) + MySQL.single('SELECT vehicle FROM owned_vehicles WHERE plate = ?', {vehicleProps.plate}, + function(result) + if result then + local vehicle = json.decode(result.vehicle) + if vehicleProps.model == vehicle.model then + MySQL.update('UPDATE owned_vehicles SET vehicle = ? WHERE plate = ?', {json.encode(vehicleProps), vehicleProps.plate}) + if Customs[src] then + if Customs[src][tostring(vehicleProps.plate)] then + Customs[src][tostring(vehicleProps.plate)].props = vehicleProps + else + Customs[src][tostring(vehicleProps.plate)] = {props = vehicleProps, netId = netId} + end + else + Customs[src] = {} + Customs[src][tostring(vehicleProps.plate)] = {props = vehicleProps, netId = netId} + end + local veh = NetworkGetEntityFromNetworkId(netId) + local Veh_State = Entity(veh).state.VehicleProperties + if Veh_State then + Entity(veh).state:set("VehicleProperties", vehicleProps, true) + end + else + print(('[^3WARNING^7] Player ^5%s^7 Attempted To upgrade with mismatching vehicle model'):format(xPlayer.source)) + end + end + end) +end) + +ESX.RegisterServerCallback('esx_lscustom:getVehiclesPrices', function(source, cb) + if not Vehicles then + Vehicles = MySQL.query.await('SELECT model, price FROM vehicles') + end + cb(Vehicles) +end) diff --git a/[esx_addons]/esx_mechanicjob/.editorconfig b/[esx_addons]/esx_mechanicjob/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_mechanicjob/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_mechanicjob/LICENSE b/[esx_addons]/esx_mechanicjob/LICENSE new file mode 100644 index 00000000..6bcf52f9 --- /dev/null +++ b/[esx_addons]/esx_mechanicjob/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_mechanicjob + Copyright (C) 2015-2023 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 . + +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_mechanicjob Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_mechanicjob/README.md b/[esx_addons]/esx_mechanicjob/README.md new file mode 100644 index 00000000..803a3eed --- /dev/null +++ b/[esx_addons]/esx_mechanicjob/README.md @@ -0,0 +1,48 @@ +# esx_mechanicjob + +## Requirements + +* Auto mode + * No need to download another resource + +* Player management (billing and boss actions) + * [esx_society](https://github.com/ESX-Org/esx_society) + * [esx_billing](https://github.com/ESX-Org/esx_billing) + +## Download & Installation + +### Using [fvm](https://github.com/qlaffont/fvm-installer) +``` +fvm install --save --folder=esx esx-org/esx_mechanicjob +``` + +### Using Git +``` +cd resources +git clone https://github.com/ESX-Org/esx_mechanicjob [esx]/esx_mechanicjob +``` + +### Manually +- Download https://github.com/ESX-Org/esx_mechanicjob/archive/master.zip +- Put it in the `[esx]` directory + +## Installation +- Import `esx_mechanicjob.sql` in your database +- If you want player management you have to set `Config.EnablePlayerManagement` to `true` in `config.lua` +- Add this to your `server.cfg`: + +``` +start esx_mechanicjob +``` + +# Legal +### License +esx_mechanicjob - mechanic job for ESX + +Copyright (C) 2015-2023 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/. \ No newline at end of file diff --git a/[esx_addons]/esx_mechanicjob/client/main.lua b/[esx_addons]/esx_mechanicjob/client/main.lua new file mode 100644 index 00000000..a97a9270 --- /dev/null +++ b/[esx_addons]/esx_mechanicjob/client/main.lua @@ -0,0 +1,939 @@ +local HasAlreadyEnteredMarker, LastZone = false, nil +local CurrentAction, CurrentActionMsg, CurrentActionData = nil, '', {} +local CurrentlyTowedVehicle, Blips, NPCOnJob, NPCTargetTowable, NPCTargetTowableZone = nil, {}, false, nil, nil +local NPCHasSpawnedTowable, NPCLastCancel, NPCHasBeenNextToTowable, NPCTargetDeleterZone = false, GetGameTimer() - 5 * 60000, false, false +local isDead, isBusy = false, false + +function SelectRandomTowable() + local index = GetRandomIntInRange(1, #Config.Towables) + + for k,v in pairs(Config.Zones) do + if v.Pos.x == Config.Towables[index].x and v.Pos.y == Config.Towables[index].y and v.Pos.z == Config.Towables[index].z then + return k + end + end +end + +function StartNPCJob() + NPCOnJob = true + + NPCTargetTowableZone = SelectRandomTowable() + local zone = Config.Zones[NPCTargetTowableZone] + + Blips['NPCTargetTowableZone'] = AddBlipForCoord(zone.Pos.x, zone.Pos.y, zone.Pos.z) + SetBlipRoute(Blips['NPCTargetTowableZone'], true) + + ESX.ShowNotification(TranslateCap('drive_to_indicated')) +end + +function StopNPCJob(cancel) + if Blips['NPCTargetTowableZone'] then + RemoveBlip(Blips['NPCTargetTowableZone']) + Blips['NPCTargetTowableZone'] = nil + end + + if Blips['NPCDelivery'] then + RemoveBlip(Blips['NPCDelivery']) + Blips['NPCDelivery'] = nil + end + + Config.Zones.VehicleDelivery.Type = -1 + + NPCOnJob = false + NPCTargetTowable = nil + NPCTargetTowableZone = nil + NPCHasSpawnedTowable = false + NPCHasBeenNextToTowable = false + + if cancel then + ESX.ShowNotification(TranslateCap('mission_canceled'), "error") + else + --TriggerServerEvent('esx_mechanicjob:onNPCJobCompleted') + end +end + +function OpenMechanicActionsMenu() + local elements = { + {unselectable = true, icon = "fas fa-gear", title = TranslateCap('mechanic')}, + {icon = "fas fa-car", title = TranslateCap('vehicle_list'), value = 'vehicle_list'}, + {icon = "fas fa-shirt", title = TranslateCap('work_wear'), value = 'cloakroom'}, + {icon = "fas fa-shirt", title = TranslateCap('civ_wear'), value = 'cloakroom2'}, + {icon = "fas fa-box", title = TranslateCap('deposit_stock'), value = 'put_stock'}, + {icon = "fas fa-box", title = TranslateCap('withdraw_stock'), value = 'get_stock'} + } + + if Config.EnablePlayerManagement and ESX.PlayerData.job and ESX.PlayerData.job.grade_name == 'boss' then + elements[#elements+1] = { + icon = 'fas fa-boss', + title = TranslateCap('boss_actions'), + value = 'boss_actions' + } + end + + ESX.OpenContext("right", elements, function(menu,element) + if element.value == 'vehicle_list' then + if Config.EnableSocietyOwnedVehicles then + local elements2 = { + {unselectable = true, icon = "fas fa-car", title = TranslateCap('service_vehicle')} + } + + ESX.TriggerServerCallback('esx_society:getVehiclesInGarage', function(vehicles) + for i=1, #vehicles, 1 do + elements2[#elements2+1] = { + icon = 'fas fa-car', + title = GetDisplayNameFromVehicleModel(vehicles[i].model) .. ' [' .. vehicles[i].plate .. ']', + value = vehicles[i] + } + end + + ESX.OpenContext("right", elements2, function(menu2,element2) + ESX.CloseContext() + local vehicleProps = element2.value + + ESX.Game.SpawnVehicle(vehicleProps.model, Config.Zones.VehicleSpawnPoint.Pos, 270.0, function(vehicle) + ESX.Game.SetVehicleProperties(vehicle, vehicleProps) + local playerPed = PlayerPedId() + TaskWarpPedIntoVehicle(playerPed, vehicle, -1) + end) + + TriggerServerEvent('esx_society:removeVehicleFromGarage', 'mechanic', vehicleProps) + end) + end, 'mechanic') + else + local elements2 = { + {unselectable = true, icon = "fas fa-car", title = TranslateCap('service_vehicle')}, + {icon = "fas fa-truck", title = TranslateCap('flat_bed'), value = 'flatbed'}, + {icon = "fas fa-truck", title = TranslateCap('tow_truck'), value = 'towtruck2'} + } + + if Config.EnablePlayerManagement and ESX.PlayerData.job and (ESX.PlayerData.job.grade_name == 'boss' or ESX.PlayerData.job.grade_name == 'chief' or ESX.PlayerData.job.grade_name == 'experimente') then + elements2[#elements2+1] = { + icon = 'fas fa-truck', + title = 'Slamvan', + value = 'slamvan3' + } + end + + ESX.OpenContext("right", elements2, function(menu2,element2) + if Config.MaxInService == -1 then + ESX.CloseContext() + ESX.Game.SpawnVehicle(element2.value, Config.Zones.VehicleSpawnPoint.Pos, 90.0, function(vehicle) + local playerPed = PlayerPedId() + TaskWarpPedIntoVehicle(playerPed, vehicle, -1) + end) + else + ESX.TriggerServerCallback('esx_service:enableService', function(canTakeService, maxInService, inServiceCount) + if canTakeService then + ESX.CloseContext() + ESX.Game.SpawnVehicle(element2.value, Config.Zones.VehicleSpawnPoint.Pos, 90.0, function(vehicle) + local playerPed = PlayerPedId() + TaskWarpPedIntoVehicle(playerPed, vehicle, -1) + end) + else + ESX.ShowNotification(TranslateCap('service_full') .. inServiceCount .. '/' .. maxInService) + end + end, 'mechanic') + end + end) + end + elseif element.value == 'cloakroom' then + ESX.CloseContext() + ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin, jobSkin) + if skin.sex == 0 then + TriggerEvent('skinchanger:loadClothes', skin, jobSkin.skin_male) + else + TriggerEvent('skinchanger:loadClothes', skin, jobSkin.skin_female) + end + end) + elseif element.value == 'cloakroom2' then + ESX.CloseContext() + ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin, jobSkin) + TriggerEvent('skinchanger:loadSkin', skin) + end) + elseif Config.OxInventory and (element.value == 'put_stock' or element.value == 'get_stock') then + exports.ox_inventory:openInventory('stash', 'society_mechanic') + return ESX.CloseContext() + elseif element.value == 'put_stock' then + OpenPutStocksMenu() + elseif element.value == 'get_stock' then + OpenGetStocksMenu() + elseif element.value == 'boss_actions' then + TriggerEvent('esx_society:openBossMenu', 'mechanic', function(data, menu) + menu.close() + end) + end + end, function(menu) + CurrentAction = 'mechanic_actions_menu' + CurrentActionMsg = TranslateCap('open_actions') + CurrentActionData = {} + end) +end + +function OpenMechanicHarvestMenu() + if Config.EnablePlayerManagement and ESX.PlayerData.job and ESX.PlayerData.job.grade_name ~= 'recrue' then + local elements = { + {unselectable = true, icon = "fas fa-gear", title = "Mechanic Harvest Menu"}, + {icon = "fas fa-gear", title = TranslateCap('gas_can'), value = 'gaz_bottle'}, + {icon = "fas fa-gear", title = TranslateCap('repair_tools'), value = 'fix_tool'}, + {icon = "fas fa-gear", title = TranslateCap('body_work_tools'), value = 'caro_tool'} + } + + ESX.OpenContext("right", elements, function(menu,element) + if element.value == 'gaz_bottle' then + TriggerServerEvent('esx_mechanicjob:startHarvest') + elseif element.value == 'fix_tool' then + TriggerServerEvent('esx_mechanicjob:startHarvest2') + elseif element.value == 'caro_tool' then + TriggerServerEvent('esx_mechanicjob:startHarvest3') + end + end, function(menu) + CurrentAction = 'mechanic_harvest_menu' + CurrentActionMsg = TranslateCap('harvest_menu') + CurrentActionData = {} + end) + else + ESX.ShowNotification(TranslateCap('not_experienced_enough')) + end +end + +function OpenMechanicCraftMenu() + if Config.EnablePlayerManagement and ESX.PlayerData.job and ESX.PlayerData.job.grade_name ~= 'recrue' then + local elements = { + {unselectable = true, icon = "fas fa-gear", title = "Mechanic Craft Menu"}, + {icon = "fas fa-gear", title = TranslateCap('blowtorch'), value = 'blow_pipe'}, + {icon = "fas fa-gear", title = TranslateCap('repair_kit'), value = 'fix_kit'}, + {icon = "fas fa-gear", title = TranslateCap('body_kit'), value = 'caro_kit'} + } + + ESX.OpenContext("right", elements, function(menu,element) + if element.value == 'blow_pipe' then + TriggerServerEvent('esx_mechanicjob:startCraft') + elseif element.value == 'fix_kit' then + TriggerServerEvent('esx_mechanicjob:startCraft2') + elseif element.value == 'caro_kit' then + TriggerServerEvent('esx_mechanicjob:startCraft3') + end + end, function(menu) + CurrentAction = 'mechanic_craft_menu' + CurrentActionMsg = TranslateCap('craft_menu') + CurrentActionData = {} + end) + else + ESX.ShowNotification(TranslateCap('not_experienced_enough')) + end +end + +function OpenMobileMechanicActionsMenu() + local elements = { + {unselectable = true, icon = "fas fa-gear", title = TranslateCap('mechanic')}, + {icon = "fas fa-gear", title = TranslateCap('billing'), value = 'billing'}, + {icon = "fas fa-gear", title = TranslateCap('hijack'), value = 'hijack_vehicle'}, + {icon = "fas fa-gear", title = TranslateCap('repair'), value = 'fix_vehicle'}, + {icon = "fas fa-gear", title = TranslateCap('clean'), value = 'clean_vehicle'}, + {icon = "fas fa-gear", title = TranslateCap('imp_veh'), value = 'del_vehicle'}, + {icon = "fas fa-gear", title = TranslateCap('flat_bed'), value = 'dep_vehicle'}, + {icon = "fas fa-gear", title = TranslateCap('place_objects'), value = 'object_spawner'} + } + + ESX.OpenContext("right", elements, function(menu,element) + if isBusy then return end + + if element.value == "billing" then + local elements2 = { + {unselectable = true, icon = "fas fa-scroll", title = element.title}, + {title = "Amount", input = true, inputType = "number", inputMin = 1, inputMax = 250000, inputPlaceholder = "Amount to bill.."}, + {icon = "fas fa-check-double", title = "Confirm", value = "confirm"} + } + + ESX.OpenContext("right", elements2, function(menu2,element2) + local amount = tonumber(menu2.eles[2].inputValue) + + if amount == nil or amount < 0 then + ESX.ShowNotification(TranslateCap('amount_invalid'), "error") + else + local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer() + if closestPlayer == -1 or closestDistance > 3.0 then + ESX.ShowNotification(TranslateCap('no_players_nearby'), "error") + else + menu.close() + TriggerServerEvent('esx_billing:sendBill', GetPlayerServerId(closestPlayer), 'society_mechanic', TranslateCap('mechanic'), amount) + end + end + end) + elseif element.value == "hijack_vehicle" then + local playerPed = PlayerPedId() + local vehicle = ESX.Game.GetVehicleInDirection() + local coords = GetEntityCoords(playerPed) + + if IsPedSittingInAnyVehicle(playerPed) then + ESX.ShowNotification(TranslateCap('inside_vehicle')) + return + end + + if DoesEntityExist(vehicle) then + isBusy = true + TaskStartScenarioInPlace(playerPed, 'WORLD_HUMAN_WELDING', 0, true) + CreateThread(function() + Wait(10000) + + SetVehicleDoorsLocked(vehicle, 1) + SetVehicleDoorsLockedForAllPlayers(vehicle, false) + ClearPedTasksImmediately(playerPed) + + ESX.ShowNotification(TranslateCap('vehicle_unlocked')) + isBusy = false + end) + else + ESX.ShowNotification(TranslateCap('no_vehicle_nearby')) + end + elseif element.value == "fix_vehicle" then + local playerPed = PlayerPedId() + local vehicle = ESX.Game.GetVehicleInDirection() + local coords = GetEntityCoords(playerPed) + + if IsPedSittingInAnyVehicle(playerPed) then + ESX.ShowNotification(TranslateCap('inside_vehicle')) + return + end + + if DoesEntityExist(vehicle) then + isBusy = true + TaskStartScenarioInPlace(playerPed, 'PROP_HUMAN_BUM_BIN', 0, true) + CreateThread(function() + Wait(20000) + + SetVehicleFixed(vehicle) + SetVehicleDeformationFixed(vehicle) + SetVehicleUndriveable(vehicle, false) + SetVehicleEngineOn(vehicle, true, true) + ClearPedTasksImmediately(playerPed) + + ESX.ShowNotification(TranslateCap('vehicle_repaired')) + isBusy = false + end) + else + ESX.ShowNotification(TranslateCap('no_vehicle_nearby')) + end + elseif element.value == "clean_vehicle" then + local playerPed = PlayerPedId() + local vehicle = ESX.Game.GetVehicleInDirection() + local coords = GetEntityCoords(playerPed) + + if IsPedSittingInAnyVehicle(playerPed) then + ESX.ShowNotification(TranslateCap('inside_vehicle')) + return + end + + if DoesEntityExist(vehicle) then + isBusy = true + TaskStartScenarioInPlace(playerPed, 'WORLD_HUMAN_MAID_CLEAN', 0, true) + CreateThread(function() + Wait(10000) + + SetVehicleDirtLevel(vehicle, 0) + ClearPedTasksImmediately(playerPed) + + ESX.ShowNotification(TranslateCap('vehicle_cleaned')) + isBusy = false + end) + else + ESX.ShowNotification(TranslateCap('no_vehicle_nearby')) + end + elseif element.value == "del_vehicle" then + local playerPed = PlayerPedId() + + if IsPedSittingInAnyVehicle(playerPed) then + local vehicle = GetVehiclePedIsIn(playerPed, false) + + if GetPedInVehicleSeat(vehicle, -1) == playerPed then + ESX.ShowNotification(TranslateCap('vehicle_impounded')) + ESX.Game.DeleteVehicle(vehicle) + else + ESX.ShowNotification(TranslateCap('must_seat_driver')) + end + else + local vehicle = ESX.Game.GetVehicleInDirection() + + if DoesEntityExist(vehicle) then + ESX.ShowNotification(TranslateCap('vehicle_impounded')) + ESX.Game.DeleteVehicle(vehicle) + else + ESX.ShowNotification(TranslateCap('must_near')) + end + end + elseif element.value == "dep_vehicle" then + local playerPed = PlayerPedId() + local vehicle = GetVehiclePedIsIn(playerPed, true) + + local towmodel = `flatbed` + local isVehicleTow = IsVehicleModel(vehicle, towmodel) + + if isVehicleTow then + local targetVehicle = ESX.Game.GetVehicleInDirection() + + if CurrentlyTowedVehicle == nil then + if targetVehicle ~= 0 then + if not IsPedInAnyVehicle(playerPed, true) then + if vehicle ~= targetVehicle then + AttachEntityToEntity(targetVehicle, vehicle, 20, -0.5, -5.0, 1.0, 0.0, 0.0, 0.0, false, false, false, false, 20, true) + CurrentlyTowedVehicle = targetVehicle + ESX.ShowNotification(TranslateCap('vehicle_success_attached')) + + if NPCOnJob then + if NPCTargetTowable == targetVehicle then + ESX.ShowNotification(TranslateCap('please_drop_off')) + Config.Zones.VehicleDelivery.Type = 1 + + if Blips['NPCTargetTowableZone'] then + RemoveBlip(Blips['NPCTargetTowableZone']) + Blips['NPCTargetTowableZone'] = nil + end + + Blips['NPCDelivery'] = AddBlipForCoord(Config.Zones.VehicleDelivery.Pos.x, Config.Zones.VehicleDelivery.Pos.y, Config.Zones.VehicleDelivery.Pos.z) + SetBlipRoute(Blips['NPCDelivery'], true) + end + end + else + ESX.ShowNotification(TranslateCap('cant_attach_own_tt')) + end + end + else + ESX.ShowNotification(TranslateCap('no_veh_att')) + end + else + AttachEntityToEntity(CurrentlyTowedVehicle, vehicle, 20, -0.5, -12.0, 1.0, 0.0, 0.0, 0.0, false, false, false, false, 20, true) + DetachEntity(CurrentlyTowedVehicle, true, true) + + if NPCOnJob then + if NPCTargetDeleterZone then + + if CurrentlyTowedVehicle == NPCTargetTowable then + ESX.Game.DeleteVehicle(NPCTargetTowable) + TriggerServerEvent('esx_mechanicjob:onNPCJobMissionCompleted') + StopNPCJob() + NPCTargetDeleterZone = false + else + ESX.ShowNotification(TranslateCap('not_right_veh')) + end + + else + ESX.ShowNotification(TranslateCap('not_right_place')) + end + end + + CurrentlyTowedVehicle = nil + ESX.ShowNotification(TranslateCap('veh_det_succ')) + end + else + ESX.ShowNotification(TranslateCap('imp_flatbed')) + end + elseif element.value == "object_spawner" then + local playerPed = PlayerPedId() + + if IsPedSittingInAnyVehicle(playerPed) then + ESX.ShowNotification(TranslateCap('inside_vehicle')) + return + end + + local elements2 = { + {unselectable= true, icon = "fas fa-object", title = TranslateCap('objects')}, + {icon = "fas fa-object", title = TranslateCap('roadcone'), value = 'prop_roadcone02a'}, + {icon = "fas fa-object", title = TranslateCap('toolbox'), value = 'prop_toolchest_01'} + } + + ESX.OpenContext("right", elements2, function(menuObj,elementObj) + local model = elementObj.value + local coords = GetEntityCoords(playerPed) + local forward = GetEntityForwardVector(playerPed) + local x, y, z = table.unpack(coords + forward * 1.0) + + if model == 'prop_roadcone02a' then + z = z - 2.0 + elseif model == 'prop_toolchest_01' then + z = z - 2.0 + end + + ESX.Game.SpawnObject(model, {x = x, y = y, z = z}, function(obj) + SetEntityHeading(obj, GetEntityHeading(playerPed)) + PlaceObjectOnGroundProperly(obj) + end) + end) + end + end) +end + +function OpenGetStocksMenu() + ESX.TriggerServerCallback('esx_mechanicjob:getStockItems', function(items) + local elements = { + {unselectable = true, icon = "fas fa-box", title = TranslateCap('mechanic_stock')} + } + + for i=1, #items, 1 do + elements[#elements+1] = { + icon = 'fas fa-box', + title = 'x' .. items[i].count .. ' ' .. items[i].label, + value = items[i].name + } + end + + ESX.OpenContext("right", elements, function(menu,element) + local itemName = element.value + + local elements2 = { + {unselectable = true, icon = "fas fa-box", title = element.title}, + {title = "Amount", input = true, inputType = "number", inputMin = 1, inputMax = 100, inputPlaceholder = "Amount to withdraw.."}, + {icon = "fas fa-check-double", title = "Confirm", value = "confirm"} + } + + ESX.OpenContext("right", elements2, function(menu2,element2) + local count = tonumber(menu2.eles[2].inputValue) + + if count == nil then + ESX.ShowNotification(TranslateCap('invalid_quantity')) + else + ESX.CloseContext() + TriggerServerEvent('esx_mechanicjob:getStockItem', itemName, count) + + Wait(1000) + OpenGetStocksMenu() + end + end) + end) + end) +end + +function OpenPutStocksMenu() + ESX.TriggerServerCallback('esx_mechanicjob:getPlayerInventory', function(inventory) + local elements = { + {unselectable = true, icon = "fas fa-box", title = TranslateCap('inventory')} + } + + for i=1, #inventory.items, 1 do + local item = inventory.items[i] + + if item.count > 0 then + elements[#elements+1] = { + icon = 'fas fa-box', + title = item.label .. ' x' .. item.count, + type = 'item_standard', + value = item.name + } + end + end + + ESX.OpenContext("right", elements, function(menu,element) + local itemName = element.value + + local elements2 = { + {unselectable = true, icon = "fas fa-box", title = element.title}, + {title = "Amount", input = true, inputType = "number", inputMin = 1, inputMax = 100, inputPlaceholder = "Amount to deposit.."}, + {icon = "fas fa-check-double", title = "Confirm", value = "confirm"} + } + + ESX.OpenContext("right", elements2, function(menu2,element2) + local count = tonumber(menu2.eles[2].inputValue) + + if count == nil then + ESX.ShowNotification(TranslateCap('invalid_quantity')) + else + ESX.CloseContext() + TriggerServerEvent('esx_mechanicjob:putStockItems', itemName, count) + + Wait(1000) + OpenPutStocksMenu() + end + end) + end) + end) +end + +RegisterNetEvent('esx_mechanicjob:onHijack') +AddEventHandler('esx_mechanicjob:onHijack', function() + local playerPed = PlayerPedId() + local coords = GetEntityCoords(playerPed) + + if IsAnyVehicleNearPoint(coords.x, coords.y, coords.z, 5.0) then + local vehicle + + if IsPedInAnyVehicle(playerPed, false) then + vehicle = GetVehiclePedIsIn(playerPed, false) + else + vehicle = GetClosestVehicle(coords.x, coords.y, coords.z, 5.0, 0, 71) + end + + local chance = math.random(100) + local alarm = math.random(100) + + if DoesEntityExist(vehicle) then + if alarm <= 33 then + SetVehicleAlarm(vehicle, true) + StartVehicleAlarm(vehicle) + end + + TaskStartScenarioInPlace(playerPed, 'WORLD_HUMAN_WELDING', 0, true) + + CreateThread(function() + Wait(10000) + if chance <= 66 then + SetVehicleDoorsLocked(vehicle, 1) + SetVehicleDoorsLockedForAllPlayers(vehicle, false) + ClearPedTasksImmediately(playerPed) + ESX.ShowNotification(TranslateCap('veh_unlocked')) + else + ESX.ShowNotification(TranslateCap('hijack_failed')) + ClearPedTasksImmediately(playerPed) + end + end) + end + end +end) + +RegisterNetEvent('esx_mechanicjob:onCarokit') +AddEventHandler('esx_mechanicjob:onCarokit', function() + local playerPed = PlayerPedId() + local coords = GetEntityCoords(playerPed) + + if IsAnyVehicleNearPoint(coords.x, coords.y, coords.z, 5.0) then + local vehicle + + if IsPedInAnyVehicle(playerPed, false) then + vehicle = GetVehiclePedIsIn(playerPed, false) + else + vehicle = GetClosestVehicle(coords.x, coords.y, coords.z, 5.0, 0, 71) + end + + if DoesEntityExist(vehicle) then + TaskStartScenarioInPlace(playerPed, 'WORLD_HUMAN_HAMMERING', 0, true) + CreateThread(function() + Wait(10000) + SetVehicleFixed(vehicle) + SetVehicleDeformationFixed(vehicle) + ClearPedTasksImmediately(playerPed) + ESX.ShowNotification(TranslateCap('body_repaired')) + end) + end + end +end) + +RegisterNetEvent('esx_mechanicjob:onFixkit') +AddEventHandler('esx_mechanicjob:onFixkit', function() + local playerPed = PlayerPedId() + local coords = GetEntityCoords(playerPed) + + if IsAnyVehicleNearPoint(coords.x, coords.y, coords.z, 5.0) then + local vehicle + + if IsPedInAnyVehicle(playerPed, false) then + vehicle = GetVehiclePedIsIn(playerPed, false) + else + vehicle = GetClosestVehicle(coords.x, coords.y, coords.z, 5.0, 0, 71) + end + + if DoesEntityExist(vehicle) then + TaskStartScenarioInPlace(playerPed, 'PROP_HUMAN_BUM_BIN', 0, true) + CreateThread(function() + Wait(20000) + SetVehicleFixed(vehicle) + SetVehicleDeformationFixed(vehicle) + SetVehicleUndriveable(vehicle, false) + ClearPedTasksImmediately(playerPed) + ESX.ShowNotification(TranslateCap('veh_repaired')) + end) + end + end +end) + +RegisterNetEvent('esx:playerLoaded') +AddEventHandler('esx:playerLoaded', function(xPlayer) + ESX.PlayerData = xPlayer + ESX.PlayerLoaded = true +end) + +RegisterNetEvent('esx:setJob') +AddEventHandler('esx:setJob', function(job) + ESX.PlayerData.job = job +end) + +AddEventHandler('esx_mechanicjob:hasEnteredMarker', function(zone) + if zone == 'NPCJobTargetTowable' then + + elseif zone =='VehicleDelivery' then + NPCTargetDeleterZone = true + elseif zone == 'MechanicActions' then + CurrentAction = 'mechanic_actions_menu' + CurrentActionMsg = TranslateCap('open_actions') + CurrentActionData = {} + elseif zone == 'Garage' then + CurrentAction = 'mechanic_harvest_menu' + CurrentActionMsg = TranslateCap('harvest_menu') + CurrentActionData = {} + elseif zone == 'Craft' then + CurrentAction = 'mechanic_craft_menu' + CurrentActionMsg = TranslateCap('craft_menu') + CurrentActionData = {} + elseif zone == 'VehicleDeleter' then + local playerPed = PlayerPedId() + + if IsPedInAnyVehicle(playerPed, false) then + local vehicle = GetVehiclePedIsIn(playerPed, false) + + CurrentAction = 'delete_vehicle' + CurrentActionMsg = TranslateCap('veh_stored') + CurrentActionData = {vehicle = vehicle} + end + end +end) + +AddEventHandler('esx_mechanicjob:hasExitedMarker', function(zone) + if zone =='VehicleDelivery' then + NPCTargetDeleterZone = false + elseif zone == 'Craft' then + TriggerServerEvent('esx_mechanicjob:stopCraft') + TriggerServerEvent('esx_mechanicjob:stopCraft2') + TriggerServerEvent('esx_mechanicjob:stopCraft3') + elseif zone == 'Garage' then + TriggerServerEvent('esx_mechanicjob:stopHarvest') + TriggerServerEvent('esx_mechanicjob:stopHarvest2') + TriggerServerEvent('esx_mechanicjob:stopHarvest3') + end + + CurrentAction = nil + ESX.CloseContext() +end) + +AddEventHandler('esx_mechanicjob:hasEnteredEntityZone', function(entity) + local playerPed = PlayerPedId() + + if ESX.PlayerData.job and ESX.PlayerData.job.name == 'mechanic' and not IsPedInAnyVehicle(playerPed, false) then + CurrentAction = 'remove_entity' + CurrentActionMsg = TranslateCap('press_remove_obj') + CurrentActionData = {entity = entity} + end +end) + +AddEventHandler('esx_mechanicjob:hasExitedEntityZone', function(entity) + if CurrentAction == 'remove_entity' then + CurrentAction = nil + end +end) + +-- Pop NPC mission vehicle when inside area +CreateThread(function() + while true do + local Sleep = 1500 + + if NPCTargetTowableZone and not NPCHasSpawnedTowable then + Sleep = 0 + local coords = GetEntityCoords(PlayerPedId()) + local zone = Config.Zones[NPCTargetTowableZone] + + if #(coords - zone.Pos) < Config.NPCSpawnDistance then + local model = Config.Vehicles[GetRandomIntInRange(1, #Config.Vehicles)] + + ESX.Game.SpawnVehicle(model, zone.Pos, 0, function(vehicle) + NPCTargetTowable = vehicle + end) + + NPCHasSpawnedTowable = true + end + end + + if NPCTargetTowableZone and NPCHasSpawnedTowable and not NPCHasBeenNextToTowable then + Sleep = 500 + local coords = GetEntityCoords(PlayerPedId()) + local zone = Config.Zones[NPCTargetTowableZone] + + if #(coords - zone.Pos) < Config.NPCNextToDistance then + Sleep = 0 + ESX.ShowNotification(TranslateCap('please_tow')) + NPCHasBeenNextToTowable = true + end + end + Wait(Sleep) + end +end) + +-- Create Blips +CreateThread(function() + local blip = AddBlipForCoord(Config.Zones.MechanicActions.Pos.x, Config.Zones.MechanicActions.Pos.y, Config.Zones.MechanicActions.Pos.z) + + SetBlipSprite (blip, 446) + SetBlipDisplay(blip, 4) + SetBlipScale (blip, 1.0) + SetBlipColour (blip, 5) + SetBlipAsShortRange(blip, true) + + BeginTextCommandSetBlipName('STRING') + AddTextComponentSubstringPlayerName(TranslateCap('mechanic')) + EndTextCommandSetBlipName(blip) +end) + +-- Display markers +CreateThread(function() + while true do + local Sleep = 2000 + + if ESX.PlayerData.job and ESX.PlayerData.job.name == 'mechanic' then + Sleep = 500 + local coords, letSleep = GetEntityCoords(PlayerPedId()), true + + for k,v in pairs(Config.Zones) do + if v.Type ~= -1 and #(coords - v.Pos) < Config.DrawDistance then + Sleep = 0 + DrawMarker(v.Type, v.Pos.x, v.Pos.y, v.Pos.z, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, v.Size.x, v.Size.y, v.Size.z, v.Color.r, v.Color.g, v.Color.b, 100, true, true, 2, true, nil, nil, false) + letSleep = false + end + end + end + Wait(Sleep) + end +end) + +-- Enter / Exit marker events +CreateThread(function() + while true do + local Sleep = 500 + + if ESX.PlayerData.job and ESX.PlayerData.job.name == 'mechanic' then + + local coords = GetEntityCoords(PlayerPedId()) + local isInMarker = false + local currentZone = nil + + for k,v in pairs(Config.Zones) do + if(#(coords - v.Pos) < v.Size.x) then + Sleep = 0 + isInMarker = true + currentZone = k + end + end + + if (isInMarker and not HasAlreadyEnteredMarker) or (isInMarker and LastZone ~= currentZone) then + HasAlreadyEnteredMarker = true + LastZone = currentZone + TriggerEvent('esx_mechanicjob:hasEnteredMarker', currentZone) + end + + if not isInMarker and HasAlreadyEnteredMarker then + HasAlreadyEnteredMarker = false + TriggerEvent('esx_mechanicjob:hasExitedMarker', LastZone) + end + end + Wait(Sleep) + end +end) + +CreateThread(function() + local trackedEntities = { + 'prop_roadcone02a', + 'prop_toolchest_01' + } + + while true do + Wait(500) + + local playerPed = PlayerPedId() + local coords = GetEntityCoords(playerPed) + + local closestDistance = -1 + local closestEntity = nil + + for i=1, #trackedEntities, 1 do + local object = GetClosestObjectOfType(coords, 3.0, joaat(trackedEntities[i]), false, false, false) + + if DoesEntityExist(object) then + local objCoords = GetEntityCoords(object) + local distance = #(coords - objCoords) + + if closestDistance == -1 or closestDistance > distance then + closestDistance = distance + closestEntity = object + end + end + end + + if closestDistance ~= -1 and closestDistance <= 3.0 then + if LastEntity ~= closestEntity then + TriggerEvent('esx_mechanicjob:hasEnteredEntityZone', closestEntity) + LastEntity = closestEntity + end + else + if LastEntity then + TriggerEvent('esx_mechanicjob:hasExitedEntityZone', LastEntity) + LastEntity = nil + end + end + end +end) + +-- Key Controls +CreateThread(function() + while true do + local sleep = 500 + if CurrentAction then + sleep = 0 + ESX.ShowHelpNotification(CurrentActionMsg) + + if IsControlJustReleased(0, 38) and ESX.PlayerData.job and ESX.PlayerData.job.name == 'mechanic' then + if CurrentAction == 'mechanic_actions_menu' then + OpenMechanicActionsMenu() + elseif CurrentAction == 'mechanic_harvest_menu' then + OpenMechanicHarvestMenu() + elseif CurrentAction == 'mechanic_craft_menu' then + OpenMechanicCraftMenu() + elseif CurrentAction == 'delete_vehicle' then + if Config.EnableSocietyOwnedVehicles then + + local vehicleProps = ESX.Game.GetVehicleProperties(CurrentActionData.vehicle) + TriggerServerEvent('esx_society:putVehicleInGarage', 'mechanic', vehicleProps) + else + local entityModel = GetEntityModel(CurrentActionData.vehicle) + + if entityModel == `flatbed` or entityModel == `towtruck2` or entityModel == `slamvan3` then + TriggerServerEvent('esx_service:disableService', 'mechanic') + end + end + ESX.Game.DeleteVehicle(CurrentActionData.vehicle) + elseif CurrentAction == 'remove_entity' then + DeleteEntity(CurrentActionData.entity) + end + + CurrentAction = nil + end + end + Wait(sleep) + end +end) +RegisterCommand('mechanicMenu', function() + if ESX.PlayerData.job and ESX.PlayerData.job.name == 'mechanic' then + OpenMobileMechanicActionsMenu() + end +end, false) + + + +RegisterCommand('mechanicjob', function() + local playerPed = PlayerPedId() + if ESX.PlayerData.job and ESX.PlayerData.job.name == 'mechanic' then + if NPCOnJob then + if GetGameTimer() - NPCLastCancel > 5 * 60000 then + StopNPCJob(true) + NPCLastCancel = GetGameTimer() + else + ESX.ShowNotification(TranslateCap('wait_five'), "error") + end + else + if IsPedInAnyVehicle(playerPed, false) and IsVehicleModel(GetVehiclePedIsIn(playerPed, false), `flatbed`) then + StartNPCJob() + else + ESX.ShowNotification(TranslateCap('must_in_flatbed'), "error") + end + end + end +end, false) + +RegisterKeyMapping('mechanicMenu', 'Open Mechanic Menu', 'keyboard', 'F6') +RegisterKeyMapping('mechanicjob', 'Togggle NPC Job', 'keyboard', 'F6') + +AddEventHandler('esx:onPlayerDeath', function(data) isDead = true end) +AddEventHandler('esx:onPlayerSpawn', function(spawn) isDead = false end) diff --git a/[esx_addons]/esx_mechanicjob/config.lua b/[esx_addons]/esx_mechanicjob/config.lua new file mode 100644 index 00000000..776b9355 --- /dev/null +++ b/[esx_addons]/esx_mechanicjob/config.lua @@ -0,0 +1,119 @@ +Config = {} +Config.Locale = GetConvar('esx:locale', 'en') + +Config.DrawDistance = 10.0 -- How close you need to be in order for the markers to be drawn (in GTA units). +Config.MaxInService = -1 +Config.EnablePlayerManagement = true -- Enable society managing. +Config.EnableSocietyOwnedVehicles = false + +Config.NPCSpawnDistance = 500.0 +Config.NPCNextToDistance = 25.0 +Config.NPCJobEarnings = { min = 15, max = 40 } + +Config.OxInventory = ESX.GetConfig().OxInventory + +Config.Vehicles = { + 'adder', + 'asea', + 'asterope', + 'banshee', + 'buffalo', + 'sultan', + 'baller3' +} + +Config.Zones = { + + MechanicActions = { + Pos = vector3(-342.291, -133.370, 39.009 ), + Size = { x = 1.0, y = 1.0, z = 1.0 }, + Color = { r = 50, g = 200, b = 50 }, + Type = 21 + }, + + Garage = { + Pos = vector3(-97.5, 6496.1, 31.4 ), + Size = { x = 1.0, y = 1.0, z = 1.0 }, + Color = { r = 50, g = 200, b = 50 }, + Type = 21 + }, + + Craft = { + Pos = vector3( -323.140, -129.882, 38.999 ), + Size = { x = 1.0, y = 1.0, z = 1.0 }, + Color = { r = 50, g = 200, b = 50 }, + Type = 21 + }, + + VehicleSpawnPoint = { + Pos = vector3(-366.354, -110.766, 37.696 ), + Size = { x = 1.5, y = 1.5, z = 1.0 }, + Type = -1 + }, + + VehicleDeleter = { + Pos = vector3(-386.899, -105.675, 37.683 ), + Size = { x = 3.0, y = 3.0, z = 1.0 }, + Color = { r = 204, g = 204, b = 0 }, + Type = 1 + }, + + VehicleDelivery = { + Pos = vector3(-382.925, -133.748, 37.685 ), + Size = { x = 20.0, y = 20.0, z = 3.0 }, + Color = { r = 204, g = 204, b = 0 }, + Type = -1 + } +} + +Config.Towables = { + vector3(-2480.9, -212.0, 17.4), + vector3(-2723.4, 13.2, 15.1), + vector3(-3169.6, 976.2, 15.0), + vector3(-3139.8, 1078.7, 20.2), + vector3(-1656.9, -246.2, 54.5), + vector3(-1586.7, -647.6, 29.4), + vector3(-1036.1, -491.1, 36.2), + vector3(-1029.2, -475.5, 36.4), + vector3(75.2, 164.9, 104.7), + vector3(-534.6, -756.7, 31.6), + vector3(487.2, -30.8, 88.9), + vector3(-772.2, -1281.8, 4.6), + vector3(-663.8, -1207.0, 10.2), + vector3(719.1, -767.8, 24.9), + vector3(-971.0, -2410.4, 13.3), + vector3(-1067.5, -2571.4, 13.2), + vector3(-619.2, -2207.3, 5.6), + vector3(1192.1, -1336.9, 35.1), + vector3(-432.8, -2166.1, 9.9), + vector3(-451.8, -2269.3, 7.2), + vector3(939.3, -2197.5, 30.5), + vector3(-556.1, -1794.7, 22.0), + vector3(591.7, -2628.2, 5.6), + vector3(1654.5, -2535.8, 74.5), + vector3(1642.6, -2413.3, 93.1), + vector3(1371.3, -2549.5, 47.6), + vector3(383.8, -1652.9, 37.3), + vector3(27.2, -1030.9, 29.4), + vector3(229.3, -365.9, 43.8), + vector3(-85.8, -51.7, 61.1), + vector3(-4.6, -670.3, 31.9), + vector3(-111.9, 92.0, 71.1), + vector3(-314.3, -698.2, 32.5), + vector3(-366.9, 115.5, 65.6), + vector3(-592.1, 138.2, 60.1), + vector3(-1613.9, 18.8, 61.8), + vector3(-1709.8, 55.1, 65.7), + vector3(-521.9, -266.8, 34.9), + vector3(-451.1, -333.5, 34.0), + vector3(322.4, -1900.5, 25.8) +} + +for k,v in ipairs(Config.Towables) do + Config.Zones['Towable' .. k] = { + Pos = v, + Size = { x = 1.5, y = 1.5, z = 1.0 }, + Color = { r = 204, g = 204, b = 0 }, + Type = -1 + } +end diff --git a/[esx_addons]/esx_mechanicjob/esx_mechanicjob.sql b/[esx_addons]/esx_mechanicjob/esx_mechanicjob.sql new file mode 100644 index 00000000..0b80f4ec --- /dev/null +++ b/[esx_addons]/esx_mechanicjob/esx_mechanicjob.sql @@ -0,0 +1,34 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_mechanic', 'Mechanic', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_mechanic', 'Mechanic', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_mechanic', 'Mechanic', 1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('mechanic', 'Mechanic') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('mechanic',0,'recrue','Recrue',12,'{}','{}'), + ('mechanic',1,'novice','Novice',24,'{}','{}'), + ('mechanic',2,'experimente','Experimente',36,'{}','{}'), + ('mechanic',3,'chief',"Chef d\'équipe",48,'{}','{}'), + ('mechanic',4,'boss','Patron',0,'{}','{}') +; + +INSERT INTO `items` (name, label, weight) VALUES + ('gazbottle', 'bouteille de gaz', 2), + ('fixtool', 'outils réparation', 2), + ('carotool', 'outils carosserie', 2), + ('blowpipe', 'Chalumeaux', 2), + ('fixkit', 'Kit réparation', 3), + ('carokit', 'Kit carosserie', 3) +; diff --git a/[esx_addons]/esx_mechanicjob/fxmanifest.lua b/[esx_addons]/esx_mechanicjob/fxmanifest.lua new file mode 100644 index 00000000..4f0704df --- /dev/null +++ b/[esx_addons]/esx_mechanicjob/fxmanifest.lua @@ -0,0 +1,29 @@ +fx_version 'adamant' + +game 'gta5' + +description 'ESX Mechanic Job' +lua54 'yes' +version '1.9.0' + +shared_script '@es_extended/imports.lua' + +client_scripts { + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'client/main.lua' +} + +server_scripts { + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'server/main.lua' +} + +dependencies { + 'es_extended', + 'esx_society', + 'esx_billing' +} diff --git a/[esx_addons]/esx_mechanicjob/locales/br.lua b/[esx_addons]/esx_mechanicjob/locales/br.lua new file mode 100644 index 00000000..2670b870 --- /dev/null +++ b/[esx_addons]/esx_mechanicjob/locales/br.lua @@ -0,0 +1,85 @@ +Locales['br'] = { + ['mechanic'] = 'Mecânico', + ['drive_to_indicated'] = 'Dirija para a localização indicada.', + ['mission_canceled'] = 'Missão ~r~cancelada', + ['vehicle_list'] = 'Lista de veículos', + ['work_wear'] = 'Vestuário de trabalho', + ['civ_wear'] = 'Roupas normal', + ['deposit_stock'] = 'Depósito de estoque', + ['withdraw_stock'] = 'Retirar do estoque', + ['boss_actions'] = 'Administração', + ['service_vehicle'] = 'Veículo de serviço', + ['flat_bed'] = 'Reboque Pranha', + ['tow_truck'] = 'Reboque Guincho', + ['service_full'] = 'Serviço cheio: ', + ['open_actions'] = 'Aperte [E] para acessar menu.', + ['harvest'] = 'Processando', + ['harvest_menu'] = 'Aperte [E] para acessar o menu de processamento.', + ['not_experienced_enough'] = 'Você não é ~r~experiente o suficiente para executar está ação.', + ['gas_can'] = 'Lata de gás', + ['repair_tools'] = 'Ferramentas de reparo', + ['body_work_tools'] = 'Ferramentas de carroçaria', + ['blowtorch'] = 'Maçarico', + ['repair_kit'] = 'Kit de reparação', + ['body_kit'] = 'Kit de corpo', + ['craft'] = 'Construir', + ['craft_menu'] = 'Aperte [E] para acessar menu de criar feramentas.', + ['billing'] = 'Faturamento', + ['hijack'] = 'Sequestro', + ['repair'] = 'Reparar', + ['clean'] = 'Limpar', + ['imp_veh'] = 'Veículo rebocado', + ['place_objects'] = 'Objetos de trabalho', + ['invoice_amount'] = 'Valor da fatura', + ['amount_invalid'] = 'Valor inválido', + ['no_players_nearby'] = 'Sem jogadores nas proximidades', + ['no_vehicle_nearby'] = 'there is no nearby vehicle', + ['inside_vehicle'] = 'you can\'t do this from inside the vehicle!', + ['vehicle_unlocked'] = 'Veículo Destrancado', + ['vehicle_repaired'] = 'Veículo Reparado', + ['vehicle_cleaned'] = 'Veículo Limpo', + ['vehicle_impounded'] = 'Veículo ~r~removido', + ['must_seat_driver'] = 'Você deve estar sentado ~r~no banco do motorista!', + ['must_near'] = 'Você deve estar perto de um ~r~veículo para rebocalo.', + ['vehicle_success_attached'] = 'Veículo foi rebocado com sucesso!.', + ['please_drop_off'] = 'Por favor, deixe o veículo na oficina mecânica', + ['cant_attach_own_tt'] = '~r~Você não pode rebocar seu próprio veículo!', + ['no_veh_att'] = 'Não há ~r~veículo para ser rebocado!', + ['not_right_veh'] = 'Este não é o veículo certo', + ['veh_det_succ'] = 'Veículo foi entregue com sucesso...', + ['imp_flatbed'] = '~r~Ação impossível! você precisa de um reboque de prancha para isso.', + ['objects'] = 'Objetos', + ['roadcone'] = 'Cone', + ['toolbox'] = 'Caixa de ferramentas', + ['mechanic_stock'] = 'Estoque do mecânico', + ['quantity'] = 'Quantidade', + ['invalid_quantity'] = 'Quantidade inválida', + ['inventory'] = 'Inventário', + ['veh_unlocked'] = 'Veículo destrancado', + ['hijack_failed'] = '~r~Destrava falhou', + ['body_repaired'] = 'Carro reparado', + ['veh_repaired'] = 'Veículo reparado', + ['veh_stored'] = 'Aperte [E] para armazenar o veículo.', + ['press_remove_obj'] = 'Aperte [E] para remover o objeto', + ['please_tow'] = 'Por favor reboque este veículo!', + ['wait_five'] = 'Você deve ~r~aguardar 5 minutos', + ['must_in_flatbed'] = 'Você deve estar em um caminhão de mecânico para iniciar a missão', + ['mechanic_customer'] = 'Cliente mecânico', + ['you_do_not_room'] = '~r~Você não tem mais espaço', + ['recovery_gas_can'] = 'Lata de gâs fabricado...', + ['recovery_repair_tools'] = 'Ferramentas de reparo fabricado...', + ['recovery_body_tools'] = 'Ferramentas de capo fabricado...', + ['not_enough_gas_can'] = 'Você não tem ~r~lata de gás o suficiente.', + ['assembling_blowtorch'] = 'Montagem Maçarico...', + ['not_enough_repair_tools'] = 'Você não tem ~r~ferramentas de reparo o suficiente.', + ['assembling_repair_kit'] = 'Fabricando Kit de reparação...', + ['not_enough_body_tools'] = 'Você não tem ~r~ferramentas corporais o suficiente.', + ['assembling_body_kit'] = 'Fabricando Kit de corpo...', + ['your_comp_earned'] = 'Sua empresa recebeu $', + ['you_used_blowtorch'] = 'Você usou um maçarico', + ['you_used_repair_kit'] = 'Você usou um Kit de reparação', + ['you_used_body_kit'] = 'Você usou um Kit de corpo', + ['have_withdrawn'] = 'você retirou x%s %s', + ['have_deposited'] = 'você depositou x%s %s', + ['player_cannot_hold'] = 'you do ~r~not have enough free space in your inventory!', +} diff --git a/[esx_addons]/esx_mechanicjob/locales/de.lua b/[esx_addons]/esx_mechanicjob/locales/de.lua new file mode 100644 index 00000000..002fd47d --- /dev/null +++ b/[esx_addons]/esx_mechanicjob/locales/de.lua @@ -0,0 +1,85 @@ +Locales['de'] = { + ['mechanic'] = 'Mechaniker', + ['drive_to_indicated'] = 'Fahre zum markierten Bereich', + ['mission_canceled'] = 'Mission abgebrochen', + ['vehicle_list'] = 'Fahrzeugliste', + ['work_wear'] = 'Arbeitskleidung', + ['civ_wear'] = 'Zivilkleidung', + ['deposit_stock'] = 'Bestand Einzahlen', + ['withdraw_stock'] = 'Verfügbar Abheben', + ['boss_actions'] = 'Inhaber Aktionen', + ['service_vehicle'] = 'Service Fahrzeug', + ['flat_bed'] = 'Pritschenwagen', + ['tow_truck'] = 'Abschleppwagen', + ['service_full'] = 'Gesamt Service: ', + ['open_actions'] = 'Drücke [E] um Menü zu öffnen', + ['harvest'] = 'Sammeln', + ['harvest_menu'] = 'Drücke [E] um Farm Menü aufzurufen', + ['not_experienced_enough'] = 'Du bist nicht erfahren genug um dies zu tun!', + ['gas_can'] = 'Benzinkanister', + ['repair_tools'] = 'Reparaturwerkzeug', + ['body_work_tools'] = 'Karosseriewerkzeug', + ['blowtorch'] = 'Schweißgerät', + ['repair_kit'] = 'Reparatur Kit', + ['body_kit'] = 'Karosserie Kit', + ['craft'] = 'Herstellen', + ['craft_menu'] = 'Drücke [E] um Herstellungsmenü zu öffnen.', + ['billing'] = 'Rechnungen', + ['hijack'] = 'Aufgebrochen', + ['repair'] = 'Reparieren', + ['clean'] = 'Reinigen', + ['imp_veh'] = 'Fahrzeug einziehen', + ['place_objects'] = 'Objekte platzieren', + ['invoice_amount'] = 'Rechnungsbetrag', + ['amount_invalid'] = 'Ungültiger Betrag', + ['no_players_nearby'] = 'Es ist kein Spieler in der Nähe', + ['no_vehicle_nearby'] = 'Es ist kein Fahrzeug in der Nähe', + ['inside_vehicle'] = 'Du musst vorher aussteigen!', + ['vehicle_unlocked'] = 'Fahrzeug geöffnet', + ['vehicle_repaired'] = 'Fahrzeug repariert', + ['vehicle_cleaned'] = 'Fahrzeug gereinigt', + ['vehicle_impounded'] = 'Fahrzeug wurde eingezogen', + ['must_seat_driver'] = 'Setz dich als Fahrer hinein!', + ['must_near'] = 'In die Nähe des Fahrzeugs stellen was eingezogen werden soll', + ['vehicle_success_attached'] = 'Fahrzeug fixiert', + ['please_drop_off'] = 'Stelle Fahrzeug in der Garage ab', + ['cant_attach_own_tt'] = 'Du kannst nicht den eigenen Abschleppwagen fixieren', + ['no_veh_att'] = 'Kein Fahrzeug zum fixieren gefunden', + ['not_right_veh'] = 'Falsches Fahrzeug', + ['veh_det_succ'] = 'Fahrzeug gelöst!', + ['imp_flatbed'] = 'Nicht möglich! Du benötigst einen Pritschenwagen', + ['objects'] = 'Objekte', + ['roadcone'] = 'Verkehrskegel', + ['toolbox'] = 'Werkzeugkasten', + ['mechanic_stock'] = 'Lager Mechaniker', + ['quantity'] = 'Anzahl', + ['invalid_quantity'] = 'Anzahl ungültig!', + ['inventory'] = 'Inventar', + ['veh_unlocked'] = 'Fahrzeug geöffnet', + ['hijack_failed'] = 'Aufbrechen gescheitert', + ['body_repaired'] = 'Karosserie repariert', + ['veh_repaired'] = 'Fahrzueg repariert', + ['veh_stored'] = 'Drücke [E] um Fahrzeug einzuparken', + ['press_remove_obj'] = 'Drücke [E] um Objekt zu entfernen', + ['please_tow'] = 'Fahrzeug abschleppen', + ['wait_five'] = 'Warte 5 Minuten', + ['must_in_flatbed'] = 'Du musst dich im Pritschenwagen befinden', + ['mechanic_customer'] = 'Kunde', + ['you_do_not_room'] = 'Kein Platz mehr', + ['recovery_gas_can'] = 'Abholung Bezinkanister...', + ['recovery_repair_tools'] = 'Abholung Reparaturwerkzeug...', + ['recovery_body_tools'] = 'Abholung Karosseriewerkzeug...', + ['not_enough_gas_can'] = 'Du hast nicht genug Benzinkanister', + ['assembling_blowtorch'] = 'Schweißgerät zusammenbauen...', + ['not_enough_repair_tools'] = 'Du hast nicht genug Reparaturwerkzeuge.', + ['assembling_repair_kit'] = 'Reparatur Kit zusammenbauen...', + ['not_enough_body_tools'] = 'Du hast nicht genug Karosseriewerkzeug', + ['assembling_body_kit'] = 'Karosseriewerkzeug zusammenbauen...', + ['your_comp_earned'] = 'Deine Firma hat $ verdient', + ['you_used_blowtorch'] = 'Schweißgerät genutzt', + ['you_used_repair_kit'] = 'Reparatur Kit genutzt', + ['you_used_body_kit'] = 'Karosserie Kit genutzt', + ['have_withdrawn'] = 'Du hast x%s %s abgehoben', + ['have_deposited'] = 'Du hast x%s %s eingezahlt', + ['player_cannot_hold'] = 'Kein Platz im Inventar!', +} diff --git a/[esx_addons]/esx_mechanicjob/locales/en.lua b/[esx_addons]/esx_mechanicjob/locales/en.lua new file mode 100644 index 00000000..14921c47 --- /dev/null +++ b/[esx_addons]/esx_mechanicjob/locales/en.lua @@ -0,0 +1,86 @@ +Locales['en'] = { + ['mechanic'] = 'mechanic', + ['drive_to_indicated'] = 'Drive to the indicated location.', + ['mission_canceled'] = 'Mission canceled', + ['vehicle_list'] = 'vehicle List', + ['work_wear'] = 'workwear', + ['civ_wear'] = 'civilian clothes', + ['deposit_stock'] = 'deposit Stock', + ['withdraw_stock'] = 'withdraw Stock', + ['boss_actions'] = 'boss Actions', + ['service_vehicle'] = 'service Vehicle', + ['flat_bed'] = 'flatbed', + ['tow_truck'] = 'tow Truck', + ['service_full'] = 'service full: ', + ['open_actions'] = 'Press [E] to access the menu.', + ['harvest'] = 'harvest', + ['harvest_menu'] = 'press [E] to access the harvest menu.', + ['not_experienced_enough'] = 'you are not experienced enough to perform this action.', + ['gas_can'] = 'gas Can', + ['repair_tools'] = 'repair Tools', + ['body_work_tools'] = 'bodywork Tools', + ['blowtorch'] = 'blowtorch', + ['repair_kit'] = 'repair Kit', + ['body_kit'] = 'body Kit', + ['craft'] = 'craft', + ['craft_menu'] = 'press [E] to access the crafting menu.', + ['billing'] = 'billing', + ['hijack'] = 'hijack', + ['repair'] = 'repair', + ['clean'] = 'clean', + ['imp_veh'] = 'impound', + ['place_objects'] = 'place Objects', + ['invoice_amount'] = 'invoice Amount', + ['amount_invalid'] = 'invalid amount', + ['no_players_nearby'] = 'there is no nearby player', + ['no_vehicle_nearby'] = 'there is no nearby vehicle', + ['inside_vehicle'] = 'you can\'t do this from inside the vehicle!', + ['vehicle_unlocked'] = 'the vehicle has been unlocked', + ['vehicle_repaired'] = 'the vehicle has been repaired', + ['vehicle_cleaned'] = 'the vehicle has been cleaned', + ['vehicle_impounded'] = 'the vehicle has been impounded', + ['must_seat_driver'] = 'you must be in the driver seat!', + ['must_near'] = 'you must be near a vehicle to impound it.', + ['vehicle_success_attached'] = 'vehicle successfully attached', + ['please_drop_off'] = 'please drop off the vehicle at the garage', + ['cant_attach_own_tt'] = 'you can\'t attach own tow truck', + ['no_veh_att'] = 'there is no vehicle to be attached', + ['not_right_veh'] = 'this is not the right vehicle', + ['not_right_place'] = 'this is not the right place', + ['veh_det_succ'] = 'vehicle successfully dettached!', + ['imp_flatbed'] = 'Action impossible! You need a Flatbed to load a vehicle', + ['objects'] = 'objects', + ['roadcone'] = 'roadcone', + ['toolbox'] = 'toolbox', + ['mechanic_stock'] = 'mechanic Stock', + ['quantity'] = 'quantity', + ['invalid_quantity'] = 'invalid quantity', + ['inventory'] = 'inventory', + ['veh_unlocked'] = 'Vehicle Unlocked', + ['hijack_failed'] = 'Hijack Failed', + ['body_repaired'] = 'Body repaired', + ['veh_repaired'] = 'Vehicle Repaired', + ['veh_stored'] = 'press [E] to store the vehicle.', + ['press_remove_obj'] = 'press [E] to remove the object', + ['please_tow'] = 'please tow the vehicle', + ['wait_five'] = 'you must wait 5 minutes', + ['must_in_flatbed'] = 'you must be in a flatbed to being the mission', + ['mechanic_customer'] = 'mechanic Customer', + ['you_do_not_room'] = 'You do not have more room', + ['recovery_gas_can'] = 'Gas Can Retrieval...', + ['recovery_repair_tools'] = 'Repair Tools Retrieval...', + ['recovery_body_tools'] = 'Body Tools Retrieval...', + ['not_enough_gas_can'] = 'You do not have enough gas cans.', + ['assembling_blowtorch'] = 'Assembling Blowtorch...', + ['not_enough_repair_tools'] = 'You do not have enough repair tools.', + ['assembling_repair_kit'] = 'Assembling Repair Kit...', + ['not_enough_body_tools'] = 'You do not have enough body tools.', + ['assembling_body_kit'] = 'Assembling Body Kit...', + ['your_comp_earned'] = 'your company has earned $', + ['you_used_blowtorch'] = 'you used a blowtorch', + ['you_used_repair_kit'] = 'you used a Repair Kit', + ['you_used_body_kit'] = 'you used a Body Kit', + ['have_withdrawn'] = 'you have withdrawn x%s %s', + ['have_deposited'] = 'you have deposited x%s %s', + ['player_cannot_hold'] = 'you do not have enough free space in your inventory!', +} diff --git a/[esx_addons]/esx_mechanicjob/locales/es.lua b/[esx_addons]/esx_mechanicjob/locales/es.lua new file mode 100644 index 00000000..dbe22348 --- /dev/null +++ b/[esx_addons]/esx_mechanicjob/locales/es.lua @@ -0,0 +1,86 @@ +Locales['es'] = { + ['mechanic'] = 'Mecánico', + ['drive_to_indicated'] = 'Conduce a la ubicación indicada.', + ['mission_canceled'] = 'Misión cancelada', + ['vehicle_list'] = 'Lista de vehículos', + ['work_wear'] = 'Ropa de trabajo', + ['civ_wear'] = 'Ropa de civil', + ['deposit_stock'] = 'Depositar stock', + ['withdraw_stock'] = 'Retirar stock', + ['boss_actions'] = 'Acciones del jefe', + ['service_vehicle'] = 'Vehículo de servicio', + ['flat_bed'] = 'Plataforma', + ['tow_truck'] = 'Camión de remolque', + ['service_full'] = 'Servicio completo: ', + ['open_actions'] = 'Presiona [E] para acceder al menú.', + ['harvest'] = 'Cosecha', + ['harvest_menu'] = 'Presiona [E] para acceder al menú de cosecha.', + ['not_experienced_enough'] = 'Usted no está lo suficientemente experimentado para realizar esta acción.', + ['gas_can'] = 'Lata de gas', + ['repair_tools'] = 'Herramientas para reparar', + ['body_work_tools'] = 'Herramientas de carrocería', + ['blowtorch'] = 'Soplete', + ['repair_kit'] = 'kit de reparación', + ['body_kit'] = 'kit de carrocería', + ['craft'] = 'Fabricar', + ['craft_menu'] = 'Presiona [E] para acceder al menú de crafteo.', + ['billing'] = 'Facturación', + ['hijack'] = 'Forzar', + ['repair'] = 'Reparar', + ['clean'] = 'Limpiar', + ['imp_veh'] = 'Incautar', + ['place_objects'] = 'Colocar objetos', + ['invoice_amount'] = 'Cantidad de factura', + ['amount_invalid'] = 'Cantidad Inválida', + ['no_players_nearby'] = 'No hay un jugador/a cercano', + ['no_vehicle_nearby'] = 'No hay ningún vehículo cercano', + ['inside_vehicle'] = '¡No puedes hacer esto desde el interior del vehículo!', + ['vehicle_unlocked'] = 'El vehículo ha sido desbloqueado', + ['vehicle_repaired'] = 'El vehículo ha sido reparado', + ['vehicle_cleaned'] = 'El vehículo ha sido limpiado', + ['vehicle_impounded'] = 'El vehículo ha sido incautado', + ['must_seat_driver'] = '¡Debes estar en el asiento del conductor!', + ['must_near'] = 'Usted debe estar cerca de un vehículo incautarlo.', + ['vehicle_success_attached'] = 'Vehículo con éxito adjuntado', + ['please_drop_off'] = 'Por favor, deje el vehículo en el garaje', + ['cant_attach_own_tt'] = 'No puedes adjuntar su propia grúa', + ['no_veh_att'] = 'No hay vehículo que se adjunte', + ['not_right_veh'] = 'Este no es el vehículo correcto', + ['not_right_place'] = 'Este no es el lugar correcto', + ['veh_det_succ'] = 'Vehículo con éxito separado!', + ['imp_flatbed'] = '¡Acción imposible! Necesitas una Cama plana para cargar un vehículo', + ['objects'] = 'Objetos', + ['roadcone'] = 'Cono', + ['toolbox'] = 'Caja de herramientas', + ['mechanic_stock'] = 'Stock mecánico', + ['quantity'] = 'Cantidad', + ['invalid_quantity'] = 'Cantidad inválida', + ['inventory'] = 'Inventario', + ['veh_unlocked'] = 'Vehículo desbloqueado', + ['hijack_failed'] = 'Secuestro fallido', + ['body_repaired'] = 'Carrocería reparado', + ['veh_repaired'] = 'Vehículo reparado', + ['veh_stored'] = 'Presiona [E] para almacenar el vehículo.', + ['press_remove_obj'] = 'Presiona [E] para quitar el objeto', + ['please_tow'] = 'Por favor remolca el vehículo', + ['wait_five'] = 'Debes esperar 5 minutos', + ['must_in_flatbed'] = 'Debes estar en una plataforma para ser la misión', + ['mechanic_customer'] = 'Cliente mecánico', + ['you_do_not_room'] = 'No tienes mas espacio', + ['recovery_gas_can'] = 'Lata de gas Recuperando...', + ['recovery_repair_tools'] = 'Herramientas para reparar Recuperando...', + ['recovery_body_tools'] = 'Herramientas de carrocería Recuperando...', + ['not_enough_gas_can'] = 'No tienes suficiente latas de gas.', + ['assembling_blowtorch'] = 'Montando Soplete...', + ['not_enough_repair_tools'] = 'No tienes suficiente herramientas para reparar.', + ['assembling_repair_kit'] = 'Montando Kit de reparación...', + ['not_enough_body_tools'] = 'No tienes suficiente herramientas de carrocería.', + ['assembling_body_kit'] = 'Montando Kit de carrocería...', + ['your_comp_earned'] = 'Tu empresa ha ganado $', + ['you_used_blowtorch'] = 'Usaste un soplete', + ['you_used_repair_kit'] = 'Usaste un Kit de reparación', + ['you_used_body_kit'] = 'Usaste un Kit de carrocería', + ['have_withdrawn'] = 'Has retirado x%s %s', + ['have_deposited'] = 'Has depositado x%s %s', + ['player_cannot_hold'] = 'Tu no tienes suficiente espacio suficiente en tu inventario!', +} diff --git a/[esx_addons]/esx_mechanicjob/locales/et.lua b/[esx_addons]/esx_mechanicjob/locales/et.lua new file mode 100644 index 00000000..bd7af279 --- /dev/null +++ b/[esx_addons]/esx_mechanicjob/locales/et.lua @@ -0,0 +1,86 @@ +Locales['et'] = { + ['mechanic'] = 'Mehaanik', + ['drive_to_indicated'] = 'Sõida ettenähtud kohta.', + ['mission_canceled'] = 'Töö katkestatud', + ['vehicle_list'] = 'Sõidukite list', + ['work_wear'] = 'Töö riided', + ['civ_wear'] = 'Tava riided', + ['deposit_stock'] = 'deposit Stock', + ['withdraw_stock'] = 'withdraw Stock', + ['boss_actions'] = 'Bossi menüü', + ['service_vehicle'] = 'Teenindussõiduk', + ['flat_bed'] = 'Pardaauto', + ['tow_truck'] = 'Puksiirauto', + ['service_full'] = 'Täis teenus: ', + ['open_actions'] = 'Vajuta [E], et avada menüü.', + ['harvest'] = 'Korja', + ['harvest_menu'] = 'Vajuta [E], et avada korjamis menüü.', + ['not_experienced_enough'] = 'Sa pole piisavalt kogenud, et seda teha.', + ['gas_can'] = 'Bensiini kanister', + ['repair_tools'] = 'Parandus tööriistad', + ['body_work_tools'] = 'Kere tööriistad', + ['blowtorch'] = 'keevitaja', + ['repair_kit'] = 'Parandus komplekt', + ['body_kit'] = 'Kere', + ['craft'] = 'Meisterda', + ['craft_menu'] = 'Vajuta [E], et avada menüü.', + ['billing'] = 'Arved', + ['hijack'] = 'Varasta', + ['repair'] = 'Paranda', + ['clean'] = 'Puhasta', + ['imp_veh'] = 'Aresti', + ['place_objects'] = 'Aseta objekt', + ['invoice_amount'] = 'Arve', + ['amount_invalid'] = 'Vale kogus', + ['no_players_nearby'] = 'Ligiduses pole ühtegi isikut', + ['no_vehicle_nearby'] = 'Ligiduses pole ühtegi sõidukit', + ['inside_vehicle'] = 'Sa ei saa seda teha autost seest!', + ['vehicle_unlocked'] = 'Auto on lukust lahti', + ['vehicle_repaired'] = 'Auto on parandatud', + ['vehicle_cleaned'] = 'Auto on pestud', + ['vehicle_impounded'] = 'Auto on arreteeritud', + ['must_seat_driver'] = 'Sa pead olema juhi istmel!', + ['must_near'] = 'Sa pead olema auto ligidal, et seda arreteerida.', + ['vehicle_success_attached'] = 'sõiduk edukalt ühendatud', + ['please_drop_off'] = 'Palun viige sõiduk garaaži', + ['cant_attach_own_tt'] = 'Sa ei saa teist puksiiri puksiirida', + ['no_veh_att'] = 'Ühtegi sõidukit pole ligidal millega ühendada', + ['not_right_veh'] = 'See pole õige sõiduk', + ['not_right_place'] = 'See pole õige koht', + ['veh_det_succ'] = 'Sõiduk edukalt lahti tehtud!', + ['imp_flatbed'] = 'Sa ei saa seda teha! Sul on selle jaoks vaja pardaautot', + ['objects'] = 'objekt', + ['roadcone'] = 'Koonus', + ['toolbox'] = 'Tööriista komplekt', + ['mechanic_stock'] = 'mechanic Stock', + ['quantity'] = 'Kogus', + ['invalid_quantity'] = 'iVale kogus', + ['inventory'] = 'Kapp', + ['veh_unlocked'] = 'Auto lukust lahti tehtud', + ['hijack_failed'] = 'Ukse muukimine ebaõnnestus', + ['body_repaired'] = 'Kere parandatud', + ['veh_repaired'] = 'Sõiduk parandatud', + ['veh_stored'] = 'Vajuta [E], et hoistada ese.', + ['press_remove_obj'] = 'Vajuta [E], et võtta ese.', + ['please_tow'] = 'Palun puksiiri see sõiduk', + ['wait_five'] = 'Sa pead ootama 5 minutit', + ['must_in_flatbed'] = 'Sul peab olema pardaauto, et alustada tööga.', + ['mechanic_customer'] = 'Mehaaniku klient', + ['you_do_not_room'] = 'Sul pole rohkem ruumi', + ['recovery_gas_can'] = 'Bensiini kanistri tagastamine...', + ['recovery_repair_tools'] = 'Parandus tööriistade tagastamine...', + ['recovery_body_tools'] = 'Kere tööriistade tagastamine...', + ['not_enough_gas_can'] = 'Sul pole piisavalt bensiini kanistreid.', + ['assembling_blowtorch'] = 'Paned keevitajat kokku...', + ['not_enough_repair_tools'] = 'Sul pole piisavalt parandus tööriistu.', + ['assembling_repair_kit'] = 'Paned paranduskomplekti kokku...', + ['not_enough_body_tools'] = 'Sul pole piisavalt kere tööriistu.', + ['assembling_body_kit'] = 'Valmistad kere...', + ['your_comp_earned'] = 'Teie firma teenis $', + ['you_used_blowtorch'] = 'Sa kasutasid keevitaja', + ['you_used_repair_kit'] = 'Sa kasutasid paranduskomplekti', + ['you_used_body_kit'] = 'Sa kasutasid kere', + ['have_withdrawn'] = 'Sa võtsid firma arvelt x%s %s', + ['have_deposited'] = 'Sa panid firma arvele x%s %s', + ['player_cannot_hold'] = 'Sul pole piisavalt ruumi seljakotis!', +} diff --git a/[esx_addons]/esx_mechanicjob/locales/fi.lua b/[esx_addons]/esx_mechanicjob/locales/fi.lua new file mode 100644 index 00000000..a6738bc6 --- /dev/null +++ b/[esx_addons]/esx_mechanicjob/locales/fi.lua @@ -0,0 +1,85 @@ +Locales['fi'] = { + ['mechanic'] = 'mekaanikko', + ['drive_to_indicated'] = 'Aja merkattuun pisteeseen.', + ['mission_canceled'] = 'tehtävä ~r~peruutettu', + ['vehicle_list'] = 'ajoneuvo lista', + ['work_wear'] = 'työvaatteet', + ['civ_wear'] = 'siviilivaatteet', + ['deposit_stock'] = 'talleta varastoon', + ['withdraw_stock'] = 'ota varastosta', + ['boss_actions'] = 'pomo toiminnot', + ['service_vehicle'] = 'huoltoajoneuvo', + ['flat_bed'] = 'flatbed', + ['tow_truck'] = 'hinausajoneuvo', + ['service_full'] = 'työntekijöitä tarpeeksi: ', + ['open_actions'] = 'paina [E] avataksesi menun.', + ['harvest'] = 'kerää', + ['harvest_menu'] = 'paina [E] avataksesi keräys menun.', + ['not_experienced_enough'] = 'et ole ~r~tarpeeksi koulutettu että voit tehdä tätä.', + ['gas_can'] = 'kaasupullo', + ['repair_tools'] = 'korjaustyökalut', + ['body_work_tools'] = 'korin korjaustyökalut', + ['blowtorch'] = 'polttoleikkuri', + ['repair_kit'] = 'korjauskitti', + ['body_kit'] = 'korikitti', + ['craft'] = 'valmista', + ['craft_menu'] = 'paina [E] avataksesi valmistus menu', + ['billing'] = 'laskutus', + ['hijack'] = 'avaa lukot', + ['repair'] = 'korjaa', + ['clean'] = 'pese', + ['imp_veh'] = 'takavarikoi', + ['place_objects'] = 'aseta objekteja', + ['invoice_amount'] = 'laskun summa', + ['amount_invalid'] = 'virheellinen summa', + ['no_players_nearby'] = 'ei pelaajia lähettyvillä', + ['no_vehicle_nearby'] = 'there is no nearby vehicle', + ['inside_vehicle'] = 'you can\'t do this from inside the vehicle!', + ['vehicle_unlocked'] = 'ajoneuvo Avattu', + ['vehicle_repaired'] = 'ajoneuvo Korjattu', + ['vehicle_cleaned'] = 'ajoneuvo pesty', + ['vehicle_impounded'] = 'ajoneuvo ~r~Takavarikoitu', + ['must_seat_driver'] = 'sinun pitää olla ~r~kuskin paikalla', + ['must_near'] = 'sinun pitää olla ~r~ajoneuvon lähellä että voit takavarikoida.', + ['vehicle_success_attached'] = 'ajoneuvo onnistuneesti kytketty!.', + ['please_drop_off'] = 'vie ajoneuvo korjauspajan pihalle, kiitos.', + ['cant_attach_own_tt'] = '~r~Et voi kytkeä omaa hinausautoa', + ['no_veh_att'] = 'täällä ei ole ~r~ajoneuvoa jota kytkeä', + ['not_right_veh'] = 'tämä ei ole oikea ajoneuvo', + ['veh_det_succ'] = 'ajoneuvo onnistuunesti irroitettu!', + ['imp_flatbed'] = '~r~Toiminto mahdoton! Sinulla pitää olla Flatbed tähän.', + ['objects'] = 'objektit', + ['roadcone'] = 'kartio', + ['toolbox'] = 'työkalupakki', + ['mechanic_stock'] = 'mekaanikon varasto', + ['quantity'] = 'määrä', + ['invalid_quantity'] = 'virheellinen summa', + ['inventory'] = 'reppu', + ['veh_unlocked'] = 'Ajoneuvo avattu', + ['hijack_failed'] = '~r~Tiirikointi epäonnistu', + ['body_repaired'] = 'Kori korjattu', + ['veh_repaired'] = 'Ajoneuvo korjattu', + ['veh_stored'] = 'paina [E] laittaaksesi auto talliin.', + ['press_remove_obj'] = 'paina [E] poistaaksesi objekti', + ['please_tow'] = 'voisitko hinata ajoneuvon, kiitos', + ['wait_five'] = 'sinun pitää ~r~odottaa 5 minuuttia', + ['must_in_flatbed'] = 'sinun pitää olla flatbedin kyydissä aloitaaksesi.', + ['mechanic_customer'] = 'mekaanikon Asiakas', + ['you_do_not_room'] = '~r~Sinulla ei ole enempää tilaa', + ['recovery_gas_can'] = 'Kaasupullon täyttö menossa...', + ['recovery_repair_tools'] = 'Korjaustyökalujen kerääminen menossa...', + ['recovery_body_tools'] = 'Korin työkalujen kerääminen menossa...', + ['not_enough_gas_can'] = 'sinulla ~r~ei ole tarpeeksi kaasupulloja.', + ['assembling_blowtorch'] = 'kasataan Polttoleikkuria...', + ['not_enough_repair_tools'] = 'sinulla ~r~ei ole tarpeeksi korjaus työkaluja.', + ['assembling_repair_kit'] = 'kasataan Korjauskittiä...', + ['not_enough_body_tools'] = 'sinulla ~r~ei ole tarpeeksi kori työkaluja.', + ['assembling_body_kit'] = 'kasataan Korikittiä...', + ['your_comp_earned'] = 'yrityksesi tienasi $', + ['you_used_blowtorch'] = 'sinä käytit yhden Polttoleikkurin', + ['you_used_repair_kit'] = 'sinä käytit yhden Korjauskitin', + ['you_used_body_kit'] = 'sinä käytit yhden Korikitin', + ['have_withdrawn'] = 'sinä nostit x%s %s', + ['have_deposited'] = 'sinä talletit x%s %s', + ['player_cannot_hold'] = 'sinulla ~r~ei ole tarpeeksi vapaata tilaa repussasi!', +} diff --git a/[esx_addons]/esx_mechanicjob/locales/fr.lua b/[esx_addons]/esx_mechanicjob/locales/fr.lua new file mode 100644 index 00000000..5327a6e7 --- /dev/null +++ b/[esx_addons]/esx_mechanicjob/locales/fr.lua @@ -0,0 +1,86 @@ +Locales['fr'] = { + ['mechanic'] = 'mécano', + ['drive_to_indicated'] = 'Conduisez jusqu\'à l\'endroit indiqué', + ['mission_canceled'] = 'Mission ~r~annulée', + ['vehicle_list'] = 'sortir véhicule', + ['work_wear'] = 'tenue de travail', + ['civ_wear'] = 'Tenue civile', + ['deposit_stock'] = 'Déposer Stock', + ['withdraw_stock'] = 'Prendre Stock', + ['boss_actions'] = 'action patron', + ['service_vehicle'] = 'Véhicule de service', + ['flat_bed'] = 'plateau', + ['tow_truck'] = 'dépanneuse', + ['service_full'] = 'service complet : ', + ['open_actions'] = 'Appuyez sur [E] pour accéder au menu.', + ['harvest'] = 'récolte', + ['harvest_menu'] = 'Appuyez sur [E] pour accéder au menu de récolte.', + ['not_experienced_enough'] = 'Vous n\'êtes ~r~pas assez expérimenté pour effectuer cette action.', + ['gas_can'] = 'Bouteille de gaz', + ['repair_tools'] = 'Outils réparation', + ['body_work_tools'] = 'Outils carosserie', + ['blowtorch'] = 'chalumeau', + ['repair_kit'] = 'kit réparation', + ['body_kit'] = 'kit carosserie', + ['craft'] = 'établi', + ['craft_menu'] = 'appuyez sur [E] pour accéder au menu établi.', + ['billing'] = 'facturation', + ['hijack'] = 'crocheter', + ['repair'] = 'réparer', + ['clean'] = 'nettoyer', + ['imp_veh'] = 'fourrière', + ['place_objects'] = 'placer objets', + ['invoice_amount'] = 'montant de la facture', + ['amount_invalid'] = 'montant invalide', + ['no_players_nearby'] = 'aucun joueur à proximité', + ['no_vehicle_nearby'] = 'aucun véhicule à proximité', + ['inside_vehicle'] = 'vous ne pouvez pas effectuer cette action depuis un véhicule!', + ['vehicle_unlocked'] = 'véhicule déverrouillé', + ['vehicle_repaired'] = 'véhicule réparé', + ['vehicle_cleaned'] = 'véhicule nettoyé', + ['vehicle_impounded'] = 'vehicule ~r~mis en fourrière', + ['must_seat_driver'] = 'vous devez être assis du ~r~côté conducteur!', + ['must_near'] = 'vous devez être ~r~près d\'un véhicule pour le mettre en fourrière', + ['vehicle_success_attached'] = 'vehicule attaché avec succès!', + ['please_drop_off'] = 'veuillez déposer le véhicule à la concession', + ['cant_attach_own_tt'] = '~r~Impossible d\'attacher votre propre dépanneuse', + ['no_veh_att'] = 'il n\'y a ~r~pas de véhicule à attacher', + ['not_right_veh'] = 'ce n\'est pas le bon véhicule', + ['veh_det_succ'] = 'vehicule détaché avec succès!', + ['imp_flatbed'] = '~r~Impossible! Vous devez avoir un Plateau pour ça', + ['objects'] = 'objets', + ['roadcone'] = 'plot', + ['toolbox'] = 'boîte à outils', + ['mechanic_stock'] = 'coffre de l\'entreprise', + ['quantity'] = 'quantité', + ['invalid_quantity'] = 'quantité invalide', + ['inventory'] = 'inventaire', + ['veh_unlocked'] = 'Véhicule déverouillé', + ['hijack_failed'] = '~r~Crochetage raté', + ['body_repaired'] = 'Carosserie réparée', + ['veh_repaired'] = 'Véhicule réparé', + ['veh_stored'] = 'appuyez sur [E] pour ranger le véhicule.', + ['press_remove_obj'] = 'appuyez sur [E] pour enlever l\'objet', + ['please_tow'] = 'veuillez remorquer le véhicule', + ['wait_five'] = 'Vous devez ~r~attendre 5 minutes', + ['must_in_flatbed'] = 'Vous devez être à bord d\'un Plateau pour commencer la mission', + ['not_right_place'] = 'Vous devez être au bon endroit pour faire cela', + ['mechanic_customer'] = 'client mecano', + ['you_do_not_room'] = '~r~Vous n\'avez plus de place', + ['recovery_gas_can'] = 'Récupération de bouteille de gaz...', + ['recovery_repair_tools'] = 'Récupération d\'outils réparation...', + ['recovery_body_tools'] = 'Récupération d\'outils carosserie...', + ['not_enough_gas_can'] = 'Vous n\'avez ~r~pas assez de bouteille de gaz', + ['assembling_blowtorch'] = 'Assemblage de chalumeaux...', + ['not_enough_repair_tools'] = 'Vous n\'avez ~r~pas assez d\'outils réparation', + ['assembling_repair_kit'] = 'Assemblage de kit réparation...', + ['not_enough_body_tools'] = 'Vous n\'avez ~r~pas assez d\'outils carosserie', + ['assembling_body_kit'] = 'Assemblage de kit carosserie...', + ['your_comp_earned'] = 'Votre société a gagné $', + ['you_used_blowtorch'] = 'Vous avez utilisé un chalumeau', + ['you_used_repair_kit'] = 'Vous avez utilisé un kit de réparation', + ['you_used_body_kit'] = 'Vous avez utilisé un kit de carosserie', + ['have_withdrawn'] = 'vous avez pris x%s %s', + ['have_deposited'] = 'vous avez déposé x%s %s', + ['player_cannot_hold'] = 'vous n\'avez ~r~pas assez d\'espace libre dans votre inventaire!', +} diff --git a/[esx_addons]/esx_mechanicjob/locales/hu.lua b/[esx_addons]/esx_mechanicjob/locales/hu.lua new file mode 100644 index 00000000..2255cc25 --- /dev/null +++ b/[esx_addons]/esx_mechanicjob/locales/hu.lua @@ -0,0 +1,86 @@ +Locales['hu'] = { + ['mechanic'] = 'LS Custom Tuningoló telep', + ['drive_to_indicated'] = '[Információ]: Menj a kijelölt pontra.', + ['mission_canceled'] = 'Küldetés ~r~megszakítva', + ['vehicle_list'] = 'Munkajárművek', + ['work_wear'] = 'Munkaruha', + ['civ_wear'] = 'Civil ruházat', + ['deposit_stock'] = 'Készlet berakás', + ['withdraw_stock'] = 'Készlet kivétel', + ['boss_actions'] = 'Leader Panel', + ['service_vehicle'] = 'szervíz jármű', + ['flat_bed'] = 'Platós kocsi', + ['tow_truck'] = 'Vontató', + ['service_full'] = 'Szervíz full: ', + ['open_actions'] = '[Információ]: Nyomd meg az [E] gombot a menü megnyitásához', + ['harvest'] = 'aratás', + ['harvest_menu'] = 'nyomd meg a [E] gombot az aratás menühöz.', + ['not_experienced_enough'] = 'nem vagy elég tapasztalt hogy végrehatjsd a műveletet', + ['gas_can'] = 'nitro', + ['repair_tools'] = 'Javítószerszámok', + ['body_work_tools'] = 'karosszéria szerszámok', + ['blowtorch'] = 'fújólámpa', + ['repair_kit'] = 'javítókészlet', + ['body_kit'] = 'body Kit', + ['craft'] = 'barkácsolás', + ['craft_menu'] = 'nyomd meg a [E] gombot a barkácsolás menü elérséhez', + ['billing'] = 'Munkadíj átadása', + ['hijack'] = 'Kocsi feltörése', + ['repair'] = 'Javítás', + ['clean'] = 'Kocsi lemosása', + ['imp_veh'] = 'Lefoglalás', + ['place_objects'] = 'Objectek lerakása', + ['invoice_amount'] = 'Írd be az összeget (( Szabályzat alapján ))', + ['amount_invalid'] = '~r~[Információ]: Ismeretlen érték!', + ['no_players_nearby'] = '~r~[Információ]: Nincs a közeledben játékos!', + ['no_vehicle_nearby'] = '~r~[Információ]: Nincs a közeledben kocsi!', + ['inside_vehicle'] = 'Jármű belsejéből nem csinálhatod!', + ['vehicle_unlocked'] = '[Információ]: Sikeresen feltörted a kijelölt kocsit!', + ['vehicle_repaired'] = '[Információ]: Kocsi sikeresen megjavítva! Oszd ki a munkadíjat!', + ['vehicle_cleaned'] = '[Információ]: Kocsi sikeresen lemosva!', + ['vehicle_impounded'] = '[Információ]: Kocsi sikeresen lefoglalva!', + ['must_seat_driver'] = 'vezetőülésben kell lenned!', + ['must_near'] = '~r~[Információ]: Nincs a közeledben kocsi amit lefoglalhatnál!', + ['vehicle_success_attached'] = '[Információ]: A kocsit sikeresen felraktad a platóra.', + ['please_drop_off'] = '[Információ]: Most vidd el a kijelölt pontra!', + ['cant_attach_own_tt'] = '~r~[Információ]: Nem teheted meg!', + ['no_veh_att'] = 'nincs csatlakoztatható ~r~jármű', + ['not_right_veh'] = 'ez nem megfelelő jármű', + ['not_right_place'] = 'ez nem a megfelelő hely', + ['veh_det_succ'] = '[Információ]: Sikeresen levetted a kocsit a platóról!', + ['imp_flatbed'] = '~r~[Információ]: Nem teheted meg!', + ['objects'] = 'objectek', + ['roadcone'] = 'útkúp', + ['toolbox'] = 'eszköztár', + ['mechanic_stock'] = 'Szerelő készlet', + ['quantity'] = 'mennyiség', + ['invalid_quantity'] = 'érvénytelen mennyiség', + ['inventory'] = 'leltár', + ['veh_unlocked'] = 'Jármű kinyitva', + ['hijack_failed'] = '~r~Eltérítés sikertelen', + ['body_repaired'] = 'Body javítva', + ['veh_repaired'] = 'Jármű javítva', + ['veh_stored'] = '[Információ]: Nyomd meg az [E] gombot a kocsi lerakásához.', + ['press_remove_obj'] = '[Információ]: Nyomd meg az [E] gombot a tárgy törléséhez', + ['please_tow'] = '[Információ]: Rakd fel a platóra a kocsit! (( F6 panel ))', + ['wait_five'] = 'Neked muszáj ~r~várni 5 percet', + ['must_in_flatbed'] = '[Információ]: Csak platós kocsival tudsz küldetést csinálni!', + ['mechanic_customer'] = 'Szerelő ügyfél', + ['you_do_not_room'] = '~r~Nincs több helyed', + ['recovery_gas_can'] = 'Gázpalack Visszakeresés...', + ['recovery_repair_tools'] = 'Javító szerszámok Visszakeresés...', + ['recovery_body_tools'] = 'Body szerszámok Visszakeresés...', + ['not_enough_gas_can'] = 'Nincs elég gázpalackod', + ['assembling_blowtorch'] = 'Összeszerelés Fújólámpa...', + ['not_enough_repair_tools'] = 'Nincs elég javítószerszámod', + ['assembling_repair_kit'] = 'Összeszerelés Javító készlet...', + ['not_enough_body_tools'] = 'Nincs elég body szerszámod', + ['assembling_body_kit'] = 'Összeszerelés Body készlet...', + ['your_comp_earned'] = '[Információ]: Gratulálok, kapott egy kis pénzt a frakció és te is! ~r~', + ['you_used_blowtorch'] = 'használtál egy fújólámpát', + ['you_used_repair_kit'] = 'használtál egy Javító készletet', + ['you_used_body_kit'] = 'használtál egy Body készletet', + ['have_withdrawn'] = 'Kivettél x%s %s', + ['have_deposited'] = 'Beraktál x%s %s', + ['player_cannot_hold'] = 'Nincs elég szabad hely az inventorydban', +} \ No newline at end of file diff --git a/[esx_addons]/esx_mechanicjob/locales/it.lua b/[esx_addons]/esx_mechanicjob/locales/it.lua new file mode 100644 index 00000000..b1d4b8d3 --- /dev/null +++ b/[esx_addons]/esx_mechanicjob/locales/it.lua @@ -0,0 +1,86 @@ +Locales['it'] = { + ['mechanic'] = 'meccanico', + ['drive_to_indicated'] = 'guida fino alla posizione indicata.', + ['mission_canceled'] = 'missione annullata', + ['vehicle_list'] = 'elenco veicoli', + ['work_wear'] = 'abbigliamento da lavoro', + ['civ_wear'] = 'abiti civili', + ['deposit_stock'] = 'deposito', + ['withdraw_stock'] = 'ritira', + ['boss_actions'] = 'azioni boss', + ['service_vehicle'] = 'veicoli di servizio', + ['flat_bed'] = 'flatbed', + ['tow_truck'] = 'carro attrezzi', + ['service_full'] = 'servizio completo: ', + ['open_actions'] = 'premi [E] per accedere al menu.', + ['harvest'] = 'raccolto', + ['harvest_menu'] = 'premi [E] per accedere al menu raccolto.', + ['not_experienced_enough'] = 'non hai abbastanza esperienza per eseguire questa azione.', + ['gas_can'] = 'bombola del gas', + ['repair_tools'] = 'riparazione strumenti', + ['body_work_tools'] = 'strumenti carrozzeria', + ['blowtorch'] = 'fiamma ossidrica', + ['repair_kit'] = 'kit di riparazione', + ['body_kit'] = 'body Kit', + ['craft'] = 'creazione', + ['craft_menu'] = 'premi [E] per accedere al menu di creazione.', + ['billing'] = 'fattura', + ['hijack'] = 'trasportare', + ['repair'] = 'riparazione', + ['clean'] = 'pulito', + ['imp_veh'] = 'sequestrato', + ['place_objects'] = 'posiziona oggetti', + ['invoice_amount'] = 'importo fattura', + ['amount_invalid'] = 'importo non valido', + ['no_players_nearby'] = 'nessun giocatore nelle vicinanze', + ['no_vehicle_nearby'] = 'nessun veicolo nelle vicinanze', + ['inside_vehicle'] = 'non puoi farlo dall\'interno del veicolo!', + ['vehicle_unlocked'] = 'il veicolo è stato sbloccato', + ['vehicle_repaired'] = 'il veicolo è stato riparato', + ['vehicle_cleaned'] = 'il veicolo è stato pulito', + ['vehicle_impounded'] = 'il veicolo è stato sequestrato', + ['must_seat_driver'] = 'devi essere al posto di guida!', + ['must_near'] = 'devi essere vicino il veicolo per sequestrarlo.', + ['vehicle_success_attached'] = 'veicolo collegato con successo', + ['please_drop_off'] = 'perfavore lascia il veicolo al garage', + ['cant_attach_own_tt'] = 'non puoi attaccare il tuo carro attrezzi', + ['no_veh_att'] = 'non c\'è nessu veicolo da attaccare', + ['not_right_veh'] = 'questo non è il veicolo giusto', + ['not_right_place'] = 'questo non è il posto giusto', + ['veh_det_succ'] = 'veicolo staccato con successo!', + ['imp_flatbed'] = 'azione impossibile! hai bisogno di un pianale per caricare il veicolo', + ['objects'] = 'oggetti', + ['roadcone'] = 'cono stradale', + ['toolbox'] = 'cassetta degli attrezzi', + ['mechanic_stock'] = 'deposito meccanico', + ['quantity'] = 'quantità', + ['invalid_quantity'] = 'quantità non valida', + ['inventory'] = 'inventario', + ['veh_unlocked'] = 'veicolo sbloccato', + ['hijack_failed'] = 'traino fallito', + ['body_repaired'] = 'carrozzeria riparata', + ['veh_repaired'] = 'veicolo riparato', + ['veh_stored'] = 'press [E] per depositare il veicolo.', + ['press_remove_obj'] = 'premi [E] per rimuovere', + ['please_tow'] = 'perfavore traina il veicolo', + ['wait_five'] = 'devi attendere 5 minuti', + ['must_in_flatbed'] = 'devi essere in un flatbed per avviare la missione', + ['mechanic_customer'] = 'cliente meccanico', + ['you_do_not_room'] = 'non hai più spazio', + ['recovery_gas_can'] = 'recupero bomboletta di gas...', + ['recovery_repair_tools'] = 'recupero degli strumenti di riparazione...', + ['recovery_body_tools'] = 'recupero body tools...', + ['not_enough_gas_can'] = 'non hai abbastanza bomboletta di gas.', + ['assembling_blowtorch'] = 'montaggio fiamma ossidrica...', + ['not_enough_repair_tools'] = 'non hai abbastanza strumenti di riparazione.', + ['assembling_repair_kit'] = 'assemblaggio kit di riparazione...', + ['not_enough_body_tools'] = 'non hai abbastanza body tools.', + ['assembling_body_kit'] = 'Assemblaggio Body Kit...', + ['your_comp_earned'] = 'la tua azienda ha guadagnato $', + ['you_used_blowtorch'] = 'hai usato una fiamma ossidrica', + ['you_used_repair_kit'] = 'hai usato un Kit di riparazione', + ['you_used_body_kit'] = 'hai usato un Body Kit', + ['have_withdrawn'] = 'hai prelevato x%s %s', + ['have_deposited'] = 'hai depositato x%s %s', + ['player_cannot_hold'] = 'non hai abbastanza spazio libero nel tuo inventario!', +} diff --git a/[esx_addons]/esx_mechanicjob/locales/nl.lua b/[esx_addons]/esx_mechanicjob/locales/nl.lua new file mode 100644 index 00000000..57c06fab --- /dev/null +++ b/[esx_addons]/esx_mechanicjob/locales/nl.lua @@ -0,0 +1,85 @@ +Locales['nl'] = { + ['mechanic'] = 'monteur', + ['drive_to_indicated'] = 'Rij naar de aangegeven locatie', + ['mission_canceled'] = 'opdracht ~r~Geannuleerd', + ['vehicle_list'] = 'voertuigenlijst', + ['work_wear'] = 'werk kleding', + ['civ_wear'] = 'burger kleding', + ['deposit_stock'] = 'vooraad wegleggen', + ['withdraw_stock'] = 'vooraad opbergen', + ['boss_actions'] = 'baas acties', + ['service_vehicle'] = 'service voertuig', + ['flat_bed'] = 'oprijwagen', + ['tow_truck'] = 'sleep wagen', + ['service_full'] = 'dienst voledig: ', + ['open_actions'] = 'Druk op [E] om in het menu te komen.', + ['harvest'] = 'oogsten', + ['harvest_menu'] = 'druk op [E] om in het oogst menu te komen.', + ['not_experienced_enough'] = 'je hebt ~r~niet genoeg ervaring om dit te doen.', + ['gas_can'] = 'jerrycan', + ['repair_tools'] = 'reparatie gereedschap', + ['body_work_tools'] = 'plaatwerk gereedschap', + ['blowtorch'] = 'gasbrannder', + ['repair_kit'] = 'reparatie set', + ['body_kit'] = 'plaatwerk set', + ['craft'] = 'maaken', + ['craft_menu'] = 'druk op [E] om in het maak menu te komen.', + ['billing'] = 'facturen', + ['hijack'] = 'openbreken', + ['repair'] = 'repareer', + ['clean'] = 'maak schoon', + ['imp_veh'] = 'inbeslag nemen', + ['place_objects'] = 'plaats objecten', + ['invoice_amount'] = 'factuur bedrag', + ['amount_invalid'] = 'ongeldig aantal', + ['no_players_nearby'] = 'er is geen speler in de buurt', + ['no_vehicle_nearby'] = 'er is geen voertuig in de buurt', + ['inside_vehicle'] = 'je kan dit niet doen in een voertuig!', + ['vehicle_unlocked'] = 'het voortuig is opengebroken', + ['vehicle_repaired'] = 'het voortuig is gerepareerd', + ['vehicle_cleaned'] = 'het voortuig is schoongemaakt', + ['vehicle_impounded'] = 'het voortuig is ~r~in beslag genomen', + ['must_seat_driver'] = 'je moet in de bestuurders stoel zitten', + ['must_near'] = 'je moet ~r~dicht bij een voertuig zijn om hem in beslag te nemen.', + ['vehicle_success_attached'] = 'voertuig succesvol vastgemaakt', + ['please_drop_off'] = 'graag voertuig naar de garage brengen', + ['cant_attach_own_tt'] = '~r~je kan niet je eigen wagen vast maken', + ['no_veh_att'] = 'er zijn geen ~r~voertuigen om vast te maken', + ['not_right_veh'] = 'dit is niet het juiste voertuig', + ['veh_det_succ'] = 'voertuig succesvol losgekoppeld!', + ['imp_flatbed'] = '~r~Actie onmogelijk! je moet een oprijwagen nodig om deze te laden', + ['objects'] = 'objecten', + ['roadcone'] = 'pion', + ['toolbox'] = 'gereedschaps kist', + ['mechanic_stock'] = 'monteurs opslag', + ['quantity'] = 'hoeveelheid', + ['invalid_quantity'] = 'ongeldige hoeveelheid', + ['inventory'] = 'inventaris', + ['veh_unlocked'] = 'Voertuig opgengemaakt', + ['hijack_failed'] = '~r~Openbreken mislukt', + ['body_repaired'] = 'Plaatwerk gerepareerd', + ['veh_repaired'] = 'Voertuig gerepareerd', + ['veh_stored'] = 'Druk op [E] om voertuig op te slaan.', + ['press_remove_obj'] = 'Druk op [E] om object weg te halen', + ['please_tow'] = 'graag voertuig afslepen', + ['wait_five'] = 'je moet 5 minuten ~r~wachten', + ['must_in_flatbed'] = 'je bent een oprijwagen nodig voor deze klant', + ['mechanic_customer'] = 'klant van garage', + ['you_do_not_room'] = '~r~Je hebt geen ruimte', + ['recovery_gas_can'] = 'Jerrycan Ophalen...', + ['recovery_repair_tools'] = 'Reparatie gereedschap Ophalen...', + ['recovery_body_tools'] = 'Plaatwerk gereedschap Ophalen...', + ['not_enough_gas_can'] = 'je hebt ~r~niet genoeg jerrycans.', + ['assembling_blowtorch'] = 'In elkaar aan het zetten gasbrannder...', + ['not_enough_repair_tools'] = 'je hebt ~r~niet genoeg reparatie gereedschap.', + ['assembling_repair_kit'] = 'In elkaar aan het zetten reparatie set...', + ['not_enough_body_tools'] = 'je hebt ~r~niet genoeg plaatwerk gereedschap.', + ['assembling_body_kit'] = 'In elkaar aan het zetten plaatwerk set...', + ['your_comp_earned'] = 'de garage heeft verdient €', + ['you_used_blowtorch'] = 'je gebruikte een gasbrannder', + ['you_used_repair_kit'] = 'je gebruikte een reparatie set', + ['you_used_body_kit'] = 'je gebruikte een plaatwerk set', + ['have_withdrawn'] = 'je hebt opgenomen x%s %s', + ['have_deposited'] = 'je hebt gestort x%s %s', + ['player_cannot_hold'] = 'je hebt ~r~niet genoeg vrije ruimte in je inventaris!', +} diff --git a/[esx_addons]/esx_mechanicjob/locales/pl.lua b/[esx_addons]/esx_mechanicjob/locales/pl.lua new file mode 100644 index 00000000..6e9b67cb --- /dev/null +++ b/[esx_addons]/esx_mechanicjob/locales/pl.lua @@ -0,0 +1,85 @@ +Locales['pl'] = { + ['mechanic'] = 'mechanik', + ['drive_to_indicated'] = 'Jedz do wskazanej lokalizacji.', + ['mission_canceled'] = 'misja ~r~anulowana', + ['vehicle_list'] = 'lista pojazdów', + ['work_wear'] = 'ubrania robocze', + ['civ_wear'] = 'ubrania cywilne', + ['deposit_stock'] = 'deponuj przedmioty', + ['withdraw_stock'] = 'wyciągnij przedmioty', + ['boss_actions'] = 'akcje szefa', + ['service_vehicle'] = 'serwisuj pojazd', + ['flat_bed'] = 'laweta', + ['tow_truck'] = 'holownik', + ['service_full'] = 'serwis pełny: ', + ['open_actions'] = 'wciśnij [E] aby otworzyć menu.', + ['harvest'] = 'zbieraj', + ['harvest_menu'] = 'wcisnij [E] aby otworzyć menu zbierania.', + ['not_experienced_enough'] = 'nie jesteś wystarczająco ~r~doświadczony aby zrobić tą akcję.', + ['gas_can'] = 'kanister z paliwem', + ['repair_tools'] = 'zestaw do naprawy', + ['body_work_tools'] = 'zestaw blacharski', + ['blowtorch'] = 'palnik', + ['repair_kit'] = 'narzedzia naprawcze', + ['body_kit'] = 'karoseria', + ['craft'] = 'twórz', + ['craft_menu'] = 'wcisnij [E] aby otworzyc menu tworzenia.', + ['billing'] = 'faktury', + ['hijack'] = 'forsowanie', + ['repair'] = 'naprawa', + ['clean'] = 'wyczyść', + ['imp_veh'] = 'odholowywanie', + ['place_objects'] = 'połóż objekt', + ['invoice_amount'] = 'suma faktury', + ['amount_invalid'] = 'nieprawidłowa suma', + ['no_players_nearby'] = 'brak gracza w pobliżu', + ['no_vehicle_nearby'] = 'brak pojazdu w pobliżu', + ['inside_vehicle'] = 'nie możesz tego zrobić z środka pojazdu!', + ['vehicle_unlocked'] = 'pojazd został odblokowany', + ['vehicle_repaired'] = 'pojazd został naprawiony', + ['vehicle_cleaned'] = 'pojazd został umyty', + ['vehicle_impounded'] = 'pojazd został ~r~odholowany', + ['must_seat_driver'] = 'musisz być na siedzeniu kierowcy!', + ['must_near'] = 'musisz być ~r~blisko pojazdu aby go odholować.', + ['vehicle_success_attached'] = 'pojazd przyłączony', + ['please_drop_off'] = 'proszę odstawić pojazd w garażu', + ['cant_attach_own_tt'] = '~r~nie możesz podłączyć własnego holwnika', + ['no_veh_att'] = 'nie ma ~r~pojazdu do podłączenia', + ['not_right_veh'] = 'to nie jest prawidłowy pojazd', + ['veh_det_succ'] = 'pojazd odłączony!', + ['imp_flatbed'] = '~r~Akcja niemożliwa! Potrzebujesz lawety aby załadować pojazd', + ['objects'] = 'objekty', + ['roadcone'] = 'pachołek', + ['toolbox'] = 'skrzynka z narzędziami', + ['mechanic_stock'] = 'magazyn mechanika', + ['quantity'] = 'ilość', + ['invalid_quantity'] = 'nieprawidłowa ilość', + ['inventory'] = 'ekwipunek', + ['veh_unlocked'] = 'Pojazd odblokowany', + ['hijack_failed'] = '~r~Forsowanie nie udane', + ['body_repaired'] = 'Karoseria naprawiona', + ['veh_repaired'] = 'Pojazd naprawiony', + ['veh_stored'] = 'wcisnij [E] aby schować pojazd.', + ['press_remove_obj'] = 'wcisnij [E] aby usunąć objekt', + ['please_tow'] = 'proszę odholować pojazd', + ['wait_five'] = 'musisz ~r~poczekać 5 minut', + ['must_in_flatbed'] = 'musisz być w lawecie aby rozpocząć misje', + ['mechanic_customer'] = 'klient mechanika', + ['you_do_not_room'] = '~r~Nie masz wiecej miejsca', + ['recovery_gas_can'] = 'odzyskiwanie Kanistra z paliwem...', + ['recovery_repair_tools'] = 'odzyskiwanie Części naprawczych...', + ['recovery_body_tools'] = 'odzyskiwanie Części blacharskich...', + ['not_enough_gas_can'] = 'nie posiadasz ~r~wystarczająco paliwa w kanistrze.', + ['assembling_blowtorch'] = 'składanie Palnika...', + ['not_enough_repair_tools'] = 'nie posiadasz ~r~wystarczająco częsci naprawczych.', + ['assembling_repair_kit'] = 'składanie częsci naprawczych...', + ['not_enough_body_tools'] = 'nie posiadasz ~r~wystarczająco częsci blacharskich.', + ['assembling_body_kit'] = 'składanie częsci blacharskich...', + ['your_comp_earned'] = 'twoja firma zarobiła $', + ['you_used_blowtorch'] = 'użyłeś palnik', + ['you_used_repair_kit'] = 'użyłeś częsci naprawczych', + ['you_used_body_kit'] = 'użyłeś częsci blacharskich', + ['have_withdrawn'] = 'wyciągnąłeś x%s %s', + ['have_deposited'] = 'zdeponowałeś x%s %s', + ['player_cannot_hold'] = '~r~nie masz wystarczająco wolnego miejsca w ekwipunku!', +} diff --git a/[esx_addons]/esx_mechanicjob/locales/si.lua b/[esx_addons]/esx_mechanicjob/locales/si.lua new file mode 100644 index 00000000..48f949e7 --- /dev/null +++ b/[esx_addons]/esx_mechanicjob/locales/si.lua @@ -0,0 +1,85 @@ +Locales['si'] = { + ['mechanic'] = 'mehanik', + ['drive_to_indicated'] = 'Odpeljite se na navedeno lokacijo.', + ['mission_canceled'] = 'Misija je odpovedana', + ['vehicle_list'] = 'seznam vozil', + ['work_wear'] = 'delovna oblačila', + ['civ_wear'] = 'civilna oblačila', + ['deposit_stock'] = 'zaloga za depozit', + ['withdraw_stock'] = 'umakni zalogo', + ['boss_actions'] = 'dejanja šefa', + ['service_vehicle'] = 'službeno vozilo', + ['flat_bed'] = 'flatbed', + ['tow_truck'] = 'vlečno vozilo', + ['service_full'] = 'storitev v celoti: ', + ['open_actions'] = "Za dostop do menija pritisnite [E].", + ['harvest'] = 'pridelek', + ['harvest_menu'] = "pritisnite [E] za dostop do menija žetve.", + ['not_experienced_enough'] = 'niste dovolj izkušeni za izvedbo tega dejanja.', + ['gas_can'] = 'plinska pločevinka', + ['repair_tools'] = 'orodja za popravila', + ['body_work_tools'] = 'orodja za karoserijo', + ['blowtorch'] = 'gorilnik', + ['repair_kit'] = 'komplet za popravila', + ['body_kit'] = 'komplet za popravilo', + ['craft'] = 'obrt', + ['craft_menu'] = "pritisnite [E] za dostop do menija za izdelavo.", + ['billing'] = 'zaračunavanje', + ['hijack'] = 'ugrabiti', + ['repair'] = 'popravilo', + ['clean'] = 'čist', + ['imp_veh'] = 'impound', + ['place_objects'] = 'place Objects', + ['invoice_amount'] = 'znesek računa', + ['amount_invalid'] = 'neveljaven znesek', + ['no_players_nearby'] = 'v bližini ni nobenega igralca', + ['no_vehicle_nearby'] = 'v bližini ni vozila', + ['inside_vehicle'] = 'tega ne moreš storiti iz vozila!', + ['vehicle_unlocked'] = 'vozilo je bilo odklenjeno', + ['vehicle_repaired'] = 'vozilo je bilo popravljeno', + ['vehicle_cleaned'] = 'vozilo je bilo očiščeno', + ['vehicle_impounded'] = 'vozilo je bilo zaseženo', + ['must_seat_driver'] = 'moraš sedeti na voznikovem sedežu!', + ['must_near'] = 'morate biti v bližini vozila, da ga lahko zasežete', + ['vehicle_success_attached'] = 'vozilo je bilo uspešno pripeto', + ['please_drop_off'] = 'pustite vozilo v garaži', + ['cant_attach_own_tt'] = 'ne morete priključiti lastnega vlečnega vozila', + ['no_veh_att'] = 'ni vozila, ki bi ga bilo treba priključiti', + ['not_right_veh'] = 'to ni pravo vozilo', + ['veh_det_succ'] = "vozilo je bilo uspešno priključeno!", + ['imp_flatbed'] = "Ukrep ni mogoč! Za natovarjanje vozila potrebujete ploščato vozilo", + ['objects'] = 'objects', + ['roadcone'] = 'roadcone', + ['toolbox'] = 'toolbox', + ['mechanic_stock'] = 'mehanična zaloga', + ["quantity"] = "quantity", + ["invalid_quantity"] = "invalid quantity", + ['inventory'] = 'inventar', + ['veh_unlocked'] = 'Vozilo odklenjeno', + ['hijack_failed'] = 'Ugrabitev ni uspela', + ['body_repaired'] = 'Popravljeno telo', + ['veh_repaired'] = 'Vozilo popravljeno', + ['veh_stored'] = "pritisnite [E], da shranite vozilo.", + ['press_remove_obj'] = 'pritisnite [E], da odstranite predmet', + ['please_tow'] = "prosimo, odvlecite vozilo", + ['wait_five'] = 'počakajte 5 minut', + ['must_in_flatbed'] = 'za opravljanje naloge morate biti v vozilu z ravnim tovorom', + ['mechanic_customer'] = 'mehanik stranka', + ['you_do_not_room'] = 'nimate več prostora', + ['recovery_gas_can'] = 'Prevzem plinske posode...', + ['recovery_repair_tools'] = 'Pridobitev orodja za popravilo...', + ['recovery_body_tools'] = 'Pridobitev orodij za popravila...', + ['not_enough_gas_can'] = 'Nimate dovolj pločevink za plin.', + ['assembling_blowtorch'] = 'Sestavljanje gorilnika...', + ['not_enough_repair_tools'] = 'Nimate dovolj orodja za popravilo.', + ['assembling_repair_kit'] = 'Sestavljaš komplet za popravila...', + ['not_enough_body_tools'] = 'Nimate dovolj orodja za sestavljanje karoserije.', + ['assembling_body_kit'] = 'Sestavljanje kompleta za karoserijo...', + ['your_comp_earned'] = 'vaše podjetje je zaslužilo $', + ['you_used_blowtorch'] = 'uporabili ste gorilnik', + ['you_used_repair_kit'] = 'uporabili ste komplet za popravilo', + ['you_used_body_kit'] = 'uporabili ste komplet za popravilo', + ['have_withdrawn'] = 'umaknili ste x%s %s', + ['have_deposited'] = 'vplačali ste x%s %s %s', + ['player_cannot_hold'] = 'v inventarju nimate dovolj prostega prostora!', +} diff --git a/[esx_addons]/esx_mechanicjob/locales/sv.lua b/[esx_addons]/esx_mechanicjob/locales/sv.lua new file mode 100644 index 00000000..3a4208a9 --- /dev/null +++ b/[esx_addons]/esx_mechanicjob/locales/sv.lua @@ -0,0 +1,85 @@ +Locales['sv'] = { + ['mechanic'] = 'mekaniker', + ['drive_to_indicated'] = 'Vänligen kör till den angivna platsen.', + ['mission_canceled'] = '~r~Uppdraget har avbrutits', + ['vehicle_list'] = 'Fordon', + ['work_wear'] = 'arbetskläder', + ['civ_wear'] = 'civil klädsel', + ['deposit_stock'] = 'Sätt in objekt', + ['withdraw_stock'] = 'Ta ut objekt', + ['boss_actions'] = 'Chef meny', + ['service_vehicle'] = 'service fordon', + ['flat_bed'] = 'flatbed', + ['tow_truck'] = 'bärgningsbil', + ['service_full'] = 'service full: ', + ['open_actions'] = 'Tryck [E] för att öppna menyn.', + ['harvest'] = 'skörda', + ['harvest_menu'] = 'Tryck [E] för att öppna menyn.', + ['not_experienced_enough'] = 'Du är inte ~r~erfaren nog att utföra uppgiften.', + ['gas_can'] = 'gasbehållare', + ['repair_tools'] = 'reparationsverktyg', + ['body_work_tools'] = 'karossverktyg', + ['blowtorch'] = 'blåslampa', + ['repair_kit'] = 'reparationssats', + ['body_kit'] = 'kroppssats', + ['craft'] = 'hantverk', + ['craft_menu'] = 'Tryck [E] för att öppna menyn.', + ['billing'] = 'fakturering', + ['hijack'] = 'kapa', + ['repair'] = 'reparera', + ['clean'] = 'tvätta', + ['imp_veh'] = 'beslagta fordon', + ['place_objects'] = 'placera objekt', + ['invoice_amount'] = 'fakturabelopp', + ['amount_invalid'] = 'ogiltigt belopp', + ['no_players_nearby'] = 'det finns inga spelare i närheten', + ['no_vehicle_nearby'] = 'det finns inget fordon i närheten', + ['inside_vehicle'] = 'du kan inte göra detta i det trånga utrymmet!', + ['vehicle_unlocked'] = 'fordonet har olåsts upp', + ['vehicle_repaired'] = 'fordonet har reparerats', + ['vehicle_cleaned'] = 'fordonet har rengjorts', + ['vehicle_impounded'] = 'fordonet har ~r~beslagtagits', + ['must_seat_driver'] = 'du måste sitta i ~r~förarsätet!', + ['must_near'] = 'du måste vara ~r~nära ett fordon för att beslagta det.', + ['vehicle_success_attached'] = 'fordonet är bundet!', + ['please_drop_off'] = 'vänligen släpp av fordonet hos garaget', + ['cant_attach_own_tt'] = 'du kan ~r~inte binda din egna truck!', + ['no_veh_att'] = 'det finns inget ~r~fordon i närheten', + ['not_right_veh'] = 'detta är ~r~inte rätt fordon', + ['veh_det_succ'] = 'fordonet har lossnat!', + ['imp_flatbed'] = '~r~Det går inte! Du måste ha en Flatbed för det!', + ['objects'] = 'objekt', + ['roadcone'] = 'kona', + ['toolbox'] = 'verktygslåda', + ['mechanic_stock'] = 'mekaniker lager', + ['quantity'] = 'kvantitet', + ['invalid_quantity'] = 'ogiltig kvantitet', + ['inventory'] = 'förråd', + ['veh_unlocked'] = 'Fordon har låsts upp', + ['hijack_failed'] = '~r~Kapningen misslyckades', + ['body_repaired'] = 'Karossen har lagats', + ['veh_repaired'] = 'Fordonet har lagats', + ['veh_stored'] = 'tryck [E] för att förvara fordonet.', + ['press_remove_obj'] = 'tryck [E] för att ta bort objektet.', + ['please_tow'] = 'Vänligen bogsera fordonet', + ['wait_five'] = 'Du måste ~r~vänta 5 minuter', + ['must_in_flatbed'] = 'Du måste vara i en flatbed för att starta uppdraget', + ['mechanic_customer'] = 'mekaniker kund', + ['you_do_not_room'] = '~r~Du har inte mer plats', + ['recovery_gas_can'] = 'Gasbehållare återvinns...', + ['recovery_repair_tools'] = 'Reparationsverktyg återvinns...', + ['recovery_body_tools'] = 'Karossverktyg återvinns...', + ['not_enough_gas_can'] = 'Du har ~r~inte tillräckligt många gasbehållare!', + ['assembling_blowtorch'] = 'Tillverkar blåslampa...', + ['not_enough_repair_tools'] = 'Du har ~r~inte tillräckligt många reparationsverktyg!', + ['assembling_repair_kit'] = 'Tillverkar reparationssats...', + ['not_enough_body_tools'] = 'Du har ~r~inte tillräckligt många karossverktyg!', + ['assembling_body_kit'] = 'Tillverkar karossverktyg...', + ['your_comp_earned'] = 'ditt företag har tjänat $', + ['you_used_blowtorch'] = 'du har använt en blåslampa', + ['you_used_repair_kit'] = 'du har använt en reparationssats', + ['you_used_body_kit'] = 'du har använt en karossverktyg', + ['have_withdrawn'] = 'du har tagit ut x%s %s', + ['have_deposited'] = 'du har lagrat x%s %s', + ['player_cannot_hold'] = 'du har ~r~inte tillräckligt med utrymme för att hålla det!', +} \ No newline at end of file diff --git a/[esx_addons]/esx_mechanicjob/localization/en_esx_mecanojob.sql b/[esx_addons]/esx_mechanicjob/localization/en_esx_mecanojob.sql new file mode 100644 index 00000000..2e06496c --- /dev/null +++ b/[esx_addons]/esx_mechanicjob/localization/en_esx_mecanojob.sql @@ -0,0 +1,34 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_mechanic', 'Mechanic', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_mechanic', 'Mechanic', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_mechanic', 'Mechanic', 1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('mechanic', 'Mechanic') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('mechanic',0,'recrue','Recruit',12,'{}','{}'), + ('mechanic',1,'novice','Novice',24,'{}','{}'), + ('mechanic',2,'experimente','Experienced',36,'{}','{}'), + ('mechanic',3,'chief','Leader',48,'{}','{}'), + ('mechanic',4,'boss','Boss',0,'{}','{}') +; + +INSERT INTO `items` (name, label, weight) VALUES + ('gazbottle', 'Gas Bottle', 2), + ('fixtool', 'Repair Tools', 2), + ('carotool', 'Tools', 2), + ('blowpipe', 'Blowtorch', 2), + ('fixkit', 'Repair Kit', 3), + ('carokit', 'Body Kit', 3) +; diff --git a/[esx_addons]/esx_mechanicjob/localization/fi_esx_mecanojob.sql b/[esx_addons]/esx_mechanicjob/localization/fi_esx_mecanojob.sql new file mode 100644 index 00000000..72455d41 --- /dev/null +++ b/[esx_addons]/esx_mechanicjob/localization/fi_esx_mecanojob.sql @@ -0,0 +1,34 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_mechanic', 'Mekaanikko', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_mechanic', 'Mekaanikko', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_mechanic', 'Mekaanikko', 1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('mechanic', 'Mekaanikko') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('mechanic',0,'recrue','Harjottelija',12,'{}','{}'), + ('mechanic',1,'novice','Aloittelija',24,'{}','{}'), + ('mechanic',2,'experimente','Kokenut',36,'{}','{}'), + ('mechanic',3,'chief','Johtaja',48,'{}','{}'), + ('mechanic',4,'boss','Pomo',0,'{}','{}') +; + +INSERT INTO `items` (name, label, weight) VALUES + ('gazbottle', 'Kaasupullo', 2), + ('fixtool', 'Korjaustyökalut', 2), + ('carotool', 'Työkalut', 2), + ('blowpipe', 'Polttoleikkuri', 2), + ('fixkit', 'Korjauskitti', 3), + ('carokit', 'Korikitti', 3) +; diff --git a/[esx_addons]/esx_mechanicjob/localization/hu_esx_mecanojob.sql b/[esx_addons]/esx_mechanicjob/localization/hu_esx_mecanojob.sql new file mode 100644 index 00000000..d456c4f3 --- /dev/null +++ b/[esx_addons]/esx_mechanicjob/localization/hu_esx_mecanojob.sql @@ -0,0 +1,34 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_mechanic', 'Szerelő', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_mechanic', 'Szerelő', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_mechanic', 'Szerelő', 1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('mechanic', 'Szerelő') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('mechanic', 0, 'recrue', 'Újonc', 12, '{}', '{}'), + ('mechanic', 1, 'novice', 'Kezdő', 24, '{}', '{}'), + ('mechanic', 2, 'experimente', 'Tapasztalt', 36, '{}', '{}'), + ('mechanic', 3, 'chief', 'Vezető', 48, '{}', '{}'), + ('mechanic', 4, 'boss', 'Főnök', 0, '{}' ,'{}') +; + +INSERT INTO `items` (name, label, weight) VALUES + ('gazbottle', 'Gázpalack', 2), + ('fixtool', 'Javítószerszámok', 2), + ('carotool', 'Szerszámok', 2), + ('blowpipe', 'Fújólámpa', 2), + ('fixkit', 'Javító készlet', 3), + ('carokit', 'Body Kit', 3) +; diff --git a/[esx_addons]/esx_mechanicjob/localization/nl_esx_mechanicjob.sql b/[esx_addons]/esx_mechanicjob/localization/nl_esx_mechanicjob.sql new file mode 100644 index 00000000..8b3d1d31 --- /dev/null +++ b/[esx_addons]/esx_mechanicjob/localization/nl_esx_mechanicjob.sql @@ -0,0 +1,32 @@ +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_mechanic', 'Monteur', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_mechanic', 'Monteur', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_mechanic', 'Monteur', 1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('mechanic', 'Monteur') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('mechanic',0,'recrue','Stagair',12,'{}','{}'), + ('mechanic',1,'novice','Personeel',24,'{}','{}'), + ('mechanic',2,'experimente','Ervaard',36,'{}','{}'), + ('mechanic',3,'chief','Supervisor',48,'{}','{}'), + ('mechanic',4,'boss','Baas',0,'{}','{}') +; + +INSERT INTO `items` (name, label, weight) VALUES + ('gazbottle', 'Gas Fles', 2), + ('fixtool', 'Repareer set', 2), + ('carotool', 'Tools', 2), + ('blowpipe', 'Las Apparaat', 2), + ('fixkit', 'Repareer set', 3), + ('carokit', 'Body set', 3) +; diff --git a/[esx_addons]/esx_mechanicjob/localization/pl_esx_mecanojob.sql b/[esx_addons]/esx_mechanicjob/localization/pl_esx_mecanojob.sql new file mode 100644 index 00000000..32549365 --- /dev/null +++ b/[esx_addons]/esx_mechanicjob/localization/pl_esx_mecanojob.sql @@ -0,0 +1,34 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_mechanic', 'Mechanik', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_mechanic', 'Mechanik', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_mechanic', 'Mechanik', 1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('mechanic', 'Mechanik') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('mechanic',0,'recrue','Praktykant',12,'{}','{}'), + ('mechanic',1,'novice','Nowicjusz',24,'{}','{}'), + ('mechanic',2,'experimente','Doświadczony',36,'{}','{}'), + ('mechanic',3,'chief','Kierownik',48,'{}','{}'), + ('mechanic',4,'boss','Szef',0,'{}','{}') +; + +INSERT INTO `items` (name, label, weight) VALUES + ('gazbottle', 'Butelka z gazem', 2), + ('fixtool', 'Zestaw do naprawy', 2), + ('carotool', 'Częsci naprawcze', 2), + ('blowpipe', 'Palnik', 2), + ('fixkit', 'Narzedzia naprawcze', 3), + ('carokit', 'Części blacharskie', 3) +; diff --git a/[esx_addons]/esx_mechanicjob/localization/si_esx_mecanojob.sql b/[esx_addons]/esx_mechanicjob/localization/si_esx_mecanojob.sql new file mode 100644 index 00000000..262c5484 --- /dev/null +++ b/[esx_addons]/esx_mechanicjob/localization/si_esx_mecanojob.sql @@ -0,0 +1,34 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_mechanic', 'Mehanik', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_mechanic', 'Mehanik', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_mechanic', 'Mehanik', 1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('mechanic', 'Mehanik') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('mechanic',0,'recrue','Rekrut',12,'{}','{}'), + ('mechanic',1,'novice','Novinec',24,'{}','{}'), + ('mechanic',2,'experimente','Izkušen',36,'{}','{}'), + ('mechanic',3,'chief','PodDirektor',48,'{}','{}'), + ('mechanic',4,'boss','Direktor',0,'{}','{}') +; + +INSERT INTO `items` (name, label, weight) VALUES + ('gazbottle', 'Gas Bottle', 2), + ('fixtool', 'Orodja za popravilo', 2), + ('carotool', 'Tools', 2), + ('blowpipe', 'Blowtorch', 2), + ('fixkit', 'Popravilo', 3), + ('carokit', 'Body Kit', 3) +; diff --git a/[esx_addons]/esx_mechanicjob/localization/sv_esx_mecanojob.sql b/[esx_addons]/esx_mechanicjob/localization/sv_esx_mecanojob.sql new file mode 100644 index 00000000..375200dd --- /dev/null +++ b/[esx_addons]/esx_mechanicjob/localization/sv_esx_mecanojob.sql @@ -0,0 +1,34 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_mechanic', 'Mekaniker', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_mechanic', 'Mekaniker', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_mechanic', 'Mekaniker', 1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('mechanic', 'Mekaniker') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('mechanic',0,'recrue','Rekryt',12,'{}','{}'), + ('mechanic',1,'novice','Nyanställd',24,'{}','{}'), + ('mechanic',2,'experimente','Erfaren',36,'{}','{}'), + ('mechanic',3,'chief','Chef',48,'{}','{}'), + ('mechanic',4,'boss','Ägare',0,'{}','{}') +; + +INSERT INTO `items` (name, label, weight) VALUES + ('gazbottle', 'Gas Flaska', 2), + ('fixtool', 'Reparationsverktyg', 2), + ('carotool', 'Verktyg', 2), + ('blowpipe', 'Blåslampa', 2), + ('fixkit', 'Reparationssats', 3), + ('carokit', 'Karosskit', 3) +; diff --git a/[esx_addons]/esx_mechanicjob/server/main.lua b/[esx_addons]/esx_mechanicjob/server/main.lua new file mode 100644 index 00000000..9d8e2103 --- /dev/null +++ b/[esx_addons]/esx_mechanicjob/server/main.lua @@ -0,0 +1,306 @@ +local PlayersHarvesting, PlayersHarvesting2, PlayersHarvesting3, PlayersCrafting, PlayersCrafting2, PlayersCrafting3 = {}, {}, {}, {}, {}, {} + +if Config.MaxInService ~= -1 then + TriggerEvent('esx_service:activateService', 'mechanic', Config.MaxInService) +end + +CreateThread(function() + exports["esx_society"]:registerSociety('mechanic', 'mechanic', 'society_mechanic', 'society_mechanic', 'society_mechanic', {type = 'private'}) +end) + +local function Harvest(source) + SetTimeout(4000, function() + + if PlayersHarvesting[source] == true then + local xPlayer = ESX.GetPlayerFromId(source) + local GazBottleQuantity = xPlayer.getInventoryItem('gazbottle').count + + if GazBottleQuantity >= 5 then + TriggerClientEvent('esx:showNotification', source, TranslateCap('you_do_not_room')) + else + xPlayer.addInventoryItem('gazbottle', 1) + Harvest(source) + end + end + + end) +end + +RegisterServerEvent('esx_mechanicjob:startHarvest') +AddEventHandler('esx_mechanicjob:startHarvest', function() + local source = source + PlayersHarvesting[source] = true + TriggerClientEvent('esx:showNotification', source, TranslateCap('recovery_gas_can')) + Harvest(source) +end) + +RegisterServerEvent('esx_mechanicjob:stopHarvest') +AddEventHandler('esx_mechanicjob:stopHarvest', function() + local source = source + PlayersHarvesting[source] = false +end) + +local function Harvest2(source) + SetTimeout(4000, function() + + if PlayersHarvesting2[source] == true then + local xPlayer = ESX.GetPlayerFromId(source) + local FixToolQuantity = xPlayer.getInventoryItem('fixtool').count + + if FixToolQuantity >= 5 then + TriggerClientEvent('esx:showNotification', source, TranslateCap('you_do_not_room')) + else + xPlayer.addInventoryItem('fixtool', 1) + Harvest2(source) + end + end + + end) +end + +RegisterServerEvent('esx_mechanicjob:startHarvest2') +AddEventHandler('esx_mechanicjob:startHarvest2', function() + local source = source + PlayersHarvesting2[source] = true + TriggerClientEvent('esx:showNotification', source, TranslateCap('recovery_repair_tools')) + Harvest2(source) +end) + +RegisterServerEvent('esx_mechanicjob:stopHarvest2') +AddEventHandler('esx_mechanicjob:stopHarvest2', function() + local source = source + PlayersHarvesting2[source] = false +end) + +local function Harvest3(source) + SetTimeout(4000, function() + + if PlayersHarvesting3[source] == true then + local xPlayer = ESX.GetPlayerFromId(source) + local CaroToolQuantity = xPlayer.getInventoryItem('carotool').count + if CaroToolQuantity >= 5 then + TriggerClientEvent('esx:showNotification', source, TranslateCap('you_do_not_room')) + else + xPlayer.addInventoryItem('carotool', 1) + Harvest3(source) + end + end + + end) +end + +RegisterServerEvent('esx_mechanicjob:startHarvest3') +AddEventHandler('esx_mechanicjob:startHarvest3', function() + local source = source + PlayersHarvesting3[source] = true + TriggerClientEvent('esx:showNotification', source, TranslateCap('recovery_body_tools')) + Harvest3(source) +end) + +RegisterServerEvent('esx_mechanicjob:stopHarvest3') +AddEventHandler('esx_mechanicjob:stopHarvest3', function() + local source = source + PlayersHarvesting3[source] = false +end) + +local function Craft(source) + SetTimeout(4000, function() + + if PlayersCrafting[source] == true then + local xPlayer = ESX.GetPlayerFromId(source) + local GazBottleQuantity = xPlayer.getInventoryItem('gazbottle').count + + if GazBottleQuantity <= 0 then + TriggerClientEvent('esx:showNotification', source, TranslateCap('not_enough_gas_can')) + else + xPlayer.removeInventoryItem('gazbottle', 1) + xPlayer.addInventoryItem('blowpipe', 1) + Craft(source) + end + end + + end) +end + +RegisterServerEvent('esx_mechanicjob:startCraft') +AddEventHandler('esx_mechanicjob:startCraft', function() + local source = source + PlayersCrafting[source] = true + TriggerClientEvent('esx:showNotification', source, TranslateCap('assembling_blowtorch')) + Craft(source) +end) + +RegisterServerEvent('esx_mechanicjob:stopCraft') +AddEventHandler('esx_mechanicjob:stopCraft', function() + local source = source + PlayersCrafting[source] = false +end) + +local function Craft2(source) + SetTimeout(4000, function() + + if PlayersCrafting2[source] == true then + local xPlayer = ESX.GetPlayerFromId(source) + local FixToolQuantity = xPlayer.getInventoryItem('fixtool').count + + if FixToolQuantity <= 0 then + TriggerClientEvent('esx:showNotification', source, TranslateCap('not_enough_repair_tools')) + else + xPlayer.removeInventoryItem('fixtool', 1) + xPlayer.addInventoryItem('fixkit', 1) + Craft2(source) + end + end + + end) +end + +RegisterServerEvent('esx_mechanicjob:startCraft2') +AddEventHandler('esx_mechanicjob:startCraft2', function() + local source = source + PlayersCrafting2[source] = true + TriggerClientEvent('esx:showNotification', source, TranslateCap('assembling_repair_kit')) + Craft2(source) +end) + +RegisterServerEvent('esx_mechanicjob:stopCraft2') +AddEventHandler('esx_mechanicjob:stopCraft2', function() + local source = source + PlayersCrafting2[source] = false +end) + +local function Craft3(source) + SetTimeout(4000, function() + + if PlayersCrafting3[source] == true then + local xPlayer = ESX.GetPlayerFromId(source) + local CaroToolQuantity = xPlayer.getInventoryItem('carotool').count + + if CaroToolQuantity <= 0 then + TriggerClientEvent('esx:showNotification', source, TranslateCap('not_enough_body_tools')) + else + xPlayer.removeInventoryItem('carotool', 1) + xPlayer.addInventoryItem('carokit', 1) + Craft3(source) + end + end + + end) +end + +RegisterServerEvent('esx_mechanicjob:startCraft3') +AddEventHandler('esx_mechanicjob:startCraft3', function() + local source = source + PlayersCrafting3[source] = true + TriggerClientEvent('esx:showNotification', source, TranslateCap('assembling_body_kit')) + Craft3(source) +end) + +RegisterServerEvent('esx_mechanicjob:stopCraft3') +AddEventHandler('esx_mechanicjob:stopCraft3', function() + local source = source + PlayersCrafting3[source] = false +end) + +RegisterServerEvent('esx_mechanicjob:onNPCJobMissionCompleted') +AddEventHandler('esx_mechanicjob:onNPCJobMissionCompleted', function() + local source = source + local xPlayer = ESX.GetPlayerFromId(source) + local total = math.random(Config.NPCJobEarnings.min, Config.NPCJobEarnings.max); + + if xPlayer.job.grade >= 3 then + total = total * 2 + end + + TriggerEvent('esx_addonaccount:getSharedAccount', 'society_mechanic', function(account) + account.addMoney(total) + end) + + TriggerClientEvent("esx:showNotification", source, TranslateCap('your_comp_earned').. total) +end) + +ESX.RegisterUsableItem('blowpipe', function(source) + local source = source + local xPlayer = ESX.GetPlayerFromId(source) + + xPlayer.removeInventoryItem('blowpipe', 1) + + TriggerClientEvent('esx_mechanicjob:onHijack', source) + TriggerClientEvent('esx:showNotification', source, TranslateCap('you_used_blowtorch')) +end) + +ESX.RegisterUsableItem('fixkit', function(source) + local source = source + local xPlayer = ESX.GetPlayerFromId(source) + + xPlayer.removeInventoryItem('fixkit', 1) + + TriggerClientEvent('esx_mechanicjob:onFixkit', source) + TriggerClientEvent('esx:showNotification', source, TranslateCap('you_used_repair_kit')) +end) + +ESX.RegisterUsableItem('carokit', function(source) + local source = source + local xPlayer = ESX.GetPlayerFromId(source) + + xPlayer.removeInventoryItem('carokit', 1) + + TriggerClientEvent('esx_mechanicjob:onCarokit', source) + TriggerClientEvent('esx:showNotification', source, TranslateCap('you_used_body_kit')) +end) + +RegisterServerEvent('esx_mechanicjob:getStockItem') +AddEventHandler('esx_mechanicjob:getStockItem', function(itemName, count) + local xPlayer = ESX.GetPlayerFromId(source) + + TriggerEvent('esx_addoninventory:getSharedInventory', 'society_mechanic', function(inventory) + local item = inventory.getItem(itemName) + + -- is there enough in the society? + if count > 0 and item.count >= count then + + -- can the player carry the said amount of x item? + if xPlayer.canCarryItem(itemName, count) then + inventory.removeItem(itemName, count) + xPlayer.addInventoryItem(itemName, count) + xPlayer.showNotification(TranslateCap('have_withdrawn', count, item.label)) + else + xPlayer.showNotification(TranslateCap('player_cannot_hold')) + end + else + xPlayer.showNotification(TranslateCap('invalid_quantity')) + end + end) +end) + +ESX.RegisterServerCallback('esx_mechanicjob:getStockItems', function(source, cb) + TriggerEvent('esx_addoninventory:getSharedInventory', 'society_mechanic', function(inventory) + cb(inventory.items) + end) +end) + +RegisterServerEvent('esx_mechanicjob:putStockItems') +AddEventHandler('esx_mechanicjob:putStockItems', function(itemName, count) + local xPlayer = ESX.GetPlayerFromId(source) + + TriggerEvent('esx_addoninventory:getSharedInventory', 'society_mechanic', function(inventory) + local item = inventory.getItem(itemName) + local playerItemCount = xPlayer.getInventoryItem(itemName).count + + if item.count >= 0 and count <= playerItemCount then + xPlayer.removeInventoryItem(itemName, count) + inventory.addItem(itemName, count) + else + xPlayer.showNotification(TranslateCap('invalid_quantity')) + end + + xPlayer.showNotification(TranslateCap('have_deposited', count, item.label)) + end) +end) + +ESX.RegisterServerCallback('esx_mechanicjob:getPlayerInventory', function(source, cb) + local xPlayer = ESX.GetPlayerFromId(source) + local items = xPlayer.inventory + + cb({items = items}) +end) diff --git a/[esx_addons]/esx_optionalneeds/.editorconfig b/[esx_addons]/esx_optionalneeds/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_optionalneeds/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_optionalneeds/LICENSE b/[esx_addons]/esx_optionalneeds/LICENSE new file mode 100644 index 00000000..a88e7c97 --- /dev/null +++ b/[esx_addons]/esx_optionalneeds/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_optionalneeds + Copyright (C) 2015-2023 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 . + +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_optionalneeds Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_optionalneeds/README.md b/[esx_addons]/esx_optionalneeds/README.md new file mode 100644 index 00000000..5271675b --- /dev/null +++ b/[esx_addons]/esx_optionalneeds/README.md @@ -0,0 +1,18 @@ +# esx_optionalneeds +ESX Optional Needs + +[REQUIREMENTS] +- esx_status https://github.com/ESX-Org/esx_status + +[INSTALLATION] + +1) CD in your resources folder +2) Clone the repository +``` +git clone https://github.com/ESX-Org/esx_optionalneeds [esx]/esx_optionalneeds +``` +3) Add this in your server.cfg : + +``` +start esx_optionalneeds +``` diff --git a/[esx_addons]/esx_optionalneeds/client/main.lua b/[esx_addons]/esx_optionalneeds/client/main.lua new file mode 100644 index 00000000..2516c284 --- /dev/null +++ b/[esx_addons]/esx_optionalneeds/client/main.lua @@ -0,0 +1,157 @@ +local IsAlreadyDrunk = false +local DrunkLevel = -1 + +function Drunk(level, start) + + CreateThread(function() + + local playerPed = PlayerPedId() + + if start then + DoScreenFadeOut(800) + Wait(1000) + end + + if level == 0 then + + RequestAnimSet("move_m@drunk@slightlydrunk") + + while not HasAnimSetLoaded("move_m@drunk@slightlydrunk") do + Wait(0) + end + + SetPedMovementClipset(playerPed, "move_m@drunk@slightlydrunk", true) + + elseif level == 1 then + + RequestAnimSet("move_m@drunk@moderatedrunk") + + while not HasAnimSetLoaded("move_m@drunk@moderatedrunk") do + Wait(0) + end + + SetPedMovementClipset(playerPed, "move_m@drunk@moderatedrunk", true) + + elseif level == 2 then + + RequestAnimSet("move_m@drunk@verydrunk") + + while not HasAnimSetLoaded("move_m@drunk@verydrunk") do + Wait(0) + end + + SetPedMovementClipset(playerPed, "move_m@drunk@verydrunk", true) + + end + + SetTimecycleModifier("spectator5") + SetPedMotionBlur(playerPed, true) + SetPedIsDrunk(playerPed, true) + + if start then + DoScreenFadeIn(800) + end + + end) + +end + +function Reality() + + CreateThread(function() + + local playerPed = PlayerPedId() + + DoScreenFadeOut(800) + Wait(1000) + + ClearTimecycleModifier() + ResetScenarioTypesEnabled() + ResetPedMovementClipset(playerPed, 0) + SetPedIsDrunk(playerPed, false) + SetPedMotionBlur(playerPed, false) + + DoScreenFadeIn(800) + + end) + +end + +AddEventHandler('esx_status:loaded', function(status) + + TriggerEvent('esx_status:registerStatus', 'drunk', 0, '#8F15A5', + function(status) + if status.val > 0 then + return true + else + return false + end + end, + function(status) + status.remove(1500) + end + ) + + CreateThread(function() + + while true do + + Wait(1000) + + TriggerEvent('esx_status:getStatus', 'drunk', function(status) + + if status.val > 0 then + + local start = true + + if IsAlreadyDrunk then + start = false + end + + local level = 0 + + if status.val <= 250000 then + level = 0 + elseif status.val <= 500000 then + level = 1 + else + level = 2 + end + + if level ~= DrunkLevel then + Drunk(level, start) + end + + IsAlreadyDrunk = true + DrunkLevel = level + end + + if status.val == 0 then + + if IsAlreadyDrunk then + Reality() + end + + IsAlreadyDrunk = false + DrunkLevel = -1 + + end + + end) + + end + + end) + +end) + +RegisterNetEvent('esx_optionalneeds:onDrink') +AddEventHandler('esx_optionalneeds:onDrink', function() + + local playerPed = PlayerPedId() + + TaskStartScenarioInPlace(playerPed, "WORLD_HUMAN_DRINKING", 0, 1) + Wait(1000) + ClearPedTasksImmediately(playerPed) + +end) \ No newline at end of file diff --git a/[esx_addons]/esx_optionalneeds/config.lua b/[esx_addons]/esx_optionalneeds/config.lua new file mode 100644 index 00000000..0dea84dc --- /dev/null +++ b/[esx_addons]/esx_optionalneeds/config.lua @@ -0,0 +1,5 @@ +Config = {} + +Config.TickTime = 100 +Config.UpdateClientTime = 5000 +Config.Locale = GetConvar('esx:locale', 'en') diff --git a/[esx_addons]/esx_optionalneeds/esx_optionalneeds.sql b/[esx_addons]/esx_optionalneeds/esx_optionalneeds.sql new file mode 100644 index 00000000..56167c40 --- /dev/null +++ b/[esx_addons]/esx_optionalneeds/esx_optionalneeds.sql @@ -0,0 +1,5 @@ + + +INSERT INTO `items` (`name`, `label`, `weight`) VALUES + ('beer', 'Beer', 1) +; diff --git a/[esx_addons]/esx_optionalneeds/fxmanifest.lua b/[esx_addons]/esx_optionalneeds/fxmanifest.lua new file mode 100644 index 00000000..93a796b0 --- /dev/null +++ b/[esx_addons]/esx_optionalneeds/fxmanifest.lua @@ -0,0 +1,20 @@ +fx_version 'adamant' + +game 'gta5' + +description 'ESX Optional Needs' +lua54 'yes' +version '1.9.0' + +shared_script '@es_extended/imports.lua' + +server_scripts { + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'server/main.lua' +} + +client_scripts { + 'client/main.lua' +} diff --git a/[esx_addons]/esx_optionalneeds/locales/de.lua b/[esx_addons]/esx_optionalneeds/locales/de.lua new file mode 100644 index 00000000..c8dbebfc --- /dev/null +++ b/[esx_addons]/esx_optionalneeds/locales/de.lua @@ -0,0 +1,5 @@ +Locales['de'] = { + + ['used_beer'] = 'Du hast 1x Bier getrunken', + +} \ No newline at end of file diff --git a/[esx_addons]/esx_optionalneeds/locales/en.lua b/[esx_addons]/esx_optionalneeds/locales/en.lua new file mode 100644 index 00000000..5f7f6431 --- /dev/null +++ b/[esx_addons]/esx_optionalneeds/locales/en.lua @@ -0,0 +1,5 @@ +Locales['en'] = { + + ['used_beer'] = 'you used 1x Beer', + +} \ No newline at end of file diff --git a/[esx_addons]/esx_optionalneeds/locales/es.lua b/[esx_addons]/esx_optionalneeds/locales/es.lua new file mode 100644 index 00000000..bcde249e --- /dev/null +++ b/[esx_addons]/esx_optionalneeds/locales/es.lua @@ -0,0 +1,5 @@ +Locales['es'] = { + + ['used_beer'] = 'Has usado 1x Cerveza', + +} diff --git a/[esx_addons]/esx_optionalneeds/locales/fi.lua b/[esx_addons]/esx_optionalneeds/locales/fi.lua new file mode 100644 index 00000000..563c8136 --- /dev/null +++ b/[esx_addons]/esx_optionalneeds/locales/fi.lua @@ -0,0 +1,5 @@ +Locales['fi'] = { + + ['used_beer'] = 'sinä joit 1x Olut', + +} \ No newline at end of file diff --git a/[esx_addons]/esx_optionalneeds/locales/fr.lua b/[esx_addons]/esx_optionalneeds/locales/fr.lua new file mode 100644 index 00000000..aa6069d2 --- /dev/null +++ b/[esx_addons]/esx_optionalneeds/locales/fr.lua @@ -0,0 +1,5 @@ +Locales['fr'] = { + + ['used_beer'] = 'vous avez utilisé 1x Bière', + +} \ No newline at end of file diff --git a/[esx_addons]/esx_optionalneeds/locales/hu.lua b/[esx_addons]/esx_optionalneeds/locales/hu.lua new file mode 100644 index 00000000..486d148f --- /dev/null +++ b/[esx_addons]/esx_optionalneeds/locales/hu.lua @@ -0,0 +1,3 @@ +Locales['hu'] = { + ['used_beer'] = 'Ittál egy Sört', +} \ No newline at end of file diff --git a/[esx_addons]/esx_optionalneeds/locales/pl.lua b/[esx_addons]/esx_optionalneeds/locales/pl.lua new file mode 100644 index 00000000..42ed9c52 --- /dev/null +++ b/[esx_addons]/esx_optionalneeds/locales/pl.lua @@ -0,0 +1,5 @@ +Locales['pl'] = { + + ['used_beer'] = 'używasz 1x Piwo', + +} \ No newline at end of file diff --git a/[esx_addons]/esx_optionalneeds/locales/si.lua b/[esx_addons]/esx_optionalneeds/locales/si.lua new file mode 100644 index 00000000..25b9ad32 --- /dev/null +++ b/[esx_addons]/esx_optionalneeds/locales/si.lua @@ -0,0 +1,5 @@ +Locales['si'] = { + + ['used_beer'] = 'Uporabil si 1x Pivo', + +} \ No newline at end of file diff --git a/[esx_addons]/esx_optionalneeds/localization/en_esx_optionalneeds.sql b/[esx_addons]/esx_optionalneeds/localization/en_esx_optionalneeds.sql new file mode 100644 index 00000000..12282cce --- /dev/null +++ b/[esx_addons]/esx_optionalneeds/localization/en_esx_optionalneeds.sql @@ -0,0 +1,11 @@ + + +INSERT INTO `items` (`name`, `label`, `weight`) VALUES + ('beer', 'Beer', 1) +; + +INSERT INTO `shops` (store, item, price) VALUES + ('TwentyFourSeven', 'beer', 45), + ('RobsLiquor', 'beer', 45), + ('LTDgasoline', 'beer', 45) +; diff --git a/[esx_addons]/esx_optionalneeds/localization/es_esx_optionalneeds.sql b/[esx_addons]/esx_optionalneeds/localization/es_esx_optionalneeds.sql new file mode 100644 index 00000000..4a1ddf0b --- /dev/null +++ b/[esx_addons]/esx_optionalneeds/localization/es_esx_optionalneeds.sql @@ -0,0 +1,11 @@ + + +INSERT INTO `items` (`name`, `label`, `weight`) VALUES + ('beer', 'Cerveza', 1) +; + +INSERT INTO `shops` (store, item, price) VALUES + ('TwentyFourSeven', 'beer', 45), + ('RobsLiquor', 'beer', 45), + ('LTDgasoline', 'beer', 45) +; diff --git a/[esx_addons]/esx_optionalneeds/localization/hu_esx_optionalneeds.sql b/[esx_addons]/esx_optionalneeds/localization/hu_esx_optionalneeds.sql new file mode 100644 index 00000000..261a4ff0 --- /dev/null +++ b/[esx_addons]/esx_optionalneeds/localization/hu_esx_optionalneeds.sql @@ -0,0 +1,5 @@ + + +INSERT INTO `items` (`name`, `label`, `weight`) VALUES + ('beer', 'Sör', 1) +; diff --git a/[esx_addons]/esx_optionalneeds/localization/si_esx_optionalneeds.sql b/[esx_addons]/esx_optionalneeds/localization/si_esx_optionalneeds.sql new file mode 100644 index 00000000..5b1f9c9e --- /dev/null +++ b/[esx_addons]/esx_optionalneeds/localization/si_esx_optionalneeds.sql @@ -0,0 +1,11 @@ + + +INSERT INTO `items` (`name`, `label`, `weight`) VALUES + ('beer', 'Pivo', 1) +; + +INSERT INTO `shops` (store, item, price) VALUES + ('TwentyFourSeven', 'beer', 45), + ('RobsLiquor', 'beer', 45), + ('LTDgasoline', 'beer', 45) +; diff --git a/[esx_addons]/esx_optionalneeds/server/main.lua b/[esx_addons]/esx_optionalneeds/server/main.lua new file mode 100644 index 00000000..e71416de --- /dev/null +++ b/[esx_addons]/esx_optionalneeds/server/main.lua @@ -0,0 +1,11 @@ +ESX.RegisterUsableItem('beer', function(source) + + local xPlayer = ESX.GetPlayerFromId(source) + + xPlayer.removeInventoryItem('beer', 1) + + TriggerClientEvent('esx_status:add', source, 'drunk', 250000) + TriggerClientEvent('esx_optionalneeds:onDrink', source) + TriggerClientEvent('esx:showNotification', source, TranslateCap('used_beer')) + +end) diff --git a/[esx_addons]/esx_policejob/.editorconfig b/[esx_addons]/esx_policejob/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_policejob/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_policejob/LICENSE b/[esx_addons]/esx_policejob/LICENSE new file mode 100644 index 00000000..0c07e1b1 --- /dev/null +++ b/[esx_addons]/esx_policejob/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_policejob + Copyright (C) 2015-2023 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 . + +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_policejob Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_policejob/README.md b/[esx_addons]/esx_policejob/README.md new file mode 100644 index 00000000..64463d85 --- /dev/null +++ b/[esx_addons]/esx_policejob/README.md @@ -0,0 +1,68 @@ +# esx_policejob + +This resource for ESX adds police armories, vehicle garages and ability for cops to search, handcuff people and much more. + +### Requirements +* Auto mode + * [esx_billing](https://github.com/ESX-Org/esx_billing) + * [esx_vehicleshop](https://github.com/ESX-Org/esx_vehicleshop) + +* Player management (boss actions and armory with buyable weapons) + * [esx_addoninventory](https://github.com/ESX-Org/esx_addoninventory) + * [esx_datastore](https://github.com/ESX-Org/esx_datastore) + * [esx_society](https://github.com/ESX-Org/esx_society) + +* ESX Identity Support + * [esx_identity](https://github.com/ESX-Org/esx_identity) + +* ESX License Support + * [esx_license](https://github.com/ESX-Org/esx_license) + +* ESX Service Support + * [esx_service](https://github.com/ESX-Org/esx_service) + +* ESX Status Support + * [esx_status](https://github.com/ESX-Org/esx_status) + +## Download & Installation + +### Using [fvm](https://github.com/qlaffont/fvm-installer) +``` +fvm install --save --folder=esx esx-org/esx_policejob +``` + +### Using Git +``` +cd resources +git clone https://github.com/ESX-Org/esx_policejob [esx]/esx_policejob +``` + +### Manually +- Download https://github.com/ESX-Org/esx_policejob/archive/master.zip +- Put it in the `[esx]` directory + + +## Installation +- Import `esx_policejob.sql` in your database +- Add this to your server.cfg: + +``` +start esx_policejob +``` + +- * If you want player management you have to set `Config.EnablePlayerManagement` to `true` in `config.lua` + * If you want armory management you have to set `Config.EnableArmoryManagement` to `true` in `config.lua` + * If you want license management you have to set `Config.EnableLicenses` to `true` in `config.lua` + * If you want service management you have to set `Config.MaxInService` to a higher value than `-1` in `config.lua` + +# Legal +### License +esx_policejob - police script for ESX + +Copyright (C) 2015-2023 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/. diff --git a/[esx_addons]/esx_policejob/client/main.lua b/[esx_addons]/esx_policejob/client/main.lua new file mode 100644 index 00000000..faa2ea4b --- /dev/null +++ b/[esx_addons]/esx_policejob/client/main.lua @@ -0,0 +1,1543 @@ +local CurrentActionData, handcuffTimer, dragStatus, blipsCops, currentTask = {}, {}, {}, {}, {} +local HasAlreadyEnteredMarker, isDead, isHandcuffed, hasAlreadyJoined, playerInService = false, false, false, false, false +local LastStation, LastPart, LastPartNum, LastEntity, CurrentAction, CurrentActionMsg +dragStatus.isDragged, isInShopMenu = false, false + +RegisterNetEvent('esx:playerLoaded') +AddEventHandler('esx:playerLoaded', function(xPlayer) + ESX.PlayerData = xPlayer + ESX.PlayerLoaded = true +end) + +RegisterNetEvent('esx:onPlayerLogout') +AddEventHandler('esx:onPlayerLogout', function() + ESX.PlayerLoaded = false + ESX.PlayerData = {} +end) + +function cleanPlayer(playerPed) + SetPedArmour(playerPed, 0) + ClearPedBloodDamage(playerPed) + ResetPedVisibleDamage(playerPed) + ClearPedLastWeaponDamage(playerPed) + ResetPedMovementClipset(playerPed, 0) +end + +function setUniform(uniform, playerPed) + TriggerEvent('skinchanger:getSkin', function(skin) + local uniformObject + + if skin.sex == 0 then + uniformObject = Config.Uniforms[uniform].male + else + uniformObject = Config.Uniforms[uniform].female + end + + if uniformObject then + TriggerEvent('skinchanger:loadClothes', skin, uniformObject) + + if uniform == 'bullet_wear' then + SetPedArmour(playerPed, 100) + end + else + ESX.ShowNotification(TranslateCap('no_outfit')) + end + end) +end + +function OpenCloakroomMenu() + local playerPed = PlayerPedId() + local grade = ESX.PlayerData.job.grade_name + + local elements = { + {unselectable = true, icon = "fas fa-shirt", title = TranslateCap("cloakroom")}, + {icon = "fas fa-shirt", title = TranslateCap('citizen_wear'), value = 'citizen_wear'}, + {icon = "fas fa-shirt", title = TranslateCap('bullet_wear'), uniform = 'bullet_wear'}, + {icon = "fas fa-shirt", title = TranslateCap('gilet_wear'), uniform = 'gilet_wear'}, + {icon = "fas fa-shirt", title = TranslateCap('police_wear'), uniform = grade} + } + + if Config.EnableCustomPeds then + for k,v in ipairs(Config.CustomPeds.shared) do + elements[#elements+1] = { + icon = "fas fa-shirt", + title = v.label, + value = 'freemode_ped', + maleModel = v.maleModel, + femaleModel = v.femaleModel + } + end + + for k,v in ipairs(Config.CustomPeds[grade]) do + elements[#elements+1] = { + icon = "fas fa-shirt", + title = v.label, + value = 'freemode_ped', + maleModel = v.maleModel, + femaleModel = v.femaleModel + } + end + end + + ESX.OpenContext("right", elements, function(menu,element) + cleanPlayer(playerPed) + local data = {current = element} + + if data.current.value == 'citizen_wear' then + if Config.EnableCustomPeds then + ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin, jobSkin) + local isMale = skin.sex == 0 + + TriggerEvent('skinchanger:loadDefaultModel', isMale, function() + ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin) + TriggerEvent('skinchanger:loadSkin', skin) + TriggerEvent('esx:restoreLoadout') + end) + end) + + end) + else + ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin) + TriggerEvent('skinchanger:loadSkin', skin) + end) + end + + if Config.EnableESXService then + ESX.TriggerServerCallback('esx_service:isInService', function(isInService) + if isInService then + playerInService = false + + local notification = { + title = TranslateCap('service_anonunce'), + subject = '', + msg = TranslateCap('service_out_announce', GetPlayerName(PlayerId())), + iconType = 1 + } + + TriggerServerEvent('esx_service:notifyAllInService', notification, 'police') + + TriggerServerEvent('esx_service:disableService', 'police') + TriggerEvent('esx_policejob:updateBlip') + ESX.ShowNotification(TranslateCap('service_out')) + end + end, 'police') + end + end + + if Config.EnableESXService and data.current.value ~= 'citizen_wear' then + local awaitService + + ESX.TriggerServerCallback('esx_service:isInService', function(isInService) + if not isInService then + + if Config.MaxInService ~= -1 then + ESX.TriggerServerCallback('esx_service:enableService', function(canTakeService, maxInService, inServiceCount) + if not canTakeService then + ESX.ShowNotification(TranslateCap('service_max', inServiceCount, maxInService)) + else + awaitService = true + playerInService = true + + local notification = { + title = TranslateCap('service_anonunce'), + subject = '', + msg = TranslateCap('service_in_announce', GetPlayerName(PlayerId())), + iconType = 1 + } + + TriggerServerEvent('esx_service:notifyAllInService', notification, 'police') + TriggerEvent('esx_policejob:updateBlip') + ESX.ShowNotification(TranslateCap('service_in')) + end + end, 'police') + else + awaitService = true + playerInService = true + + local notification = { + title = TranslateCap('service_anonunce'), + subject = '', + msg = TranslateCap('service_in_announce', GetPlayerName(PlayerId())), + iconType = 1 + } + + TriggerServerEvent('esx_service:notifyAllInService', notification, 'police') + TriggerEvent('esx_policejob:updateBlip') + ESX.ShowNotification(TranslateCap('service_in')) + end + + else + awaitService = true + end + end, 'police') + + while awaitService == nil do + Wait(0) + end + + -- if we couldn't enter service don't let the player get changed + if not awaitService then + return + end + end + + if data.current.uniform then + setUniform(data.current.uniform, playerPed) + elseif data.current.value == 'freemode_ped' then + local modelHash + + ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin, jobSkin) + if skin.sex == 0 then + modelHash = joaat(data.current.maleModel) + else + modelHash = joaat(data.current.femaleModel) + end + + ESX.Streaming.RequestModel(modelHash, function() + SetPlayerModel(PlayerId(), modelHash) + SetModelAsNoLongerNeeded(modelHash) + SetPedDefaultComponentVariation(PlayerPedId()) + + TriggerEvent('esx:restoreLoadout') + end) + end) + end + end, function(menu) + CurrentAction = 'menu_cloakroom' + CurrentActionMsg = TranslateCap('open_cloackroom') + CurrentActionData = {} + end) +end + +function OpenArmoryMenu(station) + local elements + if Config.OxInventory then + exports.ox_inventory:openInventory('stash', {id = 'society_police', owner = station}) + return ESX.CloseContext() + else + elements = { + {unselectable = true, icon = "fas fa-gun", title = TranslateCap('armory')}, + {icon = "fas fa-gun", title = TranslateCap('buy_weapons'), value = 'buy_weapons'} + + } + + if Config.EnableArmoryManagement then + table.insert(elements, {icon = "fas fa-gun", title = TranslateCap('get_weapon'), value = 'get_weapon'}) + table.insert(elements, {icon = "fas fa-gun", title = TranslateCap('put_weapon'), value = 'put_weapon'}) + table.insert(elements, {icon = "fas fa-box", title = TranslateCap('remove_object'), value = 'get_stock'}) + table.insert(elements, {icon = "fas fa-box", title = TranslateCap('deposit_object'), value = 'put_stock'}) + end + end + + ESX.OpenContext("right", elements, function(menu,element) + local data = {current = element} + if data.current.value == 'get_weapon' then + OpenGetWeaponMenu() + elseif data.current.value == 'put_weapon' then + OpenPutWeaponMenu() + elseif data.current.value == 'buy_weapons' then + OpenBuyWeaponsMenu() + elseif data.current.value == 'put_stock' then + OpenPutStocksMenu() + elseif data.current.value == 'get_stock' then + OpenGetStocksMenu() + end + end, function(menu) + CurrentAction = 'menu_armory' + CurrentActionMsg = TranslateCap('open_armory') + CurrentActionData = {station = station} + end) +end + +function OpenPoliceActionsMenu() + local elements = { + {unselectable = true, icon = "fas fa-police", title = "Police"}, + {icon = "fas fa-user", title = TranslateCap('citizen_interaction'), value = 'citizen_interaction'}, + {icon = "fas fa-car", title = TranslateCap('vehicle_interaction'), value = 'vehicle_interaction'}, + {icon = "fas fa-object", title = TranslateCap('object_spawner'), value = 'object_spawner'} + } + + ESX.OpenContext("right", elements, function(menu,element) + local data = {current = element} + + if data.current.value == 'citizen_interaction' then + local elements2 = { + {unselectable = true, icon = "fas fa-user", title = element.title}, + {icon = "fas fa-idkyet", title = TranslateCap('id_card'), value = 'identity_card'}, + {icon = "fas fa-idkyet", title = TranslateCap('search'), value = 'search'}, + {icon = "fas fa-idkyet", title = TranslateCap('handcuff'), value = 'handcuff'}, + {icon = "fas fa-idkyet", title = TranslateCap('drag'), value = 'drag'}, + {icon = "fas fa-idkyet", title = TranslateCap('put_in_vehicle'), value = 'put_in_vehicle'}, + {icon = "fas fa-idkyet", title = TranslateCap('out_the_vehicle'), value = 'out_the_vehicle'}, + {icon = "fas fa-idkyet", title = TranslateCap('fine'), value = 'fine'}, + {icon = "fas fa-idkyet", title = TranslateCap('unpaid_bills'), value = 'unpaid_bills'} + } + + if Config.EnableLicenses then + elements2[#elements2+1] = { + icon = "fas fa-scroll", + title = TranslateCap('license_check'), + value = 'license' + } + end + + ESX.OpenContext("right", elements2, function(menu2,element2) + local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer() + if closestPlayer ~= -1 and closestDistance <= 3.0 then + local data2 = {current = element2} + local action = data2.current.value + + if action == 'identity_card' then + OpenIdentityCardMenu(closestPlayer) + elseif action == 'search' then + OpenBodySearchMenu(closestPlayer) + elseif action == 'handcuff' then + TriggerServerEvent('esx_policejob:handcuff', GetPlayerServerId(closestPlayer)) + elseif action == 'drag' then + TriggerServerEvent('esx_policejob:drag', GetPlayerServerId(closestPlayer)) + elseif action == 'put_in_vehicle' then + TriggerServerEvent('esx_policejob:putInVehicle', GetPlayerServerId(closestPlayer)) + elseif action == 'out_the_vehicle' then + TriggerServerEvent('esx_policejob:OutVehicle', GetPlayerServerId(closestPlayer)) + elseif action == 'fine' then + OpenFineMenu(closestPlayer) + elseif action == 'license' then + ShowPlayerLicense(closestPlayer) + elseif action == 'unpaid_bills' then + OpenUnpaidBillsMenu(closestPlayer) + end + else + ESX.ShowNotification(TranslateCap('no_players_nearby')) + end + end, function(menu) + OpenPoliceActionsMenu() + end) + elseif data.current.value == 'vehicle_interaction' then + local elements3 = { + {unselectable = true, icon = "fas fa-car", title = element.title} + } + local playerPed = PlayerPedId() + local vehicle = ESX.Game.GetVehicleInDirection() + + if DoesEntityExist(vehicle) then + elements3[#elements3+1] = {icon = "fas fa-car", title = TranslateCap('vehicle_info'), value = 'vehicle_infos'} + elements3[#elements3+1] = {icon = "fas fa-car", title = TranslateCap('pick_lock'), value = 'hijack_vehicle'} + elements3[#elements3+1] = {icon = "fas fa-car", title = TranslateCap('impound'), value = 'impound'} + end + + elements3[#elements3+1] = { + icon = "fas fa-scroll", + title = TranslateCap('search_database'), + value = 'search_database' + } + + ESX.OpenContext("right", elements3, function(menu3,element3) + local data2 = {current = element3} + local coords = GetEntityCoords(playerPed) + vehicle = ESX.Game.GetVehicleInDirection() + action = data2.current.value + + if action == 'search_database' then + LookupVehicle(element3) + elseif DoesEntityExist(vehicle) then + if action == 'vehicle_infos' then + local vehicleData = ESX.Game.GetVehicleProperties(vehicle) + OpenVehicleInfosMenu(vehicleData) + elseif action == 'hijack_vehicle' then + if IsAnyVehicleNearPoint(coords.x, coords.y, coords.z, 3.0) then + TaskStartScenarioInPlace(playerPed, 'WORLD_HUMAN_WELDING', 0, true) + Wait(20000) + ClearPedTasksImmediately(playerPed) + + SetVehicleDoorsLocked(vehicle, 1) + SetVehicleDoorsLockedForAllPlayers(vehicle, false) + ESX.ShowNotification(TranslateCap('vehicle_unlocked')) + end + elseif action == 'impound' then + if currentTask.busy then + return + end + + ESX.ShowHelpNotification(TranslateCap('impound_prompt')) + TaskStartScenarioInPlace(playerPed, 'CODE_HUMAN_MEDIC_TEND_TO_DEAD', 0, true) + + currentTask.busy = true + currentTask.task = ESX.SetTimeout(10000, function() + ClearPedTasks(playerPed) + ImpoundVehicle(vehicle) + Wait(100) + end) + + CreateThread(function() + while currentTask.busy do + Wait(1000) + + vehicle = GetClosestVehicle(coords.x, coords.y, coords.z, 3.0, 0, 71) + if not DoesEntityExist(vehicle) and currentTask.busy then + ESX.ShowNotification(TranslateCap('impound_canceled_moved')) + ESX.ClearTimeout(currentTask.task) + ClearPedTasks(playerPed) + currentTask.busy = false + break + end + end + end) + end + else + ESX.ShowNotification(TranslateCap('no_vehicles_nearby')) + end + end, function(menu) + OpenPoliceActionsMenu() + end) + elseif data.current.value == "object_spawner" then + local elements4 = { + {unselectable = true, icon = "fas fa-object", title = element.title}, + {icon = "fas fa-cone", title = TranslateCap('cone'), model = 'prop_roadcone02a'}, + {icon = "fas fa-cone", title = TranslateCap('barrier'), model = 'prop_barrier_work05'}, + {icon = "fas fa-cone", title = TranslateCap('spikestrips'), model = 'p_ld_stinger_s'}, + {icon = "fas fa-cone", title = TranslateCap('box'), model = 'prop_boxpile_07d'}, + {icon = "fas fa-cone", title = TranslateCap('cash'), model = 'hei_prop_cash_crate_half_full'} + } + + ESX.OpenContext("right", elements4, function(menu4,element4) + local data2 = {current = element4} + local playerPed = PlayerPedId() + local coords, forward = GetEntityCoords(playerPed), GetEntityForwardVector(playerPed) + local objectCoords = (coords + forward * 1.0) + + ESX.Game.SpawnObject(data2.current.model, objectCoords, function(obj) + SetEntityHeading(obj, GetEntityHeading(playerPed)) + PlaceObjectOnGroundProperly(obj) + end) + end, function(menu) + OpenPoliceActionsMenu() + end) + end + end) +end + +function OpenIdentityCardMenu(player) + ESX.TriggerServerCallback('esx_policejob:getOtherPlayerData', function(data) + local elements = { + {icon = "fas fa-user", title = TranslateCap('name', data.name)}, + {icon = "fas fa-user", title = TranslateCap('job', ('%s - %s'):format(data.job, data.grade))} + } + + if Config.EnableESXIdentity then + elements[#elements+1] = {icon = "fas fa-user", title = TranslateCap('sex', TranslateCap(data.sex))} + elements[#elements+1] = {icon = "fas fa-user", title = TranslateCap('sex', TranslateCap(data.sex))} + elements[#elements+1] = {icon = "fas fa-user", title = TranslateCap('height', data.height)} + end + + if Config.EnableESXOptionalneeds and data.drunk then + elements[#elements+1] = {title = TranslateCap('bac', data.drunk)} + end + + if data.licenses then + elements[#elements+1] = {title = TranslateCap('license_label')} + + for i=1, #data.licenses, 1 do + elements[#elements+1] = {title = data.licenses[i].label} + end + end + + ESX.OpenContext("right", elements, nil, function(menu) + OpenPoliceActionsMenu() + end) + end, GetPlayerServerId(player)) +end + +function OpenBodySearchMenu(player) + if Config.OxInventory then + exports.ox_inventory:openInventory('player', GetPlayerServerId(player)) + return ESX.CloseContext() + end + + ESX.TriggerServerCallback('esx_policejob:getOtherPlayerData', function(data) + local elements = { + {unselectable = true, icon = "fas fa-user", title = TranslateCap('search')} + } + + for i=1, #data.accounts, 1 do + if data.accounts[i].name == 'black_money' and data.accounts[i].money > 0 then + elements[#elements+1] = { + icon = "fas fa-money", + title = TranslateCap('confiscate_dirty', ESX.Math.Round(data.accounts[i].money)), + value = 'black_money', + itemType = 'item_account', + amount = data.accounts[i].money + } + break + end + end + + table.insert(elements, {label = TranslateCap('guns_label')}) + + for i=1, #data.weapons, 1 do + elements[#elements+1] = { + icon = "fas fa-gun", + title = TranslateCap('confiscate_weapon', ESX.GetWeaponLabel(data.weapons[i].name), data.weapons[i].ammo), + value = data.weapons[i].name, + itemType = 'item_weapon', + amount = data.weapons[i].ammo + } + end + + elements[#elements+1] = {title = TranslateCap('inventory_label')} + + for i=1, #data.inventory, 1 do + if data.inventory[i].count > 0 then + elements[#elements+1] = { + icon = "fas fa-box", + title = TranslateCap('confiscate_inv', data.inventory[i].count, data.inventory[i].label), + value = data.inventory[i].name, + itemType = 'item_standard', + amount = data.inventory[i].count + } + end + end + + ESX.OpenContext("right", elements, function(menu,element) + local data = {current = element} + if data.current.value then + TriggerServerEvent('esx_policejob:confiscatePlayerItem', GetPlayerServerId(player), data.current.itemType, data.current.value, data.current.amount) + OpenBodySearchMenu(player) + end + end) + end, GetPlayerServerId(player)) +end + +function OpenFineMenu(player) + local elements = { + {unselectable = true, icon = "fas fa-scroll", title = TranslateCap('fine')}, + {icon = "fas fa-scroll", title = TranslateCap('traffic_offense'), value = 0}, + {icon = "fas fa-scroll", title = TranslateCap('minor_offense'), value = 1}, + {icon = "fas fa-scroll", title = TranslateCap('average_offense'), value = 2}, + {icon = "fas fa-scroll", title = TranslateCap('major_offense'), value = 3} + } + + ESX.OpenContext("right", elements, function(menu,element) + local data = {current = element} + OpenFineCategoryMenu(player, data.current.value) + end) +end + +function OpenFineCategoryMenu(player, category) + ESX.TriggerServerCallback('esx_policejob:getFineList', function(fines) + local elements = { + {unselectable = true, icon = "fas fa-scroll", title = TranslateCap('fine')} + } + + for k,fine in ipairs(fines) do + elements[#elements+1] = { + icon = "fas fa-scroll", + title = ('%s %s'):format(fine.label, TranslateCap('armory_item', ESX.Math.GroupDigits(fine.amount))), + value = fine.id, + amount = fine.amount, + fineLabel = fine.label + } + end + + ESX.OpenContext("right", elements, function(menu,element) + local data = {current = element} + if Config.EnablePlayerManagement then + TriggerServerEvent('esx_billing:sendBill', GetPlayerServerId(player), 'society_police', TranslateCap('fine_total', data.current.fineLabel), data.current.amount) + else + TriggerServerEvent('esx_billing:sendBill', GetPlayerServerId(player), '', TranslateCap('fine_total', data.current.fineLabel), data.current.amount) + end + + ESX.SetTimeout(300, function() + OpenFineCategoryMenu(player, category) + end) + end) + end, category) +end + +function LookupVehicle(elementF) + local elements = { + {unselectable = true, icon = "fas fa-car", title = elementF.title}, + {title = "Enter Plate", input = true, inputType = "text", inputPlaceholder = "ABC 123"}, + {icon = "fas fa-check-double", title = "Lookup Plate", value = "lookup"} + } + + ESX.OpenContext("right", elements, function(menu,element) + local data = {value = menu.eles[2].inputValue} + local length = string.len(data.value) + if not data.value or length < 2 or length > 8 then + ESX.ShowNotification(TranslateCap('search_database_error_invalid')) + else + ESX.TriggerServerCallback('esx_policejob:getVehicleInfos', function(retrivedInfo) + local elements = { + {unselectable = true, icon = "fas fa-car", title = element.title}, + {unselectable = true, icon = "fas fa-car", title = TranslateCap('plate', retrivedInfo.plate)} + } + + if not retrivedInfo.owner then + elements[#elements+1] = {unselectable = true, icon = "fas fa-user", title = TranslateCap('owner_unknown')} + else + elements[#elements+1] = {unselectable = true, icon = "fas fa-user", title = TranslateCap('owner', retrivedInfo.owner)} + end + + ESX.OpenContext("right", elements, nil, function(menu) + OpenPoliceActionsMenu() + end) + end, data.value) + end + end) +end + +function ShowPlayerLicense(player) + local elements = { + {unselectable = true, icon = "fas fa-scroll", title = TranslateCap('license_revoke')} + } + + ESX.TriggerServerCallback('esx_policejob:getOtherPlayerData', function(playerData) + if playerData.licenses then + for i=1, #playerData.licenses, 1 do + if playerData.licenses[i].label and playerData.licenses[i].type then + elements[#elements+1] = { + icon = "fas fa-scroll", + title = playerData.licenses[i].label, + type = playerData.licenses[i].type + } + end + end + end + + ESX.OpenContext("right", elements, function(menu,element) + local data = {current = element} + ESX.ShowNotification(TranslateCap('licence_you_revoked', data.current.label, playerData.name)) + TriggerServerEvent('esx_policejob:message', GetPlayerServerId(player), TranslateCap('license_revoked', data.current.label)) + + TriggerServerEvent('esx_license:removeLicense', GetPlayerServerId(player), data.current.type) + + ESX.SetTimeout(300, function() + ShowPlayerLicense(player) + end) + end) + end, GetPlayerServerId(player)) +end + +function OpenUnpaidBillsMenu(player) + local elements = { + {unselectable = true, icon = "fas fa-scroll", title = TranslateCap('unpaid_bills')} + } + + ESX.TriggerServerCallback('esx_billing:getTargetBills', function(bills) + for k,bill in ipairs(bills) do + elements[#elements+1] = { + unselectable = true, + icon = "fas fa-scroll", + title = ('%s - %s'):format(bill.label, TranslateCap('armory_item', ESX.Math.GroupDigits(bill.amount))), + billId = bill.id + } + end + + ESX.OpenContext("right", elements, nil, nil) + end, GetPlayerServerId(player)) +end + +function OpenVehicleInfosMenu(vehicleData) + ESX.TriggerServerCallback('esx_policejob:getVehicleInfos', function(retrivedInfo) + local elements = { + {unselectable = true, icon = "fas fa-car", title = TranslateCap('vehicle_info')}, + {icon = "fas fa-car", title = TranslateCap('plate', retrivedInfo.plate)} + + } + + if not retrivedInfo.owner then + elements[#elements+1] = {unselectable = true, icon = "fas fa-user", title = TranslateCap('owner_unknown')} + else + elements[#elements+1] = {unselectable = true, icon = "fas fa-user", title = TranslateCap('owner', retrivedInfo.owner)} + end + + ESX.OpenContext("right", elements, nil, nil) + end, vehicleData.plate) +end + +function OpenGetWeaponMenu() + ESX.TriggerServerCallback('esx_policejob:getArmoryWeapons', function(weapons) + local elements = { + {unselectable = true, icon = "fas fa-gun", title = TranslateCap('get_weapon_menu')} + } + + for i=1, #weapons, 1 do + if weapons[i].count > 0 then + elements[#elements+1] = { + icon = "fas fa-gun", + title = 'x' .. weapons[i].count .. ' ' .. ESX.GetWeaponLabel(weapons[i].name), + value = weapons[i].name + } + end + end + + ESX.OpenContext("right", elements, function(menu,element) + local data = {current = element} + ESX.TriggerServerCallback('esx_policejob:removeArmoryWeapon', function() + ESX.CloseContext() + OpenGetWeaponMenu() + end, data.current.value) + end) + end) +end + +function OpenPutWeaponMenu() + local elements = { + {unselectable = true, icon = "fas fa-gun", title = TranslateCap('put_weapon_menu')} + } + local playerPed = PlayerPedId() + local weaponList = ESX.GetWeaponList() + + for i=1, #weaponList, 1 do + local weaponHash = joaat(weaponList[i].name) + + if HasPedGotWeapon(playerPed, weaponHash, false) and weaponList[i].name ~= 'WEAPON_UNARMED' then + elements[#elements+1] = { + icon = "fas fa-gun", + title = weaponList[i].label, + value = weaponList[i].name + } + end + end + + ESX.OpenContext("right", elements, function(menu,element) + local data = {current = element} + ESX.TriggerServerCallback('esx_policejob:addArmoryWeapon', function() + ESX.CloseContext() + OpenPutWeaponMenu() + end, data.current.value, true) + end) +end + +function OpenBuyWeaponsMenu() + local elements = { + {unselectable = true, icon = "fas fa-gun", title = TranslateCap('armory_weapontitle')} + } + local playerPed = PlayerPedId() + + for k,v in ipairs(Config.AuthorizedWeapons[ESX.PlayerData.job.grade_name]) do + local weaponNum, weapon = ESX.GetWeapon(v.weapon) + local components, label = {} + local hasWeapon = HasPedGotWeapon(playerPed, joaat(v.weapon), false) + + if v.components then + for i=1, #v.components do + if v.components[i] then + local component = weapon.components[i] + local hasComponent = HasPedGotWeaponComponent(playerPed, joaat(v.weapon), component.hash) + + if hasComponent then + label = ('%s: %s'):format(component.label, TranslateCap('armory_owned')) + else + if v.components[i] > 0 then + label = ('%s: %s'):format(component.label, TranslateCap('armory_item', ESX.Math.GroupDigits(v.components[i]))) + else + label = ('%s: %s'):format(component.label, TranslateCap('armory_free')) + end + end + + components[#components+1] = { + icon = "fas fa-gun", + title = label, + componentLabel = component.label, + hash = component.hash, + name = component.name, + price = v.components[i], + hasComponent = hasComponent, + componentNum = i + } + end + end + end + + if hasWeapon and v.components then + label = ('%s: >'):format(weapon.label) + elseif hasWeapon and not v.components then + label = ('%s: %s'):format(weapon.label, TranslateCap('armory_owned')) + else + if v.price > 0 then + label = ('%s: %s'):format(weapon.label, TranslateCap('armory_item', ESX.Math.GroupDigits(v.price))) + else + label = ('%s: %s'):format(weapon.label, TranslateCap('armory_free')) + end + end + + elements[#elements+1] = { + icon = "fas fa-gun", + title = label, + weaponLabel = weapon.label, + name = weapon.name, + components = components, + price = v.price, + hasWeapon = hasWeapon + } + end + + ESX.OpenContext("right", elements, function(menu,element) + local data = {current = element} + if data.current.hasWeapon then + if #data.current.components > 0 then + OpenWeaponComponentShop(data.current.components, data.current.name, menu) + end + else + ESX.TriggerServerCallback('esx_policejob:buyWeapon', function(bought) + if bought then + if data.current.price > 0 then + ESX.ShowNotification(TranslateCap('armory_bought', data.current.weaponLabel, ESX.Math.GroupDigits(data.current.price))) + end + + menu.close() + OpenBuyWeaponsMenu() + else + ESX.ShowNotification(TranslateCap('armory_money')) + end + end, data.current.name, 1) + end + end) +end + +function OpenWeaponComponentShop(components, weaponName, parentShop) + + ESX.OpenContext("right", components, function(menu,element) + local data = {current = element} + if data.current.hasComponent then + ESX.ShowNotification(TranslateCap('armory_hascomponent')) + else + ESX.TriggerServerCallback('esx_policejob:buyWeapon', function(bought) + if bought then + if data.current.price > 0 then + ESX.ShowNotification(TranslateCap('armory_bought', data.current.componentLabel, ESX.Math.GroupDigits(data.current.price))) + end + + menu.close() + parentShop.close() + OpenBuyWeaponsMenu() + else + ESX.ShowNotification(TranslateCap('armory_money')) + end + end, weaponName, 2, data.current.componentNum) + end + end) +end + +function OpenGetStocksMenu() + ESX.TriggerServerCallback('esx_policejob:getStockItems', function(items) + local elements = { + {unselectable = true, icon = "fas fa-box", title = TranslateCap('police_stock')} + } + + for i=1, #items, 1 do + elements[#elements+1] = { + icon = "fas fa-box", + title = 'x' .. items[i].count .. ' ' .. items[i].label, + value = items[i].name + } + end + + ESX.OpenContext("right", elements, function(menu,element) + local data = {current = element} + local itemName = data.current.value + + local elements2 = { + {unselectable = true, icon = "fas fa-box", title = element.title}, + {title = TranslateCap('quantity'), input = true, inputType = "number", inputMin = 1, inputMax = 150, inputPlaceholder = "Amount to withdraw.."}, + {icon = "fas fa-check-double", title = "Confirm", value = "confirm"} + } + + ESX.OpenContext("right", elements2, function(menu2,element2) + local data2 = {value = menu2.eles[2].inputValue} + local count = tonumber(data2.value) + + if not count then + ESX.ShowNotification(TranslateCap('quantity_invalid')) + else + ESX.CloseContext() + TriggerServerEvent('esx_policejob:getStockItem', itemName, count) + + Wait(300) + OpenGetStocksMenu() + end + end) + end) + end) +end + +function OpenPutStocksMenu() + ESX.TriggerServerCallback('esx_policejob:getPlayerInventory', function(inventory) + local elements = { + {unselectable = true, icon = "fas fa-box", title = TranslateCap('inventory')} + } + + for i=1, #inventory.items, 1 do + local item = inventory.items[i] + + if item.count > 0 then + elements[#elements+1] = { + icon = "fas fa-box", + title = item.label .. ' x' .. item.count, + type = 'item_standard', + value = item.name + } + end + end + + ESX.OpenContext("right", elements, function(menu,element) + local data = {current = element} + local itemName = data.current.value + + local elements2 = { + {unselectable = true, icon = "fas fa-box", title = element.title}, + {title = TranslateCap('quantity'), input = true, inputType = "number", inputMin = 1, inputMax = 150, inputPlaceholder = "Amount to withdraw.."}, + {icon = "fas fa-check-double", title = "Confirm", value = "confirm"} + } + + ESX.OpenContext("right", elements2, function(menu2,element2) + local data2 = {value = menu2.eles[2].inputValue} + local count = tonumber(data2.value) + + if not count then + ESX.ShowNotification(TranslateCap('quantity_invalid')) + else + ESX.CloseContext() + TriggerServerEvent('esx_policejob:putStockItems', itemName, count) + + Wait(300) + OpenPutStocksMenu() + end + end) + end) + end) +end + +RegisterNetEvent('esx:setJob') +AddEventHandler('esx:setJob', function(job) + ESX.PlayerData.job = job + if job.name == 'police' then + Wait(1000) + TriggerServerEvent('esx_policejob:forceBlip') + end +end) + +AddEventHandler('esx_policejob:hasEnteredMarker', function(station, part, partNum) + if part == 'Cloakroom' then + CurrentAction = 'menu_cloakroom' + CurrentActionMsg = TranslateCap('open_cloackroom') + CurrentActionData = {} + elseif part == 'Armory' then + CurrentAction = 'menu_armory' + CurrentActionMsg = TranslateCap('open_armory') + CurrentActionData = {station = station} + elseif part == 'Vehicles' then + CurrentAction = 'menu_vehicle_spawner' + CurrentActionMsg = TranslateCap('garage_prompt') + CurrentActionData = {station = station, part = part, partNum = partNum} + elseif part == 'Helicopters' then + CurrentAction = 'Helicopters' + CurrentActionMsg = TranslateCap('helicopter_prompt') + CurrentActionData = {station = station, part = part, partNum = partNum} + elseif part == 'BossActions' then + CurrentAction = 'menu_boss_actions' + CurrentActionMsg = TranslateCap('open_bossmenu') + CurrentActionData = {} + end +end) + +AddEventHandler('esx_policejob:hasExitedMarker', function(station, part, partNum) + if not isInShopMenu then + ESX.CloseContext() + end + + CurrentAction = nil +end) + +AddEventHandler('esx_policejob:hasEnteredEntityZone', function(entity) + local playerPed = PlayerPedId() + + if ESX.PlayerData.job and ESX.PlayerData.job.name == 'police' and IsPedOnFoot(playerPed) then + CurrentAction = 'remove_entity' + CurrentActionMsg = TranslateCap('remove_prop') + CurrentActionData = {entity = entity} + end + + if GetEntityModel(entity) == `p_ld_stinger_s` then + local playerPed = PlayerPedId() + local coords = GetEntityCoords(playerPed) + + if IsPedInAnyVehicle(playerPed, false) then + local vehicle = GetVehiclePedIsIn(playerPed) + + for i=0, 7, 1 do + SetVehicleTyreBurst(vehicle, i, true, 1000) + end + end + end +end) + +AddEventHandler('esx_policejob:hasExitedEntityZone', function(entity) + if CurrentAction == 'remove_entity' then + CurrentAction = nil + end +end) + +RegisterNetEvent('esx_policejob:handcuff') +AddEventHandler('esx_policejob:handcuff', function() + isHandcuffed = not isHandcuffed + local playerPed = PlayerPedId() + + if isHandcuffed then + RequestAnimDict('mp_arresting') + while not HasAnimDictLoaded('mp_arresting') do + Wait(100) + end + + TaskPlayAnim(playerPed, 'mp_arresting', 'idle', 8.0, -8, -1, 49, 0, 0, 0, 0) + RemoveAnimDict('mp_arresting') + + SetEnableHandcuffs(playerPed, true) + DisablePlayerFiring(playerPed, true) + SetCurrentPedWeapon(playerPed, `WEAPON_UNARMED`, true) -- unarm player + SetPedCanPlayGestureAnims(playerPed, false) + FreezeEntityPosition(playerPed, true) + DisplayRadar(false) + + if Config.EnableHandcuffTimer then + if handcuffTimer.active then + ESX.ClearTimeout(handcuffTimer.task) + end + + StartHandcuffTimer() + end + else + if Config.EnableHandcuffTimer and handcuffTimer.active then + ESX.ClearTimeout(handcuffTimer.task) + end + + ClearPedSecondaryTask(playerPed) + SetEnableHandcuffs(playerPed, false) + DisablePlayerFiring(playerPed, false) + SetPedCanPlayGestureAnims(playerPed, true) + FreezeEntityPosition(playerPed, false) + DisplayRadar(true) + end +end) + +RegisterNetEvent('esx_policejob:unrestrain') +AddEventHandler('esx_policejob:unrestrain', function() + if isHandcuffed then + local playerPed = PlayerPedId() + isHandcuffed = false + + ClearPedSecondaryTask(playerPed) + SetEnableHandcuffs(playerPed, false) + DisablePlayerFiring(playerPed, false) + SetPedCanPlayGestureAnims(playerPed, true) + FreezeEntityPosition(playerPed, false) + DisplayRadar(true) + + -- end timer + if Config.EnableHandcuffTimer and handcuffTimer.active then + ESX.ClearTimeout(handcuffTimer.task) + end + end +end) + +RegisterNetEvent('esx_policejob:drag') +AddEventHandler('esx_policejob:drag', function(copId) + if isHandcuffed then + dragStatus.isDragged = not dragStatus.isDragged + dragStatus.CopId = copId + end +end) + +CreateThread(function() + local wasDragged + + while true do + local Sleep = 1500 + + if isHandcuffed and dragStatus.isDragged then + Sleep = 50 + local targetPed = GetPlayerPed(GetPlayerFromServerId(dragStatus.CopId)) + + if DoesEntityExist(targetPed) and IsPedOnFoot(targetPed) and not IsPedDeadOrDying(targetPed, true) then + if not wasDragged then + AttachEntityToEntity(ESX.PlayerData.ped, targetPed, 11816, 0.54, 0.54, 0.0, 0.0, 0.0, 0.0, false, false, false, false, 2, true) + wasDragged = true + else + Wait(1000) + end + else + wasDragged = false + dragStatus.isDragged = false + DetachEntity(ESX.PlayerData.ped, true, false) + end + elseif wasDragged then + wasDragged = false + DetachEntity(ESX.PlayerData.ped, true, false) + end + Wait(Sleep) + end +end) + +RegisterNetEvent('esx_policejob:putInVehicle') +AddEventHandler('esx_policejob:putInVehicle', function() + if isHandcuffed then + local playerPed = PlayerPedId() + local vehicle, distance = ESX.Game.GetClosestVehicle() + + if vehicle and distance < 5 then + local maxSeats, freeSeat = GetVehicleMaxNumberOfPassengers(vehicle) + + for i=maxSeats - 1, 0, -1 do + if IsVehicleSeatFree(vehicle, i) then + freeSeat = i + break + end + end + + if freeSeat then + TaskWarpPedIntoVehicle(playerPed, vehicle, freeSeat) + dragStatus.isDragged = false + end + end + end +end) + +RegisterNetEvent('esx_policejob:OutVehicle') +AddEventHandler('esx_policejob:OutVehicle', function() + local GetVehiclePedIsIn = GetVehiclePedIsIn + local IsPedSittingInAnyVehicle = IsPedSittingInAnyVehicle + local TaskLeaveVehicle = TaskLeaveVehicle + if IsPedSittingInAnyVehicle(ESX.PlayerData.ped) then + local vehicle = GetVehiclePedIsIn(ESX.PlayerData.ped, false) + TaskLeaveVehicle(ESX.PlayerData.ped, vehicle, 64) + end +end) + +-- Handcuff +CreateThread(function() + local DisableControlAction = DisableControlAction + local IsEntityPlayingAnim = IsEntityPlayingAnim + while true do + local Sleep = 1000 + + if isHandcuffed then + Sleep = 0 + DisableControlAction(0, 1, true) -- Disable pan + DisableControlAction(0, 2, true) -- Disable tilt + DisableControlAction(0, 24, true) -- Attack + DisableControlAction(0, 257, true) -- Attack 2 + DisableControlAction(0, 25, true) -- Aim + DisableControlAction(0, 263, true) -- Melee Attack 1 + DisableControlAction(0, 32, true) -- W + DisableControlAction(0, 34, true) -- A + DisableControlAction(0, 31, true) -- S + DisableControlAction(0, 30, true) -- D + + DisableControlAction(0, 45, true) -- Reload + DisableControlAction(0, 22, true) -- Jump + DisableControlAction(0, 44, true) -- Cover + DisableControlAction(0, 37, true) -- Select Weapon + DisableControlAction(0, 23, true) -- Also 'enter'? + + DisableControlAction(0, 288, true) -- Disable phone + DisableControlAction(0, 289, true) -- Inventory + DisableControlAction(0, 170, true) -- Animations + DisableControlAction(0, 167, true) -- Job + + DisableControlAction(0, 0, true) -- Disable changing view + DisableControlAction(0, 26, true) -- Disable looking behind + DisableControlAction(0, 73, true) -- Disable clearing animation + DisableControlAction(2, 199, true) -- Disable pause screen + + DisableControlAction(0, 59, true) -- Disable steering in vehicle + DisableControlAction(0, 71, true) -- Disable driving forward in vehicle + DisableControlAction(0, 72, true) -- Disable reversing in vehicle + + DisableControlAction(2, 36, true) -- Disable going stealth + + DisableControlAction(0, 47, true) -- Disable weapon + DisableControlAction(0, 264, true) -- Disable melee + DisableControlAction(0, 257, true) -- Disable melee + DisableControlAction(0, 140, true) -- Disable melee + DisableControlAction(0, 141, true) -- Disable melee + DisableControlAction(0, 142, true) -- Disable melee + DisableControlAction(0, 143, true) -- Disable melee + DisableControlAction(0, 75, true) -- Disable exit vehicle + DisableControlAction(27, 75, true) -- Disable exit vehicle + + if IsEntityPlayingAnim(ESX.PlayerData.ped, 'mp_arresting', 'idle', 3) ~= 1 then + ESX.Streaming.RequestAnimDict('mp_arresting', function() + TaskPlayAnim(ESX.PlayerData.ped, 'mp_arresting', 'idle', 8.0, -8, -1, 49, 0.0, false, false, false) + RemoveAnimDict('mp_arresting') + end) + end + end + Wait(Sleep) + end +end) + +-- Create blips +CreateThread(function() + for k,v in pairs(Config.PoliceStations) do + local blip = AddBlipForCoord(v.Blip.Coords) + + SetBlipSprite (blip, v.Blip.Sprite) + SetBlipDisplay(blip, v.Blip.Display) + SetBlipScale (blip, v.Blip.Scale) + SetBlipColour (blip, v.Blip.Colour) + SetBlipAsShortRange(blip, true) + + BeginTextCommandSetBlipName('STRING') + AddTextComponentSubstringPlayerName(TranslateCap('map_blip')) + EndTextCommandSetBlipName(blip) + end +end) + +-- Draw markers and more +CreateThread(function() + while true do + local Sleep = 1500 + if ESX.PlayerData.job and ESX.PlayerData.job.name == 'police' then + Sleep = 500 + local playerPed = PlayerPedId() + local playerCoords = GetEntityCoords(playerPed) + local isInMarker, hasExited = false, false + local currentStation, currentPart, currentPartNum + + for k,v in pairs(Config.PoliceStations) do + for i=1, #v.Cloakrooms, 1 do + local distance = #(playerCoords - v.Cloakrooms[i]) + + if distance < Config.DrawDistance then + DrawMarker(Config.MarkerType.Cloakrooms, v.Cloakrooms[i], 0.0, 0.0, 0.0, 0, 0.0, 0.0, 1.0, 1.0, 1.0, Config.MarkerColor.r, Config.MarkerColor.g, Config.MarkerColor.b, 100, false, true, 2, true, false, false, false) + Sleep = 0 + + if distance < Config.MarkerSize.x then + isInMarker, currentStation, currentPart, currentPartNum = true, k, 'Cloakroom', i + end + end + end + + for i=1, #v.Armories, 1 do + local distance = #(playerCoords - v.Armories[i]) + + if distance < Config.DrawDistance then + DrawMarker(Config.MarkerType.Armories, v.Armories[i], 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.5, Config.MarkerColor.r, Config.MarkerColor.g, Config.MarkerColor.b, 100, false, true, 2, true, false, false, false) + Sleep = 0 + + if distance < Config.MarkerSize.x then + isInMarker, currentStation, currentPart, currentPartNum = true, k, 'Armory', i + end + end + end + + for i=1, #v.Vehicles, 1 do + local distance = #(playerCoords - v.Vehicles[i].Spawner) + + if distance < Config.DrawDistance then + DrawMarker(Config.MarkerType.Vehicles, v.Vehicles[i].Spawner, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, Config.MarkerColor.r, Config.MarkerColor.g, Config.MarkerColor.b, 100, false, true, 2, true, false, false, false) + Sleep = 0 + + if distance < Config.MarkerSize.x then + isInMarker, currentStation, currentPart, currentPartNum = true, k, 'Vehicles', i + end + end + end + + for i=1, #v.Helicopters, 1 do + local distance = #(playerCoords - v.Helicopters[i].Spawner) + + if distance < Config.DrawDistance then + DrawMarker(Config.MarkerType.Helicopters, v.Helicopters[i].Spawner, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, Config.MarkerColor.r, Config.MarkerColor.g, Config.MarkerColor.b, 100, false, true, 2, true, false, false, false) + Sleep = 0 + + if distance < Config.MarkerSize.x then + isInMarker, currentStation, currentPart, currentPartNum = true, k, 'Helicopters', i + end + end + end + + if Config.EnablePlayerManagement and ESX.PlayerData.job.grade_name == 'boss' then + for i=1, #v.BossActions, 1 do + local distance = #(playerCoords - v.BossActions[i]) + + if distance < Config.DrawDistance then + DrawMarker(Config.MarkerType.BossActions, v.BossActions[i], 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, Config.MarkerColor.r, Config.MarkerColor.g, Config.MarkerColor.b, 100, false, true, 2, true, false, false, false) + Sleep = 0 + + if distance < Config.MarkerSize.x then + isInMarker, currentStation, currentPart, currentPartNum = true, k, 'BossActions', i + end + end + end + end + end + + if isInMarker and not HasAlreadyEnteredMarker or (isInMarker and (LastStation ~= currentStation or LastPart ~= currentPart or LastPartNum ~= currentPartNum)) then + if + (LastStation and LastPart and LastPartNum) and + (LastStation ~= currentStation or LastPart ~= currentPart or LastPartNum ~= currentPartNum) + then + TriggerEvent('esx_policejob:hasExitedMarker', LastStation, LastPart, LastPartNum) + hasExited = true + end + + HasAlreadyEnteredMarker = true + LastStation = currentStation + LastPart = currentPart + LastPartNum = currentPartNum + + TriggerEvent('esx_policejob:hasEnteredMarker', currentStation, currentPart, currentPartNum) + end + + if not hasExited and not isInMarker and HasAlreadyEnteredMarker then + HasAlreadyEnteredMarker = false + TriggerEvent('esx_policejob:hasExitedMarker', LastStation, LastPart, LastPartNum) + end + end + Wait(Sleep) + end +end) + +-- Enter / Exit entity zone events +CreateThread(function() + local trackedEntities = { + `prop_roadcone02a`, + `prop_barrier_work05`, + `p_ld_stinger_s`, + `prop_boxpile_07d`, + `hei_prop_cash_crate_half_full` + } + + while true do + local Sleep = 1500 + + local GetEntityCoords = GetEntityCoords + local GetClosestObjectOfType = GetClosestObjectOfType + local DoesEntityExist = DoesEntityExist + local playerCoords = GetEntityCoords(ESX.PlayerData.ped) + + local closestDistance = -1 + local closestEntity = nil + + for i=1, #trackedEntities, 1 do + local object = GetClosestObjectOfType(playerCoords, 3.0, trackedEntities[i], false, false, false) + + if DoesEntityExist(object) then + Sleep = 500 + local objCoords = GetEntityCoords(object) + local distance = #(playerCoords - objCoords) + + if closestDistance == -1 or closestDistance > distance then + closestDistance = distance + closestEntity = object + end + end + end + + if closestDistance ~= -1 and closestDistance <= 3.0 then + if LastEntity ~= closestEntity then + TriggerEvent('esx_policejob:hasEnteredEntityZone', closestEntity) + LastEntity = closestEntity + end + else + if LastEntity then + TriggerEvent('esx_policejob:hasExitedEntityZone', LastEntity) + LastEntity = nil + end + end + Wait(Sleep) + end +end) + +ESX.RegisterInput("police:interact", "(ESX PoliceJob) Interact", "keyboard", "E", function() + if not CurrentAction then + return + end + + if not ESX.PlayerData.job or (ESX.PlayerData.job and not ESX.PlayerData.job.name == 'police') then + return + end + if CurrentAction == 'menu_cloakroom' then + OpenCloakroomMenu() + elseif CurrentAction == 'menu_armory' then + if not Config.EnableESXService then + OpenArmoryMenu(CurrentActionData.station) + elseif playerInService then + OpenArmoryMenu(CurrentActionData.station) + else + ESX.ShowNotification(TranslateCap('service_not')) + end + elseif CurrentAction == 'menu_vehicle_spawner' then + if not Config.EnableESXService then + OpenVehicleSpawnerMenu('car', CurrentActionData.station, CurrentActionData.part, CurrentActionData.partNum) + elseif playerInService then + OpenVehicleSpawnerMenu('car', CurrentActionData.station, CurrentActionData.part, CurrentActionData.partNum) + else + ESX.ShowNotification(TranslateCap('service_not')) + end + elseif CurrentAction == 'Helicopters' then + if not Config.EnableESXService then + OpenVehicleSpawnerMenu('helicopter', CurrentActionData.station, CurrentActionData.part, CurrentActionData.partNum) + elseif playerInService then + OpenVehicleSpawnerMenu('helicopter', CurrentActionData.station, CurrentActionData.part, CurrentActionData.partNum) + else + ESX.ShowNotification(TranslateCap('service_not')) + end + elseif CurrentAction == 'delete_vehicle' then + ESX.Game.DeleteVehicle(CurrentActionData.vehicle) + elseif CurrentAction == 'menu_boss_actions' then + ESX.CloseContext() + TriggerEvent('esx_society:openBossMenu', 'police', function(data, menu) + menu.close() + + CurrentAction = 'menu_boss_actions' + CurrentActionMsg = TranslateCap('open_bossmenu') + CurrentActionData = {} + end, { wash = false }) -- disable washing money + elseif CurrentAction == 'remove_entity' then + DeleteEntity(CurrentActionData.entity) + end + + CurrentAction = nil +end) + +ESX.RegisterInput("police:quickactions", "(ESX PoliceJob) Quick Actions", "keyboard", "F6", function() + if not ESX.PlayerData.job or (ESX.PlayerData.job.name ~= 'police') or isDead then + return + end + + if not Config.EnableESXService then + OpenPoliceActionsMenu() + elseif playerInService then + OpenPoliceActionsMenu() + else + ESX.ShowNotification(TranslateCap('service_not')) + end +end) + +CreateThread(function() + while true do + local Sleep = 1000 + + if CurrentAction then + Sleep = 0 + ESX.ShowHelpNotification(CurrentActionMsg) + end + Wait(Sleep) + end +end) + +-- Create blip for colleagues +function createBlip(id) + local ped = GetPlayerPed(id) + local blip = GetBlipFromEntity(ped) + + if not DoesBlipExist(blip) then -- Add blip and create head display on player + blip = AddBlipForEntity(ped) + SetBlipSprite(blip, 1) + ShowHeadingIndicatorOnBlip(blip, true) -- Player Blip indicator + SetBlipRotation(blip, math.ceil(GetEntityHeading(ped))) -- update rotation + SetBlipNameToPlayerName(blip, id) -- update blip name + SetBlipScale(blip, 0.85) -- set scale + SetBlipAsShortRange(blip, true) + + table.insert(blipsCops, blip) -- add blip to array so we can remove it later + end +end + +RegisterNetEvent('esx_policejob:updateBlip') +AddEventHandler('esx_policejob:updateBlip', function() + + -- Refresh all blips + for k, existingBlip in pairs(blipsCops) do + RemoveBlip(existingBlip) + end + + -- Clean the blip table + blipsCops = {} + + -- Enable blip? + if Config.EnableESXService and not playerInService then + return + end + + if not Config.EnableJobBlip then + return + end + + -- Is the player a cop? In that case show all the blips for other cops + if ESX.PlayerData.job and ESX.PlayerData.job.name == 'police' then + ESX.TriggerServerCallback('esx_society:getOnlinePlayers', function(players) + for i=1, #players, 1 do + if players[i].job.name == 'police' then + local id = GetPlayerFromServerId(players[i].source) + if NetworkIsPlayerActive(id) and GetPlayerPed(id) ~= PlayerPedId() then + createBlip(id) + end + end + end + end) + end + +end) + +AddEventHandler('esx:onPlayerSpawn', function(spawn) + isDead = false + TriggerEvent('esx_policejob:unrestrain') + + if not hasAlreadyJoined then + TriggerServerEvent('esx_policejob:spawned') + end + hasAlreadyJoined = true +end) + +AddEventHandler('esx:onPlayerDeath', function(data) + isDead = true +end) + +AddEventHandler('onResourceStop', function(resource) + if resource == GetCurrentResourceName() then + TriggerEvent('esx_policejob:unrestrain') + + if Config.EnableESXService then + TriggerServerEvent('esx_service:disableService', 'police') + end + + if Config.EnableHandcuffTimer and handcuffTimer.active then + ESX.ClearTimeout(handcuffTimer.task) + end + end +end) + +-- handcuff timer, unrestrain the player after an certain amount of time +function StartHandcuffTimer() + if Config.EnableHandcuffTimer and handcuffTimer.active then + ESX.ClearTimeout(handcuffTimer.task) + end + + handcuffTimer.active = true + + handcuffTimer.task = ESX.SetTimeout(Config.HandcuffTimer, function() + ESX.ShowNotification(TranslateCap('unrestrained_timer')) + TriggerEvent('esx_policejob:unrestrain') + handcuffTimer.active = false + end) +end + +-- TODO +-- - return to garage if owned +-- - message owner that his vehicle has been impounded +function ImpoundVehicle(vehicle) + --local vehicleName = GetLabelText(GetDisplayNameFromVehicleModel(GetEntityModel(vehicle))) + ESX.Game.DeleteVehicle(vehicle) + ESX.ShowNotification(TranslateCap('impound_successful')) + currentTask.busy = false +end + +if ESX.PlayerLoaded and ESX.PlayerData.job == 'police' then + SetTimeout(1000, function() + TriggerServerEvent('esx_policejob:forceBlip') + end) +end diff --git a/[esx_addons]/esx_policejob/client/vehicle.lua b/[esx_addons]/esx_policejob/client/vehicle.lua new file mode 100644 index 00000000..34841a25 --- /dev/null +++ b/[esx_addons]/esx_policejob/client/vehicle.lua @@ -0,0 +1,311 @@ + +local spawnedVehicles = {} + +function OpenVehicleSpawnerMenu(type, station, part, partNum) + local playerCoords = GetEntityCoords(PlayerPedId()) + local elements = { + {unselectable = true, icon = "fas fa-car", title = TranslateCap('garage_title')}, + {icon = "fas fa-car", title = TranslateCap('garage_storeditem'), action = 'garage'}, + {icon = "fas fa-car", title = TranslateCap('garage_storeitem'), action = 'store_garage'}, + {icon = "fas fa-car", title = TranslateCap('garage_buyitem'), action = 'buy_vehicle'} + } + + ESX.OpenContext("right", elements, function(menu,element) + if element.action == "buy_vehicle" then + local shopElements = {} + local shopCoords = Config.PoliceStations[station][part][partNum].InsideShop + local authorizedVehicles = Config.AuthorizedVehicles[type][ESX.PlayerData.job.grade_name] + + if authorizedVehicles then + if #authorizedVehicles > 0 then + for k,vehicle in ipairs(authorizedVehicles) do + if IsModelInCdimage(vehicle.model) then + local vehicleLabel = GetLabelText(GetDisplayNameFromVehicleModel(vehicle.model)) + + shopElements[#shopElements+1] = { + icon = 'fas fa-car', + title = ('%s - %s'):format(vehicleLabel, TranslateCap('shop_item', ESX.Math.GroupDigits(vehicle.price))), + name = vehicleLabel, + model = vehicle.model, + price = vehicle.price, + props = vehicle.props, + type = type + } + end + end + + if #shopElements > 0 then + OpenShopMenu(shopElements, playerCoords, shopCoords) + else + ESX.ShowNotification(TranslateCap('garage_notauthorized')) + end + else + ESX.ShowNotification(TranslateCap('garage_notauthorized')) + end + else + ESX.ShowNotification(TranslateCap('garage_notauthorized')) + end + elseif element.action == "garage" then + local garage = { + {unselectable = true, icon = "fas fa-car", title = "Garage"} + } + + ESX.TriggerServerCallback('esx_vehicleshop:retrieveJobVehicles', function(jobVehicles) + if #jobVehicles > 0 then + local allVehicleProps = {} + + for k,v in ipairs(jobVehicles) do + local props = json.decode(v.vehicle) + + if IsModelInCdimage(props.model) then + local vehicleName = GetLabelText(GetDisplayNameFromVehicleModel(props.model)) + local label = ('%s - %s: '):format(vehicleName, props.plate) + + if v.stored == 1 then + label = label .. ('%s'):format(TranslateCap('garage_stored')) + elseif v.stored == 0 then + label = label .. ('%s'):format(TranslateCap('garage_notstored')) + end + + garage[#garage+1] = { + icon = 'fas fa-car', + title = label, + stored = v.stored, + model = props.model, + plate = props.plate + } + + allVehicleProps[props.plate] = props + end + end + + if #garage > 0 then + ESX.OpenContext("right", garage, function(menuG,elementG) + if elementG.stored == 1 then + local foundSpawn, spawnPoint = GetAvailableVehicleSpawnPoint(station, part, partNum) + + if foundSpawn then + ESX.CloseContext() + + ESX.Game.SpawnVehicle(elementG.model, spawnPoint.coords, spawnPoint.heading, function(vehicle) + local vehicleProps = allVehicleProps[elementG.plate] + ESX.Game.SetVehicleProperties(vehicle, vehicleProps) + + TriggerServerEvent('esx_vehicleshop:setJobVehicleState', elementG.plate, false) + ESX.ShowNotification(TranslateCap('garage_released')) + end) + end + else + ESX.ShowNotification(TranslateCap('garage_notavailable')) + end + end) + else + ESX.ShowNotification(TranslateCap('garage_empty')) + end + else + ESX.ShowNotification(TranslateCap('garage_empty')) + end + end, type) + elseif element.action == "store_garage" then + StoreNearbyVehicle(playerCoords) + end + end) +end + +function StoreNearbyVehicle(playerCoords) + local vehicles, plates, index = ESX.Game.GetVehiclesInArea(playerCoords, 30.0), {}, {} + + if next(vehicles) then + for i = 1, #vehicles do + local vehicle = vehicles[i] + + -- Make sure the vehicle we're saving is empty, or else it won't be deleted + if GetVehicleNumberOfPassengers(vehicle) == 0 and IsVehicleSeatFree(vehicle, -1) then + local plate = ESX.Math.Trim(GetVehicleNumberPlateText(vehicle)) + plates[#plates + 1] = plate + index[plate] = vehicle + end + end + else + ESX.ShowNotification(TranslateCap('garage_store_nearby')) + return + end + + ESX.TriggerServerCallback('esx_policejob:storeNearbyVehicle', function(plate) + if plate then + local vehicleId = index[plate] + local attempts = 0 + ESX.Game.DeleteVehicle(vehicleId) + local isBusy = true + + CreateThread(function() + BeginTextCommandBusyspinnerOn('STRING') + AddTextComponentSubstringPlayerName(TranslateCap('garage_storing')) + EndTextCommandBusyspinnerOn(4) + + while isBusy do + Wait(100) + end + + BusyspinnerOff() + end) + + -- Workaround for vehicle not deleting when other players are near it. + while DoesEntityExist(vehicleId) do + Wait(500) + attempts = attempts + 1 + + -- Give up + if attempts > 30 then + break + end + + vehicles = ESX.Game.GetVehiclesInArea(playerCoords, 30.0) + if #vehicles > 0 then + for i = 1, #vehicles do + local vehicle = vehicles[i] + if ESX.Math.Trim(GetVehicleNumberPlateText(vehicle)) == plate then + ESX.Game.DeleteVehicle(vehicle) + break + end + end + end + end + + isBusy = false + ESX.ShowNotification(TranslateCap('garage_has_stored')) + else + ESX.ShowNotification(TranslateCap('garage_has_notstored')) + end + end, plates) +end + +function GetAvailableVehicleSpawnPoint(station, part, partNum) + local spawnPoints = Config.PoliceStations[station][part][partNum].SpawnPoints + local found, foundSpawnPoint = false, nil + + for i=1, #spawnPoints, 1 do + if ESX.Game.IsSpawnPointClear(spawnPoints[i].coords, spawnPoints[i].radius) then + found, foundSpawnPoint = true, spawnPoints[i] + break + end + end + + if found then + return true, foundSpawnPoint + else + ESX.ShowNotification(TranslateCap('vehicle_blocked')) + return false + end +end + +function OpenShopMenu(elements, restoreCoords, shopCoords) + local playerPed = PlayerPedId() + isInShopMenu = true + ESX.OpenContext("right", elements, function(menu,element) + local elements2 = { + {unselectable = true, icon = "fas fa-car", title = element.title}, + {icon = "fas fa-eye", title = "View", value = "view"} + } + + ESX.OpenContext("right", elements2, function(menu2,element2) + if element2.value == "view" then + DeleteSpawnedVehicles() + WaitForVehicleToLoad(element.model) + + ESX.Game.SpawnLocalVehicle(element.model, shopCoords, 0.0, function(vehicle) + table.insert(spawnedVehicles, vehicle) + TaskWarpPedIntoVehicle(playerPed, vehicle, -1) + FreezeEntityPosition(vehicle, true) + SetModelAsNoLongerNeeded(element.model) + + if element.props then + ESX.Game.SetVehicleProperties(vehicle, element.props) + end + end) + + local elements3 = { + {unselectable = true, icon = "fas fa-car", title = element.title}, + {icon = "fas fa-check-double", title = "Buy", value = "buy"}, + {icon = "fas fa-eye", title = "Stop Viewing", value = "stop"} + } + + ESX.OpenContext("right", elements3, function(menu3,element3) + if element3.value == 'stop' then + isInShopMenu = false + ESX.CloseContext() + + DeleteSpawnedVehicles() + FreezeEntityPosition(playerPed, false) + SetEntityVisible(playerPed, true) + + ESX.Game.Teleport(playerPed, restoreCoords) + elseif element3.value == "buy" then + local newPlate = exports['esx_vehicleshop']:GeneratePlate() + local vehicle = GetVehiclePedIsIn(playerPed, false) + local props = ESX.Game.GetVehicleProperties(vehicle) + props.plate = newPlate + + ESX.TriggerServerCallback('esx_policejob:buyJobVehicle', function (bought) + if bought then + ESX.ShowNotification(TranslateCap('vehicleshop_bought', element.name, ESX.Math.GroupDigits(element.price))) + + isInShopMenu = false + ESX.CloseContext() + DeleteSpawnedVehicles() + FreezeEntityPosition(playerPed, false) + SetEntityVisible(playerPed, true) + + ESX.Game.Teleport(playerPed, restoreCoords) + else + ESX.ShowNotification(TranslateCap('vehicleshop_money')) + ESX.CloseContext() + end + end, props, element.type) + end + end) + end + end) + end) +end + + +CreateThread(function() + while true do + Wait(0) + + if isInShopMenu then + DisableControlAction(0, 75, true) -- Disable exit vehicle + DisableControlAction(27, 75, true) -- Disable exit vehicle + else + Wait(500) + end + end +end) + +function DeleteSpawnedVehicles() + while #spawnedVehicles > 0 do + local vehicle = spawnedVehicles[1] + ESX.Game.DeleteVehicle(vehicle) + table.remove(spawnedVehicles, 1) + end +end + +function WaitForVehicleToLoad(modelHash) + modelHash = (type(modelHash) == 'number' and modelHash or joaat(modelHash)) + + if not HasModelLoaded(modelHash) then + RequestModel(modelHash) + + BeginTextCommandBusyspinnerOn('STRING') + AddTextComponentSubstringPlayerName(TranslateCap('vehicleshop_awaiting_model')) + EndTextCommandBusyspinnerOn(4) + + while not HasModelLoaded(modelHash) do + Wait(0) + DisableAllControlActions(0) + end + + BusyspinnerOff() + end +end diff --git a/[esx_addons]/esx_policejob/config.lua b/[esx_addons]/esx_policejob/config.lua new file mode 100644 index 00000000..7fa6b8d8 --- /dev/null +++ b/[esx_addons]/esx_policejob/config.lua @@ -0,0 +1,332 @@ +Config = {} + +Config.DrawDistance = 10.0 -- How close do you need to be for the markers to be drawn (in GTA units). +Config.MarkerType = {Cloakrooms = 20, Armories = 21, BossActions = 22, Vehicles = 36, Helicopters = 34} +Config.MarkerSize = {x = 1.5, y = 1.5, z = 0.5} +Config.MarkerColor = {r = 50, g = 50, b = 204} + +Config.EnablePlayerManagement = true -- Enable if you want society managing. +Config.EnableArmoryManagement = false +Config.EnableESXIdentity = true -- Enable if you're using esx_identity. +Config.EnableESXOptionalneeds = false -- Enable if you're using esx_optionalneeds +Config.EnableLicenses = false -- Enable if you're using esx_license. + +Config.EnableHandcuffTimer = true -- Enable handcuff timer? will unrestrain player after the time ends. +Config.HandcuffTimer = 10 * 60000 -- 10 minutes. + +Config.EnableJobBlip = false -- Enable blips for cops on duty, requires esx_society. +Config.EnableCustomPeds = false -- Enable custom peds in cloak room? See Config.CustomPeds below to customize peds. + +Config.EnableESXService = false -- Enable esx service? +Config.MaxInService = -1 -- How many people can be in service at once? Set as -1 to have no limit + +Config.Locale = GetConvar('esx:locale', 'en') + +Config.OxInventory = ESX.GetConfig().OxInventory + +Config.PoliceStations = { + + LSPD = { + + Blip = { + Coords = vector3(425.1, -979.5, 30.7), + Sprite = 60, + Display = 4, + Scale = 1.2, + Colour = 29 + }, + + Cloakrooms = { + vector3(452.6, -992.8, 30.6) + }, + + Armories = { + vector3(451.7, -980.1, 30.6) + }, + + Vehicles = { + { + Spawner = vector3(454.6, -1017.4, 28.4), + InsideShop = vector3(228.5, -993.5, -99.5), + SpawnPoints = { + {coords = vector3(438.4, -1018.3, 27.7), heading = 90.0, radius = 6.0}, + {coords = vector3(441.0, -1024.2, 28.3), heading = 90.0, radius = 6.0}, + {coords = vector3(453.5, -1022.2, 28.0), heading = 90.0, radius = 6.0}, + {coords = vector3(450.9, -1016.5, 28.1), heading = 90.0, radius = 6.0} + } + }, + + { + Spawner = vector3(473.3, -1018.8, 28.0), + InsideShop = vector3(228.5, -993.5, -99.0), + SpawnPoints = { + {coords = vector3(475.9, -1021.6, 28.0), heading = 276.1, radius = 6.0}, + {coords = vector3(484.1, -1023.1, 27.5), heading = 302.5, radius = 6.0} + } + } + }, + + Helicopters = { + { + Spawner = vector3(461.1, -981.5, 43.6), + InsideShop = vector3(477.0, -1106.4, 43.0), + SpawnPoints = { + {coords = vector3(449.5, -981.2, 43.6), heading = 92.6, radius = 10.0} + } + } + }, + + BossActions = { + vector3(448.4, -973.2, 30.6) + } + + } + +} + +Config.AuthorizedWeapons = { + recruit = { + {weapon = 'WEAPON_APPISTOL', components = {0, 0, 1000, 4000, nil}, price = 10000}, + {weapon = 'WEAPON_NIGHTSTICK', price = 0}, + {weapon = 'WEAPON_STUNGUN', price = 1500}, + {weapon = 'WEAPON_FLASHLIGHT', price = 80} + }, + + officer = { + {weapon = 'WEAPON_APPISTOL', components = {0, 0, 1000, 4000, nil}, price = 10000}, + {weapon = 'WEAPON_ADVANCEDRIFLE', components = {0, 6000, 1000, 4000, 8000, nil}, price = 50000}, + {weapon = 'WEAPON_NIGHTSTICK', price = 0}, + {weapon = 'WEAPON_STUNGUN', price = 500}, + {weapon = 'WEAPON_FLASHLIGHT', price = 0} + }, + + sergeant = { + {weapon = 'WEAPON_APPISTOL', components = {0, 0, 1000, 4000, nil}, price = 10000}, + {weapon = 'WEAPON_ADVANCEDRIFLE', components = {0, 6000, 1000, 4000, 8000, nil}, price = 50000}, + {weapon = 'WEAPON_PUMPSHOTGUN', components = {2000, 6000, nil}, price = 70000}, + {weapon = 'WEAPON_NIGHTSTICK', price = 0}, + {weapon = 'WEAPON_STUNGUN', price = 500}, + {weapon = 'WEAPON_FLASHLIGHT', price = 0} + }, + + lieutenant = { + {weapon = 'WEAPON_APPISTOL', components = {0, 0, 1000, 4000, nil}, price = 10000}, + {weapon = 'WEAPON_ADVANCEDRIFLE', components = {0, 6000, 1000, 4000, 8000, nil}, price = 50000}, + {weapon = 'WEAPON_PUMPSHOTGUN', components = {2000, 6000, nil}, price = 70000}, + {weapon = 'WEAPON_NIGHTSTICK', price = 0}, + {weapon = 'WEAPON_STUNGUN', price = 500}, + {weapon = 'WEAPON_FLASHLIGHT', price = 0} + }, + + boss = { + {weapon = 'WEAPON_APPISTOL', components = {0, 0, 1000, 4000, nil}, price = 10000}, + {weapon = 'WEAPON_ADVANCEDRIFLE', components = {0, 6000, 1000, 4000, 8000, nil}, price = 50000}, + {weapon = 'WEAPON_PUMPSHOTGUN', components = {2000, 6000, nil}, price = 70000}, + {weapon = 'WEAPON_NIGHTSTICK', price = 0}, + {weapon = 'WEAPON_STUNGUN', price = 500}, + {weapon = 'WEAPON_FLASHLIGHT', price = 0} + } +} + +Config.AuthorizedVehicles = { + car = { + recruit = {}, + + officer = { + {model = 'police3', price = 20000} + }, + + sergeant = { + {model = 'policet', price = 18500}, + {model = 'policeb', price = 30500} + }, + + lieutenant = { + {model = 'riot', price = 70000}, + {model = 'fbi2', price = 60000} + }, + + boss = {} + }, + + helicopter = { + recruit = {}, + + officer = {}, + + sergeant = {}, + + lieutenant = { + {model = 'polmav', props = {modLivery = 0}, price = 200000} + }, + + boss = { + {model = 'polmav', props = {modLivery = 0}, price = 100000} + } + } +} + +Config.CustomPeds = { + shared = { + {label = 'Sheriff Ped', maleModel = 's_m_y_sheriff_01', femaleModel = 's_f_y_sheriff_01'}, + {label = 'Police Ped', maleModel = 's_m_y_cop_01', femaleModel = 's_f_y_cop_01'} + }, + + recruit = {}, + + officer = {}, + + sergeant = {}, + + lieutenant = {}, + + boss = { + {label = 'SWAT Ped', maleModel = 's_m_y_swat_01', femaleModel = 's_m_y_swat_01'} + } +} + +-- CHECK SKINCHANGER CLIENT MAIN.LUA for matching elements +Config.Uniforms = { + recruit = { + male = { + tshirt_1 = 59, tshirt_2 = 1, + torso_1 = 55, torso_2 = 0, + decals_1 = 0, decals_2 = 0, + arms = 41, + pants_1 = 25, pants_2 = 0, + shoes_1 = 25, shoes_2 = 0, + helmet_1 = 46, helmet_2 = 0, + chain_1 = 0, chain_2 = 0, + ears_1 = 2, ears_2 = 0 + }, + female = { + tshirt_1 = 36, tshirt_2 = 1, + torso_1 = 48, torso_2 = 0, + decals_1 = 0, decals_2 = 0, + arms = 44, + pants_1 = 34, pants_2 = 0, + shoes_1 = 27, shoes_2 = 0, + helmet_1 = 45, helmet_2 = 0, + chain_1 = 0, chain_2 = 0, + ears_1 = 2, ears_2 = 0 + } + }, + + officer = { + male = { + tshirt_1 = 58, tshirt_2 = 0, + torso_1 = 55, torso_2 = 0, + decals_1 = 0, decals_2 = 0, + arms = 41, + pants_1 = 25, pants_2 = 0, + shoes_1 = 25, shoes_2 = 0, + helmet_1 = -1, helmet_2 = 0, + chain_1 = 0, chain_2 = 0, + ears_1 = 2, ears_2 = 0 + }, + female = { + tshirt_1 = 35, tshirt_2 = 0, + torso_1 = 48, torso_2 = 0, + decals_1 = 0, decals_2 = 0, + arms = 44, + pants_1 = 34, pants_2 = 0, + shoes_1 = 27, shoes_2 = 0, + helmet_1 = -1, helmet_2 = 0, + chain_1 = 0, chain_2 = 0, + ears_1 = 2, ears_2 = 0 + } + }, + + sergeant = { + male = { + tshirt_1 = 58, tshirt_2 = 0, + torso_1 = 55, torso_2 = 0, + decals_1 = 8, decals_2 = 1, + arms = 41, + pants_1 = 25, pants_2 = 0, + shoes_1 = 25, shoes_2 = 0, + helmet_1 = -1, helmet_2 = 0, + chain_1 = 0, chain_2 = 0, + ears_1 = 2, ears_2 = 0 + }, + female = { + tshirt_1 = 35, tshirt_2 = 0, + torso_1 = 48, torso_2 = 0, + decals_1 = 7, decals_2 = 1, + arms = 44, + pants_1 = 34, pants_2 = 0, + shoes_1 = 27, shoes_2 = 0, + helmet_1 = -1, helmet_2 = 0, + chain_1 = 0, chain_2 = 0, + ears_1 = 2, ears_2 = 0 + } + }, + + lieutenant = { + male = { + tshirt_1 = 58, tshirt_2 = 0, + torso_1 = 55, torso_2 = 0, + decals_1 = 8, decals_2 = 2, + arms = 41, + pants_1 = 25, pants_2 = 0, + shoes_1 = 25, shoes_2 = 0, + helmet_1 = -1, helmet_2 = 0, + chain_1 = 0, chain_2 = 0, + ears_1 = 2, ears_2 = 0 + }, + female = { + tshirt_1 = 35, tshirt_2 = 0, + torso_1 = 48, torso_2 = 0, + decals_1 = 7, decals_2 = 2, + arms = 44, + pants_1 = 34, pants_2 = 0, + shoes_1 = 27, shoes_2 = 0, + helmet_1 = -1, helmet_2 = 0, + chain_1 = 0, chain_2 = 0, + ears_1 = 2, ears_2 = 0 + } + }, + + boss = { + male = { + tshirt_1 = 58, tshirt_2 = 0, + torso_1 = 55, torso_2 = 0, + decals_1 = 8, decals_2 = 3, + arms = 41, + pants_1 = 25, pants_2 = 0, + shoes_1 = 25, shoes_2 = 0, + helmet_1 = -1, helmet_2 = 0, + chain_1 = 0, chain_2 = 0, + ears_1 = 2, ears_2 = 0 + }, + female = { + tshirt_1 = 35, tshirt_2 = 0, + torso_1 = 48, torso_2 = 0, + decals_1 = 7, decals_2 = 3, + arms = 44, + pants_1 = 34, pants_2 = 0, + shoes_1 = 27, shoes_2 = 0, + helmet_1 = -1, helmet_2 = 0, + chain_1 = 0, chain_2 = 0, + ears_1 = 2, ears_2 = 0 + } + }, + + bullet_wear = { + male = { + bproof_1 = 11, bproof_2 = 1 + }, + female = { + bproof_1 = 13, bproof_2 = 1 + } + }, + + gilet_wear = { + male = { + tshirt_1 = 59, tshirt_2 = 1 + }, + female = { + tshirt_1 = 36, tshirt_2 = 1 + } + } +} diff --git a/[esx_addons]/esx_policejob/esx_policejob.sql b/[esx_addons]/esx_policejob/esx_policejob.sql new file mode 100644 index 00000000..3d904697 --- /dev/null +++ b/[esx_addons]/esx_policejob/esx_policejob.sql @@ -0,0 +1,90 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_police', 'Police', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_police', 'Police', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_police', 'Police', 1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('police', 'LSPD') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('police',0,'recruit','Recrue',20,'{}','{}'), + ('police',1,'officer','Officier',40,'{}','{}'), + ('police',2,'sergeant','Sergent',60,'{}','{}'), + ('police',3,'lieutenant','Lieutenant',85,'{}','{}'), + ('police',4,'boss','Commandant',100,'{}','{}') +; + +CREATE TABLE `fine_types` ( + `id` int NOT NULL AUTO_INCREMENT, + `label` varchar(255) DEFAULT NULL, + `amount` int DEFAULT NULL, + `category` int DEFAULT NULL, + + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `fine_types` (label, amount, category) VALUES + ('Usage abusif du klaxon',30,0), + ('Franchir une ligne continue',40,0), + ('Circulation à contresens',250,0), + ('Demi-tour non autorisé',250,0), + ('Circulation hors-route',170,0), + ('Non-respect des distances de sécurité',30,0), + ('Arrêt dangereux / interdit',150,0), + ('Stationnement gênant / interdit',70,0), + ('Non respect de la priorité à droite',70,0), + ('Non-respect à un véhicule prioritaire',90,0), + ('Non-respect d\'un stop',105,0), + ('Non-respect d\'un feu rouge',130,0), + ('Dépassement dangereux',100,0), + ('Véhicule non en état',100,0), + ('Conduite sans permis',1500,0), + ('Délit de fuite',800,0), + ('Excès de vitesse < 5 kmh',90,0), + ('Excès de vitesse 5-15 kmh',120,0), + ('Excès de vitesse 15-30 kmh',180,0), + ('Excès de vitesse > 30 kmh',300,0), + ('Entrave de la circulation',110,1), + ('Dégradation de la voie publique',90,1), + ('Trouble à l\'ordre publique',90,1), + ('Entrave opération de police',130,1), + ('Insulte envers / entre civils',75,1), + ('Outrage à agent de police',110,1), + ('Menace verbale ou intimidation envers civil',90,1), + ('Menace verbale ou intimidation envers policier',150,1), + ('Manifestation illégale',250,1), + ('Tentative de corruption',1500,1), + ('Arme blanche sortie en ville',120,2), + ('Arme léthale sortie en ville',300,2), + ('Port d\'arme non autorisé (défaut de license)',600,2), + ('Port d\'arme illégal',700,2), + ('Pris en flag lockpick',300,2), + ('Vol de voiture',1800,2), + ('Vente de drogue',1500,2), + ('Fabriquation de drogue',1500,2), + ('Possession de drogue',650,2), + ('Prise d\'ôtage civil',1500,2), + ('Prise d\'ôtage agent de l\'état',2000,2), + ('Braquage particulier',650,2), + ('Braquage magasin',650,2), + ('Braquage de banque',1500,2), + ('Tir sur civil',2000,3), + ('Tir sur agent de l\'état',2500,3), + ('Tentative de meurtre sur civil',3000,3), + ('Tentative de meurtre sur agent de l\'état',5000,3), + ('Meurtre sur civil',10000,3), + ('Meurte sur agent de l\'état',30000,3), + ('Meurtre involontaire',1800,3), + ('Escroquerie à l\'entreprise',2000,2) +; diff --git a/[esx_addons]/esx_policejob/fxmanifest.lua b/[esx_addons]/esx_policejob/fxmanifest.lua new file mode 100644 index 00000000..d8070a66 --- /dev/null +++ b/[esx_addons]/esx_policejob/fxmanifest.lua @@ -0,0 +1,32 @@ +fx_version 'adamant' + +game 'gta5' + +description 'ESX Police Job' +lua54 'yes' +version '1.9.0' + +shared_script '@es_extended/imports.lua' + +server_scripts { + '@oxmysql/lib/MySQL.lua', + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'server/main.lua' +} + +client_scripts { + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'client/main.lua', + 'client/vehicle.lua' +} + +dependencies { + 'es_extended', + 'esx_billing', + 'esx_society', + 'esx_vehicleshop' +} diff --git a/[esx_addons]/esx_policejob/locales/br.lua b/[esx_addons]/esx_policejob/locales/br.lua new file mode 100644 index 00000000..c2e6e84d --- /dev/null +++ b/[esx_addons]/esx_policejob/locales/br.lua @@ -0,0 +1,148 @@ +Locales['br'] = { + -- Cloackroom + ['cloakroom'] = 'Vestiário', + ['citizen_wear'] = 'Roupa casual', + ['police_wear'] = 'Uniforme da Polícia', + ['gilet_wear'] = 'orange reflective jacket', + ['bullet_wear'] = 'bulletproof vest', + ['no_outfit'] = 'there\'s no uniform that fits you!', + ['open_cloackroom'] = 'Pressione [E] para se trocar', + -- Armory + ['remove_object'] = 'take object', + ['deposit_object'] = 'deposit object', + ['get_weapon'] = 'Pegar arma', + ['put_weapon'] = 'Entregar arma', + ['buy_weapons'] = 'Comprar armas', + ['armory'] = 'Arsenal', + ['open_armory'] = 'Pressione [E] para acessar o arsenal', + ['armory_owned'] = 'owned', + ['armory_free'] = 'free', + ['armory_item'] = '$%s', + ['armory_weapontitle'] = 'armory - Buy weapon', + ['armory_componenttitle'] = 'armory - Weapon attatchments', + ['armory_bought'] = 'you bought an %s for $%s', + ['armory_money'] = 'you cannot afford that weapon', + ['armory_hascomponent'] = 'you have that attatchment equiped!', + ['get_weapon_menu'] = 'armory - Withdraw Weapon', + ['put_weapon_menu'] = 'armory - Store Weapon', + -- Vehicles + ['vehicle_menu'] = 'vehicle', + ['vehicle_blocked'] = 'all available spawn points are currently blocked!', + ['garage_prompt'] = 'press [E] to access the Vehicle Actions.', + ['garage_title'] = 'vehicle Actions', + ['garage_stored'] = 'stored', + ['garage_notstored'] = 'not in garage', + ['garage_storing'] = 'we\'re attempting to remove the vehicle, make sure no players are around it.', + ['garage_has_stored'] = 'the vehicle has been stored in your garage', + ['garage_has_notstored'] = 'no nearby owned vehicles were found', + ['garage_notavailable'] = 'your vehicle is not stored in the garage.', + ['garage_blocked'] = 'there\'s no available spawn points!', + ['garage_empty'] = 'you don\'t have any vehicles in your garage.', + ['garage_released'] = 'your vehicle has been released from the garage.', + ['garage_store_nearby'] = 'there is no nearby vehicles.', + ['garage_storeditem'] = 'open garage', + ['garage_storeitem'] = 'store vehicle in garage', + ['garage_buyitem'] = 'vehicle shop', + ['garage_notauthorized'] = 'you\'re not authorized to buy this kind of vehicles.', + ['helicopter_prompt'] = 'press [E] to access the Helicopter Actions.', + ['shop_item'] = '$%s', + ['vehicleshop_title'] = 'vehicle Shop', + ['vehicleshop_confirm'] = 'do you want to buy this vehicle?', + ['vehicleshop_bought'] = 'you have bought %s for $%s', + ['vehicleshop_money'] = 'you cannot afford that vehicle', + ['vehicleshop_awaiting_model'] = 'the vehicle is currently DOWNLOADING & LOADING please wait', + ['confirm_no'] = 'no', + ['confirm_yes'] = 'yes', + -- Service + ['service_max'] = 'you cannot enter service, max officers in service: %s/%s', + ['service_not'] = 'you have not entered service! You\'ll have to get changed first.', + ['service_anonunce'] = 'service information', + ['service_in'] = 'you\'ve entered service, welcome!', + ['service_in_announce'] = 'operator %s has entered service!', + ['service_out'] = 'you have left service.', + ['service_out_announce'] = 'operator %s has left their service.', + -- Action Menu + ['citizen_interaction'] = 'Interagir com o cidadão', + ['vehicle_interaction'] = 'Interagir com o veículo', + ['object_spawner'] = 'Interagir com as rodovias', + + ['id_card'] = 'Carteira de identidade', + ['search'] = 'Procurar', + ['handcuff'] = 'Algemar / Soltar', + ['drag'] = 'drag', + ['put_in_vehicle'] = 'Colocar no veículo', + ['out_the_vehicle'] = 'take out of vehicle', + ['fine'] = 'Multa', + ['unpaid_bills'] = 'manage unpaid bills', + ['license_check'] = 'manage license', + ['license_revoke'] = 'revoke license', + ['license_revoked'] = 'your %s has been revoked!', + ['licence_you_revoked'] = 'you revoked a %s which belonged to %s', + ['no_players_nearby'] = 'nenhum jogador nas proximidades', + ['being_searched'] = 'you are being searched by the Police', + -- Vehicle interaction + ['vehicle_info'] = 'Informações', + ['pick_lock'] = 'Trancar veículo', + ['vehicle_unlocked'] = 'Veículo destravado', + ['no_vehicles_nearby'] = 'Nenhum veículo nas proximidades', + ['impound'] = 'apreender carro', + ['impound_prompt'] = 'Pressione [E] para cancelar a apreender', + ['impound_canceled'] = 'you canceled the impound', + ['impound_canceled_moved'] = 'o apreender foi cancelado porque o veículo mudou', + ['impound_successful'] = 'você apreendeu o veículo', + ['search_database'] = 'informação do veículo', + ['search_database_title'] = 'informações do veículo - pesquisa com número de registro', + ['search_database_error_invalid'] = 'que ~r~não é um número de registro válido', + -- Traffic interaction + ['traffic_interaction'] = 'Interagir com as rodovias', + ['cone'] = 'Cones', + ['barrier'] = 'Barreira', + ['spikestrips'] = 'Fita de pregos', + ['box'] = 'Caixa', + ['cash'] = 'Caixa de dinheiro', + -- ID Card Menu + ['name'] = 'name: %s', + ['job'] = 'job: %s', + ['sex'] = 'sex: %s', + ['dob'] = 'DOB: %s', + ['height'] = 'height: %s', + ['bac'] = 'BAC: %s', + ['unknown'] = 'unknown', + ['male'] = 'male', + ['female'] = 'female', + -- Body Search Menu + ['guns_label'] = '--- Armas ---', + ['inventory_label'] = '--- Inventário ---', + ['license_label'] = ' --- Licenses ---', + ['confiscate'] = 'confiscar %s', + ['confiscate_weapon'] = 'confiscate %s with %s bullets', + ['confiscate_inv'] = 'Confiscar %sx %s', + ['confiscate_dirty'] = 'Confiscar dinheiro sujo: $%s', + ['you_confiscated'] = 'you confiscated %sx %s from %s', + ['got_confiscated'] = '%sx %s were confiscated by %s', + ['you_confiscated_account'] = 'you confiscated $%s (%s) from %s', + ['got_confiscated_account'] = '$%s (%s) was confiscated by %s', + ['you_confiscated_weapon'] = 'you confiscated %s from %s with ~o~%s bullets', + ['got_confiscated_weapon'] = 'your %s with ~o~%s bullets was confiscated by %s', + ['traffic_offense'] = 'Infrações de transito', + ['minor_offense'] = 'Infração leve', + ['average_offense'] = 'Infração média', + ['major_offense'] = 'Infração grave', + ['fine_total'] = 'multa: %s', + -- Vehicle Info Menu + ['plate'] = 'placa: %s', + ['owner_unknown'] = 'proprietário: Desconhecido', + ['owner'] = 'proprietário: %s', + -- Boss Menu + ['open_bossmenu'] = 'Pressione [E] para abrir o menu', + ['quantity_invalid'] = 'invalid quantity', + ['have_withdrawn'] = 'you have withdrawn %sx %s', + ['have_deposited'] = 'you have deposited %sx %s', + ['quantity'] = 'quantity', + ['inventory'] = 'inventory', + ['police_stock'] = 'police Stock', + -- Misc + ['remove_prop'] = 'Pressione [E] para remover o objeto', + ['map_blip'] = 'Departamento de Polícia', + ['unrestrained_timer'] = 'you feel your handcuffs slowly losing grip and fading away.', +} diff --git a/[esx_addons]/esx_policejob/locales/cs.lua b/[esx_addons]/esx_policejob/locales/cs.lua new file mode 100644 index 00000000..4d73e757 --- /dev/null +++ b/[esx_addons]/esx_policejob/locales/cs.lua @@ -0,0 +1,148 @@ +Locales['cs'] = { + -- Cloakroom + ['cloakroom'] = 'satna', + ['citizen_wear'] = 'civilní oblek', + ['police_wear'] = 'policejní oblek', + ['gilet_wear'] = 'oranžová reflexní vesta', + ['bullet_wear'] = 'neprůstřelná vesta', + ['no_outfit'] = 'není zde žádná uniforma, která by ti sedla!', + ['open_cloackroom'] = 'stiskni [E] pro změnu oblečení.', + -- Armory + ['remove_object'] = 'vzít objekt', + ['deposit_object'] = 'odevzdat objekt', + ['get_weapon'] = 'vzít zbraň ze zbrojnice', + ['put_weapon'] = 'uchovat zbraň ve zbrojnici', + ['buy_weapons'] = 'koupit zbraně', + ['armory'] = 'zbrojnice', + ['open_armory'] = 'stiskni [E] pro přístup do zbrojnice.', + ['armory_owned'] = 'vlastněno', + ['armory_free'] = 'zdarma', + ['armory_item'] = '$%s', + ['armory_weapontitle'] = 'zbrojnice', + ['armory_componenttitle'] = 'zbrojnice - Příslušenství ke zbraním', + ['armory_bought'] = 'zakoupil jsi %s za $%s', + ['armory_money'] = 'nemáš dostatek peněz na tuto zbraň', + ['armory_hascomponent'] = 'toto příslušenství máš již nainstalováno!', + ['get_weapon_menu'] = 'zbrojnice - Vzít zbraň', + ['put_weapon_menu'] = 'zbrojnice - Uchovat zbraň', + -- Vehicles + ['vehicle_menu'] = 'vozidlo', + ['vehicle_blocked'] = 'vsechny dostupne spawn pointy jsou blokovany!', + ['garage_prompt'] = 'stiskni [E] pro otevreni akce vozidel.', + ['garage_title'] = 'akce vozidel', + ['garage_stored'] = 'uloženo', + ['garage_notstored'] = 'není v garáži', + ['garage_storing'] = 'pokousime se o odstraneni vozidla, ujisti se, ze kolem nej nejsou hraci.', + ['garage_has_stored'] = 'vozidlo bylo ulozeno do garaze', + ['garage_has_notstored'] = 'zadne nejblizsi vlastnene vozidlo nenalezeno', + ['garage_notavailable'] = 'tvoje vozidlo neni ulozeno v garazi.', + ['garage_blocked'] = 'nejsou zde zadne spawn pointy!', + ['garage_empty'] = 'zadne vozidlo nemas v garazi.', + ['garage_released'] = 'tvoje vozidlo bylo vyjmuto z garaze.', + ['garage_store_nearby'] = 'nejsou poblíž zádná vozidla.', + ['garage_storeditem'] = 'otevřít garáž', + ['garage_storeitem'] = 'uchovat vozidlo v garáži', + ['garage_buyitem'] = 'prodej vozidel', + ['garage_notauthorized'] = 'nemas opravneni ke koupi tohoto vozidla.', + ['helicopter_prompt'] = 'stiskni [E] pro pristup k akcim Helikopter.', + ['shop_item'] = '$%s', + ['vehicleshop_title'] = 'prodejce vozidel', + ['vehicleshop_confirm'] = 'opravdu chces koupit toto vozidlo?', + ['vehicleshop_bought'] = 'koupil jsi %s za ~r~$%s', + ['vehicleshop_money'] = 'toto vozidlo si nemuzete dovolit', + ['vehicleshop_awaiting_model'] = 'vozidlo se prave stahuje a nacita prosim pockej', + ['confirm_no'] = 'ne', + ['confirm_yes'] = 'ano', + -- Service + ['service_max'] = 'nemuzete vstoupit do sluzby, max dustojníci v provozu: %s/%s', + ['service_not'] = 'nezadali jste sluzbu! Nejprve se musíte zmenit.', + ['service_anonunce'] = 'informace o sluzbe', + ['service_in'] = 'vstoupil jsi do sluzby, vitej!', + ['service_in_announce'] = 'operator %s se pripojil do sluzby!', + ['service_out'] = 'opustil jsi sluzbu.', + ['service_out_announce'] = 'operator %s opustil jejich sluzbu.', + -- Action Menu + ['citizen_interaction'] = 'Interakce s občanem', + ['vehicle_interaction'] = 'Interakce vozidla', + ['object_spawner'] = 'Objekty', + + ['id_card'] = 'Občanský průkaz', + ['search'] = 'prohledat', + ['handcuff'] = 'poutat / odpoutat', + ['drag'] = 'prenést', + ['put_in_vehicle'] = 'vlozit do vozidla', + ['out_the_vehicle'] = 'vytahnout z vozidla', + ['fine'] = 'pokuta', + ['unpaid_bills'] = 'spravovat nezaplacené pokuty', + ['license_check'] = 'spravovat průkazy', + ['license_revoke'] = 'zneplatnit průkaz', + ['license_revoked'] = 'vase %s bylo zruseno!', + ['licence_you_revoked'] = 'zrusil jsi %s ktery patril %s', + ['no_players_nearby'] = 'zadny hrac pobliz!', + ['being_searched'] = 'prave jsi prohledavan policii', + -- Vehicle interaction + ['vehicle_info'] = 'informace o vozidle', + ['pick_lock'] = 'vypáčit vozidlo', + ['vehicle_unlocked'] = 'vozidlo je Odemčeno', + ['no_vehicles_nearby'] = 'there is no vehicles nearby', + ['impound'] = 'odtahnout vozidlo', + ['impound_prompt'] = 'zmackni [E] pro zruseni odtahnuti', + ['impound_canceled'] = 'zrusil jsi odtah', + ['impound_canceled_moved'] = 'odtah byl zrusen,protoze se vozidlo pohlo!', + ['impound_successful'] = 'uspesne jsi odtahl vozidlo', + ['search_database'] = 'informace o vozidle', + ['search_database_title'] = 'informace o vozidle - pomocí registracnich cisel', + ['search_database_error_invalid'] = 'tohle ~r~neni spravne registracni cislo', + -- Traffic interaction + ['traffic_interaction'] = 'interakce provozu', + ['cone'] = 'kuzel', + ['barrier'] = 'bariera', + ['spikestrips'] = 'ostnaty pas', + ['box'] = 'box', + ['cash'] = 'box penez', + -- ID Card Menu + ['name'] = 'jméno: %s', + ['job'] = 'práce: %s', + ['sex'] = 'pohlaví: %s', + ['dob'] = 'DOB: %s', + ['height'] = 'výška: %s', + ['bac'] = 'BAC: %s', + ['unknown'] = 'neznámé', + ['male'] = 'muž', + ['female'] = 'žena', + -- Body Search Menu + ['guns_label'] = '--- Zbraně ---', + ['inventory_label'] = '--- Inventář ---', + ['license_label'] = ' --- Průkazy ---', + ['confiscate'] = 'zabavit %s', + ['confiscate_weapon'] = 'zabavit %s s %s naboji', + ['confiscate_inv'] = 'zabavit %sx %s', + ['confiscate_dirty'] = 'zabavit spinave penize: $%s', + ['you_confiscated'] = 'zabavil jsi %sx %s od %s', + ['got_confiscated'] = '%sx %s byly zabaveny od %s', + ['you_confiscated_account'] = 'zabavil jsi $%s (%s) od %s', + ['got_confiscated_account'] = '$%s (%s) byly zabaveny %s', + ['you_confiscated_weapon'] = 'zabavil jsi %s od %s s ~o~%s naboji ', + ['got_confiscated_weapon'] = 'tvoje %s s ~o~%s bylo zabaveno od %s', + ['traffic_offense'] = 'dopravní přestupek', + ['minor_offense'] = 'malý přestupek', + ['average_offense'] = 'přestupek', + ['major_offense'] = 'trestný čin', + ['fine_total'] = 'pokuta: %s', + -- Vehicle Info Menu + ['plate'] = 'SPZ: %s', + ['owner_unknown'] = 'vlastník: Neznámý', + ['owner'] = 'vlastník: %s', + -- Boss Menu + ['open_bossmenu'] = 'stiskni [E] pro otevření menu', + ['quantity_invalid'] = 'neplatné množství', + ['have_withdrawn'] = 'vybral jsi %sx %s', + ['have_deposited'] = 'vložil jsi %sx %s', + ['quantity'] = 'množství', + ['inventory'] = 'inventář', + ['police_stock'] = 'policejní sklad', + -- Misc + ['remove_prop'] = 'stiskni [E] pro odstranění předmětu', + ['map_blip'] = 'policejní stanice', + ['unrestrained_timer'] = 'cítíš, že tvé pouta pomalu ztrácejí přilnavost a padají.', +} diff --git a/[esx_addons]/esx_policejob/locales/de.lua b/[esx_addons]/esx_policejob/locales/de.lua new file mode 100644 index 00000000..44c12991 --- /dev/null +++ b/[esx_addons]/esx_policejob/locales/de.lua @@ -0,0 +1,148 @@ +Locales['de'] = { + -- Cloackroom + ['cloakroom'] = 'Garderobe', + ['citizen_wear'] = 'Zivilkleidung', + ['police_wear'] = 'Arbeitskleidung', + ['gilet_wear'] = 'orangefarbene reflektierende Jacke', + ['bullet_wear'] = 'kugelsichere Weste', + ['no_outfit'] = 'Es gibt keine, Uniform, die dir passt.', + ['open_cloackroom'] = 'Drücke [E] um dich umzuziehen', + -- Armory + ['remove_object'] = 'Objekt nehmen', + ['deposit_object'] = 'Objekt einlagern', + ['get_weapon'] = 'Waffen holen', + ['put_weapon'] = 'Waffen bringen', + ['buy_weapons'] = 'Waffen kaufen', + ['armory'] = 'Waffenkammer', + ['open_armory'] = 'Drücke [E], um die Waffenkammer zu öffnen', + ['armory_owned'] = 'Eigentum', + ['armory_free'] = 'gratis', + ['armory_item'] = '$%s', + ['armory_weapontitle'] = 'Waffenkammer - Waffe kaufen', + ['armory_componenttitle'] = 'Waffenkammer - Waffen Attachments', + ['armory_bought'] = 'Du hast dir %s für $%s gekauft', + ['armory_money'] = 'Du kannst dir die Waffe nicht leisten', + ['armory_hascomponent'] = 'Du hast das Attachment bereits!', + ['get_weapon_menu'] = 'Arsenal - Waffe auslagern', + ['put_weapon_menu'] = 'Arsenal - Waffe einlagern', + -- Vehicles + ['vehicle_menu'] = 'Fahrzeug', + ['vehicle_blocked'] = 'alle verfügbaren Spawnpunkte sind derzeit blockiert!', + ['garage_prompt'] = 'Drücke [E], um das Garagenmenü zu öffnen.', + ['garage_title'] = 'Fahrzeug Aktionen', + ['garage_stored'] = 'eingelagert', + ['garage_notstored'] = 'nicht in der Garage', + ['garage_storing'] = 'Wir versuchen, das Fahrzeug zu entfernen, stelle sicher, dass sich keine Spieler in der Nähe des Fahrzeugs befinden.', + ['garage_has_stored'] = 'das Fahrzeug wurde in deiner Garage abgestellt', + ['garage_has_notstored'] = 'Keine eigenen Fahrzeuge in der Nähe gefunden', + ['garage_notavailable'] = 'Dein Fahrzeug ist nicht in der Garage abgestellt.', + ['garage_blocked'] = 'Es gibt keine verfügbaren Spawn-Punkte!', + ['garage_empty'] = 'Du hast keine Fahrzeuge in der Garage.', + ['garage_released'] = 'Ihr Fahrzeug aus der Garage entlassen wurde.', + ['garage_store_nearby'] = 'Es gibt keine Fahrzeuge in der Nähe.', + ['garage_storeditem'] = 'Garage öffnen', + ['garage_storeitem'] = 'Fahrzeug einparken', + ['garage_buyitem'] = 'Fahrzeugshop', + ['garage_notauthorized'] = 'Du bist nicht berechtigt, diese Art von Fahrzeugen zu kaufen..', + ['helicopter_prompt'] = 'Drücken sie [E] um das Hubschrauber Menü zu öffnen.', + ['shop_item'] = '$%s', + ['vehicleshop_title'] = 'Fahrzeug Shop', + ['vehicleshop_confirm'] = 'Willst du dieses Fahrzeug kaufen?', + ['vehicleshop_bought'] = 'Du hast %s gekauft für $%s', + ['vehicleshop_money'] = 'Du kannst dir das Fahrzeug nicht leisten', + ['vehicleshop_awaiting_model'] = 'das Fahrzeug wird gerade HERUNTERGELADEN & LÄDT bitte warten', + ['confirm_no'] = 'nein', + ['confirm_yes'] = 'ja', + -- Service + ['service_max'] = 'Du kannst den Dienst nicht antreten, maximale Anzahl von Beamten im Dienst: %s/%s', + ['service_not'] = 'Du bist noch nicht im Dienst! Du musst dich erst umziehen.', + ['service_anonunce'] = 'Service-Informationen', + ['service_in'] = 'Du hast deinen Dienst angetreten, willkommen!', + ['service_in_announce'] = 'Operator %s hat seinen Dienst aufgenommen!', + ['service_out'] = 'Du hast den Dienst verlassen.', + ['service_out_announce'] = 'Operator %s hat seinen Dienst beendet.', + -- Action Menu + ['citizen_interaction'] = 'Zivilinteraktionen', + ['vehicle_interaction'] = 'Fahrzeuginteraktionen', + ['object_spawner'] = 'Objekt Spawner', + + ['id_card'] = 'ID Karte', + ['search'] = 'Suche', + ['handcuff'] = 'Festnehmen / Freilassen', + ['drag'] = 'drag', + ['put_in_vehicle'] = 'In Fahrzeug setzen', + ['out_the_vehicle'] = 'aus dem Fahrzeug nehmen', + ['fine'] = 'Strafe', + ['unpaid_bills'] = 'Unbezahlte Rechnungen verwalten', + ['license_check'] = 'Lizenz verwalten', + ['license_revoke'] = 'Lizenz wegnehmen', + ['license_revoked'] = 'Deine %s wurde entzogen', + ['licence_you_revoked'] = 'Du hast %s widerrufen, die %s gehörte', + ['no_players_nearby'] = 'keine Spieler in der Nähe', + ['being_searched'] = 'Du wirst von der Polizei durchsucht', + -- Vehicle interaction + ['vehicle_info'] = 'Fahrzeug Information', + ['pick_lock'] = 'Fahrzeug öffnen', + ['vehicle_unlocked'] = 'Fahrzeug offen', + ['no_vehicles_nearby'] = 'Keine Fahrzeuge in der Nähe', + ['impound'] = 'beschlagnahmtes Fahrzeug', + ['impound_prompt'] = 'Drücken Sie [E], um die Beschlagnahmung abzubrechen.', + ['impound_canceled'] = 'Du hast die Beschlagnahmung abgebrochen', + ['impound_canceled_moved'] = 'die Beschlagnahme wurde aufgehoben, weil das Fahrzeug bewegt wurde', + ['impound_successful'] = 'Du hast das Fahrzeug beschlagnahmt', + ['search_database'] = 'Fahrzeug Informationen', + ['search_database_title'] = 'Fahrzeuginformationen - Suche über das amtliche Kennzeichen', + ['search_database_error_invalid'] = 'die keine gültige Registrierungsnummer ist', + -- Traffic interaction + ['traffic_interaction'] = 'Straßeninteraktionen', + ['cone'] = 'Hütchen', + ['barrier'] = 'Barriere', + ['spikestrips'] = 'Nagelband', + ['box'] = 'Box', + ['cash'] = 'Box mit Geld', + -- ID Card Menu + ['name'] = 'Name: %s', + ['job'] = 'Job: %s', + ['sex'] = 'Geschlecht: %s', + ['dob'] = 'GEB.: %s', + ['height'] = 'Größe: %s', + ['bac'] = 'BAC: %s', + ['unknown'] = 'unbekannt', + ['male'] = 'männlich', + ['female'] = 'weiblich', + -- Body Search Menu + ['guns_label'] = '--- Waffen ---', + ['inventory_label'] = '--- Inventar ---', + ['license_label'] = ' --- Lizenzen ---', + ['confiscate'] = 'konfiszieren %s', + ['confiscate_weapon'] = 'konfisziere %s mit %s kugeln', + ['confiscate_inv'] = 'konfisziere %sx %s', + ['confiscate_dirty'] = 'Schwarzgeld konfisziert: $%s', + ['you_confiscated'] = 'Du konfiszierst %sx %s von %s', + ['got_confiscated'] = '%sx %s wurde konfisziert von %s', + ['you_confiscated_account'] = 'du konfiszierst $%s (%s) von %s', + ['got_confiscated_account'] = '$%s (%s) wurde konfisziert von %s', + ['you_confiscated_weapon'] = 'Du konfiszierst %s von %s mit %s kugeln', + ['got_confiscated_weapon'] = 'Deine %s mit %s kugeln wurde konfisziert von %s', + ['traffic_offense'] = 'Verkehrsvergehen', + ['minor_offense'] = 'Geringes Vergehen', + ['average_offense'] = 'Normales Vergehen', + ['major_offense'] = 'Hohes Vergehen', + ['fine_total'] = 'Strafe: %s', + -- Vehicle Info Menu + ['plate'] = 'Kennzeichen: %s', + ['owner_unknown'] = 'Besitzer: Unbekannt', + ['owner'] = 'Besitzer: %s', + -- Boss Menu + ['open_bossmenu'] = 'Drücke [E], um das Menü zu öffnen', + ['quantity_invalid'] = 'ungültige Menge', + ['have_withdrawn'] = 'Du hast abgehoben %sx %s', + ['have_deposited'] = 'Sie haben eingezahlt %sx %s', + ['quantity'] = 'Qualität', + ['inventory'] = 'Inventar', + ['police_stock'] = 'Polizeibestand', + -- Misc + ['remove_prop'] = 'Drücke [E], um das Objekt zu entfernen', + ['map_blip'] = 'Polizeistation', + ['unrestrained_timer'] = 'Du spürst, wie die Handschellen langsam ihren Halt verlieren und sich auflösen.', +} diff --git a/[esx_addons]/esx_policejob/locales/en.lua b/[esx_addons]/esx_policejob/locales/en.lua new file mode 100644 index 00000000..6b6a12bc --- /dev/null +++ b/[esx_addons]/esx_policejob/locales/en.lua @@ -0,0 +1,148 @@ +Locales['en'] = { + -- Cloakroom + ['cloakroom'] = 'locker room', + ['citizen_wear'] = 'civilian Outfit', + ['police_wear'] = 'police Outfit', + ['gilet_wear'] = 'orange reflective jacket', + ['bullet_wear'] = 'bulletproof vest', + ['no_outfit'] = 'there\'s no uniform that fits you!', + ['open_cloackroom'] = 'press [E] to change clothes.', + -- Armory + ['remove_object'] = 'withdraw object', + ['deposit_object'] = 'deposit object', + ['get_weapon'] = 'withdraw weapon from armory', + ['put_weapon'] = 'store weapon in armory', + ['buy_weapons'] = 'buy weapons', + ['armory'] = 'armory', + ['open_armory'] = 'press [E] to access the Armory.', + ['armory_owned'] = 'owned', + ['armory_free'] = 'free', + ['armory_item'] = '$%s', + ['armory_weapontitle'] = 'armory - Buy weapon', + ['armory_componenttitle'] = 'armory - Weapon attatchments', + ['armory_bought'] = 'you bought an %s for $%s', + ['armory_money'] = 'you cannot afford that weapon', + ['armory_hascomponent'] = 'you have that attatchment equiped!', + ['get_weapon_menu'] = 'armory - Withdraw Weapon', + ['put_weapon_menu'] = 'armory - Store Weapon', + -- Vehicles + ['vehicle_menu'] = 'vehicle', + ['vehicle_blocked'] = 'all available spawn points are currently blocked!', + ['garage_prompt'] = 'press [E] to access the Vehicle Actions.', + ['garage_title'] = 'vehicle Actions', + ['garage_stored'] = 'stored', + ['garage_notstored'] = 'not in garage', + ['garage_storing'] = 'we\'re attempting to remove the vehicle, make sure no players are around it.', + ['garage_has_stored'] = 'the vehicle has been stored in your garage', + ['garage_has_notstored'] = 'no nearby owned vehicles were found', + ['garage_notavailable'] = 'your vehicle is not stored in the garage.', + ['garage_blocked'] = 'there\'s no available spawn points!', + ['garage_empty'] = 'you don\'t have any vehicles in your garage.', + ['garage_released'] = 'your vehicle has been released from the garage.', + ['garage_store_nearby'] = 'there is no nearby vehicles.', + ['garage_storeditem'] = 'open garage', + ['garage_storeitem'] = 'store vehicle in garage', + ['garage_buyitem'] = 'vehicle shop', + ['garage_notauthorized'] = 'you\'re not authorized to buy this kind of vehicles.', + ['helicopter_prompt'] = 'press [E] to access the Helicopter Actions.', + ['shop_item'] = '$%s', + ['vehicleshop_title'] = 'vehicle Shop', + ['vehicleshop_confirm'] = 'do you want to buy this vehicle?', + ['vehicleshop_bought'] = 'you have bought %s for ~r~$%s', + ['vehicleshop_money'] = 'you cannot afford that vehicle', + ['vehicleshop_awaiting_model'] = 'the vehicle is currently DOWNLOADING & LOADING please wait', + ['confirm_no'] = 'no', + ['confirm_yes'] = 'yes', + -- Service + ['service_max'] = 'you cannot enter service, max officers in service: %s/%s', + ['service_not'] = 'you have not entered service! You\'ll have to get changed first.', + ['service_anonunce'] = 'service information', + ['service_in'] = 'you\'ve entered service, welcome!', + ['service_in_announce'] = 'operator %s has entered service!', + ['service_out'] = 'you have left service.', + ['service_out_announce'] = 'operator %s has left their service.', + -- Action Menu + ['citizen_interaction'] = 'citizen Interaction', + ['vehicle_interaction'] = 'vehicle Interaction', + ['object_spawner'] = 'object Spawner', + + ['id_card'] = 'ID Card', + ['search'] = 'search', + ['handcuff'] = 'cuff / Uncuff', + ['drag'] = 'escort', + ['put_in_vehicle'] = 'put in Vehicle', + ['out_the_vehicle'] = 'drag out from vehicle', + ['fine'] = 'fine', + ['unpaid_bills'] = 'manage unpaid bills', + ['license_check'] = 'manage license', + ['license_revoke'] = 'revoke license', + ['license_revoked'] = 'your %s has been revoked!', + ['licence_you_revoked'] = 'you revoked a %s which belonged to %s', + ['no_players_nearby'] = 'there is no player(s) nearby!', + ['being_searched'] = 'you are being searched by the Police', + -- Vehicle interaction + ['vehicle_info'] = 'vehicle Info', + ['pick_lock'] = 'lockpick Vehicle', + ['vehicle_unlocked'] = 'vehicle Unlocked', + ['no_vehicles_nearby'] = 'there is no vehicles nearby', + ['impound'] = 'impound vehicle', + ['impound_prompt'] = 'press [E] to cancel the impound', + ['impound_canceled'] = 'you canceled the impound', + ['impound_canceled_moved'] = 'the impound has been canceled because the vehicle moved', + ['impound_successful'] = 'you have impounded the vehicle', + ['search_database'] = 'vehicle information', + ['search_database_title'] = 'vehicle information - search with registration number', + ['search_database_error_invalid'] = 'that is ~r~not a valid registration number', + -- Traffic interaction + ['traffic_interaction'] = 'interaction Traffic', + ['cone'] = 'cone', + ['barrier'] = 'barrier', + ['spikestrips'] = 'spikestrips', + ['box'] = 'box', + ['cash'] = 'box of cash', + -- ID Card Menu + ['name'] = 'name: %s', + ['job'] = 'job: %s', + ['sex'] = 'sex: %s', + ['dob'] = 'DOB: %s', + ['height'] = 'height: %s', + ['bac'] = 'BAC: %s', + ['unknown'] = 'unknown', + ['male'] = 'male', + ['female'] = 'female', + -- Body Search Menu + ['guns_label'] = '--- Guns ---', + ['inventory_label'] = '--- Inventory ---', + ['license_label'] = ' --- Licenses ---', + ['confiscate'] = 'confiscate %s', + ['confiscate_weapon'] = 'confiscate %s with %s bullets', + ['confiscate_inv'] = 'confiscate %sx %s', + ['confiscate_dirty'] = 'confiscate dirty money: $%s', + ['you_confiscated'] = 'you confiscated %sx %s from %s', + ['got_confiscated'] = '%sx %s were confiscated by %s', + ['you_confiscated_account'] = 'you confiscated $%s (%s) from %s', + ['got_confiscated_account'] = '$%s (%s) was confiscated by %s', + ['you_confiscated_weapon'] = 'you confiscated %s from %s with ~o~%s bullets', + ['got_confiscated_weapon'] = 'your %s with ~o~%s bullets was confiscated by %s', + ['traffic_offense'] = 'traffic Offense', + ['minor_offense'] = 'minor Offense', + ['average_offense'] = 'average Offense', + ['major_offense'] = 'major Offense', + ['fine_total'] = 'fine: %s', + -- Vehicle Info Menu + ['plate'] = 'plate: %s', + ['owner_unknown'] = 'owner: Unknown', + ['owner'] = 'owner: %s', + -- Boss Menu + ['open_bossmenu'] = 'press [E] to open the menu', + ['quantity_invalid'] = 'invalid quantity', + ['have_withdrawn'] = 'you have withdrawn %sx %s', + ['have_deposited'] = 'you have deposited %sx %s', + ['quantity'] = 'quantity', + ['inventory'] = 'inventory', + ['police_stock'] = 'police Stock', + -- Misc + ['remove_prop'] = 'press [E] to delete the object', + ['map_blip'] = 'police Station', + ['unrestrained_timer'] = 'you feel your handcuffs slowly losing grip and fading away.', +} diff --git a/[esx_addons]/esx_policejob/locales/es.lua b/[esx_addons]/esx_policejob/locales/es.lua new file mode 100644 index 00000000..389f43f4 --- /dev/null +++ b/[esx_addons]/esx_policejob/locales/es.lua @@ -0,0 +1,148 @@ +Locales['es'] = { + -- Cloakroom + ['cloakroom'] = 'Taquilla', + ['citizen_wear'] = 'Ropa de civil', + ['police_wear'] = 'Uniforme', + ['gilet_wear'] = 'Chaqueta reflectante naranja', + ['bullet_wear'] = 'Chaleco antibalas', + ['no_outfit'] = '¡No hay ningún uniforme disponible para ti!', + ['open_cloackroom'] = 'Presionar [E] para abrir su taquilla', + -- Armory + ['remove_object'] = 'Coger objeto', + ['deposit_object'] = 'Depositar objeto', + ['get_weapon'] = 'Coger arma', + ['put_weapon'] = 'Depositar arma', + ['buy_weapons'] = 'Comprar armas', + ['armory'] = 'Armeria', + ['open_armory'] = 'Presionar [E] para acceder a la armeria', + ['armory_owned'] = 'Comprada', + ['armory_free'] = 'Gratis', + ['armory_item'] = '$%s', + ['armory_weapontitle'] = 'Armeria - Comprar arma', + ['armory_componenttitle'] = 'Armeria - Complementos del arma', + ['armory_bought'] = 'compraste una %s por $%s', + ['armory_money'] = 'No dispones de suficiente dinero para comprar esta arma', + ['armory_hascomponent'] = '¡Ya dispones de ese complemento!', + ['get_weapon_menu'] = 'Armeria - Retirar arma', + ['put_weapon_menu'] = 'Armeria - Guardar arma', + -- Vehicles + ['vehicle_menu'] = 'Vehículos', + ['vehicle_blocked'] = '¡Todos los puntos de aparición de vehículos están ocupados!', + ['garage_prompt'] = 'Presione [E] para acceder a Acciones del Vehículo.', + ['garage_title'] = 'Acciones del vehículo', + ['garage_stored'] = 'Guardado', + ['garage_notstored'] = 'No se encuentra en el garaje', + ['garage_storing'] = 'Estamos intentando borrar el vehículo, asegurate de que no haya jugadores cerca.', + ['garage_has_stored'] = 'El vehículo ha sido guardado en su garaje', + ['garage_has_notstored'] = 'no nearby owned vehicles were found', + ['garage_notavailable'] = 'Su vehículo no está guardado en el garaje.', + ['garage_blocked'] = '¡No hay ningún punto de spawn disponible!', + ['garage_empty'] = 'No dispones de ningún vehículo en su garaje.', + ['garage_released'] = 'your vehicle has been released from the garage.', + ['garage_store_nearby'] = 'No hay vehículos cercanos.', + ['garage_storeditem'] = 'Abrir garaje', + ['garage_storeitem'] = 'Guardar vehículo en el garaje', + ['garage_buyitem'] = 'Tienda de vehículos', + ['garage_notauthorized'] = 'No estás autorizado a comprar este tipo de vehículos.', + ['helicopter_prompt'] = 'press [E] to access the Helicopter Actions.', + ['shop_item'] = '$%s', + ['vehicleshop_title'] = 'Tienda de vehículos', + ['vehicleshop_confirm'] = '¿Quieres comprar este vehículo?', + ['vehicleshop_bought'] = 'Has comprado un %s por ~r~$%s', + ['vehicleshop_money'] = 'No tienes suficiente dinero para comprar este vehículo', + ['vehicleshop_awaiting_model'] = 'El vehículo se está DESCARGANDO Y CARGANDO porfavor espere', + ['confirm_no'] = 'no', + ['confirm_yes'] = 'si', + -- Service + ['service_max'] = 'No puedes entrar de servicio porque se ha alcanzado el número máximo: %s/%s', + ['service_not'] = '¡No has entrado de servicio! Debes hacerlo primeramente.', + ['service_anonunce'] = 'Información de servicio', + ['service_in'] = 'Has entrado de servicio. ¡Bienvenido!', + ['service_in_announce'] = '¡El agente %s ha entrado de servicio!', + ['service_out'] = 'Has salido de servicio.', + ['service_out_announce'] = 'El agente %s se ha salido de servicio.', + -- Action Menu + ['citizen_interaction'] = 'Interacción ciudadana', + ['vehicle_interaction'] = 'Interacción vehículo', + ['object_spawner'] = 'Colocar objetos', + + ['id_card'] = 'Documento de identidad', + ['search'] = 'Buscar', + ['handcuff'] = 'Poner/quitar Esposas', + ['drag'] = 'escoltar', + ['put_in_vehicle'] = 'Meter en el vehículo', + ['out_the_vehicle'] = 'Sacar del vehículo', + ['fine'] = 'Multa', + ['unpaid_bills'] = 'manage unpaid bills', + ['license_check'] = 'Gestionar licencia', + ['license_revoke'] = 'Revocar licencia', + ['license_revoked'] = 'Su %s ha sido revocar!', + ['licence_you_revoked'] = 'you revoked a %s which belonged to %s', + ['no_players_nearby'] = 'no hay jugadores cerca', + ['being_searched'] = 'you are being searched by the Police', + -- Vehicle interaction + ['vehicle_info'] = 'Información del vehículo', + ['pick_lock'] = 'Forzar coche', + ['vehicle_unlocked'] = 'Vehículo desbloqueado', + ['no_vehicles_nearby'] = 'No hay vehículos cerca', + ['impound'] = 'Confiscar vehículo', + ['impound_prompt'] = 'Presione [E] para cancelar impound', + ['impound_canceled'] = 'you canceled the impound', + ['impound_canceled_moved'] = 'the impound has been canceled because the vehicle moved', + ['impound_successful'] = 'you have impounded the vehicle', + ['search_database'] = 'vehicle information', + ['search_database_title'] = 'vehicle information - search with registration number', + ['search_database_error_invalid'] = 'that is ~r~not a valid registration number', + -- Traffic interaction + ['traffic_interaction'] = 'Rutas de interacción', + ['cone'] = 'Cono', + ['barrier'] = 'Barrera', + ['spikestrips'] = 'Grada', + ['box'] = 'Caja', + ['cash'] = 'Dinero', + -- ID Card Menu + ['name'] = 'Nombre: %s', + ['job'] = 'Trabajo: %s', + ['sex'] = 'Sexo: %s', + ['dob'] = 'DOB: %s', + ['height'] = 'Altura: %s', + ['bac'] = 'BAC: %s', + ['unknown'] = 'Desconocido', + ['male'] = 'Hombre', + ['female'] = 'Mujer', + -- Body Search Menu + ['guns_label'] = '--- Armas ---', + ['inventory_label'] = '--- Inventario ---', + ['license_label'] = ' --- Licenses ---', + ['confiscate'] = 'confiscar %s', + ['confiscate_weapon'] = 'confiscate %s with %s bullets', + ['confiscate_inv'] = 'confiscar %sx %s', + ['confiscate_dirty'] = 'confiscar dinero negro: €%s', + ['you_confiscated'] = 'you confiscated %sx %s from %s', + ['got_confiscated'] = '%sx %s were confiscated by %s', + ['you_confiscated_account'] = 'Has confiscado €%s (%s) de %s', + ['got_confiscated_account'] = '€%s (%s) ha sido confiscado por %s', + ['you_confiscated_weapon'] = 'you confiscated %s from %s with ~o~%s bullets', + ['got_confiscated_weapon'] = 'your %s with ~o~%s bullets was confiscated by %s', + ['traffic_offense'] = 'Delito de tráfico', + ['minor_offense'] = 'Delito menor', + ['average_offense'] = 'Delito medio', + ['major_offense'] = 'Delito grave', + ['fine_total'] = 'Multa total: %s', + -- Vehicle Info Menu + ['plate'] = 'n°: %s', + ['owner_unknown'] = 'propietario: Desconocido', + ['owner'] = 'propietario: %s', + -- Boss Menu + ['open_bossmenu'] = 'presionar [E] para abrir el menú', + ['quantity_invalid'] = 'cantidad invalida', + ['have_withdrawn'] = 'you have withdrawn %sx %s', + ['have_deposited'] = 'you have deposited %sx %s', + ['quantity'] = 'cantidad', + ['inventory'] = 'inventario', + ['police_stock'] = 'almacen Policial', + -- Misc + ['remove_prop'] = 'presionar [E] para eliminar el objeto', + ['map_blip'] = 'comisaría de policía', + ['unrestrained_timer'] = 'you feel your handcuffs slowly losing grip and fading away.', +} diff --git a/[esx_addons]/esx_policejob/locales/et.lua b/[esx_addons]/esx_policejob/locales/et.lua new file mode 100644 index 00000000..4b1834b6 --- /dev/null +++ b/[esx_addons]/esx_policejob/locales/et.lua @@ -0,0 +1,153 @@ +Locales['et'] = { + -- Cloakroom + ['cloakroom'] = 'Riidekapp', + ['citizen_wear'] = 'Tsiviiliriietus', + ['police_wear'] = 'Politsei riietus', + ['gilet_wear'] = 'Oranž helkurjope', + ['bullet_wear'] = 'Kuulivest', + ['no_outfit'] = 'Ükski riietus ei sobi sinule!', + ['open_cloackroom'] = 'Vajuta ~INPUT_CONTEXT~ ,et vahetada ~y~riideid~s~.', + -- Armory + ['remove_object'] = 'Asjade väljastamine', + ['deposit_object'] = 'Asjade asetamine kappi', + ['get_weapon'] = 'Relvade väljastamine relvakapist', + ['put_weapon'] = 'Relvade hoiustamine relvakappi', + ['buy_weapons'] = 'Osta tulirelv', + ['armory'] = 'Asjadekapp/Relvakapp', + ['open_armory'] = 'Vajuta ~INPUT_CONTEXT~ ,et avada ~y~Asjadekapp/Relvakapp~s~.', + ['armory_owned'] = 'Omatud', + ['armory_free'] = 'Tasuta', + ['armory_item'] = '$%s', + ['armory_weapontitle'] = 'Relvakapp - Osta relv', + ['armory_componenttitle'] = 'Relvakapp - Relva Lisad', + ['armory_bought'] = 'Sa ostsid ~y~%s~s~ ~g~$%s~s~ eest', + ['armory_money'] = 'Sul pole piisavalt raha, et seda relva osta.', + ['armory_hascomponent'] = 'Sul on juba see relva lisa küljes!', + ['get_weapon_menu'] = 'Relva väljastamine relvakapist', + ['put_weapon_menu'] = 'Relva hoiustamine relvakappi', + -- Vehicles + ['vehicle_menu'] = 'Sõiduk', + ['vehicle_blocked'] = 'Miski blokeerib garaaži!', + ['garage_prompt'] = 'Vajuta ~INPUT_CONTEXT~ ,et kuvada ~y~sõidukeid~s~.', + ['garage_title'] = 'Sõidukid', + ['garage_stored'] = 'Pargitud', + ['garage_notstored'] = 'Pole garaažis', + ['garage_storing'] = 'Auto parkimine garaaži, vaata, et kedagi ligiduses poleks.', + ['garage_has_stored'] = 'Sõiduk on pargitud teie garaaži', + ['garage_has_notstored'] = 'Ühtegi omatud sõidukit ei leitud.', + ['garage_notavailable'] = 'Teie sõiduk pole pargitud garaaži.', + ['garage_blocked'] = 'Miski blokeerib garaaži!', + ['garage_empty'] = 'Teil pole ühtegi sõidukit garaažis.', + ['garage_released'] = 'Teie sõiduk on garaažist juba väljastatud.', + ['garage_store_nearby'] = 'Ligiduses pole ühtegi sõidukit.', + ['garage_storeditem'] = 'Vaata garaaži', + ['garage_storeitem'] = 'Pargi sõiduk garaaži', + ['garage_buyitem'] = 'Sõiduki pood', + ['helicopter_prompt'] = 'Vajuta ~INPUT_CONTEXT~ ,et kuvada ~y~Koptereid~s~.', + ['helicopter_notauthorized'] = 'Sul pole õiguseid osta kopterit.', + ['shop_item'] = '$%s', + ['vehicleshop_title'] = 'Sõiduki pood', + ['vehicleshop_confirm'] = 'Kas sa soovid seda sõidukit osta?', + ['vehicleshop_bought'] = 'Sa ostsid ~y~%s~s~ ~r~$%s~s~ eest', + ['vehicleshop_money'] = 'Sul pole piisavalt raha, et seda sõidukit osta.', + ['vehicleshop_awaiting_model'] = 'Sõidukit hetkel ~g~Laetakse~s~ Palun oodake', + ['confirm_no'] = 'ei', + ['confirm_yes'] = 'jah', + -- Service + ['service_max'] = 'Sa ei saa end tööle registreerida, maksimaalne arv ohvitsere: %s/%s', + ['service_not'] = 'Sa ei saa end tööle kirjutada! Sa pead enne riided ära vahetama.', + ['service_anonunce'] = 'Teenistuse informatsioon', + ['service_in'] = 'Kirjutasite end tööle, Edu!', + ['service_in_announce'] = 'Ohvitser ~y~%s~s~ tuli tööle!', + ['service_out'] = 'Lahkusid töölt', + ['service_out_announce'] = 'Ohvitser ~y~%s~s~ lahkus töölt.', + -- Action Menu + ['citizen_interaction'] = 'Isikuga tegelemine', + ['vehicle_interaction'] = 'Sõidukiga tegelemine', + ['object_spawner'] = 'Asjade asetamine', + + ['id_card'] = 'ID Kaart', + ['search'] = 'Otsi läbi', + ['hardcuff'] = 'Seo käed kinni', + ['handcuff'] = 'Pane isik raudu / tee raudadest lahti', + ['uncuff'] = 'Tee isiku rauad lahti', + ['drag'] = 'Eskort', + ['put_in_vehicle'] = 'Pane isik autosse', + ['out_the_vehicle'] = 'Võta isik autost välja', + ['fine'] = 'Tee trahv', + ['unpaid_bills'] = 'Vaata isiku maksmata arveid', + ['license_check'] = 'Vaata isiku lube', + ['license_revoke'] = 'Võta luba ära', + ['license_revoked'] = 'Sinu ~b~%s~s~ luba ~y~on ära võetud~s~!', + ['licence_you_revoked'] = 'Sa võtsid ~b~%s~s~ load isikult: ~y~%s~s~', + ['no_players_nearby'] = 'Läheduses pole ühtegi isikut!', + ['being_searched'] = 'Sind ~y~otsitakse läbi~s~ ~b~Politsei~s~ poolt.', + -- Vehicle interaction + ['vehicle_info'] = 'Sõiduki informatsioon', + ['pick_lock'] = 'Keevita sõiduki uks lahti', + ['vehicle_unlocked'] = 'Sõiduk on ~g~Lahti Keevitatud~s~', + ['no_vehicles_nearby'] = 'Läheduses pole ühtegi sõidukit', + ['impound'] = 'Puksiiri sõiduk ära', + ['impound_prompt'] = 'Vajuta ~INPUT_CONTEXT~ et lõpetada ~y~puksiirimine~s~', + ['impound_canceled'] = 'Sa lõpetasid puksiirimise', + ['impound_canceled_moved'] = 'Puksiirimine lõpetati kuna sõiduk liikus', + ['impound_successful'] = 'Sa puksiirisid sõiduki ära!', + ['search_database'] = 'Otsi sõidukit numbrimärgi järgi', + ['search_database_title'] = 'Otsi sõidukit numbrimärgi järgi', + ['search_database_error_invalid'] = 'See ei ole ~r~registris~s~ olev ~y~sõiduk~s~', + ['search_database_error_not_found'] = 'See ei ole ~r~registris~s~ olev ~y~sõiduk~s~', + ['search_database_found'] = 'See sõiduk ~y~kuulub~s~: ~b~%s~s~', + -- Traffic interaction + ['traffic_interaction'] = 'Asjade asetamine', + ['cone'] = 'Koonus', + ['barrier'] = 'Tõke', + ['spikestrips'] = 'Siilid', + ['box'] = 'Kast', + ['cash'] = 'Kast raha', + -- ID Card Menu + ['name'] = 'Nimi: %s', + ['job'] = 'Töökoht: %s', + ['sex'] = 'Sugu: %s', + ['dob'] = 'Sünniaeg: %s', + ['height'] = 'Pikkus: %s', + ['id'] = 'Hüüdnimi: %s', + ['bac'] = 'Alkoholi sisaldus veres: %s', + ['unknown'] = 'Tundmatu', + ['male'] = 'Mees', + ['female'] = 'Naine', + -- Body Search Menu + ['guns_label'] = '--- Relvad ---', + ['inventory_label'] = '--- Kott/taskud ---', + ['license_label'] = ' --- Load ---', + ['confiscate'] = 'Konfiskeeritud %s', + ['confiscate_weapon'] = 'Konfiskeeri %s koos %s padruniga', + ['confiscate_inv'] = 'Konfiskeeri %sx %s', + ['confiscate_dirty'] = 'Konfiskeeri musta raha: $%s', + ['you_confiscated'] = 'Sa konfiskeerisid ~y~%sx~s~ ~b~%s~s~ isikult: ~b~%s~s~', + ['got_confiscated'] = '~y~%sx~s~ ~b~%s~s~ konfiskeeriti ~y~%s~s~ poolt', + ['you_confiscated_account'] = 'Sa konfiskeerisid ~g~$%s~s~ (%s) isikult: ~b~%s~s~', + ['got_confiscated_account'] = '~g~$%s~s~ (%s) konfiskeeriti ~y~%s~s~ poolt', + ['you_confiscated_weapon'] = 'Sa konfiskeerisid ~b~%s~s~ isikult ~b~%s~s~ koos ~o~%s~s~ padruniga', + ['got_confiscated_weapon'] = 'Sinu ~b~%s~s~ koos ~o~%s~s~ padruniga konfiskeeriti ~y~%s~s~ poolt', + ['traffic_offense'] = 'Liiklusrikkumine', + ['minor_offense'] = 'Väike kuritegu', + ['average_offense'] = 'Keskmine kuritegu', + ['major_offense'] = 'Suur kuritegu', + ['fine_total'] = 'Trahv: %s', + -- Vehicle Info Menu + ['plate'] = 'Numbrimärk: %s', + ['owner_unknown'] = 'Sõiduki omanik: Puudub', + ['owner'] = 'Omanik: %s', + -- Boss Menu + ['open_bossmenu'] = 'Vajuta ~INPUT_CONTEXT~ et avada boss menüü', + ['quantity_invalid'] = 'Kehtetu kogus', + ['have_withdrawn'] = 'Sa võtsid firmaarvelt välja ~y~%sx~s~ ~b~%s~s~', + ['have_deposited'] = 'Sa panid firmaarvele ~y~%sx~s~ ~b~%s~s~', + ['quantity'] = 'Kogus', + ['inventory'] = 'Inventuur', + ['police_stock'] = 'Politsei aktsia', + -- Misc + ['remove_prop'] = 'Vajuta ~INPUT_CONTEXT~ et kustutada asi sinu ees.', + ['map_blip'] = 'Politseijaoskond', + ['unrestrained_timer'] = 'Sa tunned, kuidas käerauad libisevad kätelt.', +} diff --git a/[esx_addons]/esx_policejob/locales/fi.lua b/[esx_addons]/esx_policejob/locales/fi.lua new file mode 100644 index 00000000..db2d037e --- /dev/null +++ b/[esx_addons]/esx_policejob/locales/fi.lua @@ -0,0 +1,148 @@ +Locales['fi'] = { + -- Cloakroom + ['cloakroom'] = 'vaatelokero', + ['citizen_wear'] = 'siviiliasu', + ['police_wear'] = 'poliisiasu', + ['gilet_wear'] = 'huomioliivi', + ['bullet_wear'] = 'luotiliivi', + ['no_outfit'] = 'täällä ei ole sinulle sopivaa asua', + ['open_cloackroom'] = 'paina [E] vaihtaaksesi vaatteita.', + -- Armory + ['remove_object'] = 'ota esine', + ['deposit_object'] = 'talleta esine', + ['get_weapon'] = 'ota ase', + ['put_weapon'] = 'laita ase pois', + ['buy_weapons'] = 'osta aseita', + ['armory'] = 'asevarasto', + ['open_armory'] = 'paina [E] avataksesi asevarasto', + ['armory_owned'] = 'owned', + ['armory_free'] = 'free', + ['armory_item'] = '$%s', + ['armory_weapontitle'] = 'armory - Buy weapon', + ['armory_componenttitle'] = 'armory - Weapon attatchments', + ['armory_bought'] = 'you bought an %s for $%s', + ['armory_money'] = 'you cannot afford that weapon', + ['armory_hascomponent'] = 'you have that attatchment equiped!', + ['get_weapon_menu'] = 'armory - Withdraw Weapon', + ['put_weapon_menu'] = 'armory - Store Weapon', + -- Vehicles + ['vehicle_menu'] = 'vehicle', + ['vehicle_blocked'] = 'all available spawn points are currently blocked!', + ['garage_prompt'] = 'press [E] to access the Vehicle Actions.', + ['garage_title'] = 'vehicle Actions', + ['garage_stored'] = 'stored', + ['garage_notstored'] = 'not in garage', + ['garage_storing'] = 'we\'re attempting to remove the vehicle, make sure no players are around it.', + ['garage_has_stored'] = 'the vehicle has been stored in your garage', + ['garage_has_notstored'] = 'no nearby owned vehicles were found', + ['garage_notavailable'] = 'your vehicle is not stored in the garage.', + ['garage_blocked'] = 'there\'s no available spawn points!', + ['garage_empty'] = 'you don\'t have any vehicles in your garage.', + ['garage_released'] = 'your vehicle has been released from the garage.', + ['garage_store_nearby'] = 'there is no nearby vehicles.', + ['garage_storeditem'] = 'open garage', + ['garage_storeitem'] = 'store vehicle in garage', + ['garage_buyitem'] = 'vehicle shop', + ['garage_notauthorized'] = 'you\'re not authorized to buy this kind of vehicles.', + ['helicopter_prompt'] = 'press [E] to access the Helicopter Actions.', + ['shop_item'] = '$%s', + ['vehicleshop_title'] = 'vehicle Shop', + ['vehicleshop_confirm'] = 'do you want to buy this vehicle?', + ['vehicleshop_bought'] = 'you have bought %s for ~r~$%s', + ['vehicleshop_money'] = 'you cannot afford that vehicle', + ['vehicleshop_awaiting_model'] = 'the vehicle is currently DOWNLOADING & LOADING please wait', + ['confirm_no'] = 'no', + ['confirm_yes'] = 'yes', + -- Service + ['service_max'] = 'you cannot enter service, max officers in service: %s/%s', + ['service_not'] = 'you have not entered service! You\'ll have to get changed first.', + ['service_anonunce'] = 'service information', + ['service_in'] = 'you\'ve entered service, welcome!', + ['service_in_announce'] = 'operator %s has entered service!', + ['service_out'] = 'you have left service.', + ['service_out_announce'] = 'operator %s has left their service.', + -- Action Menu + ['citizen_interaction'] = 'siviilin vuorovaikutus', + ['vehicle_interaction'] = 'ajoneuvon vuorovaikutus', + ['object_spawner'] = 'objekti spawneri', + + ['id_card'] = 'henkilöllisyystodistus', + ['search'] = 'tutki', + ['handcuff'] = 'raudat On/Off', + ['drag'] = 'raahaa', + ['put_in_vehicle'] = 'laita ajoneuvoon', + ['out_the_vehicle'] = 'ota ulos ajoneuvosta', + ['fine'] = 'sakko', + ['unpaid_bills'] = 'hallinoi maksamattomia laskuja', + ['license_check'] = 'hallitse lisenssejä', + ['license_revoke'] = 'kumoa lisenssi', + ['license_revoked'] = 'sinun %s kumottiin!', + ['licence_you_revoked'] = 'sinä kumosit %s mikä kuului henkilölle %s', + ['no_players_nearby'] = 'ei pelaajia lähettyvillä', + ['being_searched'] = 'you are being searched by the Police', + -- Vehicle interaction + ['vehicle_info'] = 'ajoneuvon tiedot', + ['pick_lock'] = 'tiirikoi ovet', + ['vehicle_unlocked'] = 'ajoneuvo Avattu', + ['no_vehicles_nearby'] = 'ei ajoneuvoja lähettyvillä', + ['impound'] = 'takavarikoi ajoneuvo', + ['impound_prompt'] = 'paina [E] peruaksesi takavarikointi', + ['impound_canceled'] = 'sinä peruit takavarikoinnin', + ['impound_canceled_moved'] = 'takavarikointi peruuntui koska ajoneuvo liikku', + ['impound_successful'] = 'takavarikoit ajoneuvon', + ['search_database'] = 'ajoneuvon tiedot', + ['search_database_title'] = 'ajoneuvon tiedot - etsi rekisterinumerolla', + ['search_database_error_invalid'] = 'tämä ~r~ei ole voimassa oleva rekisterinumero', + -- Traffic interaction + ['traffic_interaction'] = 'liikenteen vuorovaikutus', + ['cone'] = 'kartio', + ['barrier'] = 'este', + ['spikestrips'] = 'piikkimatto', + ['box'] = 'laatikko', + ['cash'] = 'rahalaatikko', + -- ID Card Menu + ['name'] = 'nimi: %s', + ['job'] = 'työ: %s', + ['sex'] = 'sukupuoli: %s', + ['dob'] = 'syntymäaika: %s', + ['height'] = 'pituus: %s', + ['bac'] = 'alkometri: %s', + ['unknown'] = 'tuntematon', + ['male'] = 'mies', + ['female'] = 'nainen', + -- Body Search Menu + ['guns_label'] = '--- Aseet ---', + ['inventory_label'] = '--- Reppu ---', + ['license_label'] = ' --- Lisenssit ---', + ['confiscate'] = 'takavarikoi %s', + ['confiscate_weapon'] = 'confiscate %s with %s bullets', + ['confiscate_inv'] = 'takavarikoi %sx %s', + ['confiscate_dirty'] = 'takavarikoi likainen raha: $%s', + ['you_confiscated'] = 'sinä takavarioit %sx %s pelaajalta %s', + ['got_confiscated'] = '%sx %s takavarikoitiin sinulta pelaajan %s toimesta', + ['you_confiscated_account'] = 'sinä takavarikoit $%s (%s) pelaajalta %s', + ['got_confiscated_account'] = '$%s (%s) takavarikoitiin sinulta pelaajan %s toimesta', + ['you_confiscated_weapon'] = 'sinä takavarikoit %s pelaajalta %s jossa oli ~o~%s panosta', + ['got_confiscated_weapon'] = 'sinun %s jossa oli ~o~%s panosta takavarikoitiin sinulta%s', + ['traffic_offense'] = 'liikenne rikokset', + ['minor_offense'] = 'lievät rikokset', + ['average_offense'] = 'keskisuuret rikokset', + ['major_offense'] = 'vakavat rikokset', + ['fine_total'] = 'sakko: %s', + --Vehicle Info Menu + ['plate'] = 'kilpi: %s', + ['owner_unknown'] = 'omistaja: Tuntematon', + ['owner'] = 'omistaja: %s', + --Boss Menu + ['open_bossmenu'] = 'paina [E] avataksesi valikon', + ['quantity_invalid'] = 'invalid quantity', + ['have_withdrawn'] = 'sinä otit varastosta %sx %s', + ['have_deposited'] = 'sinä talletit varastoon %sx %s', + ['quantity'] = 'määrä', + ['inventory'] = 'varasto', + ['police_stock'] = 'poliisin Varasto', + -- Misc + ['remove_prop'] = 'paina [E] poistaaksesi objektin', + ['map_blip'] = 'poliisilaitos', + ['unrestrained_timer'] = 'tunnet kuinka hitaasti käsiraudat alkavat löystyä ja irtoavat', +} \ No newline at end of file diff --git a/[esx_addons]/esx_policejob/locales/fr.lua b/[esx_addons]/esx_policejob/locales/fr.lua new file mode 100644 index 00000000..c3136406 --- /dev/null +++ b/[esx_addons]/esx_policejob/locales/fr.lua @@ -0,0 +1,148 @@ +Locales['fr'] = { + -- Cloakroom + ['cloakroom'] = 'vestiaire', + ['citizen_wear'] = 'tenue Civil', + ['police_wear'] = 'tenue Policier', + ['gilet_wear'] = 'gilet orange', + ['bullet_wear'] = 'gilet pare-balles', + ['no_outfit'] = 'il n\'y a pas d\'uniforme à votre taille...', + ['open_cloackroom'] = 'appuyez sur [E] pour vous changer', + -- Armory + ['remove_object'] = 'prendre Objet', + ['deposit_object'] = 'déposer objet', + ['get_weapon'] = 'prendre Arme', + ['put_weapon'] = 'déposer Arme', + ['buy_weapons'] = 'acheter Armes', + ['armory'] = 'armurerie', + ['open_armory'] = 'appuyez sur [E] pour accéder à l\'armurerie', + ['armory_owned'] = 'possédé', + ['armory_free'] = 'gratuit', + ['armory_item'] = '$%s', + ['armory_weapontitle'] = 'armurerie - Acheter une arme', + ['armory_componenttitle'] = 'armurerie - Accessoires d\'armes', + ['armory_bought'] = 'vous achetez un %s pour $%s', + ['armory_money'] = 'vous ne pouvez pas acheter cette arme', + ['armory_hascomponent'] = 'vous avez cet accessoire équipé!', + ['get_weapon_menu'] = 'armurerie - Retirer arme', + ['put_weapon_menu'] = 'armurerie - Stocker arme', + -- Vehicles + ['vehicle_menu'] = 'véhicule', + ['vehicle_blocked'] = 'tous les points de spawn sont bloqués!', + ['garage_prompt'] = 'appuyez sur [E] pour accéder aux Actions Véhicule.', + ['garage_title'] = 'actions Véhicules', + ['garage_stored'] = 'rangé', + ['garage_notstored'] = 'sorti(e)', + ['garage_storing'] = 'tentative de suppression du véhicule, assurez-vous que personne ne soit autour.', + ['garage_has_stored'] = 'le véhicule a bien été rangé dans le garage', + ['garage_has_notstored'] = 'aucun véhicule dans le garage', + ['garage_notavailable'] = 'votre véhicule n\'est pas rangé dans le garage.', + ['garage_blocked'] = 'la sortie du garage est obstruée!', + ['garage_empty'] = 'vous n\'avez aucun véhicule dans le garage.', + ['garage_released'] = 'votre véhicule a été sorti.', + ['garage_store_nearby'] = 'aucun véhicule a proximité.', + ['garage_storeditem'] = 'ouvrir le garage', + ['garage_storeitem'] = 'ranger le véhicule', + ['garage_buyitem'] = 'magasin véhicule', + ['garage_notauthorized'] = 'vous n\'êtes pas autorisé à acheter ce type de véhicules.', + ['helicopter_prompt'] = 'appuyez sur [E] pour accéder aux Actions de l\'hélicoptère.', + ['shop_item'] = '$%s', + ['vehicleshop_title'] = 'magasin véhicule', + ['vehicleshop_confirm'] = 'voulez-vous acheter ce véhicule?', + ['vehicleshop_bought'] = 'vous avez acheté %s pour ~r~$%s', + ['vehicleshop_money'] = 'vous ne pouvez pas acheter ce véhicule', + ['vehicleshop_awaiting_model'] = 'le véhicule est actuellement en PRÉPARATION veuillez patienter', + ['confirm_no'] = 'non', + ['confirm_yes'] = 'oui', + -- Service + ['service_max'] = 'vous ne pouvez pas entrer en service, officiers en service: %s/%s', + ['service_not'] = 'vous n\'êtes pas en service! Vous devez d\'abord enfiler votre tenue.', + ['service_anonunce'] = 'prise de service', + ['service_in'] = 'vous êtes en service, bon courage!', + ['service_in_announce'] = 'l\'officier %s est entré en service!', + ['service_out'] = 'vous avez terminé votre service.', + ['service_out_announce'] = 'l\'officier %s a quitté son service.', + -- Action Menu + ['citizen_interaction'] = 'interaction citoyen', + ['vehicle_interaction'] = 'interaction véhicule', + ['object_spawner'] = 'placer objets', + + ['id_card'] = 'carte d\'identité', + ['search'] = 'fouiller', + ['handcuff'] = 'menotter / Démenotter', + ['drag'] = 'escorter', + ['put_in_vehicle'] = 'mettre dans véhicule', + ['out_the_vehicle'] = 'sortir du véhicule', + ['fine'] = 'Amende', + ['unpaid_bills'] = 'gérer les amendes impayées', + ['license_check'] = 'gérer les licences', + ['license_revoke'] = 'révoquer la licence', + ['license_revoked'] = 'votre %s a été révoqué!', + ['licence_you_revoked'] = 'vous avez révoqué un %s qui appartenait à %s', + ['no_players_nearby'] = 'aucun joueur à proximité', + ['being_searched'] = 'vous êtes recherché(e) par la Police', + -- Vehicle interaction + ['vehicle_info'] = 'infos véhicule', + ['pick_lock'] = 'crocheter véhicule', + ['vehicle_unlocked'] = 'véhicule déverouillé', + ['no_vehicles_nearby'] = 'aucun véhicule à proximité', + ['impound'] = 'véhicule en fourrière', + ['impound_prompt'] = 'appuyez sur [E] pour annuler la saisie du véhicule', + ['impound_canceled'] = 'vous avez annulé la saisie', + ['impound_canceled_moved'] = 'la saisie a été annulée parce que le véhicule a déménagé', + ['impound_successful'] = 'vous avez saisi le véhicule', + ['search_database'] = 'information sur le véhicule', + ['search_database_title'] = 'informations sur le véhicule - recherche avec numéro d\'enregistrement', + ['search_database_error_invalid'] = 'Ce n\'est ~r~pas un numéro d\'enregistrement valide', + -- Traffic interaction + ['traffic_interaction'] = 'interaction routière', + ['cone'] = 'plot', + ['barrier'] = 'barrière', + ['spikestrips'] = 'herse', + ['box'] = 'caisse', + ['cash'] = 'caisse', + -- ID Card Menu + ['name'] = 'nom: %s', + ['job'] = 'métier: %s', + ['sex'] = 'sexe: %s', + ['dob'] = 'DDN: %s', + ['height'] = 'taille: %s', + ['bac'] = 'BAC: %s', + ['unknown'] = 'inconnu', + ['male'] = 'homme', + ['female'] = 'femme', + -- Body Search Menu + ['guns_label'] = '--- Armes ---', + ['inventory_label'] = '--- Inventaire ---', + ['license_label'] = ' --- Licenses ---', + ['confiscate'] = 'confisquer %s', + ['confiscate_weapon'] = 'confisqué %s avec %s balles', + ['confiscate_inv'] = 'confisquer %sx %s', + ['confiscate_dirty'] = 'confisquer argent sale: €%s', + ['you_confiscated'] = 'vous avez confisqué %sx %s à %s', + ['got_confiscated'] = '%sx %s ont été confisqués par %s', + ['you_confiscated_account'] = 'vous avez confisqué $%s (%s) à %s', + ['got_confiscated_account'] = '$%s (%s) ont été confisqués par %s', + ['you_confiscated_weapon'] = 'vous avez confisqué %s à %s avec ~o~%s balles', + ['got_confiscated_weapon'] = 'votre %s avec ~o~%s balles a été confisqué par %s', + ['traffic_offense'] = 'code de la route', + ['minor_offense'] = 'délit mineur', + ['average_offense'] = 'délit moyen', + ['major_offense'] = 'délit grave', + ['fine_total'] = 'amende: %s', + -- Vehicle Info Menu + ['plate'] = 'n°: %s', + ['owner_unknown'] = 'propriétaire: Inconnu', + ['owner'] = 'propriétaire: %s', + -- Boss Menu + ['open_bossmenu'] = 'appuyez sur [E] pour ouvrir le menu', + ['quantity_invalid'] = 'quantité invalide', + ['have_withdrawn'] = 'vous avez retiré %sx %s', + ['have_deposited'] = 'vous avez déposé %sx %s', + ['quantity'] = 'quantité', + ['inventory'] = 'inventaire', + ['police_stock'] = 'coffre de la police', + -- Misc + ['remove_prop'] = 'appuyez sur [E] pour enlever l\'objet', + ['map_blip'] = 'Commissariat', + ['unrestrained_timer'] = 'vous sentez que vos menottes deviennent fragiles.', +} diff --git a/[esx_addons]/esx_policejob/locales/hu.lua b/[esx_addons]/esx_policejob/locales/hu.lua new file mode 100644 index 00000000..6938493c --- /dev/null +++ b/[esx_addons]/esx_policejob/locales/hu.lua @@ -0,0 +1,149 @@ +Locales['hu'] = { + -- Cloakroom + ['cloakroom'] = 'Zárt helyiség', + ['citizen_wear'] = 'Civil öltözet', + ['police_wear'] = 'Egyenruha', + ['gilet_wear'] = 'Láthatósági mellény', + ['bullet_wear'] = 'Golyóálló mellény', + ['no_outfit'] = 'there\'s no uniform that fits you!', + ['open_cloackroom'] = 'Nyomj [E] betüt, hogy átöltözz.', + -- Armory + ['remove_object'] = 'Tárgy kivétele', + ['deposit_object'] = 'Tárgy berakás', + ['get_weapon'] = 'Fegyver kivétele', + ['put_weapon'] = 'Fegyver berakás', + ['buy_weapons'] = 'Fegyver vásárlás', + ['armory'] = 'Fegyvertár', + ['open_armory'] = 'Nyomj [E] betüt, hogy hozzáférj: Armory.', + ['armory_owned'] = 'saját', + ['armory_free'] = 'ingyenes', + ['armory_item'] = '%s Ft', + ['armory_weapontitle'] = 'fegyvertár - vásárlás', + ['armory_componenttitle'] = 'fegyvertár - kiegészitöks', + ['armory_bought'] = 'vásároltál: %s ennyiért: ~r~%s Ft', + ['armory_money'] = 'Ez számodra nem engedélyezett', + ['armory_hascomponent'] = 'kiegészitö felvéve!', + ['get_weapon_menu'] = 'Fegyvertár - fegyver kivétele', + ['put_weapon_menu'] = 'Fegyvertár - fegyver berakása', + -- Vehicles + ['vehicle_menu'] = 'jármü', + ['vehicle_blocked'] = 'Lerakási hely blokkolva!', + ['garage_prompt'] = 'Nyomj [E] hogy hozzáférj: Vehicle Actions.', + ['garage_title'] = 'Jármü opciók', + ['garage_stored'] = 'tárolva', + ['garage_notstored'] = 'nincs a garázsban', + ['garage_storing'] = 'megpróbáljuk eltávolítani a járművet, ügyeljen arra, hogy senki ne tartózkodjon körülütte.', + ['garage_has_stored'] = 'jármü tárolva', + ['garage_has_notstored'] = 'nincs a közeledben jármü', + ['garage_notavailable'] = 'a jármü nem tárolható a garázsban.', + ['garage_blocked'] = 'nem elérhetö lerakási pont!', + ['garage_empty'] = 'nincs jármüved garázsban.', + ['garage_released'] = 'jármü kiengedve.', + ['garage_store_nearby'] = 'nincs jármü a közeledben.', + ['garage_storeditem'] = 'garázs megnyitása', + ['garage_storeitem'] = 'jármü tárolása a garázsban', + ['garage_buyitem'] = 'Autó shop', + ['helicopter_prompt'] = 'Nyomj[E] betüt, hogy hozzáférj: Helicopter Actions.', + ['helicopter_notauthorized'] = 'Nem használhatsz helikoptert.', + ['shop_item'] = '%s Ft', + ['vehicleshop_title'] = 'Autó shop', + ['vehicleshop_confirm'] = 'Meg szeretnéd venni?', + ['vehicleshop_bought'] = 'vásároltál %s ezért: ~r~%s Ft', + ['vehicleshop_money'] = 'Ezt nem engedheted meg.', + ['vehicleshop_awaiting_model'] = 'A jármű DOWNLOADING & LOADING kérlek várj', + ['confirm_no'] = 'nem', + ['confirm_yes'] = 'igen', + -- Service + ['service_max'] = 'Nem léphet szolgálatba. Maximális létszám: %s/%s', + ['service_not'] = 'Elöször vedd fel a szolgálatot...', + ['service_anonunce'] = 'információk', + ['service_in'] = 'Szolgálatba léptél, üdvözlünk!', + ['service_in_announce'] = 'operátor %s szolgálatba lépett!', + ['service_out'] = 'elhagytad a szolgálatot.', + ['service_out_announce'] = 'operátor %s leadta a szolgálatot.', + -- Action Menu + ['citizen_interaction'] = 'Ember interakciók', + ['vehicle_interaction'] = 'Jármű interakciók', + ['object_spawner'] = 'Objektum lerakása', + + ['id_card'] = 'Személyi igazolvány', + ['search'] = 'keresés', + ['handcuff'] = 'kötözés / elengedés', + ['drag'] = 'kisérés', + ['put_in_vehicle'] = 'berakás jármübe', + ['out_the_vehicle'] = 'kivétel jármüböl', + ['fine'] = 'birság', + ['unpaid_bills'] = 'fizetetlen számlák kezelése', + ['license_check'] = 'engedélyek kezelése', + ['license_revoke'] = 'engedélyek visszavonása', + ['license_revoked'] = '%s revoked!', + ['licence_you_revoked'] = 'visszavonta %s %s engedélyét', + ['no_players_nearby'] = 'nincs a közeledben játékos!', + ['being_searched'] = 'Téged éppen megmotoztak!', + -- Vehicle interaction + ['vehicle_info'] = 'Jármü infó', + ['pick_lock'] = 'Jármü feltörése', + ['vehicle_unlocked'] = 'Jármü feltörve feltörve', + ['no_vehicles_nearby'] = 'nincs jármü a közelben', + ['impound'] = 'jármü lefoglalása', + ['impound_prompt'] = 'nyomj [E] hogy megszakítsd', + ['impound_canceled'] = 'lefoglalás megszakitva', + ['impound_canceled_moved'] = 'lefoglalás nem sikerült, mert a jármü mozgásban volt', + ['impound_successful'] = 'sikeres lefoglalás', + ['search_database'] = 'Keresés rendszám alapján', + ['search_database_title'] = 'jármü információk - keresés rendszám alapján', + ['search_database_error_invalid'] = 'ez ~r~nem egy érvényes rendszám', + -- Traffic interaction + ['traffic_interaction'] = 'Útzárak', + ['cone'] = 'bólya', + ['barrier'] = 'útakadály', + ['spikestrips'] = 'szögesdrót', + ['box'] = 'doboz', + ['cash'] = 'pénzesdoboz', + -- ID Card Menu + ['name'] = 'név: %s', + ['job'] = 'munka: %s', + ['sex'] = 'neme: %s', + ['dob'] = 'DOB: %s', + ['height'] = 'magasság: %s', + ['id'] = 'ID: %s', + ['bac'] = 'BAC: %s', + ['unknown'] = 'ismeretlen', + ['male'] = 'férfi', + ['female'] = 'nö', + -- Body Search Menu + ['guns_label'] = '--- FEGYVEREK ---', + ['inventory_label'] = '--- LELTÁR ---', + ['license_label'] = ' --- ENGEDÉLYEK ---', + ['confiscate'] = 'elkobzás %s', + ['confiscate_weapon'] = 'elkobzás %s %s töltényekkel együtt', + ['confiscate_inv'] = 'elkobzás %sx %s', + ['confiscate_dirty'] = 'fekete pénz elkobzása: %s Ft', + ['you_confiscated'] = 'elkoboztad %sx %s töle: %s', + ['got_confiscated'] = '%sx %s elkobozta: %s', + ['you_confiscated_account'] = 'elkoboztad %s Ft (%s) töle %s', + ['got_confiscated_account'] = '%s Ft (%s) was confiscated by %s', + ['you_confiscated_weapon'] = '%s elkobozta: %s ~o~%s töltényekkel együtt', + ['got_confiscated_weapon'] = '%s ~o~%s elkobozta: %s', + ['traffic_offense'] = 'forgalmi vétségek', + ['minor_offense'] = 'kisebb büncselekmények', + ['average_offense'] = 'közepes büncselekmények', + ['major_offense'] = 'súlyos büncselekmények', + ['fine_total'] = 'birság: %s', + -- Vehicle Info Menu + ['plate'] = 'rendszám: %s', + ['owner_unknown'] = 'tulajdonos: ismeretlen', + ['owner'] = 'tulajdonos: %s', + -- Boss Menu + ['open_bossmenu'] = 'nyomj [E] gombot a menü eléréséhez', + ['quantity_invalid'] = 'érvénytelen mennyiség', + ['have_withdrawn'] = 'Kivetted %sx %s', + ['have_deposited'] = 'Beraktad %sx %s', + ['quantity'] = 'mennyiség', + ['inventory'] = 'leltár', + ['police_stock'] = 'Állomány', + -- Misc + ['remove_prop'] = 'Nyomj [E] gombot az objektum törléséhez', + ['map_blip'] = 'LSPD', + ['unrestrained_timer'] = '...', +} diff --git a/[esx_addons]/esx_policejob/locales/ko.lua b/[esx_addons]/esx_policejob/locales/ko.lua new file mode 100644 index 00000000..f83119f3 --- /dev/null +++ b/[esx_addons]/esx_policejob/locales/ko.lua @@ -0,0 +1,148 @@ +Locales['ko'] = { + -- Cloakroom + ['cloakroom'] = '라커룸', + ['citizen_wear'] = '민간인 복장', + ['police_wear'] = '경찰 복장', + ['gilet_wear'] = '오렌지 반사 재킷', + ['bullet_wear'] = '방탄 조끼', + ['no_outfit'] = '당신에게 맞는 유니폼이 없습니다!', + ['open_cloackroom'] = '옷을 변경하려면 [E]를 누르십시오.', + -- Armory + ['remove_object'] = '오브젝트를 빼다', + ['deposit_object'] = '오브젝트를 두다', + ['get_weapon'] = '병기고에서 무기를 빼다', + ['put_weapon'] = '병기고에 무기를 넣다', + ['buy_weapons'] = '무기 구매', + ['armory'] = '병기고', + ['open_armory'] = '[E]를 눌러 병기고에 접근하십시오.', + ['armory_owned'] = '소유', + ['armory_free'] = '자유', + ['armory_item'] = '$%s', + ['armory_weapontitle'] = '병기고 - 무기 구매', + ['armory_componenttitle'] = '병기고 - 무기 부착물', + ['armory_bought'] = '당신은 $%s에 %s를 구매했습니다', + ['armory_money'] = '당신은 이 무기를 살 수 없습니다', + ['armory_hascomponent'] = '이 부착물이 장착되어 있습니다!', + ['get_weapon_menu'] = '병기고 - 무기 빼다', + ['put_weapon_menu'] = '병기고 - 무기 넣다', + -- Vehicles + ['vehicle_menu'] = '차량', + ['vehicle_blocked'] = '모든 스폰 지점이 차단되었습니다!', + ['garage_prompt'] = '[E]를 눌러 차량 동작에 액세스하십시오.', + ['garage_title'] = '차량 행동', + ['garage_stored'] = '저장됨', + ['garage_notstored'] = '차고가 아님', + ['garage_storing'] = '차량을 제거하려고 합니다. 주변에 아무도 없는지 확인하십시오.', + ['garage_has_stored'] = '차량이 차고에 보관되었습니다', + ['garage_has_notstored'] = '차고에 차량이 없습니다', + ['garage_notavailable'] = '차량이 차고에 저장되어 있지 않습니다', + ['garage_blocked'] = '차고 출구가 막혔습니다!', + ['garage_empty'] = '차고에 차량이 없습니다.', + ['garage_released'] = '차량이 출시되었습니다', + ['garage_store_nearby'] = '주변에 차량이 없습니다.', + ['garage_storeditem'] = '차고 열기', + ['garage_storeitem'] = '차량 정리', + ['garage_buyitem'] = '차량 상점', + ['garage_notauthorized'] = 'you\'re not authorized to buy this kind of vehicles.', + ['helicopter_prompt'] = '헬리콥터 동작에 액세스하려면 [E]를 누릅니다.', + ['shop_item'] = '$%s', + ['vehicleshop_title'] = '차량 판매점', + ['vehicleshop_confirm'] = '이 차량을 사고 싶습니까?', + ['vehicleshop_bought'] = '당신은 ~r~$%s에 %s를 구매했습니다', + ['vehicleshop_money'] = '이 차량을 살 수 없습니다', + ['vehicleshop_awaiting_model'] = '차량이 현재 다운로드 및 로딩중입니다. 잠시만 기다려주십시오', + ['confirm_no'] = '아니요', + ['confirm_yes'] = '예', + -- Service + ['service_max'] = '서비스에 진입 할 수 없습니다. 최대 임원 : %s/%s', + ['service_not'] = '당신은 서비스를 입력하지 않았습니다! 먼저 변경해야합니다.', + ['service_anonunce'] = '서비스 정보', + ['service_in'] = '당신은 서비스에 들어갔다, 환영합니다!', + ['service_in_announce'] = '%s가 서비스에 들어 왔습니다!', + ['service_out'] = '당신은 서비스를 떠났습니다.', + ['service_out_announce'] = '%s가 서비스를 떠났습니다.', + -- Action Menu + ['citizen_interaction'] = '시민 상호 작용', + ['vehicle_interaction'] = '차량 상호 작용', + ['object_spawner'] = '오브젝트 Spawner', + + ['id_card'] = '신분증', + ['search'] = '수색', + ['handcuff'] = '수갑을 채우다 / 수갑을 풀어주다', + ['drag'] = '호위', + ['put_in_vehicle'] = '차량에 넣다', + ['out_the_vehicle'] = '차량을 끌다', + ['fine'] = '벌금', + ['unpaid_bills'] = '미지급 벌금 관리', + ['license_check'] = '라이선스 관리', + ['license_revoke'] = '라이선스 취소', + ['license_revoked'] = '%s는 취소입니다!', + ['licence_you_revoked'] = '%s에 속하는 %s를 취소했습니다.', + ['no_players_nearby'] = '근처에 플레이어가 없습니다!', + ['being_searched'] = '경찰이 당신을 수색', + -- Vehicle interaction + ['vehicle_info'] = '차량 정보', + ['pick_lock'] = '차량 락픽', + ['vehicle_unlocked'] = '차량 잠금 해제', + ['no_vehicles_nearby'] = '근처에 차량이 없습니다', + ['impound'] = '차량을 견인하다', + ['impound_prompt'] = '견인을 취소하려면 [E]를 누릅니다', + ['impound_canceled'] = '당신은 견인을 취소했습니다', + ['impound_canceled_moved'] = '차량이 움직였기 때문에 견인이 취소되었습니다', + ['impound_successful'] = '당신은 차량을 견인했습니다', + ['search_database'] = '차량 정보', + ['search_database_title'] = '차량 정보 - 등록번호로 검색', + ['search_database_error_invalid'] = '유효한 등록 번호가 ~r~아닙니다.', + -- Traffic interaction + ['traffic_interaction'] = '교통 상호 작용', + ['cone'] = '원뿔', + ['barrier'] = '장벽', + ['spikestrips'] = '스파이크 스트립', + ['box'] = '상자', + ['cash'] = '현금 상자', + -- ID Card Menu + ['name'] = '이름: %s', + ['job'] = '직업: %s', + ['sex'] = '성별: %s', + ['dob'] = '생일: %s', + ['height'] = '키: %s', + ['bac'] = '혈중 알코올 농도: %s', + ['unknown'] = '알 수 없는', + ['male'] = '남자', + ['female'] = '여자', + -- Body Search Menu + ['guns_label'] = '--- 총 ---', + ['inventory_label'] = '--- 인벤토리 ---', + ['license_label'] = ' --- 라이선스 ---', + ['confiscate'] = '%s 을 압수', + ['confiscate_weapon'] = '%s 와 %s 총알을 압수', + ['confiscate_inv'] = '%sx %s 을 압수', + ['confiscate_dirty'] = '더러운 돈을 압수: $%s', + ['you_confiscated'] = '당신은 %sx %s을 %s에게서 압수했습니다', + ['got_confiscated'] = '%sx %s이(가) %s에 압수되었습니다', + ['you_confiscated_account'] = '당신은 $%s (%s) 를 %s 에게서 압수했습니다.', + ['got_confiscated_account'] = '$%s (%s) 이(가) %s에 압수되었습니다', + ['you_confiscated_weapon'] = '당신은 %s을 %s에게서 압수하고 ~o~%s 총알도 압수했습니다.', + ['got_confiscated_weapon'] = '당신의 %s와 ~o~%s 총알이 %s에 의해 압수되었습니다.', + ['traffic_offense'] = '교통 위반', + ['minor_offense'] = '경범죄', + ['average_offense'] = '일반 범죄', + ['major_offense'] = '심각한 범죄', + ['fine_total'] = '벌금: %s', + -- Vehicle Info Menu + ['plate'] = '번호판: %s', + ['owner_unknown'] = '소유자: 알 수 없는', + ['owner'] = '소유자: %s', + -- Boss Menu + ['open_bossmenu'] = '[E]를 눌러 메뉴를 엽니다.', + ['quantity_invalid'] = '유효하지 않은 수량', + ['have_withdrawn'] = '당신은 %sx %s 뺐다 ', + ['have_deposited'] = '당신은 %sx %s 넣었다', + ['quantity'] = '수량', + ['inventory'] = '인벤토리', + ['police_stock'] = '경찰 자리', + -- Misc + ['remove_prop'] = '[E]를 눌러 오브젝트를 삭제하십시오.', + ['map_blip'] = '경찰서', + ['unrestrained_timer'] = '당신의 수갑이 천천히 풀리는 것을 느낍니다.', +} diff --git a/[esx_addons]/esx_policejob/locales/nl.lua b/[esx_addons]/esx_policejob/locales/nl.lua new file mode 100644 index 00000000..49fb3d2e --- /dev/null +++ b/[esx_addons]/esx_policejob/locales/nl.lua @@ -0,0 +1,149 @@ +Locales['nl'] = { + -- Cloackroom + ['cloakroom'] = 'Kleedkamer', + ['citizen_wear'] = 'Burgerkleding', + ['police_wear'] = 'Politiekleding', + ['gilet_wear'] = 'Oranje reflecterend vest', + ['bullet_wear'] = 'Kogelwerend vest', + ['no_outfit'] = 'Er zijn geen passende uniformen voor jou!', + ['open_cloackroom'] = 'Druk op [E] om je kleding aan te passen.', + -- Wapenkamer + ['remove_object'] = 'Haal item uit kluis', + ['deposit_object'] = 'Leg item in kluis', + ['get_weapon'] = 'Haal wapen uit wapenkamer', + ['put_weapon'] = 'Leg wapen in wapenkamer', + ['buy_weapons'] = 'Koop wapens', + ['armory'] = 'Wapenkamer', + ['open_armory'] = 'Druk op [E] om de Wapenkamer te openen.', + ['armory_owned'] = 'In Bezit', + ['armory_free'] = 'Gratis', + ['armory_item'] = '€%s', + ['armory_weapontitle'] = 'Wapenkamer - Koop wapen', + ['armory_componenttitle'] = 'Wapenkamer - Weapon attachments', + ['armory_bought'] = 'Je hebt een %s gekocht voor €%s.', + ['armory_money'] = 'Je kan dit wap niet betalen.', + ['armory_hascomponent'] = 'je hebt dit weapon attachment al!', + ['get_weapon_menu'] = 'Wapenkamer - Pak wapen', + ['put_weapon_menu'] = 'Wapenkamer - Leg wapen weg', + -- Vehicles + ['vehicle_menu'] = 'Voertuig', + ['vehicle_blocked'] = 'Alle spawnpunten zijn geblokkeerd!', + ['garage_prompt'] = 'Druk op [E] om de Garage te openen.', + ['garage_title'] = 'Garage', + ['garage_stored'] = 'Beschikbaar', + ['garage_notstored'] = 'Niet in garage', + ['garage_storing'] = 'We proberen je voertuig weg te halen, zorg dat er niemand langs staat.', + ['garage_has_stored'] = 'Het voertuig is opgeslagen in de garage.', + ['garage_has_notstored'] = 'Er zijn geen voertuigen in de buurt gevonden.', + ['garage_notavailable'] = 'Je voertuig is niet opgeslagen in de garage.', + ['garage_blocked'] = 'Er zijn geen beschikbare spawnpunten!', + ['garage_empty'] = 'Je hebt geen voertuigen in je garage.', + ['garage_released'] = 'Je voertuig is uit de garage gehaald.', + ['garage_store_nearby'] = 'Er zijn geen voertuigen in de buurt gevonden.', + ['garage_storeditem'] = 'Open garage', + ['garage_storeitem'] = 'Zet voertuig in garage', + ['garage_buyitem'] = 'Voertuigwinkel', + ['garage_notauthorized'] = 'Je bent niet bevoegd dit type voertuigen te halen.', + ['helicopter_prompt'] = 'Druk op [E] om de Helikopter Garage te openen.', + ['shop_item'] = '€%s', + ['vehicleshop_title'] = 'Voertuigwinkel', + ['vehicleshop_confirm'] = 'Wil je dit voertuig kopen?', + ['vehicleshop_bought'] = 'Je hebt een %s gekocht voor ~r~€%s.', + ['vehicleshop_money'] = 'Je kan dit voertuig niet betalen.', + ['vehicleshop_awaiting_model'] = 'Dit voertuig is momenteel aan het DOWNLOADEN & LADEN, even geduld asjeblieft', + ['confirm_no'] = 'Nee', + ['confirm_yes'] = 'Ja', + -- Service + ['service_max'] = 'Je kan niet in dienst gaan, maximale aantal agenten in dienst: %s/%s', + ['service_not'] = 'Je bent niet in dienst! Kleed je eerst om.', + ['service_anonunce'] = 'Dienst Informatie', + ['service_in'] = 'Je bent nu in dienst, welkom!', + ['service_in_announce'] = 'Agent %s is nu in dienst!', + ['service_out'] = 'Je bent nu uit dienst, fijne dag.', + ['service_out_announce'] = 'Agent %s is nu niet meer in dienst.', + -- Action Menu + ['citizen_interaction'] = 'Burger Interacties', + ['vehicle_interaction'] = 'Voertuig Interacties', + ['object_spawner'] = 'Object Interacties', + + ['id_card'] = 'Identiteitsbewijs', + ['search'] = 'Fouilleren', + ['handcuff'] = 'Boeien / Ontboeien', + ['drag'] = 'Meenemen', + ['put_in_vehicle'] = 'Zet in voertuig', + ['out_the_vehicle'] = 'Haal uit voertuig', + ['fine'] = 'Boete opleggen', + ['unpaid_bills'] = 'Openstaande boetes bekijken', + ['license_check'] = 'Rijbewijzen beheren', + ['license_revoke'] = 'Rijbewijs invorderen', + ['license_revoked'] = 'Je %s is ingevorderd!', + ['licence_you_revoked'] = 'Je hebt een %s van %s ingevorderd.', + ['no_players_nearby'] = 'Geen spelers in de buurt!', + ['being_searched'] = 'Je wordt gefouilleerd door de Politie', + -- Voertuig Interactie + ['vehicle_info'] = 'Voertuig Informatie', + ['pick_lock'] = 'Breek voertuig open', + ['vehicle_unlocked'] = 'Voertuig ontgrendeld.', + ['no_vehicles_nearby'] = 'Er zijn geen voertuigen in de buurt gevonden.', + ['impound'] = 'Neem voertuig in beslag', + ['impound_prompt'] = 'Druk op [E] om de inbeslagname te annuleren.', + ['impound_canceled'] = 'Je hebt de inbeslagname geannuleerd.', + ['impound_canceled_moved'] = 'De inbeslagname is geannuleerd omdat het voertuig is bewogen.', + ['impound_successful'] = 'Het voertuig is in beslag genomen.', + ['search_database'] = 'Kenteken natrekken', + ['search_database_title'] = 'Voertuig informatie - zoek op kenteken', + ['search_database_error_invalid'] = 'Het ingevoerde kenteken is ~r~ongeldig.', + -- Objecten + ['traffic_interaction'] = 'Verkeers Interacties', + ['cone'] = 'Pion', + ['barrier'] = 'Barriere', + ['box'] = 'Box', + ['fence'] = 'PD Hek', + ['cash'] = 'Pallet met geld', + ['spikestrips'] = 'Spijkermatten', + -- ID Menu + ['name'] = 'Naam: %s', + ['job'] = 'Werk: %s', + ['sex'] = 'Geslacht: %s', + ['dob'] = 'Geboortedatum: %s', + ['height'] = 'Lengte: %s', + ['bac'] = 'BAC: %s', + ['unknown'] = 'onbekend', + ['male'] = 'man', + ['female'] = 'vrouw', + -- Fouilleren + ['guns_label'] = '--- Wapens ---', + ['inventory_label'] = '--- Inventaris ---', + ['license_label'] = ' --- Papieren ---', + ['confiscate'] = 'Neem %s in beslag', + ['confiscate_weapon'] = 'Neem een %s met %s kogels in beslag', + ['confiscate_inv'] = 'Neem %sx %s in beslag', + ['confiscate_dirty'] = 'Neem zwartgeld in beslag: €%s', + ['you_confiscated'] = 'Je hebt %sx %s van %s in beslag genomen.', + ['got_confiscated'] = '%sx %s is in beslag genomen door %s.', + ['you_confiscated_account'] = 'Je hebt €%s (%s) van %s in beslag genomen.', + ['got_confiscated_account'] = '€%s (%s) is in beslag genomen door %s.', + ['you_confiscated_weapon'] = 'Je hebt een %s van %s met ~o~%s kogels in beslag genomen.', + ['got_confiscated_weapon'] = 'Je %s met ~o~%s kogels is in beslag genomen door %s.', + ['traffic_offense'] = 'Verkeersovertreding', + ['minor_offense'] = 'Kleine overtreding', + ['average_offense'] = 'Gemiddelde overtreding', + ['major_offense'] = 'Grote overtreding', + ['fine_total'] = 'Boete: %s', + -- Voertuig Informatie + ['plate'] = 'Kenteken: %s', + ['owner_unknown'] = 'Eigenaar: Onbekend', + ['owner'] = 'Eigenaar: %s', + -- Boss Menu + ['open_bossmenu'] = 'Druk op [E] om het menu te openen.', + ['quantity_invalid'] = 'Ongeldig aantal', + ['have_withdrawn'] = 'Je hebt %sx %s gepakt.', + ['have_deposited'] = 'Je hebt %sx %s weg gelegt.', + ['quantity'] = 'Aantal', + ['inventory'] = 'Inventaris', + ['police_stock'] = 'Politie Voorraad', + -- Misc + ['remove_prop'] = 'Druk op [E] om dit object te verwijderen.', + ['map_blip'] = 'Politiebureau', + ['unrestrained_timer'] = 'Je voelt je handboeien langzaam wegglijden.', + } diff --git a/[esx_addons]/esx_policejob/locales/pl.lua b/[esx_addons]/esx_policejob/locales/pl.lua new file mode 100644 index 00000000..725e67dd --- /dev/null +++ b/[esx_addons]/esx_policejob/locales/pl.lua @@ -0,0 +1,148 @@ +Locales['pl'] = { + -- Cloakroom + ['cloakroom'] = 'szatnia', + ['citizen_wear'] = 'ubranie Cywilne', + ['police_wear'] = 'mundur', + ['gilet_wear'] = 'kamizelka odblaskowa', + ['bullet_wear'] = 'kamizelka kuloodporna', + ['no_outfit'] = 'brak ubrania', + ['open_cloackroom'] = 'naciśnij [E] aby zmienić ubranie.', + -- Armory + ['remove_object'] = 'weź przedmiot', + ['deposit_object'] = 'zdeponuj przedmiot', + ['get_weapon'] = 'weź broń', + ['put_weapon'] = 'odłóż broń', + ['buy_weapons'] = 'kup Broń', + ['armory'] = 'zbrojownia', + ['open_armory'] = 'naciśnij [E] żeby uzyskać dostęp do zbrojowni', + ['armory_owned'] = 'owned', + ['armory_free'] = 'free', + ['armory_item'] = '$%s', + ['armory_weapontitle'] = 'armory - Buy weapon', + ['armory_componenttitle'] = 'armory - Weapon attatchments', + ['armory_bought'] = 'you bought an %s for $%s', + ['armory_money'] = 'you cannot afford that weapon', + ['armory_hascomponent'] = 'you have that attatchment equiped!', + ['get_weapon_menu'] = 'armory - Withdraw Weapon', + ['put_weapon_menu'] = 'armory - Store Weapon', + -- Vehicles + ['vehicle_menu'] = 'vehicle', + ['vehicle_blocked'] = 'all available spawn points are currently blocked!', + ['garage_prompt'] = 'press [E] to access the Vehicle Actions.', + ['garage_title'] = 'vehicle Actions', + ['garage_stored'] = 'stored', + ['garage_notstored'] = 'not in garage', + ['garage_storing'] = 'we\'re attempting to remove the vehicle, make sure no players are around it.', + ['garage_has_stored'] = 'the vehicle has been stored in your garage', + ['garage_has_notstored'] = 'no nearby owned vehicles were found', + ['garage_notavailable'] = 'your vehicle is not stored in the garage.', + ['garage_blocked'] = 'there\'s no available spawn points!', + ['garage_empty'] = 'you don\'t have any vehicles in your garage.', + ['garage_released'] = 'your vehicle has been released from the garage.', + ['garage_store_nearby'] = 'there is no nearby vehicles.', + ['garage_storeditem'] = 'open garage', + ['garage_storeitem'] = 'store vehicle in garage', + ['garage_buyitem'] = 'vehicle shop', + ['garage_notauthorized'] = 'you\'re not authorized to buy this kind of vehicles.', + ['helicopter_prompt'] = 'press [E] to access the Helicopter Actions.', + ['shop_item'] = '$%s', + ['vehicleshop_title'] = 'vehicle Shop', + ['vehicleshop_confirm'] = 'do you want to buy this vehicle?', + ['vehicleshop_bought'] = 'you have bought %s for ~r~$%s', + ['vehicleshop_money'] = 'you cannot afford that vehicle', + ['vehicleshop_awaiting_model'] = 'the vehicle is currently DOWNLOADING & LOADING please wait', + ['confirm_no'] = 'no', + ['confirm_yes'] = 'yes', + -- Service + ['service_max'] = 'nie możesz wejść do służby, maksymalna liczba oficerów w służbie: %s/%s', + ['service_not'] = 'nie rozpoczynasz służby! Najpierw musisz się przebrać.', + ['service_anonunce'] = 'informacje o służbie', + ['service_in'] = 'rozpoczynasz służbe, Witaj!', + ['service_in_announce'] = 'operator %s rozpoczyna służbę!', + ['service_out'] = 'opuszczasz służbę.', + ['service_out_announce'] = 'operator %s opuszcza służbe.', + -- Action Menu + ['citizen_interaction'] = 'interakcja z cywilami', + ['vehicle_interaction'] = 'interakcja z pojazdami', + ['object_spawner'] = 'przedmioty do postawienia', + + ['id_card'] = 'dowód osobisty', + ['search'] = 'przeszukaj', + ['handcuff'] = 'zakuj/Rozkuj Kajdanki ', + ['drag'] = 'przemieść podejrzanego', + ['put_in_vehicle'] = 'wsadź do pojazdu', + ['out_the_vehicle'] = 'wyciągnij z pojazdu', + ['fine'] = 'mandaty', + ['unpaid_bills'] = 'zarządzaj niezapłaconymi rachunkami', + ['license_check'] = 'zarządzaj licencjami', + ['license_revoke'] = 'unieważnij licencje', + ['license_revoked'] = 'twoja licencja %s została unieważniona!', + ['licence_you_revoked'] = 'unieważniasz %s które należały do %s', + ['no_players_nearby'] = 'brak graczy w pobliżu', + ['being_searched'] = 'you are being searched by the Police', + -- Vehicle interaction + ['vehicle_info'] = 'informacje o pojeździe', + ['pick_lock'] = 'odblokuj pojazd', + ['vehicle_unlocked'] = 'pojazd Odblokowany', + ['no_vehicles_nearby'] = 'brak pojazdu w pobliżu', + ['impound'] = 'zajmij pojazd', + ['impound_prompt'] = 'naciśnij [E] żeby unieważnić zajęcie', + ['impound_canceled'] = 'unieważniasz zajęcie', + ['impound_canceled_moved'] = 'zajęcie zostało anulowane, ponieważ pojazd przemieścił się', + ['impound_successful'] = 'zajmujesz pojazd', + ['search_database'] = 'informacje o pojeździe', + ['search_database_title'] = 'informacjeo pojeździe - przeszukaj używając numeru rejestracyjnego', + ['search_database_error_invalid'] = 'to ~r~nie jest poprawny rnumer rejestracyjny', + -- Traffic interaction + ['traffic_interaction'] = 'interakcje dla ruchu drogowego', + ['cone'] = 'pachołek', + ['barrier'] = 'barierka', + ['spikestrips'] = 'kolczatka', + ['box'] = 'pudła', + ['cash'] = 'paleta z pieniędzmi', + -- ID Card Menu + ['name'] = 'name: %s', + ['job'] = 'praca: %s', + ['sex'] = 'płeć: %s', + ['dob'] = 'data urodzenia: %s', + ['height'] = 'wzrost: %s', + ['bac'] = 'BAC: %s', + ['unknown'] = 'nieznany', + ['male'] = 'mężczyzna', + ['female'] = 'kobieta', + -- Body Search Menu + ['guns_label'] = '--- Bronie ---', + ['inventory_label'] = '--- Ekwipunek ---', + ['license_label'] = ' --- Licenses ---', + ['confiscate'] = 'skonfiskuj %s', + ['confiscate_weapon'] = 'skonfiskuj %s z %s kulami', + ['confiscate_inv'] = 'skonfiskuj %s x %s', + ['confiscate_dirty'] = 'skonfiskuj brudne pieniądze: $%s', + ['you_confiscated'] = 'skonfiskowałeś %sx %s od %s', + ['got_confiscated'] = '%sx %s zostały skonfiskowane przez %s', + ['you_confiscated_account'] = 'skonfiskowałeś %s$ (%s) od %s', + ['got_confiscated_account'] = '%s$ (%s) zostały skonfiskowane przez %s', + ['you_confiscated_weapon'] = 'skonfiskowałeś %s od %s z ~o~%s pociskami', + ['got_confiscated_weapon'] = 'twój %s z ~o~%s kulami został skonfiskowany przez %s', + ['traffic_offense'] = 'wykroczenia drogowe', + ['minor_offense'] = 'niewielkie wykroczenia', + ['average_offense'] = 'średnie wykroczenia', + ['major_offense'] = 'duże wykroczenia', + ['fine_total'] = 'mandat: %s', + -- Vehicle Info Menu + ['plate'] = 'tablica rejestracyjna: %s', + ['owner_unknown'] = 'właściciel: Nieznany', + ['owner'] = 'właściciel: %s', + -- Boss Menu + ['open_bossmenu'] = 'naciśnij [E] aby otworzyć menu', + ['quantity_invalid'] = 'nieprawidłowa ilość', + ['have_withdrawn'] = 'wyjmujesz z depozytu %sx %s', + ['have_deposited'] = 'zdeponowano %sx %s', + ['quantity'] = 'ilość', + ['inventory'] = 'ekwipunek', + ['police_stock'] = 'zapasy policji', + -- Misc + ['remove_prop'] = 'naciśnij [E] aby usunąć ten obiekt', + ['map_blip'] = 'komisariat Policji', + ['unrestrained_timer'] = 'czujesz, że twoje kajdanki powoli tracą przyczepność i znikają.', +} diff --git a/[esx_addons]/esx_policejob/locales/si.lua b/[esx_addons]/esx_policejob/locales/si.lua new file mode 100644 index 00000000..c84e45db --- /dev/null +++ b/[esx_addons]/esx_policejob/locales/si.lua @@ -0,0 +1,149 @@ +Locales['si'] = { + -- Cloakroom + ['cloakroom'] = 'garderoba', + ['citizen_wear'] = 'civilna obleka', + ['police_wear'] = 'policijska oprema', + ['gilet_wear'] = 'oranžna odsevna jakna', + ['bullet_wear'] = 'neprebojni jopič', + ['no_outfit'] = 'ni uniforme, ki bi ti ustrezala!', + ['open_cloackroom'] = 'pritisnite [E], da zamenjate oblačila', + -- orožarna + ['remove_object'] = 'umakni predmet', + ['deposit_object'] = 'položi predmet', + ['get_weapon'] = 'umakni orožje iz orožarne', + ['put_weapon'] = 'shrani orožje v orožarno', + ['buy_weapons'] = 'kupi orožje', + ["armory"] = "armory", + ['open_armory'] = "pritisnite [E] za dostop do Armory.", + ['armory_owned'] = 'v lasti', + ['armory_free'] = 'free', + ['armory_item'] = '$%s', + ['armory_weapontitle'] = 'armory - Buy weapon', + ['armory_componenttitle'] = 'armory - Weapon attatchments', + ['armory_bought'] = 'kupil si %s za $%s', + ['armory_money'] = 'tega orožja si ne moreš privoščiti', + ['armory_hascomponent'] = 'imaš ta pripomoček opremljen!', + ['get_weapon_menu'] = 'armory - Withdraw Weapon', + ['put_weapon_menu'] = 'armory - Store Weapon', + -- Vozila + ['vehicle_menu'] = 'vehicle', + ['vehicle_blocked'] = 'vse razpoložljive točke za razmnoževanje so trenutno blokirane!', + ['garage_prompt'] = 'pritisnite [E] za dostop do Vehicle Actions.', + ['garage_title'] = 'vehicle Actions', + ['garage_stored'] = 'shranjeno', + ['garage_notstored'] = 'ni v garaži', + ['garage_storing'] = 'skušamo odstraniti vozilo, poskrbite, da v njegovi bližini ni igralcev.', + ['garage_has_stored'] = 'vozilo je bilo shranjeno v vaši garaži', + ['garage_has_notstored'] = 'v bližini ni bilo najdeno nobeno vozilo v lasti', + ['garage_notavailable'] = 'vaše vozilo ni shranjeno v garaži', + ['garage_blocked'] = 'ni razpoložljivih točk za porod!', + ['garage_empty'] = 'v garaži nimate nobenega vozila', + ['garage_released'] = 'vaše vozilo je bilo izpuščeno iz garaže.', + ['garage_store_nearby'] = 'v bližini ni vozil.', + ['garage_storeditem'] = 'odprta garaža', + ['garage_storeitem'] = 'shranite vozilo v garažo', + ['garage_buyitem'] = 'trgovina z vozili', + ['garage_notauthorized'] = 'niste pooblaščeni za nakup te vrste vozil.', + ['helicopter_prompt'] = 'pritisnite [E] za dostop do Helicopter Actions.', + ['shop_item'] = '$%s', + ['vehicleshop_title'] = 'trgovina z vozili', + ['vehicleshop_confirm'] = 'želite kupiti to vozilo?', + ['vehicleshop_bought'] = 'kupili ste %s za ~r~$%s', + ['vehicleshop_money'] = 'tega vozila si ne morete privoščiti', + ['vehicleshop_awaiting_model'] = 'vozilo se trenutno POKLJUČUJE in nalaga, počakajte', + ['confirm_no'] = 'ne', + ['confirm_yes'] = 'yes', + -- storitev + ['service_max'] = 'ne morete vstopiti v službo, največje število častnikov v službi: %s/%s', + ['service_not'] = 'niste vstopili v službo! Najprej se boste morali zamenjati.', + ['service_anonunce'] = 'informacije o službi', + ['service_in'] = 'vstopili ste v storitev, dobrodošli!', + ['service_in_announce'] = 'operater %s je vstopil v storitev!', + ['service_out'] = 'zapustili ste službo.', + ['service_out_announce'] = 'operater %s je zapustil svojo službo', + -- Akcijski meni + ['citizen_interaction'] = 'interakcija z državljani', + ['vehicle_interaction'] = 'interakcija z vozilom', + ['object_spawner'] = 'object Spawner', + + ['id_card'] = 'osebna izkaznica', + ['search'] = 'iskanje', + ['handcuff'] = 'prikleniti / odkleniti', + ['drag'] = 'escort', + ['put_in_vehicle'] = 'daj v vozilo', + ['out_the_vehicle'] = 'izvleči iz vozila', + ['fine'] = 'globa', + ['unpaid_bills'] = 'upravljati neplačane račune', + ['license_check'] = 'upravljaj licenco', + ['license_revoke'] = 'odvzem licence', + ['license_revoked'] = 'vaše %s je bilo revokirano!', + ['licence_you_revoked'] = 'preklical si %s, ki je pripadala %s', + ['no_players_nearby'] = 'v bližini ni igralca(-ov)!', + ['being_searched'] = 'searched vas išče Policija', + -- interakcija z vozilom + ['vehicle_info'] = 'informacije o vozilu', + ['pick_lock'] = 'zaklepanje vozila', + ['vehicle_unlocked'] = 'vozilo Unlocked', + ['no_vehicles_nearby'] = 'v bližini ni vozil', + ['impound'] = 'zapleniti vozilo', + ['impound_prompt'] = 'pritisnite [E], da prekličete impound', + ['impound_canceled'] = 'preklicali ste zaseg', + ['impound_canceled_moved'] = 'zaseg je bil preklican, ker se je vozilo premaknilo', + ['impound_successful'] = 'vozilo ste zasegli', + ['search_database'] = 'informacije o vozilu', + ['search_database_title'] = 'vehicle information - search with registration number', + ['search_database_error_invalid'] = "to je ~r~not a valid a registration number", + -- Traffic interaction +-- Prometna interakcija +['traffic_interaction'] = 'interakcijski promet', +['storže'] = 'stožec', +['barrier'] = 'pregrada', +['spikestrips'] = 'spikestrips', +['box'] = 'box', +['cash'] = 'škatla z gotovino', +-- Meni osebne izkaznice +['name'] = 'ime: %s', +['job'] = 'opravilo: %s', +['sex'] = 'spol: %s', +['dob'] = 'DOB: %s', +['height'] = 'height: %s', +['bac'] = 'BAC: %s', +['unknown'] = 'neznano', +['male'] = 'moški', +['female'] = 'ženska', +-- Meni za iskanje telesa +['guns_label'] = '--- Puške ---', +['inventory_label'] = '--- Inventar ---', +['license_label'] = ' --- Licence ---', +['confiscate'] = 'zapleni %s', +['confiscate_weapon'] = 'zapleni %s z %s kroglami', +['confiscate_inv'] = 'zapleni %sx %s', +['confiscate_dirty'] = 'zapleni umazan denar: $%s', +['you_confiscated'] = 'zaplenili ste %sx %s od %s', +['got_confiscated'] = '%sx %s je zaplenil %s', +['you_confiscated_account'] = 'zasegel si $%s (%s) od %s', +['got_confiscated_account'] = '$%s (%s) je zaplenil %s', +['you_confiscated_weapon'] = 'zasegel si %s od %s z ~o~%s kroglami', +['got_confiscated_weapon'] = 'tvojo %s s ~o~%s naboji je zaplenil %s', +['traffic_offense'] = 'prometni prekršek', +['minor_offense'] = 'manjši prekršek', +['average_offense'] = 'povprečni prekršek', +['major_offense'] = 'večji prekršek', +['fine_total'] = "globa: %s", +-- meni z informacijami o vozilu +['plate'] = 'tablica: %s', +['owner_unknown'] = "lastnik: neznan", +['owner'] = "zadnji: %s", +-- meni šefa +['open_bossmenu'] = 'pritisnite [E] za odprtje menija', +['quantity_invalid'] = 'neveljavna količina', +['have_withdrawn'] = 'umaknili ste %sx %s', +['have_deposited'] = 'deponirali ste %sx %s', +['količina'] = 'količina', +['inventory'] = 'inventory', +['police_stock'] = "policijska zaloga", +-- Razno +['remove_prop'] = 'pritisnite [E], da izbrišete predmet', +['map_blip'] = 'policijska postaja', +['unrestrained_timer'] = 'čutiš, kako se ti izgubljaš oprijem in kako se ti razblinjajo okovi.', +} diff --git a/[esx_addons]/esx_policejob/locales/sv.lua b/[esx_addons]/esx_policejob/locales/sv.lua new file mode 100644 index 00000000..e6e6673f --- /dev/null +++ b/[esx_addons]/esx_policejob/locales/sv.lua @@ -0,0 +1,148 @@ +Locales['sv'] = { + -- Cloakroom + ['cloakroom'] = 'omklädningsrum', + ['citizen_wear'] = 'civila kläder', + ['police_wear'] = 'polisuniform', + ['gilet_wear'] = 'reflektiv väst', + ['bullet_wear'] = 'skottsäker väst', + ['no_outfit'] = 'det finns ingen uniform som passar dig!', + ['open_cloackroom'] = 'tryck [E] för att välja kläder.', + -- Armory + ['remove_object'] = 'ta ut objekt', + ['deposit_object'] = 'lägg in objekt', + ['get_weapon'] = 'ta ut vapen', + ['put_weapon'] = 'lägg in vapen', + ['buy_weapons'] = 'köp vapen', + ['armory'] = 'vapenförråd', + ['open_armory'] = 'tryck [E] för att komma åt vapenförrådet.', + ['armory_owned'] = 'ägd', + ['armory_free'] = 'gratis', + ['armory_item'] = '%s SEK', + ['armory_weapontitle'] = 'vapenförråd - Köp vapen', + ['armory_componenttitle'] = 'vapenförråd - Vapen tillbehör', + ['armory_bought'] = 'du köpte %s för %s SEK', + ['armory_money'] = 'du har inte råd med det vapnet', + ['armory_hascomponent'] = 'du har redan det tillbehöret!', + ['get_weapon_menu'] = 'vapenförråd - Ta ut vapen', + ['put_weapon_menu'] = 'vapenförråd - Spara vapen', + -- Vehicles + ['vehicle_menu'] = 'fordon', + ['vehicle_blocked'] = 'det finns ingen tillgänglig plats att ställa ut fordonet på!', + ['garage_prompt'] = 'tryck [E] för att komma åt garaget.', + ['garage_title'] = 'garage', + ['garage_stored'] = 'inställt', + ['garage_notstored'] = 'uttaget', + ['garage_storing'] = 'vi håller på att ställa in ditt fordon, se till att ingen är i närheten.', + ['garage_has_stored'] = 'fordonet har ställts in i garaget', + ['garage_has_notstored'] = 'inget ägt fordon finns i närheten', + ['garage_notavailable'] = 'ditt fordon är inte inställt i ditt garage.', + ['garage_blocked'] = 'det finns ingen tillgänglig plats att ställa ut fordonet på!', + ['garage_empty'] = 'du har inga fordon i ditt garage.', + ['garage_released'] = 'ditt fordon har tagits ut från garaget.', + ['garage_store_nearby'] = 'det finns inget fordon i närheten.', + ['garage_storeditem'] = 'öppna garage', + ['garage_storeitem'] = 'ställ in fordon', + ['garage_buyitem'] = 'fordonshandel', + ['garage_notauthorized'] = 'du har inte tillgång till att köpa dessa fordon.', + ['helicopter_prompt'] = 'tryck [E] för att komma åt helikoptergaraget.', + ['shop_item'] = '%s SEK', + ['vehicleshop_title'] = 'fordonshandel', + ['vehicleshop_confirm'] = 'vill du köpa detta fordon?', + ['vehicleshop_bought'] = 'du köpte %s för %s SEK', + ['vehicleshop_money'] = 'du har inte råd med detta fordon', + ['vehicleshop_awaiting_model'] = 'fordonet LADDAS NED OCH LADDAS IN var god vänta', + ['confirm_no'] = 'nej', + ['confirm_yes'] = 'ja', + -- Service + ['service_max'] = 'du kan inte gå tjänst, poliser i tjänst: %s/%s', + ['service_not'] = 'du är inte i tjänst! Byt om för att gå in i tjänst.', + ['service_anonunce'] = 'tjänsteinformation', + ['service_in'] = 'du deltog i tjänst, välkommen!', + ['service_in_announce'] = 'operatör %s har deltagit tjänst!', + ['service_out'] = 'du har lämnat tjänst.', + ['service_out_announce'] = 'operatör %s har lämnat deras tjänst.', + -- Action Menu + ['citizen_interaction'] = 'handlingar mot civila', + ['vehicle_interaction'] = 'handlingar på bilar', + ['object_spawner'] = 'ta fram ett objekt', + + ['id_card'] = 'ID-Kort', + ['search'] = 'sök igenom', + ['handcuff'] = 'handbojor', + ['drag'] = 'dra', + ['put_in_vehicle'] = 'sätt in i fordon', + ['out_the_vehicle'] = 'dra ut ur fordon', + ['fine'] = 'Ge böter', + ['unpaid_bills'] = 'se obetalda räkningar', + ['license_check'] = 'se licenser', + ['license_revoke'] = 'återkalla licenser', + ['license_revoked'] = 'ditt %s har blivit återkallat!', + ['licence_you_revoked'] = 'du återkallade ett %s som tillhörde %s', + ['no_players_nearby'] = 'det finns ingen i närheten', + ['being_searched'] = 'du blir visiterad av Polisen', + -- Vehicle interaction + ['vehicle_info'] = 'fordon', + ['pick_lock'] = 'bryt upp fordon', + ['vehicle_unlocked'] = 'fordonet har låsts upp', + ['no_vehicles_nearby'] = 'inga fordon i närheten', + ['impound'] = 'bärga fordonet', + ['impound_prompt'] = 'tryck [E] för att avbryta bärgningen', + ['impound_canceled'] = 'du avbröt bärgningen', + ['impound_canceled_moved'] = 'bärgningen avbröts på grund av att fordonet har rört sig', + ['impound_successful'] = 'du har bärgat fordonet', + ['search_database'] = 'fordonsuppgifter', + ['search_database_title'] = 'fordonsuppgifter - sök med registreringsnummer', + ['search_database_error_invalid'] = 'det är ~r~inte ett giltigt registreringsnummer', + -- Traffic interaction + ['traffic_interaction'] = 'trafiksåtgärder', + ['cone'] = 'kon', + ['barrier'] = 'barriär', + ['spikestrips'] = 'spikmatta', + ['box'] = 'låda', + ['cash'] = 'låda med pengar', + -- ID Card Menu + ['name'] = 'namn: %s', + ['job'] = 'jobb: %s', + ['sex'] = 'kön: %s', + ['dob'] = 'födelsedatum: %s', + ['height'] = 'längd: %s', + ['bac'] = 'alkohol i blodet: %s', + ['unknown'] = 'okänt', + ['male'] = 'man', + ['female'] = 'kvinna', + -- Body Search Menu + ['guns_label'] = '--- Vapen ---', + ['inventory_label'] = '--- Inventory ---', + ['license_label'] = ' --- Licenser ---', + ['confiscate'] = 'beslagta %s', + ['confiscate_weapon'] = 'beslagta %s med %s skott', + ['confiscate_inv'] = 'beslagta %sx %s', + ['confiscate_dirty'] = 'beslagta svarta pengar: %s SEK', + ['you_confiscated'] = 'du beslagtog %sx %s från %s', + ['got_confiscated'] = '%sx %s beslagtogs av %s', + ['you_confiscated_account'] = 'du beslagtog %s SEK (%s) från %s', + ['got_confiscated_account'] = '%s SEK (%s) beslagtogs av %s', + ['you_confiscated_weapon'] = 'du beslagtog %s från %s med ~o~%s skott', + ['got_confiscated_weapon'] = 'din %s med ~o~%s skott beslagtogs av %s', + ['traffic_offense'] = 'brott mot trafikregler', + ['minor_offense'] = 'mindre lagbrott', + ['average_offense'] = 'medel lagbrott', + ['major_offense'] = 'grovt lagbrott', + ['fine_total'] = 'böter: %s', + -- Vehicle Info Menu + ['plate'] = 'reg nummer: %s', + ['owner_unknown'] = 'ägare: Okänt', + ['owner'] = 'ägare: %s', + -- Boss Menu + ['open_bossmenu'] = 'tryck [E] för att öppna menyn', + ['quantity_invalid'] = 'otillgängligt antal', + ['have_withdrawn'] = 'du har tagit ut x%s %s', + ['have_deposited'] = 'du har lagrat x%s %s', + ['quantity'] = 'antal', + ['inventory'] = 'förråd', + ['police_stock'] = 'polisförråd', + -- Misc + ['remove_prop'] = 'tryck [E] för att ta bort objektet', + ['map_blip'] = 'polisstation', + ['unrestrained_timer'] = 'dina handklovar har försvunnit', +} diff --git a/[esx_addons]/esx_policejob/locales/tr.lua b/[esx_addons]/esx_policejob/locales/tr.lua new file mode 100644 index 00000000..d121c3e6 --- /dev/null +++ b/[esx_addons]/esx_policejob/locales/tr.lua @@ -0,0 +1,148 @@ +Locales['tr'] = { + -- Cloakroom + ['cloakroom'] = 'kıyafet Odası', + ['citizen_wear'] = 'sivil kıyafet', + ['police_wear'] = 'polis kıyafeti', + ['gilet_wear'] = 'turuncu ceket', + ['bullet_wear'] = 'kurşun geçirmez yelek', + ['no_outfit'] = ' üniforma yok!', + ['open_cloackroom'] = 'Kıyafetinizi değiştirmek için [E] tuşuna basın. ', + -- Armory + ['remove_object'] = 'obje Al', + ['deposit_object'] = 'obje Koy', + ['get_weapon'] = 'cephanelikten silah al', + ['put_weapon'] = 'cephaneliğe silah koy', + ['buy_weapons'] = 'silah satın al', + ['armory'] = 'cephanelik', + ['open_armory'] = 'Cephaneliğe erişmek için [E] tuşuna basın.', + ['armory_owned'] = 'sahipsin', + ['armory_free'] = 'bedava', + ['armory_item'] = '%s TL', + ['armory_weapontitle'] = 'cephanelik - Silah al', + ['armory_componenttitle'] = 'cephanelik - Silah eklentileri', + ['armory_bought'] = ' %s Lira Karşılığında %s satın aldın', + ['armory_money'] = 'yeteri kadar paran yok.', + ['armory_hascomponent'] = 'bu eklentiye zaten sahipsin !', + ['get_weapon_menu'] = 'cephanelik - Silah al', + ['put_weapon_menu'] = 'cephanelik - Silah koy', + -- Vehicles + ['vehicle_menu'] = 'araç', + ['vehicle_blocked'] = 'tüm Spawn Noktaları Bloke Edilmiş!', + ['garage_prompt'] = 'Araç eylemlerine ulaşmak için [E] tuşuna basınız.', + ['garage_title'] = 'araç eylemleri', + ['garage_stored'] = 'garajda', + ['garage_notstored'] = 'garajda değil', + ['garage_storing'] = 'arac garaja koyuluyor ama, etrafınızda oyuncu olmadığına emin olun .', + ['garage_has_stored'] = 'araç garajına koyuldu', + ['garage_has_notstored'] = 'yakında sana ait araç yok', + ['garage_notavailable'] = 'aracınız garajda değil.', + ['garage_blocked'] = 'müsait araç çıkarma noktası yok!', + ['garage_empty'] = 'garajında bir araç yok.', + ['garage_released'] = 'aracını garajdan çıkardın.', + ['garage_store_nearby'] = 'yakında araç yok.', + ['garage_storeditem'] = 'garajı Aç', + ['garage_storeitem'] = 'aracı garaja koy', + ['garage_buyitem'] = 'araç Galerisi', + ['garage_notauthorized'] = 'galeriye erişim iznin yok', + ['helicopter_prompt'] = 'Helikopter eylemlerine erişmek için [E] tuşuna basınız.', + ['shop_item'] = '%s TL', + ['vehicleshop_title'] = 'araç galerisi', + ['vehicleshop_confirm'] = 'bu aracı satın almak istiyor musun?', + ['vehicleshop_bought'] = '%s lira Karşılığında %s Satın aldın ', + ['vehicleshop_money'] = 'bu araca paran yetmiyor', + ['vehicleshop_awaiting_model'] = 'araç Yükleniyor lütfen bekleyiniz', + ['confirm_no'] = 'hayır', + ['confirm_yes'] = 'evet', + -- Service + ['service_max'] = 'hizmete Giremezsin,Hizmette yeterli polis var: %s/%s', + ['service_not'] = 'hizmete Giremedin! İlk Önce Kıyafetlerini Değiştirmelisin.', + ['service_anonunce'] = 'hizmet Bilgisi', + ['service_in'] = 'hizmete Giriş Yaptın, Hoşgeldin!', + ['service_in_announce'] = 'operatör %s servise giriş yaptı!', + ['service_out'] = 'hizmetten Çıktın.', + ['service_out_announce'] = 'operatör %s servisten çıkış yaptı.', + -- Action Menu + ['citizen_interaction'] = 'vatandaş Etkileşimi', + ['vehicle_interaction'] = 'araç Etkileşimi', + ['object_spawner'] = 'obje Yerleştirici', + + ['id_card'] = 'kimlik Kartı', + ['search'] = 'ara', + ['handcuff'] = 'kelepçele / Kelepçeyi Çöz', + ['drag'] = 'taşı', + ['put_in_vehicle'] = 'araca Koy', + ['out_the_vehicle'] = 'araçtan Çıkar', + ['fine'] = 'ceza', + ['unpaid_bills'] = 'ödenmemiş Faturaları Kontrol Et', + ['license_check'] = 'lisansları Kontrol Et', + ['license_revoke'] = 'lisansa El Koy', + ['license_revoked'] = '%s lisansın iptal edildi!', + ['licence_you_revoked'] = '%s adlı kullanıcıya ait %s adlı lisansına el koydun.', + ['no_players_nearby'] = 'yakında oyuncu yok!', + ['being_searched'] = 'üstün searched - Polis tarafından aranıyor', + -- Vehicle interaction + ['vehicle_info'] = 'araç Bilgisi', + ['pick_lock'] = 'aracın kilidini aç', + ['vehicle_unlocked'] = 'araç açıldı', + ['no_vehicles_nearby'] = 'yakınlarda araç yok', + ['impound'] = 'araca el koy', + ['impound_prompt'] = 'el konulan aracı geri bırakmak için [E] tuşuna basın', + ['impound_canceled'] = 'el konulma kaldırıldı', + ['impound_canceled_moved'] = 'araç hareket ettiği için el koyma iptal edildi', + ['impound_successful'] = 'araca el koydun', + ['search_database'] = 'araç bilgileri', + ['search_database_title'] = 'araç bilgileri - araç kayıt numarasından ara', + ['search_database_error_invalid'] = 'bu doğru bir araç kayıt numarası değil', + -- Traffic interaction + ['traffic_interaction'] = 'traik işlemleri', + ['cone'] = 'koni', + ['barrier'] = 'bariyer', + ['spikestrips'] = 'emniyet şeridi', + ['box'] = 'kutu', + ['cash'] = 'para kurusu', + -- ID Card Menu + ['name'] = 'isim: %s', + ['job'] = 'meslek: %s', + ['sex'] = 'cinsiyet: %s', + ['dob'] = 'doğum Tarihi: %s', + ['height'] = 'boy: %s', + ['bac'] = 'BAC: %s', + ['unknown'] = 'bilinmiyor', + ['male'] = 'erkek', + ['female'] = 'kadın', + -- Body Search Menu + ['guns_label'] = '--- Silahlar ---', + ['inventory_label'] = '--- Envanter ---', + ['license_label'] = ' --- Lisanslar ---', + ['confiscate'] = 'el koy %s', + ['confiscate_weapon'] = 'el koyuldu %s ve %s mermi', + ['confiscate_inv'] = 'el koyuldu %sx %s', + ['confiscate_dirty'] = 'kara paraya el koyuldu: %s TL', + ['you_confiscated'] = '%s adlı kişiden %sx %s aldın ', + ['got_confiscated'] = '%s adlı kişi %sx %s eşyanı aldı', + ['you_confiscated_account'] = '%s adlı oyuncunun %s TL (%s) kara parasına el konuldu', + ['got_confiscated_account'] = '%s TL (%s) kara parana el konuldu %s', + ['you_confiscated_weapon'] = '%s adlı oyuncunun %s ve ~o~%s mermilerine el konuldu', + ['got_confiscated_weapon'] = '%s ve ~o~%s mermilerine %s tarafından el konuldu', + ['traffic_offense'] = 'trafik cezaları', + ['minor_offense'] = 'küçük suç', + ['average_offense'] = 'ortalama suç', + ['major_offense'] = 'büyük suç', + ['fine_total'] = 'ceza: %s', + -- Vehicle Info Menu + ['plate'] = 'plaka: %s', + ['owner_unknown'] = 'sahibi: Bilinmiyor', + ['owner'] = 'sahibi: %s', + -- Boss Menu + ['open_bossmenu'] = 'menüyü açmak için [E] tuşuna basın', + ['quantity_invalid'] = 'miktar hatalı', + ['have_withdrawn'] = '%sx %s çekildi', + ['have_deposited'] = '%sx %s yatırıldı', + ['quantity'] = 'miktar', + ['inventory'] = 'envanter', + ['police_stock'] = 'polis Stoğu', + -- Misc + ['remove_prop'] = 'objeyi silmek için [E] tuşuna basın', + ['map_blip'] = 'polis Karakolu', + ['unrestrained_timer'] = 'ellerinin yavaşça çözüldüğünü hissediyorsun.', + } diff --git a/[esx_addons]/esx_policejob/localization/de_esx_policejob.sql b/[esx_addons]/esx_policejob/localization/de_esx_policejob.sql new file mode 100644 index 00000000..648011fa --- /dev/null +++ b/[esx_addons]/esx_policejob/localization/de_esx_policejob.sql @@ -0,0 +1,89 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_police','Polizei',1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_police','Polizei',1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_police', 'Polizei', 1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('police', 'Polizei') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('police',0,'recruit','Rekrut',20,'{}','{}'), + ('police',1,'officer','Officier',40,'{}','{}'), + ('police',2,'sergeant','Sergent',60,'{}','{}'), + ('police',3,'lieutenant','Lieutenant',85,'{}','{}'), + ('police',4,'boss','Commandant',100,'{}','{}') +; + +CREATE TABLE `fine_types` ( + `id` int NOT NULL AUTO_INCREMENT, + `label` varchar(255) DEFAULT NULL, + `amount` int DEFAULT NULL, + `category` int DEFAULT NULL, + + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `fine_types` VALUES ('1', 'Missbrauchen der Hupe', '30', '0'); +INSERT INTO `fine_types` VALUES ('2', 'Vorfahrtstraße missachtet', '40', '0'); +INSERT INTO `fine_types` VALUES ('3', 'Gegenverkehr', '250', '0'); +INSERT INTO `fine_types` VALUES ('4', 'Unbefugtes Wenden', '250', '0'); +INSERT INTO `fine_types` VALUES ('5', 'Off-Road fahren', '170', '0'); +INSERT INTO `fine_types` VALUES ('6', 'Sicherheitsrichtlinien missachtet', '30', '0'); +INSERT INTO `fine_types` VALUES ('7', 'Gefährliches halten', '150', '0'); +INSERT INTO `fine_types` VALUES ('8', 'Nicht erlaubtes parken', '70', '0'); +INSERT INTO `fine_types` VALUES ('9', 'Nicht respektieren des Rechtsfahrgebotes', '70', '0'); +INSERT INTO `fine_types` VALUES ('10', 'Nicht einhaltender Priorität eines Rettungsfahrzeuges', '90', '0'); +INSERT INTO `fine_types` VALUES ('11', 'Nicht angehalten nach Aufforderung', '105', '0'); +INSERT INTO `fine_types` VALUES ('12', 'Bei Rot über die Ampel', '130', '0'); +INSERT INTO `fine_types` VALUES ('13', 'gefährliches Überholmanöver', '100', '0'); +INSERT INTO `fine_types` VALUES ('14', 'Fahrzeug nicht Verkehrstauglich', '100', '0'); +INSERT INTO `fine_types` VALUES ('15', 'Fahren ohne Lizenz', '1500', '0'); +INSERT INTO `fine_types` VALUES ('16', 'Hit and Run', '800', '0'); +INSERT INTO `fine_types` VALUES ('17', 'zu schnell < 5 kmh', '90', '0'); +INSERT INTO `fine_types` VALUES ('18', 'zu schnell 5-15 kmh', '120', '0'); +INSERT INTO `fine_types` VALUES ('19', 'zu schnell 15-30 kmh', '180', '0'); +INSERT INTO `fine_types` VALUES ('20', 'zu schnell > 30 kmh', '300', '0'); +INSERT INTO `fine_types` VALUES ('21', 'Verkehrsbehinderung', '110', '1'); +INSERT INTO `fine_types` VALUES ('22', 'Nicht Benutzung öffentlicher Straßen', '90', '1'); +INSERT INTO `fine_types` VALUES ('23', 'Störung der öffentlichen Ordnung', '90', '1'); +INSERT INTO `fine_types` VALUES ('24', 'Polizeieinsatz behindern', '130', '1'); +INSERT INTO `fine_types` VALUES ('25', 'Beildigung an Zivilist', '75', '1'); +INSERT INTO `fine_types` VALUES ('26', 'Polizist geringschätzen', '110', '1'); +INSERT INTO `fine_types` VALUES ('27', 'verbale Bedrohung an Zivilist', '90', '1'); +INSERT INTO `fine_types` VALUES ('28', 'verbale Bedrohung an Polizist', '150', '1'); +INSERT INTO `fine_types` VALUES ('29', 'Illegale Demonstration', '250', '1'); +INSERT INTO `fine_types` VALUES ('30', 'versuchte Bestechung', '1500', '1'); +INSERT INTO `fine_types` VALUES ('31', 'Mit Messer in der Stadt bewaffnet', '120', '2'); +INSERT INTO `fine_types` VALUES ('32', 'Mit tötlicher Waffe bewaffnet', '300', '2'); +INSERT INTO `fine_types` VALUES ('33', 'Unbefugter Besitz einer Waffe (Standard-Lizenz)', '600', '2'); +INSERT INTO `fine_types` VALUES ('34', 'Illegale Waffe', '700', '2'); +INSERT INTO `fine_types` VALUES ('35', 'Einbruch/Aufbruch', '300', '2'); +INSERT INTO `fine_types` VALUES ('36', 'Autodiebstahl', '1800', '2'); +INSERT INTO `fine_types` VALUES ('37', 'Drogenverkauf', '1500', '2'); +INSERT INTO `fine_types` VALUES ('38', 'Drogen herstellen', '1500', '2'); +INSERT INTO `fine_types` VALUES ('39', 'Drogenbesitz', '650', '2'); +INSERT INTO `fine_types` VALUES ('40', 'Zivile Geisel genommen', '1500', '2'); +INSERT INTO `fine_types` VALUES ('41', 'Geiselnahme', '2000', '2'); +INSERT INTO `fine_types` VALUES ('42', 'Waghalsiges Lenken', '650', '2'); +INSERT INTO `fine_types` VALUES ('43', 'Ladenraub', '650', '2'); +INSERT INTO `fine_types` VALUES ('44', 'Bankraub', '1500', '2'); +INSERT INTO `fine_types` VALUES ('45', 'Schießen auf Zivilisten', '2000', '3'); +INSERT INTO `fine_types` VALUES ('46', 'Schießen auf Beamten', '2500', '3'); +INSERT INTO `fine_types` VALUES ('47', 'versuchterMord an Zivilisten', '3000', '3'); +INSERT INTO `fine_types` VALUES ('48', 'versuchter Mord an einem Beamten', '5000', '3'); +INSERT INTO `fine_types` VALUES ('49', 'Mord an Zivilisten', '10000', '3'); +INSERT INTO `fine_types` VALUES ('50', 'Mord an Beamten', '30000', '3'); +INSERT INTO `fine_types` VALUES ('51', 'versehentlicher Mord', '1800', '3'); +INSERT INTO `fine_types` VALUES ('52', 'Firmenbetrug', '2000', '2'); +; diff --git a/[esx_addons]/esx_policejob/localization/en_esx_policejob.sql b/[esx_addons]/esx_policejob/localization/en_esx_policejob.sql new file mode 100644 index 00000000..cb2412dd --- /dev/null +++ b/[esx_addons]/esx_policejob/localization/en_esx_policejob.sql @@ -0,0 +1,90 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_police', 'Police', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_police', 'Police', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_police', 'Police', 1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('police', 'Police') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('police',0,'recruit','Recruit',20,'{}','{}'), + ('police',1,'officer','Officer',40,'{}','{}'), + ('police',2,'sergeant','Sergeant',60,'{}','{}'), + ('police',3,'lieutenant','Lieutenant',85,'{}','{}'), + ('police',4,'boss','Chief',100,'{}','{}') +; + +CREATE TABLE `fine_types` ( + `id` int NOT NULL AUTO_INCREMENT, + `label` varchar(255) DEFAULT NULL, + `amount` int DEFAULT NULL, + `category` int DEFAULT NULL, + + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `fine_types` (label, amount, category) VALUES + ('Misuse of a horn', 30, 0), + ('Illegally Crossing a continuous Line', 40, 0), + ('Driving on the wrong side of the road', 250, 0), + ('Illegal U-Turn', 250, 0), + ('Illegally Driving Off-road', 170, 0), + ('Refusing a Lawful Command', 30, 0), + ('Illegally Stopping a Vehicle', 150, 0), + ('Illegal Parking', 70, 0), + ('Failing to Yield to the right', 70, 0), + ('Failure to comply with Vehicle Information', 90, 0), + ('Failing to stop at a Stop Sign ', 105, 0), + ('Failing to stop at a Red Light', 130, 0), + ('Illegal Passing', 100, 0), + ('Driving an illegal Vehicle', 100, 0), + ('Driving without a License', 1500, 0), + ('Hit and Run', 800, 0), + ('Exceeding Speeds Over < 5 mph', 90, 0), + ('Exceeding Speeds Over 5-15 mph', 120, 0), + ('Exceeding Speeds Over 15-30 mph', 180, 0), + ('Exceeding Speeds Over > 30 mph', 300, 0), + ('Impeding traffic flow', 110, 1), + ('Public Intoxication', 90, 1), + ('Disorderly conduct', 90, 1), + ('Obstruction of Justice', 130, 1), + ('Insults towards Civilans', 75, 1), + ('Disrespecting of an LEO', 110, 1), + ('Verbal Threat towards a Civilan', 90, 1), + ('Verbal Threat towards an LEO', 150, 1), + ('Providing False Information', 250, 1), + ('Attempt of Corruption', 1500, 1), + ('Brandishing a weapon in city Limits', 120, 2), + ('Brandishing a Lethal Weapon in city Limits', 300, 2), + ('No Firearms License', 600, 2), + ('Possession of an Illegal Weapon', 700, 2), + ('Possession of Burglary Tools', 300, 2), + ('Grand Theft Auto', 1800, 2), + ('Intent to Sell/Distrube of an illegal Substance', 1500, 2), + ('Frabrication of an Illegal Substance', 1500, 2), + ('Possession of an Illegal Substance ', 650, 2), + ('Kidnapping of a Civilan', 1500, 2), + ('Kidnapping of an LEO', 2000, 2), + ('Robbery', 650, 2), + ('Armed Robbery of a Store', 650, 2), + ('Armed Robbery of a Bank', 1500, 2), + ('Assault on a Civilian', 2000, 3), + ('Assault of an LEO', 2500, 3), + ('Attempt of Murder of a Civilian', 3000, 3), + ('Attempt of Murder of an LEO', 5000, 3), + ('Murder of a Civilian', 10000, 3), + ('Murder of an LEO', 30000, 3), + ('Involuntary manslaughter', 1800, 3), + ('Fraud', 2000, 2); +; diff --git a/[esx_addons]/esx_policejob/localization/es_esx_policejob.sql b/[esx_addons]/esx_policejob/localization/es_esx_policejob.sql new file mode 100644 index 00000000..df99de8b --- /dev/null +++ b/[esx_addons]/esx_policejob/localization/es_esx_policejob.sql @@ -0,0 +1,90 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_police', 'Policía', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_police', 'Policía', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_police', 'Policía', 1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('police', 'Policía') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('police',0,'recruit','Recluta',20,'{}','{}'), + ('police',1,'officer','Oficial',40,'{}','{}'), + ('police',2,'sergeant','Sargento',60,'{}','{}'), + ('police',3,'lieutenant','Teniente',85,'{}','{}'), + ('police',4,'boss','Jefe',100,'{}','{}') +; + +CREATE TABLE `fine_types` ( + `id` int NOT NULL AUTO_INCREMENT, + `label` varchar(255) DEFAULT NULL, + `amount` int DEFAULT NULL, + `category` int DEFAULT NULL, + + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `fine_types` (label, amount, category) VALUES + ('Mal uso del claxon', 30, 0), + ('Cruzar indebidamente la línea continua', 40, 0), + ('Conducir por el lado incorrecto de la carretera', 250, 0), + ('Giro indebido', 250, 0), + ('Conducir indebidamente fuera de la carretera', 170, 0), + ('No hacer caso a una orden de un agente', 30, 0), + ('Detener el vehículo de forma incorrecta', 150, 0), + ('Aparcar en un lugar no habilitado', 70, 0), + ('No ceder al girar a la derecha', 70, 0), + ('No cumplir con los datos de tu vehículo', 90, 0), + ('No pararse en una señal de STOP', 105, 0), + ('No pararse en un semáforo cuando está en rojo', 130, 0), + ('Cruzar indebidamente', 100, 0), + ('Conducir un coche no permitido', 100, 0), + ('Conducir sin carnet de conducción', 1500, 0), + ('Chocar y darse a la fuga', 800, 0), + ('Exceder la velocidad permitida en 5 km/h', 90, 0), + ('Exceder la velocidad permitida entre 5 y 15 km/h', 120, 0), + ('Exceder la velocidad permitida entre 15 y 30 km/h', 180, 0), + ('Exceder la velocidad permitida más de 30 km/h', 300, 0), + ('Generar atasco en una carretera', 110, 1), + ('Intoxicación pública', 90, 1), + ('Conducta alocada', 90, 1), + ('Obstrucción a la justicia', 130, 1), + ('Insultos hacia civiles', 75, 1), + ('Insultos hacia un agente', 110, 1), + ('Amenaza verbar a un civil', 90, 1), + ('Amenaza verbal a un agente', 150, 1), + ('Dar información falsa', 250, 1), + ('Intento de corrupción', 1500, 1), + ('Tendencia de armas en los limites de la ciudad', 120, 2), + ('Tendencia de armas letales en los limites de la ciudad', 300, 2), + ('No tener licencia de armas', 600, 2), + ('Posesión de un arma ilegal', 700, 2), + ('Posesión de herramientas para robos', 300, 2), + ('Desorden público', 1800, 2), + ('Intento de venta o distribución de sustancias ilegales', 1500, 2), + ('Fabricación de sustancias ilegales', 1500, 2), + ('Posesión de sustancias ilegales', 650, 2), + ('Secuestro de un civil', 1500, 2), + ('Secuestro de un agente', 2000, 2), + ('Robo', 650, 2), + ('Robo armado a una tienda', 650, 2), + ('Robo armado a un banco', 1500, 2), + ('Asalto a un civil', 2000, 3), + ('Asalto a un agente', 2500, 3), + ('Intento de asesinato a un civil', 3000, 3), + ('Intento de asesinato a un agente', 5000, 3), + ('Asesinato de un civil', 10000, 3), + ('Asesinato de un policia', 30000, 3), + ('Homicidio involuntario', 1800, 3), + ('Fraude', 2000, 2); +; diff --git a/[esx_addons]/esx_policejob/localization/fi_esx_policejob.sql b/[esx_addons]/esx_policejob/localization/fi_esx_policejob.sql new file mode 100644 index 00000000..109c40c6 --- /dev/null +++ b/[esx_addons]/esx_policejob/localization/fi_esx_policejob.sql @@ -0,0 +1,90 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_police', 'Poliisi', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_police', 'Poliisi', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_police', 'Poliisi', 1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('police', 'Poliisi') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('police',0,'recruit','Tulokas',20,'{}','{}'), + ('police',1,'officer','Konstaapeli',40,'{}','{}'), + ('police',2,'sergeant','Ylikonstaapeli',60,'{}','{}'), + ('police',3,'lieutenant','Kersantti',85,'{}','{}'), + ('police',4,'boss','Komentaja',100,'{}','{}') +; + +CREATE TABLE `fine_types` ( + `id` int NOT NULL AUTO_INCREMENT, + `label` varchar(255) DEFAULT NULL, + `amount` int DEFAULT NULL, + `category` int DEFAULT NULL, + + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `fine_types` (label, amount, category) VALUES + ('Äänimerkin väärinkäyttö', 30, 0), + ('Laiton jatkuvan linjan ylitys', 40, 0), + ('Ajaminen tien väärällä puolella', 250, 0), + ('Laiton U-käännös', 250, 0), + ('Laiton maastossa ajaminen', 170, 0), + ('Virkavallan käskyn laiminlyönti', 30, 0), + ('Laiton pysähtyminen', 150, 0), + ('Laiton parkkeeraus', 70, 0), + ('Väistöolovelvollisuuden laiminlyönti', 70, 0), + ('Väärän ajoneuvontiedon antaminen', 90, 0), + ('Stop merkin laiminlyönti', 105, 0), + ('Punaisten valojen laiminlyönti', 130, 0), + ('Laiton ohitus', 100, 0), + ('Laittomalla ajoneuvolla ajaminen', 100, 0), + ('Ajokortitta ajo', 1500, 0), + ('Yliajo', 800, 0), + ('Ylinopeus < 5 kmh', 90, 0), + ('Ylinopeus 5-15 kmh', 120, 0), + ('Ylinopeus 15-30 kmh', 180, 0), + ('Ylinopeus > 30 kmh', 300, 0), + ('Liikenteen pysäytys tahallisesti', 110, 1), + ('Julkinen päihtyminen', 90, 1), + ('Sopimaton käytös', 90, 1), + ('Oikeusjärjestelmän estäminen', 130, 1), + ('Siviilin loukkaaminen', 75, 1), + ('Virkavallan halventaminen', 110, 1), + ('Sanallainen uhkaus siviiliä kohtaan', 90, 1), + ('Sanallinen uhkaus virkavaltaa kohtaan', 150, 1), + ('Virheellisen tiedon antaminen', 250, 1), + ('Korruptioyritys', 1500, 1), + ('Aseella heiluminen kaupungin sisällä', 120, 2), + ('Tappavalla aseella heiluminen kaupungin sisällä', 300, 2), + ('Ei aselupaa', 600, 2), + ('Laittoman aseen hallusapito', 700, 2), + ('Murtotyökalujen hallussapito', 300, 2), + ('Autovarkaus', 1800, 2), + ('Tarkoitus myydä/levittää laitonta ainetta', 1500, 2), + ('Laittoman aineen valmistus', 1500, 2), + ('Laittoman aineen hallusapito ', 650, 2), + ('Siviilin kidnappaus', 1500, 2), + ('Virkavallan kidnappaus', 2000, 2), + ('Ryöstö', 650, 2), + ('Aseellinen kaupparyöstö', 650, 2), + ('Aseellinen pankkiryöstö', 1500, 2), + ('Siviiliä kohtaan kohdistunut hyökkäys', 2000, 3), + ('Virkavaltaa kohtaan kohdistunut hyökkäys', 2500, 3), + ('Siviilin murhanyritys', 3000, 3), + ('Virkavallan murhanyirtys', 5000, 3), + ('Siviilin murha', 10000, 3), + ('Virkavallan murha', 30000, 3), + ('Väkivaltainan tappo', 1800, 3), + ('Petos', 2000, 2); +; diff --git a/[esx_addons]/esx_policejob/localization/ko_esx_policejob.sql b/[esx_addons]/esx_policejob/localization/ko_esx_policejob.sql new file mode 100644 index 00000000..4053fc5b --- /dev/null +++ b/[esx_addons]/esx_policejob/localization/ko_esx_policejob.sql @@ -0,0 +1,90 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_police', '경찰', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_police', '경찰', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_police', '경찰', 1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('police', '경찰') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('police',0,'recruit','순경',20,'{}','{}'), + ('police',1,'officer','경장',40,'{}','{}'), + ('police',2,'sergeant','경사',60,'{}','{}'), + ('police',3,'lieutenant','경위',85,'{}','{}'), + ('police',4,'boss','경찰국장',100,'{}','{}') +; + +CREATE TABLE `fine_types` ( + `id` int NOT NULL AUTO_INCREMENT, + `label` varchar(255) DEFAULT NULL, + `amount` int DEFAULT NULL, + `category` int DEFAULT NULL, + + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `fine_types` (label, amount, category) VALUES + ('경적 남용', 30, 0), + ('연속으로 라인을 넘음', 40, 0), + ('역주행', 250, 0), + ('불법 U턴', 250, 0), + ('불법적인 오프로드 운전', 170, 0), + ('공무원 명령 미준수', 30, 0), + ('불법적으로 차량 정지', 150, 0), + ('불법 주차', 70, 0), + ('오른쪽으로 양보하지 않음', 70, 0), + ('등록되지 않은 차량', 90, 0), + ('정지선 지키지 않음', 105, 0), + ('빨간불에서 멈추지 않음', 130, 0), + ('위험한 추월', 100, 0), + ('불법 차량 운전', 100, 0), + ('무면허 운전', 1500, 0), + ('뺑소니', 800, 0), + ('5 km 이상 과속', 90, 0), + ('5-15 km 과속', 120, 0), + ('15-30 km 과속', 180, 0), + ('30 km 이상 과속', 300, 0), + ('교통방해', 110, 1), + ('공공질서 문제', 90, 1), + ('무질서한 행동', 90, 1), + ('공무집행 방해', 130, 1), + ('민간인에 대한 모욕', 75, 1), + ('공무원에 대한 모욕', 110, 1), + ('민간인에 대한 언어폭력', 90, 1), + ('공무원에 대한 언어폭력', 150, 1), + ('허위 정보 제공', 250, 1), + ('부패 시도', 1500, 1), + ('도시에서 무기 사용', 120, 2), + ('도시에서 위험한 무기 사용', 300, 2), + ('총기 면허 없음', 600, 2), + ('불법 무기 소지', 700, 2), + ('절도 도구 소지', 300, 2), + ('차량 절도', 1800, 2), + ('마약 판매/분배', 1500, 2), + ('마약 제조', 1500, 2), + ('마약 소지 ', 650, 2), + ('민간인 납치', 1500, 2), + ('공무원 납치', 2000, 2), + ('강도', 650, 2), + ('상점의 무장 강도', 650, 2), + ('은행의 무장 강도', 1500, 2), + ('민간인에 대한 폭행', 2000, 3), + ('공무원에 대한 폭행', 2500, 3), + ('민간인 살인 시도', 3000, 3), + ('공무원 살인 시도', 5000, 3), + ('민간인 살인', 10000, 3), + ('공무원 살인', 30000, 3), + ('우발적 살인', 1800, 3), + ('사기', 2000, 2); +; diff --git a/[esx_addons]/esx_policejob/localization/nl_esx_policejob.sql b/[esx_addons]/esx_policejob/localization/nl_esx_policejob.sql new file mode 100644 index 00000000..6958371c --- /dev/null +++ b/[esx_addons]/esx_policejob/localization/nl_esx_policejob.sql @@ -0,0 +1,64 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_police', 'Politie', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_police', 'Politie', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_police', 'Politie', 1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('police', 'Politie') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('police',0,'aspirant','Aspirant',0,'{}','{}'), + ('police',1,'surveillant','Surveillant',0,'{}','{}'), + ('police',2,'agent','Agent',0,'{}','{}'), + ('police',3,'hoofdagent','Hoofdagent',0,'{}','{}'), + ('police',4,'brigadier','Brigadier',0,'{}','{}'), + ('police',5,'inspecteur','Inspecteur',0,'{}','{}'), + ('police',6,'hoofdinspecteur','Hoofdinspecteur',0,'{}','{}'), + ('police',7,'commissaris','Commissaris',0,'{}','{}'), + ('police',8,'hoofdcommissaris','Hoofdcommissaris',0,'{}','{}'), + ('police',9,'boss','Eerste Hoofdcommissaris',0,'{}','{}') +; + +CREATE TABLE `fine_types` ( + `id` int NOT NULL AUTO_INCREMENT, + `label` varchar(255) DEFAULT NULL, + `amount` int DEFAULT NULL, + `category` int DEFAULT NULL, + + PRIMARY KEY (`id`) +); + +INSERT INTO `fine_types` (label, amount, category) VALUES + ('Onnodig claxoneren', 90, 0), + ('Rijden over een doorgetrokken streep', 240, 0), + ('Tegen het verkeer in rijden', 140, 0), + ('Negeren keerverbod (u-turn)', 140, 0), + ('Niet opvolgen aanwijzing van bevoegd ambtenaar', 110, 0), + ('Fout parkeren', 95, 0), + ('Verkeerd voorsorteren', 240, 0), + ('Rijden met een WOK status ', 300, 0), + ('Door rood rijden', 240, 0), + ('Rijden zonder rijbewijs', 340, 0), + ('Snelheid overtreding < 10km', 112, 0), + ('Snelheid overtreding 10 - 20km', 202, 0), + ('Snelheid overtreding 20 - 50km', 670, 0), + ('Snelheid overtreding > 50km', 1000, 0), + ('Openbare dronkenschap', 415, 1), + ('Wanordelijk gedrag', 500, 1), + ('Hulpdiensten hinderen', 700, 1), + ('Belediging ambtenaar in functie', 200, 1), + ('Bedreiging', 980, 1), + ('Illegaal wapen bezit', 2300, 2), + ('Illegaal drugs bezit', 400, 2), + ('Drugshandel', 3000, 3) +; diff --git a/[esx_addons]/esx_policejob/localization/pl_esx_policejob.sql b/[esx_addons]/esx_policejob/localization/pl_esx_policejob.sql new file mode 100644 index 00000000..cffb1092 --- /dev/null +++ b/[esx_addons]/esx_policejob/localization/pl_esx_policejob.sql @@ -0,0 +1,90 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_police', 'Police', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_police', 'Police', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_police', 'Police', 1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('police', 'Police') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('police',0,'recruit','Posterunkowy',20,'{}','{}'), + ('police',1,'officer','Sierżant',40,'{}','{}'), + ('police',2,'sergeant','Aspirant',60,'{}','{}'), + ('police',3,'lieutenant','Komisarz',85,'{}','{}'), + ('police',4,'boss','Generalny Inspektor',100,'{}','{}') +; + +CREATE TABLE `fine_types` ( + `id` int NOT NULL AUTO_INCREMENT, + `label` varchar(255) DEFAULT NULL, + `amount` int DEFAULT NULL, + `category` int DEFAULT NULL, + + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `fine_types` (label, amount, category) VALUES + ('Nadużywanie klaksonu', 30, 0), + ('Przekroczenie lini ciągłej', 40, 0), + ('Jechanie po złej stronie drogi', 250, 0), + ('Nieprawidłowe zawracanie', 250, 0), + ('Nielegalna jazda Off-road', 170, 0), + ('Niedostosowanie się do poleceń Policji', 30, 0), + ('Nieprawidłowe zatrzymanie pojazdu', 150, 0), + ('Nieprawidłowe parkownie', 70, 0), + ('Niezastosowanie się do ruchu prawostronnego (jazda lewym pasem)', 70, 0), + ('Brak informacji o pojeździe', 90, 0), + ('Niezastosowanie się do znaku SOTP', 105, 0), + ('Niezatrzymanie się na czerwonym świetle', 130, 0), + ('Przechodzenie w niedozwolonym miejscu', 100, 0), + ('Jazda nielegalnym pojazdem', 100, 0), + ('Brak prawa jazdy', 1500, 0), + ('Ucieczka z miejsca zdarzenia', 800, 0), + ('Przekroczenie prędkości < 5 mph', 90, 0), + ('Przekroczenie prędkości 5-15 mph', 120, 0), + ('Przekroczenie prędkości 15-30 mph', 180, 0), + ('Przekroczenie prędkości > 30 mph', 300, 0), + ('Utrudnianie przemieszczania się', 110, 1), + ('Publiczne zgorszenie', 90, 1), + ('Niepoprawne zachowanie', 90, 1), + ('Utrudnianie postępowania', 130, 1), + ('Obraza cywilów', 75, 1), + ('Obraza graczy', 110, 1), + ('Groźby werbalne', 90, 1), + ('Przeklinanie na graczy', 150, 1), + ('Dostarczanie fałszywych informacji', 250, 1), + ('Próba korupcji', 1500, 1), + ('Wymachiwanie bronią w mieście', 120, 2), + ('Wymachiwanie niebezpieczną bronią w mieście', 300, 2), + ('Brak pozwolenia na broń', 600, 2), + ('Posiadanie nielegalnej broni', 700, 2), + ('Posiadanie narzędzi do włamań', 300, 2), + ('Złodziej - recydywista', 1800, 2), + ('Rozprowadzanie nielegalnych substancji', 1500, 2), + ('Wytwarzanie nielegalnych substancji', 1500, 2), + ('Posiadanie zakazanych substancji', 650, 2), + ('Porwanie cywila', 1500, 2), + ('Porwanie gracza', 2000, 2), + ('Rabunek', 650, 2), + ('Kradzież z bronią w ręku', 650, 2), + ('Napad na Bank', 1500, 2), + ('Atak na cywila', 2000, 3), + ('Atak na gracza', 2500, 3), + ('Próba morderstwa cywila', 3000, 3), + ('Próba morderstwa gracza', 5000, 3), + ('Zabójstwo cywila z premedytacją', 10000, 3), + ('Zabójstwo gracza z premedytacją', 30000, 3), + ('Nieumyślne spowodowanie śmierci', 1800, 3), + ('Oszustwo', 2000, 2); +; diff --git a/[esx_addons]/esx_policejob/localization/si_esx_policejob.sql b/[esx_addons]/esx_policejob/localization/si_esx_policejob.sql new file mode 100644 index 00000000..b825aa75 --- /dev/null +++ b/[esx_addons]/esx_policejob/localization/si_esx_policejob.sql @@ -0,0 +1,90 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_police', 'Policija', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_police', 'Policija', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_police', 'Policija', 1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('police', 'Policija') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('police',0,'recruit','Rekrut',20,'{}','{}'), + ('police',1,'officer','Uradnik',40,'{}','{}'), + ('police',2,'sergeant','Serzant',60,'{}','{}'), + ('police',3,'lieutenant','PodDirektor',85,'{}','{}'), + ('police',4,'boss','Direktor',100,'{}','{}') +; + +CREATE TABLE `fine_types` ( + `id` int NOT NULL AUTO_INCREMENT, + `label` varchar(255) DEFAULT NULL, + `amount` int DEFAULT NULL, + `category` int DEFAULT NULL, + + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `fine_types` (label, amount, category) VALUES + ("Zloraba roga", 30, 0), + ("nezakonito prečkanje neprekinjene črte", 40, 0), + ("vožnja po napačni strani ceste", 250, 0), + ("Nezakonit obrat v nasprotno smer", 250, 0), + ("Nezakonita vožnja zunaj ceste", 170, 0), + ("zavrnitev zakonitega ukaza", 30, 0), + ("Nezakonito ustavljanje vozila", 150, 0), + ("nezakonito parkiranje", 70, 0), + ("Neupoštevanje prednosti na desni strani", 70, 0), + ("neupoštevanje informacij o vozilu", 90, 0), + ("Neustavitev pri znaku za ustavitev", 105, 0), + ("ne ustavi pri rdeči luči", 130, 0), + ("nezakonita vožnja mimo", 100, 0), + ("vožnja nezakonitega vozila", 100, 0), + ("vožnja brez vozniškega dovoljenja", 1500, 0), + ("pobeg s kraja", 800, 0), + ("prekoračitev hitrosti nad < 5 mph", 90, 0), + ("prekoračitev hitrosti nad 5-15 mph", 120, 0), + ("prekoračitev hitrosti nad 15-30 mph", 180, 0), + ("prekoračitev hitrosti nad > 30 mph", 300, 0), + ("Oviranje pretočnosti prometa", 110, 1), + ("zastrupitev v javnosti", 90, 1), + ("Neurejeno vedenje", 90, 1), + ("oviranje pravosodja", 130, 1), + ("žalitve državljanov", 75, 1), + ("nespoštovanje uslužbenca policije", 110, 1), + ("verbalna grožnja državljanu", 90, 1), + ("Verbalna grožnja pripadniku LEO", 150, 1), + ("Zagotavljanje lažnih informacij", 250, 1), + ("poskus korupcije", 1500, 1), + ("razkazovanje orožja na območju mesta", 120, 2), + ("razkazovanje smrtonosnega orožja na območju mesta", 300, 2), + ("nima dovoljenja za strelno orožje", 600, 2), + ("posedovanje nezakonitega orožja", 700, 2), + ("posedovanje vlomilskega orodja", 300, 2), + ("Grand Theft Auto", 1800, 2), + ("namera prodaje/distribucije prepovedane snovi", 1500, 2), + ('distribucija nedovoljene snovi', 1500, 2), + ("posedovanje nedovoljene snovi", 650, 2), + ("ugrabitev civilista", 1500, 2), + ("ugrabitev policista", 2000, 2), + ("rop", 650, 2), + ("oborožen rop trgovine", 650, 2), + ("oborožen rop banke", 1500, 2), + ("napad na civilista", 2000, 3), + ("napad na policista", 2500, 3), + ("poskus umora civilne osebe", 3000, 3), + ("Poskus umora policista", 5000, 3), + ("Umor civilne osebe", 10000, 3), + ("Umor policista", 30000, 3), + ("nenamerni uboj", 1800, 3), + ("goljufija", 2000, 2); +; diff --git a/[esx_addons]/esx_policejob/localization/sv_esx_policejob.sql b/[esx_addons]/esx_policejob/localization/sv_esx_policejob.sql new file mode 100644 index 00000000..6768476e --- /dev/null +++ b/[esx_addons]/esx_policejob/localization/sv_esx_policejob.sql @@ -0,0 +1,90 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_police', 'Polis', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_police', 'Polis', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_police', 'Polis', 1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('police', 'Polis') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('police',0,'recruit','Aspirant',20,'{}','{}'), + ('police',1,'officer','Assistent',40,'{}','{}'), + ('police',2,'sergeant','Inspektör',60,'{}','{}'), + ('police',3,'lieutenant','Kommissarie',85,'{}','{}'), + ('police',4,'boss','Rikspolischef',100,'{}','{}') +; + +CREATE TABLE `fine_types` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `label` varchar(255) DEFAULT NULL, + `amount` int(11) DEFAULT NULL, + `category` int(11) DEFAULT NULL, + + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `fine_types` (label, amount, category) VALUES + ('Missbruk av tuta',30,0), + ('Köra över heldragen linje',40,0), + ('Kört i motsatt riktning i rondell',250,0), + ('Olaglig u-sväng',250,0), + ('Olovlig körning i terräng',170,0), + ('Kört för nära bil framför',30,0), + ('Trafikfarlig stopp',150,0), + ('Olaglig parkering',70,0), + ('Använder inte högerregeln',70,0), + ('Aktar sig inte för tjänstefordon i utryckning',90,0), + ('Kört förbi stoppskylt',105,0), + ('Kört mot rött',130,0), + ('Farlig omkörning',100,0), + ('Fordon i dåligt skick',100,0), + ('Kört utan körkort',1500,0), + ('Smitning från olycka',800,0), + ('Kört för fort < 5 kmh',90,0), + ('Kört för fort 5-15 kmh',120,0), + ('Kört för fort 15-30 kmh',180,0), + ('Kört för fort > 30 kmh',300,0), + ('Blockerar trafiken',110,1), + ('Förstört allmän egendom',90,1), + ('Olaga diskriminering',90,1), + ('förhindrar polisens verksamhet',130,1), + ('Hets mot folkgrupp',75,1), + ('Dåligt beteende mot tjänsteman',110,1), + ('Verbalt hot mot annan person',90,1), + ('Verbalt hot mot en tjänsteman',150,1), + ('Olaglig protest',250,1), + ('Försök till mutning',1500,1), + ('Icke livshotande vapen på allmän plats ex. Hammare',120,2), + ('Dödligt vapen på allmän plats',300,2), + ('Vapen på allmän plats med licens (Licens Fel)',600,2), + ('Innehaft olaga vapen',700,2), + ('Försökt bryta sig in',300,2), + ('Bilstöld',1800,2), + ('Försäljning av droger',1500,2), + ('Tillverkning av droger',1500,2), + ('Innehav av droger',650,2), + ('Hålla gisslan/Hålla person mot dess vilja',1500,2), + ('Kidnappa en tjänsteman',2000,2), + ('Rån',650,2), + ('Butiksrån',650,2), + ('Bankrån',1500,2), + ('Skjutit en person',2000,3), + ('Skjutit en tjänsteman',2500,3), + ('Mordförsök',3000,3), + ('Mordförsök på tjänsteman',6000,3), + ('Mord',10000,3), + ('Mord på tjänsteman',30000,3), + ('Dråp',1800,3), + ('Olagliga aktiviteter inom ett företag',2000,2) +; diff --git a/[esx_addons]/esx_policejob/server/main.lua b/[esx_addons]/esx_policejob/server/main.lua new file mode 100644 index 00000000..8cc2c7a0 --- /dev/null +++ b/[esx_addons]/esx_policejob/server/main.lua @@ -0,0 +1,459 @@ +if Config.EnableESXService then + if Config.MaxInService ~= -1 then + TriggerEvent('esx_service:activateService', 'police', Config.MaxInService) + end +end + +CreateThread(function() + exports["esx_society"]:registerSociety('police', 'Police', 'society_police', 'society_police', 'society_police', {type = 'public'}) +end) + +RegisterNetEvent('esx_policejob:confiscatePlayerItem') +AddEventHandler('esx_policejob:confiscatePlayerItem', function(target, itemType, itemName, amount) + local source = source + local sourceXPlayer = ESX.GetPlayerFromId(source) + local targetXPlayer = ESX.GetPlayerFromId(target) + + if sourceXPlayer.job.name ~= 'police' then + print(('[^3WARNING^7] Player ^5%s^7 Attempted To Exploit The Confuscation System!'):format(sourceXPlayer.source)) + return + end + + if itemType == 'item_standard' then + local targetItem = targetXPlayer.getInventoryItem(itemName) + local sourceItem = sourceXPlayer.getInventoryItem(itemName) + + -- does the target player have enough in their inventory? + if targetItem.count > 0 and targetItem.count <= amount then + + -- can the player carry the said amount of x item? + if sourceXPlayer.canCarryItem(itemName, sourceItem.count) then + targetXPlayer.removeInventoryItem(itemName, amount) + sourceXPlayer.addInventoryItem (itemName, amount) + sourceXPlayer.showNotification(TranslateCap('you_confiscated', amount, sourceItem.label, targetXPlayer.name)) + targetXPlayer.showNotification(TranslateCap('got_confiscated', amount, sourceItem.label, sourceXPlayer.name)) + else + sourceXPlayer.showNotification(TranslateCap('quantity_invalid')) + end + else + sourceXPlayer.showNotification(TranslateCap('quantity_invalid')) + end + + elseif itemType == 'item_account' then + local targetAccount = targetXPlayer.getAccount(itemName) + + -- does the target player have enough money? + if targetAccount.money >= amount then + targetXPlayer.removeAccountMoney(itemName, amount, "Confiscated") + sourceXPlayer.addAccountMoney (itemName, amount, "Confiscated") + + sourceXPlayer.showNotification(TranslateCap('you_confiscated_account', amount, itemName, targetXPlayer.name)) + targetXPlayer.showNotification(TranslateCap('got_confiscated_account', amount, itemName, sourceXPlayer.name)) + else + sourceXPlayer.showNotification(TranslateCap('quantity_invalid')) + end + + elseif itemType == 'item_weapon' then + if amount == nil then amount = 0 end + + -- does the target player have weapon? + if targetXPlayer.hasWeapon(itemName) then + targetXPlayer.removeWeapon(itemName) + sourceXPlayer.addWeapon (itemName, amount) + + sourceXPlayer.showNotification(TranslateCap('you_confiscated_weapon', ESX.GetWeaponLabel(itemName), targetXPlayer.name, amount)) + targetXPlayer.showNotification(TranslateCap('got_confiscated_weapon', ESX.GetWeaponLabel(itemName), amount, sourceXPlayer.name)) + else + sourceXPlayer.showNotification(TranslateCap('quantity_invalid')) + end + end +end) + +RegisterNetEvent('esx_policejob:handcuff') +AddEventHandler('esx_policejob:handcuff', function(target) + local xPlayer = ESX.GetPlayerFromId(source) + + if xPlayer.job.name == 'police' then + TriggerClientEvent('esx_policejob:handcuff', target) + else + print(('[^3WARNING^7] Player ^5%s^7 Attempted To Exploit Handcuffs!'):format(xPlayer.source)) + end +end) + +RegisterNetEvent('esx_policejob:drag') +AddEventHandler('esx_policejob:drag', function(target) + local xPlayer = ESX.GetPlayerFromId(source) + + if xPlayer.job.name == 'police' then + TriggerClientEvent('esx_policejob:drag', target, source) + else + print(('[^3WARNING^7] Player ^5%s^7 Attempted To Exploit Dragging!'):format(xPlayer.source)) + end +end) + +RegisterNetEvent('esx_policejob:putInVehicle') +AddEventHandler('esx_policejob:putInVehicle', function(target) + local xPlayer = ESX.GetPlayerFromId(source) + + if xPlayer.job.name == 'police' then + TriggerClientEvent('esx_policejob:putInVehicle', target) + else + print(('[^3WARNING^7] Player ^5%s^7 Attempted To Exploit Garage!'):format(xPlayer.source)) + end +end) + +RegisterNetEvent('esx_policejob:OutVehicle') +AddEventHandler('esx_policejob:OutVehicle', function(target) + local xPlayer = ESX.GetPlayerFromId(source) + + if xPlayer.job.name == 'police' then + TriggerClientEvent('esx_policejob:OutVehicle', target) + else + print(('[^3WARNING^7] Player ^5%s^7 Attempted To Exploit Dragging Out Of Vehicle!'):format(xPlayer.source)) + end +end) + +RegisterNetEvent('esx_policejob:getStockItem') +AddEventHandler('esx_policejob:getStockItem', function(itemName, count) + local source = source + local xPlayer = ESX.GetPlayerFromId(source) + + TriggerEvent('esx_addoninventory:getSharedInventory', 'society_police', function(inventory) + local inventoryItem = inventory.getItem(itemName) + + -- is there enough in the society? + if count > 0 and inventoryItem.count >= count then + + -- can the player carry the said amount of x item? + if xPlayer.canCarryItem(itemName, count) then + inventory.removeItem(itemName, count) + xPlayer.addInventoryItem(itemName, count) + xPlayer.showNotification(TranslateCap('have_withdrawn', count, inventoryItem.name)) + else + xPlayer.showNotification(TranslateCap('quantity_invalid')) + end + else + xPlayer.showNotification(TranslateCap('quantity_invalid')) + end + end) +end) + +RegisterNetEvent('esx_policejob:putStockItems') +AddEventHandler('esx_policejob:putStockItems', function(itemName, count) + local xPlayer = ESX.GetPlayerFromId(source) + local sourceItem = xPlayer.getInventoryItem(itemName) + + TriggerEvent('esx_addoninventory:getSharedInventory', 'society_police', function(inventory) + local inventoryItem = inventory.getItem(itemName) + + -- does the player have enough of the item? + if sourceItem.count >= count and count > 0 then + xPlayer.removeInventoryItem(itemName, count) + inventory.addItem(itemName, count) + xPlayer.showNotification(TranslateCap('have_deposited', count, inventoryItem.name)) + else + xPlayer.showNotification(TranslateCap('quantity_invalid')) + end + end) +end) + +ESX.RegisterServerCallback('esx_policejob:getOtherPlayerData', function(source, cb, target, notify) + local xPlayer = ESX.GetPlayerFromId(target) + + if notify then + xPlayer.showNotification(TranslateCap('being_searched')) + end + + if xPlayer then + local data = { + name = xPlayer.getName(), + job = xPlayer.job.label, + grade = xPlayer.job.grade_label, + inventory = xPlayer.getInventory(), + accounts = xPlayer.getAccounts(), + weapons = xPlayer.getLoadout() + } + + if Config.EnableESXIdentity then + data.dob = xPlayer.get('dateofbirth') + data.height = xPlayer.get('height') + + if xPlayer.get('sex') == 'm' then data.sex = 'male' else data.sex = 'female' end + end + + TriggerEvent('esx_status:getStatus', target, 'drunk', function(status) + if status then + data.drunk = ESX.Math.Round(status.percent) + end + end) + + if Config.EnableLicenses then + TriggerEvent('esx_license:getLicenses', target, function(licenses) + data.licenses = licenses + cb(data) + end) + else + cb(data) + end + end +end) + +ESX.RegisterServerCallback('esx_policejob:getFineList', function(source, cb, category) + MySQL.query('SELECT * FROM fine_types WHERE category = ?', {category}, + function(fines) + cb(fines) + end) +end) + +ESX.RegisterServerCallback('esx_policejob:getVehicleInfos', function(source, cb, plate) + local retrivedInfo = { + plate = plate + } + if Config.EnableESXIdentity then + MySQL.single('SELECT users.firstname, users.lastname FROM owned_vehicles JOIN users ON owned_vehicles.owner = users.identifier WHERE plate = ?', {plate}, + function(result) + if result then + retrivedInfo.owner = ('%s %s'):format(result.firstname, result.lastname) + end + cb(retrivedInfo) + end) + else + MySQL.scalar('SELECT owner FROM owned_vehicles WHERE plate = ?', {plate}, + function(owner) + if owner then + local xPlayer = ESX.GetPlayerFromIdentifier(owner) + if xPlayer then + retrivedInfo.owner = xPlayer.getName() + end + end + cb(retrivedInfo) + end) + end +end) + +ESX.RegisterServerCallback('esx_policejob:getArmoryWeapons', function(source, cb) + TriggerEvent('esx_datastore:getSharedDataStore', 'society_police', function(store) + local weapons = store.get('weapons') + + if weapons == nil then + weapons = {} + end + + cb(weapons) + end) +end) + +ESX.RegisterServerCallback('esx_policejob:addArmoryWeapon', function(source, cb, weaponName, removeWeapon) + local xPlayer = ESX.GetPlayerFromId(source) + + if removeWeapon then + xPlayer.removeWeapon(weaponName) + end + + TriggerEvent('esx_datastore:getSharedDataStore', 'society_police', function(store) + local weapons = store.get('weapons') or {} + local foundWeapon = false + + for i=1, #weapons, 1 do + if weapons[i].name == weaponName then + weapons[i].count = weapons[i].count + 1 + foundWeapon = true + break + end + end + + if not foundWeapon then + table.insert(weapons, { + name = weaponName, + count = 1 + }) + end + + store.set('weapons', weapons) + cb() + end) +end) + +ESX.RegisterServerCallback('esx_policejob:removeArmoryWeapon', function(source, cb, weaponName) + local xPlayer = ESX.GetPlayerFromId(source) + xPlayer.addWeapon(weaponName, 500) + + TriggerEvent('esx_datastore:getSharedDataStore', 'society_police', function(store) + local weapons = store.get('weapons') or {} + + local foundWeapon = false + + for i=1, #weapons, 1 do + if weapons[i].name == weaponName then + weapons[i].count = (weapons[i].count > 0 and weapons[i].count - 1 or 0) + foundWeapon = true + break + end + end + + if not foundWeapon then + table.insert(weapons, { + name = weaponName, + count = 0 + }) + end + + store.set('weapons', weapons) + cb() + end) +end) + +ESX.RegisterServerCallback('esx_policejob:buyWeapon', function(source, cb, weaponName, type, componentNum) + local xPlayer = ESX.GetPlayerFromId(source) + local authorizedWeapons, selectedWeapon = Config.AuthorizedWeapons[xPlayer.job.grade_name] + + for k,v in ipairs(authorizedWeapons) do + if v.weapon == weaponName then + selectedWeapon = v + break + end + end + + if not selectedWeapon then + print(('[^3WARNING^7] Player ^5%s^7 Attempted To Buy Invalid Weapon - ^5%s^7!'):format(source, weaponName)) + cb(false) + else + -- Weapon + if type == 1 then + if xPlayer.getMoney() >= selectedWeapon.price then + xPlayer.removeMoney(selectedWeapon.price, "Weapon Bought") + xPlayer.addWeapon(weaponName, 100) + + cb(true) + else + cb(false) + end + + -- Weapon Component + elseif type == 2 then + local price = selectedWeapon.components[componentNum] + local weaponNum, weapon = ESX.GetWeapon(weaponName) + local component = weapon.components[componentNum] + + if component then + if xPlayer.getMoney() >= price then + xPlayer.removeMoney(price, "Weapon Component Bought") + xPlayer.addWeaponComponent(weaponName, component.name) + + cb(true) + else + cb(false) + end + else + print(('[^3WARNING^7] Player ^5%s^7 Attempted To Buy Invalid Weapon Component - ^5%s^7!'):format(source, componentNum)) + cb(false) + end + end + end +end) + +ESX.RegisterServerCallback('esx_policejob:buyJobVehicle', function(source, cb, vehicleProps, type) + local xPlayer = ESX.GetPlayerFromId(source) + local price = getPriceFromHash(vehicleProps.model, xPlayer.job.grade_name, type) + + -- vehicle model not found + if price == 0 then + print(('[^3WARNING^7] Player ^5%s^7 Attempted To Buy Invalid Vehicle - ^5%s^7!'):format(source, vehicleProps.model)) + cb(false) + else + if xPlayer.getMoney() >= price then + xPlayer.removeMoney(price, "Job Vehicle Bought") + + MySQL.insert('INSERT INTO owned_vehicles (owner, vehicle, plate, type, job, `stored`) VALUES (?, ?, ?, ?, ?, ?)', { xPlayer.identifier, json.encode(vehicleProps), vehicleProps.plate, type, xPlayer.job.name, true}, + function (rowsChanged) + cb(true) + end) + else + cb(false) + end + end +end) + +ESX.RegisterServerCallback('esx_policejob:storeNearbyVehicle', function(source, cb, plates) + local xPlayer = ESX.GetPlayerFromId(source) + + local plate = MySQL.scalar.await('SELECT plate FROM owned_vehicles WHERE owner = ? AND plate IN (?) AND job = ?', {xPlayer.identifier, plates, xPlayer.job.name}) + + if plate then + MySQL.update('UPDATE owned_vehicles SET `stored` = true WHERE owner = ? AND plate = ? AND job = ?', {xPlayer.identifier, plate, xPlayer.job.name}, + function(rowsChanged) + if rowsChanged == 0 then + cb(false) + else + cb(plate) + end + end) + else + cb(false) + end +end) + +function getPriceFromHash(vehicleHash, jobGrade, type) + local vehicles = Config.AuthorizedVehicles[type][jobGrade] + + for i = 1, #vehicles do + local vehicle = vehicles[i] + if GetHashKey(vehicle.model) == vehicleHash then + return vehicle.price + end + end + + return 0 +end + +ESX.RegisterServerCallback('esx_policejob:getStockItems', function(source, cb) + TriggerEvent('esx_addoninventory:getSharedInventory', 'society_police', function(inventory) + cb(inventory.items) + end) +end) + +ESX.RegisterServerCallback('esx_policejob:getPlayerInventory', function(source, cb) + local xPlayer = ESX.GetPlayerFromId(source) + local items = xPlayer.inventory + + cb({items = items}) +end) + +AddEventHandler('playerDropped', function() + local playerId = source + if playerId then + local xPlayer = ESX.GetPlayerFromId(playerId) + + if xPlayer and xPlayer.job.name == 'police' then + Wait(5000) + TriggerClientEvent('esx_policejob:updateBlip', -1) + end + end +end) + +RegisterNetEvent('esx_policejob:spawned') +AddEventHandler('esx_policejob:spawned', function() + local playerId = source + local xPlayer = ESX.GetPlayerFromId(playerId) + + if xPlayer and xPlayer.job.name == 'police' then + Wait(5000) + TriggerClientEvent('esx_policejob:updateBlip', -1) + end +end) + +RegisterNetEvent('esx_policejob:forceBlip') +AddEventHandler('esx_policejob:forceBlip', function() + for _, xPlayer in pairs(ESX.GetExtendedPlayers('job', 'police')) do + TriggerClientEvent('esx_policejob:updateBlip', xPlayer.source) + end +end) + +AddEventHandler('onResourceStart', function(resource) + if resource == GetCurrentResourceName() then + Wait(5000) + for _, xPlayer in pairs(ESX.GetExtendedPlayers('job', 'police')) do + TriggerClientEvent('esx_policejob:updateBlip', xPlayer.source) + end + end +end) diff --git a/[esx_addons]/esx_property/LICENSE b/[esx_addons]/esx_property/LICENSE new file mode 100644 index 00000000..359e1a62 --- /dev/null +++ b/[esx_addons]/esx_property/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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 Property - Properties Made Right! + Copyright (C) 2023 ESX-Framework + + 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 . + +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-legacy Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_property/README.md b/[esx_addons]/esx_property/README.md new file mode 100644 index 00000000..4ebc3d9a --- /dev/null +++ b/[esx_addons]/esx_property/README.md @@ -0,0 +1,94 @@ +

[ESX] Property

Discord - Website - Documentation + +## Features + +* 95 Premade Properties +* Dynamic Json Storage +* Key Management System +* Garage System +* Furniture System + * Can configure everything in the config + * Editing system + * Easy to use controls + * Furniture Stores + * Keymapped quick access menu +* Shell / IPL support +* Police Raiding +* In-Game property Creator +* Routing Buckets for instancing +* Wardrobe functionality +* OX Inventory Support +* CCTV Camera System + * Night Vision + * Cool HUD overlay + * ability to zoom in/out + * Discord webhook support (copies link to clipboard aswell) +* Admin Menu + * **EVERY** part of the property can be changed! + * Real estate Job Can also access +* Real Estate Job +* Built in Discord Logs +* Highly Configurable + +## Dependencies + +* es_extended +* esx_society *for Player Management* * +* [OX-inventory](https://github.com/overextended/ox_inventory) *For Property Stashes* * +* ESX Context +* ESX Notify +* ESX Progressbar *for Raiding* * +* ESX Datastore *for wardrobe* * +* ESX Clotheshop *for wardrobe* * +* [k4mb1 Starter Shells](https://www.k4mb1maps.com/package/5015840) *only for shell use* * +* [bob74_ipl](https://github.com/Bob74/bob74_ipl) *only for IPL use* * + +> `*` = Optional + +## Create A Property + +* [Menu Preview](https://prnt.sc/Xczb5Fs9xW-t) +* Use the command `property:create` while an admin +* Set Street Number +* Set Price of Property +* Select an Interior + > Note: To Use the Default Shells, you **NEED** [this Shell Pack](https://www.k4mb1maps.com/package/5015840) + + > [Catagory Selection](https://prnt.sc/3RGaIEVTL6zw) + + > [Interior Selection](https://prnt.sc/za9aOSsuqkce) +* Set The Entrance Position + > Note: Uses Player`s Current Coordinates + +## Getting Shell Offset + +* To get the spawn Offset of the shell, use [Loaf`s Offset Finder](https://github.com/loaf-scripts/loaf_offsetfinder) + +* To Get the Wardrobe or Storage offset, go inside the Property, goto where u want them to be and then use the `getoffset` command and it will print the offset in F8 + +## Admin Menu + +* As an Admin, use the command, `property:admin` +* From There, you can select A property +* You Can then either `Manage`, `Teleport To Entrance` or `Delete` +* Allows you to edit all options and evict users +* [Menu Preview](https://prnt.sc/Jpxox2ZcKn9G) +* [Menu Preview 2](https://prnt.sc/IbP-ynHgYSMA) + +# Copyright + + ESX Property - Properties Made Right! + Copyright (C) 2023 ESX-Framework + + 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 . diff --git a/[esx_addons]/esx_property/client/cctv.lua b/[esx_addons]/esx_property/client/cctv.lua new file mode 100644 index 00000000..80a9bf3d --- /dev/null +++ b/[esx_addons]/esx_property/client/cctv.lua @@ -0,0 +1,274 @@ +--[[ + ESX Property - Properties Made Right! + Copyright (C) 2023 ESX-Framework + + 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 . +]] +function CCTV(PropertyID) + DoScreenFadeOut(500) + Wait(500) + local Property = Properties[PropertyID] + local CamTakePic = true + if Property.cctv.enabled then + ESX.TriggerServerCallback("esx_property:CCTV", function(CanCCTV) + if CanCCTV then + InCCTV = true + local NightVision = false + local function InstructionButtonMessage(text) + BeginTextCommandScaleformString("STRING") + AddTextComponentScaleform(text) + EndTextCommandScaleformString() + end + + local function CreateInstuctionScaleform(scaleform) + local scaleform = RequestScaleformMovie(scaleform) + while not HasScaleformMovieLoaded(scaleform) do + Wait(0) + end + PushScaleformMovieFunction(scaleform, "CLEAR_ALL") + PopScaleformMovieFunctionVoid() + + PushScaleformMovieFunction(scaleform, "SET_CLEAR_SPACE") + PushScaleformMovieFunctionParameterInt(200) + PopScaleformMovieFunctionVoid() + + if Config.CCTV.PictureWebook ~= "" then + PushScaleformMovieFunction(scaleform, "SET_DATA_SLOT") + PushScaleformMovieFunctionParameterInt(1) + ScaleformMovieMethodAddParamPlayerNameString(GetControlInstructionalButton(1, Config.CCTV.Controls.Screenshot, true)) + InstructionButtonMessage(TranslateCap("take_picture")) + PopScaleformMovieFunctionVoid() + end + + PushScaleformMovieFunction(scaleform, "SET_DATA_SLOT") + PushScaleformMovieFunctionParameterInt(2) + ScaleformMovieMethodAddParamPlayerNameString(GetControlInstructionalButton(1, Config.CCTV.Controls.Right, true)) + ScaleformMovieMethodAddParamPlayerNameString(GetControlInstructionalButton(1, Config.CCTV.Controls.Left, true)) + InstructionButtonMessage(TranslateCap("rot_left_right")) + PopScaleformMovieFunctionVoid() + + PushScaleformMovieFunction(scaleform, "SET_DATA_SLOT") + PushScaleformMovieFunctionParameterInt(3) + ScaleformMovieMethodAddParamPlayerNameString(GetControlInstructionalButton(1, Config.CCTV.Controls.Down, true)) + ScaleformMovieMethodAddParamPlayerNameString(GetControlInstructionalButton(1, Config.CCTV.Controls.Up, true)) + InstructionButtonMessage(TranslateCap("rot_up_down")) + PopScaleformMovieFunctionVoid() + + PushScaleformMovieFunction(scaleform, "SET_DATA_SLOT") + PushScaleformMovieFunctionParameterInt(4) + ScaleformMovieMethodAddParamPlayerNameString(GetControlInstructionalButton(1, Config.CCTV.Controls.ZoomOut, true)) + ScaleformMovieMethodAddParamPlayerNameString(GetControlInstructionalButton(1, Config.CCTV.Controls.ZoomIn, true)) + InstructionButtonMessage(TranslateCap("zoom")) + PopScaleformMovieFunctionVoid() + + PushScaleformMovieFunction(scaleform, "SET_DATA_SLOT") + PushScaleformMovieFunctionParameterInt(5) + ScaleformMovieMethodAddParamPlayerNameString(GetControlInstructionalButton(1, Config.CCTV.Controls.NightVision, true)) + InstructionButtonMessage(TranslateCap("night_vision")) + PopScaleformMovieFunctionVoid() + + PushScaleformMovieFunction(scaleform, "SET_DATA_SLOT") + PushScaleformMovieFunctionParameterInt(0) + ScaleformMovieMethodAddParamPlayerNameString(GetControlInstructionalButton(1, Config.CCTV.Controls.Exit, true)) + InstructionButtonMessage(TranslateCap("exit")) + PopScaleformMovieFunctionVoid() + + PushScaleformMovieFunction(scaleform, "DRAW_INSTRUCTIONAL_BUTTONS") + PopScaleformMovieFunctionVoid() + + PushScaleformMovieFunction(scaleform, "SET_BACKGROUND_COLOUR") + PushScaleformMovieFunctionParameterInt(0) + PushScaleformMovieFunctionParameterInt(0) + PushScaleformMovieFunctionParameterInt(0) + PushScaleformMovieFunctionParameterInt(80) + PopScaleformMovieFunctionVoid() + + return scaleform + end + ESX.CloseContext() + local cctvcam = nil + ClearFocus() + local playerPed = PlayerPedId() + cctvcam = CreateCamWithParams("DEFAULT_SCRIPTED_CAMERA", + vector3(Property.Entrance.x, Property.Entrance.y, Property.Entrance.z + Config.CCTV.HeightAboveDoor), 0, 0, 0, Config.CCTV.FOV) + SetCamRot(cctvcam, Property.cctv.rot.x, Property.cctv.rot.y, Property.cctv.rot.z, 2) + SetCamActive(cctvcam, true) + SetTimecycleModifier("scanline_cam_cheap") + TriggerServerEvent("p_instance:s:leave") + DisableAllControlActions(0) + FreezeEntityPosition(playerPed, true) + SetEntityCollision(playerPed, false, true) + local ShowButtons = true + SetEntityVisible(playerPed, false) + SetTimecycleModifierStrength(2.0) + SetFocusArea(Property.Entrance.x, Property.Entrance.y, Property.Entrance.z, 0.0, 0.0, 0.0) + PointCamAtCoord(cctvcam, vector3(Property.Entrance.x, Property.Entrance.y, Property.Entrance.z + Config.CCTV.HeightAboveDoor)) + RenderScriptCams(true, false, 1, true, false) + Wait(1000) + DoScreenFadeIn(500) + RequestAmbientAudioBank("Phone_Soundset_Franklin", 0, 0) + RequestAmbientAudioBank("HintCamSounds", 0, 0) + while IsCamActive(cctvcam) do + Wait(5) + DisableAllControlActions(0) + EnableControlAction(0, 245, true) + EnableControlAction(0, 246, true) + EnableControlAction(0, 249, true) + HideHudComponentThisFrame(7) + HideHudComponentThisFrame(8) + HideHudComponentThisFrame(9) + HideHudComponentThisFrame(6) + HideHudComponentThisFrame(19) + HideHudAndRadarThisFrame() + + if ShowButtons then + local instructions = CreateInstuctionScaleform("instructional_buttons") + DrawScaleformMovieFullscreen(instructions, 255, 255, 255, 255, 0) + end + -- ROTATE LEFT + local getCameraRot = GetCamRot(cctvcam, 2) + + if IsDisabledControlPressed(0, Config.CCTV.Controls.Left) and getCameraRot.z < Property.cctv.maxleft then + PlaySoundFrontend(-1, " FocusIn", "HintCamSounds", false) + SetCamRot(cctvcam, getCameraRot.x, 0.0, getCameraRot.z + Config.CCTV.RotateSpeed, 2) + end + -- ROTATE RIGHT + if IsDisabledControlPressed(0, Config.CCTV.Controls.Right) and getCameraRot.z > Property.cctv.maxright then + PlaySoundFrontend(-1, " FocusIn", "HintCamSounds", false) + SetCamRot(cctvcam, getCameraRot.x, 0.0, getCameraRot.z - Config.CCTV.RotateSpeed, 2) + end + + -- ROTATE UP + if IsDisabledControlPressed(0, Config.CCTV.Controls.Up) and getCameraRot.x < Config.CCTV.MaxUpRotation then + PlaySoundFrontend(-1, " FocusIn", "HintCamSounds", false) + SetCamRot(cctvcam, getCameraRot.x + Config.CCTV.RotateSpeed, 0.0, getCameraRot.z, 2) + end + + if IsDisabledControlPressed(0, Config.CCTV.Controls.Down) and getCameraRot.x > Config.CCTV.MaxDownRotation then + PlaySoundFrontend(-1, " FocusIn", "HintCamSounds", false) + SetCamRot(cctvcam, getCameraRot.x - Config.CCTV.RotateSpeed, 0.0, getCameraRot.z, 2) + end + + if IsDisabledControlPressed(0, Config.CCTV.Controls.ZoomIn) and GetCamFov(cctvcam) > Config.CCTV.MaxZoom then + SetCamFov(cctvcam, GetCamFov(cctvcam) - 1.0) + end + + if IsDisabledControlPressed(0, Config.CCTV.Controls.ZoomOut) and GetCamFov(cctvcam) < Config.CCTV.MinZoom then + SetCamFov(cctvcam, GetCamFov(cctvcam) + 1.0) + end + + if IsDisabledControlPressed(0, Config.CCTV.Controls.Down) and getCameraRot.x > Config.CCTV.MaxDownRotation then + PlaySoundFrontend(-1, " FocusIn", "HintCamSounds", false) + SetCamRot(cctvcam, getCameraRot.x - Config.CCTV.RotateSpeed, 0.0, getCameraRot.z, 2) + end + + SetTextFont(4) + SetTextScale(0.8, 0.8) + SetTextColour(255, 255, 255, 255) + SetTextDropshadow(0.1, 3, 27, 27, 255) + BeginTextCommandDisplayText('STRING') + AddTextComponentSubstringPlayerName(Property.setName ~= "" and Property.setName or Property.Name) + EndTextCommandDisplayText(0.01, 0.01) + + SetTextFont(4) + SetTextScale(0.7, 0.7) + SetTextColour(255, 255, 255, 255) + SetTextDropshadow(0.1, 3, 27, 27, 255) + BeginTextCommandDisplayText('STRING') + local year --[[ integer ]] , month --[[ integer ]] , day --[[ integer ]] , hour --[[ integer ]] , minute --[[ integer ]] , second --[[ integer ]] = + GetPosixTime() + AddTextComponentSubstringPlayerName("" .. day .. "/" .. month .. "/" .. year .. " " .. hour .. ":" .. minute .. ":" .. second) + EndTextCommandDisplayText(0.01, 0.055) + + SetTextFont(4) + SetTextScale(0.6, 0.6) + SetTextColour(255, 255, 255, 255) + SetTextDropshadow(0.1, 3, 27, 27, 255) + BeginTextCommandDisplayText('STRING') + local Zoom = ((Config.CCTV.FOV - GetCamFov(cctvcam)) / GetCamFov(cctvcam)) * 100 + AddTextComponentSubstringPlayerName(TranslateCap("zoom_level", math.floor(Zoom))) + EndTextCommandDisplayText(0.01, 0.09) + + SetTextFont(4) + SetTextScale(0.6, 0.6) + SetTextColour(255, 255, 255, 255) + SetTextDropshadow(0.1, 3, 27, 27, 255) + BeginTextCommandDisplayText('STRING') + AddTextComponentSubstringPlayerName(NightVision and "Night Vision: Active" or "CCTV System: Active") + EndTextCommandDisplayText(0.01, 0.12) + + if IsDisabledControlPressed(0, Config.CCTV.Controls.Down) and getCameraRot.x > Config.CCTV.MaxDownRotation then + PlaySoundFrontend(-1, " FocusIn", "HintCamSounds", false) + SetCamRot(cctvcam, getCameraRot.x - Config.CCTV.RotateSpeed, 0.0, getCameraRot.z, 2) + end + + if IsDisabledControlJustPressed(0, 38) then + NightVision = not NightVision + SetNightvision(NightVision) + SetTimecycleModifier("scanline_cam") + end + + if Config.CCTV.PictureWebook ~= "" and IsDisabledControlJustPressed(0, 201) then + if CamTakePic then + ShowButtons = false + Wait(1) + PlaySoundFrontend(-1, "Camera_Shoot", "Phone_Soundset_Franklin", 1) + ESX.TriggerServerCallback("esx_property:GetWebhook", function(hook) + if hook then + exports['screenshot-basic']:requestScreenshotUpload(hook, "files[]", function(data) + local image = json.decode(data) + ESX.ShowNotification(TranslateCap("picture_taken"), "success") + SendNUIMessage({link = image.attachments[1].proxy_url}) + ESX.ShowNotification(TranslateCap("clipboard"), "success") + ShowButtons = true + CamTakePic = false + SetTimeout(5000, function() + CamTakePic = true + end) + end) + end + end) + else + ESX.ShowNotification(TranslateCap("please_wait"), "error") + end + end + + if IsDisabledControlPressed(1, Config.CCTV.Controls.Exit) then + DoScreenFadeOut(1000) + ESX.TriggerServerCallback("esx_property:ExitCCTV", function(CanExit) + if CanExit then + InCCTV = false + Wait(1000) + ClearFocus() + ClearTimecycleModifier() + ClearExtraTimecycleModifier() + RenderScriptCams(false, false, 0, true, false) + DestroyCam(cctvcam, false) + SetFocusEntity(playerPed) + SetNightvision(false) + SetSeethrough(false) + SetEntityCollision(playerPed, true, true) + FreezeEntityPosition(playerPed, false) + SetEntityVisible(playerPed, true) + Wait(1500) + DoScreenFadeIn(1000) + end + end, PropertyID) + break + end + end + end + end, PropertyID) + end +end diff --git a/[esx_addons]/esx_property/client/furniture.lua b/[esx_addons]/esx_property/client/furniture.lua new file mode 100644 index 00000000..c7bcc370 --- /dev/null +++ b/[esx_addons]/esx_property/client/furniture.lua @@ -0,0 +1,407 @@ +--[[ + ESX Property - Properties Made Right! + Copyright (C) 2023 ESX-Framework + + 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 . +]] +if Config.Furniture.Enabled then + SpawnedFurniture = {} + RegisterNetEvent("esx_property:syncFurniture", function(PropertyId, Furniture) + if Properties[PropertyId] and Furniture then + Properties[PropertyId].furniture = Furniture + end + end) + + RegisterNetEvent("esx_property:placeFurniture", function(Id, furniture, findex) + if Properties[Id] and InProperty and CurrentId == Id then + ESX.Game.SpawnLocalObject(furniture.Name, vector3(furniture.Pos.x, furniture.Pos.y, furniture.Pos.z - 0.1), function(object) + SetEntityCoordsNoOffset(object, furniture.Pos.x, furniture.Pos.y, furniture.Pos.z) + SetEntityHeading(object, furniture.Heading) + SetEntityAsMissionEntity(object, true, true) + FreezeEntityPosition(object, true) + SpawnedFurniture[findex] = {obj = object, data = furniture} + end) + end + end) + + RegisterNetEvent("esx_property:removeFurniture", function(Id, furniture) + if Properties[Id] and InProperty and CurrentId == Id then + if SpawnedFurniture[furniture] then + DeleteEntity(SpawnedFurniture[furniture].obj) + SpawnedFurniture[furniture] = nil + end + end + end) + + RegisterNetEvent("esx_property:editFurniture", function(Id, furniture, Pos, Heading) + if Properties[Id] and InProperty and CurrentId == Id then + + if SpawnedFurniture[furniture] then + local obj = SpawnedFurniture[furniture].obj + SetEntityCoordsNoOffset(obj, Pos.x, Pos.y, Pos.z) + SetEntityHeading(obj, Heading) + SpawnedFurniture[furniture].data.Pos = Pos + SpawnedFurniture[furniture].data.Heading = Heading + end + end + end) + + ------------------------ Furniture Start ------------------------------- + local inFurniture = false + local CurrentlyEditing = nil + + function TempFurniturePlacement(PropertyId, PropName, PropIndex, PropCatagory, PropPrice, Existing, Pos, Heading) + ESX.CloseContext() + if CurrentlyEditing then + DeleteEntity(CurrentlyEditing) + CurrentlyEditing = nil + end + local function InstructionButtonMessage(text) + BeginTextCommandScaleformString("STRING") + AddTextComponentScaleform(text) + EndTextCommandScaleformString() + end + + local function CreateInstuctionScaleform(scaleform) + local scaleform = RequestScaleformMovie(scaleform) + while not HasScaleformMovieLoaded(scaleform) do + Wait(0) + end + PushScaleformMovieFunction(scaleform, "CLEAR_ALL") + PopScaleformMovieFunctionVoid() + + PushScaleformMovieFunction(scaleform, "SET_CLEAR_SPACE") + PushScaleformMovieFunctionParameterInt(200) + PopScaleformMovieFunctionVoid() + + PushScaleformMovieFunction(scaleform, "SET_DATA_SLOT") + PushScaleformMovieFunctionParameterInt(1) + N_0xe83a3e3557a56640(GetControlInstructionalButton(1, Config.Furniture.Controls.MinusX, true)) + N_0xe83a3e3557a56640(GetControlInstructionalButton(1, Config.Furniture.Controls.PlusX, true)) + InstructionButtonMessage(TranslateCap("rot_left_right")) + PopScaleformMovieFunctionVoid() + + PushScaleformMovieFunction(scaleform, "SET_DATA_SLOT") + PushScaleformMovieFunctionParameterInt(3) + N_0xe83a3e3557a56640(GetControlInstructionalButton(1, Config.Furniture.Controls.MinusY, true)) + N_0xe83a3e3557a56640(GetControlInstructionalButton(1, Config.Furniture.Controls.PlusY, true)) + InstructionButtonMessage(TranslateCap("rot_up_down")) + PopScaleformMovieFunctionVoid() + + PushScaleformMovieFunction(scaleform, "SET_DATA_SLOT") + PushScaleformMovieFunctionParameterInt(5) + N_0xe83a3e3557a56640(GetControlInstructionalButton(1, Config.Furniture.Controls.Up, true)) + N_0xe83a3e3557a56640(GetControlInstructionalButton(1, Config.Furniture.Controls.Down, true)) + InstructionButtonMessage(TranslateCap("height")) + PopScaleformMovieFunctionVoid() + + PushScaleformMovieFunction(scaleform, "SET_DATA_SLOT") + PushScaleformMovieFunctionParameterInt(7) + N_0xe83a3e3557a56640(GetControlInstructionalButton(1, Config.Furniture.Controls.RotateLeft, true)) + N_0xe83a3e3557a56640(GetControlInstructionalButton(1, Config.Furniture.Controls.RotateRight, true)) + InstructionButtonMessage(TranslateCap("rotate")) + PopScaleformMovieFunctionVoid() + + PushScaleformMovieFunction(scaleform, "SET_DATA_SLOT") + PushScaleformMovieFunctionParameterInt(9) + N_0xe83a3e3557a56640(GetControlInstructionalButton(1, Config.Furniture.Controls.Confirm, true)) + InstructionButtonMessage(TranslateCap("place")) + PopScaleformMovieFunctionVoid() + + PushScaleformMovieFunction(scaleform, "SET_DATA_SLOT") + PushScaleformMovieFunctionParameterInt(0) + N_0xe83a3e3557a56640(GetControlInstructionalButton(1, Config.Furniture.Controls.Exit, true)) + InstructionButtonMessage(TranslateCap("delete_furni")) + PopScaleformMovieFunctionVoid() + + PushScaleformMovieFunction(scaleform, "DRAW_INSTRUCTIONAL_BUTTONS") + PopScaleformMovieFunctionVoid() + + PushScaleformMovieFunction(scaleform, "SET_BACKGROUND_COLOUR") + PushScaleformMovieFunctionParameterInt(0) + PushScaleformMovieFunctionParameterInt(0) + PushScaleformMovieFunctionParameterInt(0) + PushScaleformMovieFunctionParameterInt(80) + PopScaleformMovieFunctionVoid() + + return scaleform + end + function GetCameraDirection() + local rotation = GetGameplayCamRot() * (math.pi / 180) + + return vector3(-math.sin(rotation.z), math.cos(rotation.z), math.sin(rotation.x)) + end + local Position = GetEntityCoords(ESX.PlayerData.ped) + local PropSpawn = Position - vector3(0.5, 0.5, 1.0) + ESX.Game.SpawnLocalObject(PropName, PropSpawn, function(CurrentlyEditing) + CurrentlyEditing = CurrentlyEditing + NetworkSetObjectForceStaticBlend(CurrentlyEditing, true) + SetEntityAsMissionEntity(CurrentlyEditing, true, true) + SetEntityCollision(CurrentlyEditing, false, true) + if Existing then + SetEntityCoordsNoOffset(CurrentlyEditing, vector3(Pos.x, Pos.y, Pos.z)) + SetEntityHeading(CurrentlyEditing, Heading) + else + PlaceObjectOnGroundProperly(CurrentlyEditing) + end + FreezeEntityPosition(CurrentlyEditing, true) + while true do + HudForceWeaponWheel(false) + HideHudComponentThisFrame(19) + HideHudComponentThisFrame(20) + local CurrentPos = GetEntityCoords(CurrentlyEditing) + local CurrentHeading = GetEntityHeading(CurrentlyEditing) + local Rotation = GetEntityRotation(CurrentlyEditing, 2) + SetEntityDrawOutline(CurrentlyEditing, true) + SetEntityDrawOutlineColor(55, 140, 191, 200) + SetEntityDrawOutlineShader(1) + local instructions = CreateInstuctionScaleform("instructional_buttons") + DrawScaleformMovieFullscreen(instructions, 255, 255, 255, 255, 0) + Wait(0) + if IsControlJustPressed(0, 202) then + DeleteObject(CurrentlyEditing) + end + + if IsControlPressed(0, Config.Furniture.Controls.MinusY) then + local direction = GetCameraDirection() + CurrentPos = CurrentPos - vector3(direction.x * Config.Furniture.MovementSpeed, direction.y * Config.Furniture.MovementSpeed, 0) + SetEntityCoordsNoOffset(CurrentlyEditing, CurrentPos.x, CurrentPos.y, CurrentPos.z) + end + + if IsControlPressed(0, Config.Furniture.Controls.PlusY) then + local direction = GetCameraDirection() + CurrentPos = CurrentPos + vector3(direction.x * Config.Furniture.MovementSpeed, direction.y * Config.Furniture.MovementSpeed, 0) + SetEntityCoordsNoOffset(CurrentlyEditing, CurrentPos) + end + + if IsControlPressed(0, Config.Furniture.Controls.Up) then + SetEntityCoordsNoOffset(CurrentlyEditing, CurrentPos.x, CurrentPos.y, CurrentPos.z + Config.Furniture.MovementZspeed) + end + + if IsControlPressed(0, Config.Furniture.Controls.Down) then + SetEntityCoordsNoOffset(CurrentlyEditing, CurrentPos.x, CurrentPos.y, CurrentPos.z - Config.Furniture.MovementZspeed) + end + if IsControlPressed(0, Config.Furniture.Controls.RotateLeft) then + CurrentHeading = CurrentHeading + Config.Furniture.RotationSpeed + SetEntityRotation(CurrentlyEditing, 0, 0, CurrentHeading, 1, true) + -- SetEntityRotation(CurrentlyEditing, Rotation.x, Rotation.y, Rotation.z + Config.Furniture.RotationSpeed, 2, false) + -- SetEntityHeading(CurrentlyEditing, CurrentHeading + Config.Furniture.RotationSpeed) + end + + if IsControlPressed(0, Config.Furniture.Controls.RotateRight) then + CurrentHeading = CurrentHeading - Config.Furniture.RotationSpeed + SetEntityRotation(CurrentlyEditing, 0, 0, CurrentHeading, 1, true) + -- SetEntityRotation(CurrentlyEditing, Rotation.x, Rotation.y, Rotation.z - Config.Furniture.RotationSpeed, 2, false) + -- SetEntityHeading(CurrentlyEditing, CurrentHeading - Config.Furniture.RotationSpeed) + end + + if IsControlPressed(0, Config.Furniture.Controls.PlusX) then + local direction = GetCameraDirection() + CurrentPos = CurrentPos + vector3(-direction.y * Config.Furniture.MovementSpeed, direction.x * Config.Furniture.MovementSpeed, 0) + SetEntityCoordsNoOffset(CurrentlyEditing, CurrentPos) + end + + if IsControlPressed(0, Config.Furniture.Controls.MinusX) then + local direction = GetCameraDirection() + CurrentPos = CurrentPos - vector3(-direction.y * Config.Furniture.MovementSpeed, direction.x * Config.Furniture.MovementSpeed, 0) + SetEntityCoordsNoOffset(CurrentlyEditing, CurrentPos) + end + + if IsControlJustPressed(0, Config.Furniture.Controls.Confirm) then + if not Existing then + ESX.OpenContext("right", + {{unslectable = true, title = TranslateCap("confirm_buy",Config.FurnitureCatagories[PropCatagory][PropIndex].title), + description = TranslateCap("price",Config.FurnitureCatagories[PropCatagory][PropIndex].price), icon = "fas fa-shopping-cart"}, + {title = TranslateCap("yes"), value = "buy", icon = "fas fa-check"}, {title = TranslateCap("no"), icon = "fas fa-minus"}}, function(menu, element) + if element.value and element.value == "buy" then + ESX.TriggerServerCallback("esx_property:buyFurniture", function(response) + if response then + DeleteEntity(CurrentlyEditing) + ESX.ShowNotification(TranslateCap("bought_furni", Config.FurnitureCatagories[PropCatagory][PropIndex].title), "success") + ESX.CloseContext() + else + ESX.ShowNotification(TranslateCap("cannot_buy"), "error") + end + end, CurrentId, PropName, PropIndex, PropCatagory, vector3(CurrentPos.x, CurrentPos.y, CurrentPos.z), CurrentHeading) + end + end) + else + ESX.TriggerServerCallback("esx_property:editFurniture", function(response) + if response then + DeleteEntity(CurrentlyEditing) + ESX.ShowNotification(TranslateCap("edited_furni"), "success") + ESX.CloseContext() + else + ESX.ShowNotification(TranslateCap("cannot_edit"), "error") + end + end, CurrentId, PropIndex, vector3(CurrentPos.x, CurrentPos.y, CurrentPos.z), CurrentHeading) + end + end + + if DoesEntityExist(CurrentlyEditing) then + inFurniture = true + else + inFurniture = false + for _, Control in pairs(Config.Furniture.Controls) do + EnableControlAction(0, Control, true) + end + break + end + end + end) + end + + function FurnitureItems(house, Store, StoreIndex, Catagory) + local Items = {{unselectable = true, title = TranslateCap("store_title", Catagory), icon = "fas fa-store"}, + {title = TranslateCap("back"), value = "go-back", icon = "fas fa-arrow-left"}} + + for k, v in pairs(Config.FurnitureCatagories[Catagory]) do + table.insert(Items, {title = v.title, value = v.name, index = k, description = _U("price", v.price), icon = "fas fa-shopping-cart"}) + end + + ESX.OpenContext("right", Items, function(data, element) + if element.value == "go-back" then + FurnitureCatagories(house, Store, StoreIndex) + else + TempFurniturePlacement(house, element.value, element.index, Catagory) + end + end) + end + + function FurnitureCatagories(house, Store, StoreIndex) + local Catagories = {{unselectable = true, title = TranslateCap("store_title", Store), icon = "fas fa-store"}, + {title = TranslateCap("back"), value = "go-back", icon = "fas fa-arrow-left"}} + + for k, v in pairs(Config.FurnitureStores[StoreIndex].Catagories) do + table.insert(Catagories, {title = v}) + end + + ESX.OpenContext("right", Catagories, function(data, element) + if element.value == "go-back" then + FurnitureStores(house) + else + FurnitureItems(house, Store, StoreIndex, element.title) + end + end) + end + + function FurnitureEdit(propertyId, furniture) + local furni = SpawnedFurniture[furniture] + local Funiture = Config.FurnitureCatagories[furni.data.Catagory][furni.data.Index] + local Catagories = {{unselectable = true, title = TranslateCap("edit_title",Funiture.title), icon = "fas fa-store"}, + {title = TranslateCap("back"), value = "go-back", icon = "fas fa-arrow-left"}, + {title = TranslateCap("move_title"), value = "rotate", icon = "fas fa-sync-alt"}, {title = TranslateCap("delete_furni"), value = "delete", icon = "fas fa-trash-alt"}} + + ESX.OpenContext("right", Catagories, function(data, element) + if element.value == "go-back" then + FurnitureEditSelect(propertyId) + end + if element.value == "delete" then + ESX.TriggerServerCallback("esx_property:deleteFurniture", function(response) + if response then + ESX.ShowNotification(TranslateCap("delete_confirm", Funiture.title), "success") + FurnitureEditSelect(propertyId) + else + ESX.ShowNotification(TranslateCap("delete_error", Funiture.title), "error") + end + end, propertyId, furniture) + end + if element.value == "rotate" then + ESX.CloseContext() + TempFurniturePlacement(propertyId, furni.data.Name, furniture, furni.data.Catagory, furni.data.Index, true, furni.data.Pos, furni.data.Heading) + end + end) + end + + function FurnitureEditSelect(propertyId) + local Furni = {{unselectable = true, title = TranslateCap("owned_furni"), icon = "far fa-edit"}, + {title = TranslateCap("back"), value = "go-back", icon = "fas fa-arrow-left"}} + + for k, v in pairs(SpawnedFurniture) do + local Funiture = Config.FurnitureCatagories[v.data.Catagory][v.data.Index] + table.insert(Furni, {title = Funiture.title, value = k}) + end + + ESX.OpenContext("right", Furni, function(data, element) + if element.value == "go-back" then + FurnitureMenu(propertyId) + else + FurnitureEdit(propertyId, element.value) + end + end) + end + + function FurnitureStores(house) + local Options = {{unselectable = true, title = TranslateCap("menu_stores"), icon = "fas fa-store"}, + {title = TranslateCap("back"), value = "go-back", icon = "fas fa-arrow-left"}} + + for k, v in pairs(Config.FurnitureStores) do + table.insert(Options, {title = v.title, Store = k}) + end + + ESX.OpenContext("right", Options, function(data, element) + if element.Store then + FurnitureCatagories(house, element.title, element.Store) + elseif element.value == "go-back" then + FurnitureMenu(house) + end + end) + end + + function FurnitureMenu(PropertyId) + local Options = {{unselectable = true, title = TranslateCap("furni_management"), icon = "fas fa-lamp"}, + {title = TranslateCap("menu_stores"), description = TranslateCap("menu_stores_desc"), icon = "fas fa-dollar-sign", value = "store"}} + + if #SpawnedFurniture > 0 then + Options[#Options + 1] = {title = TranslateCap("menu_reset"), description = TranslateCap("menu_reset_desc"), icon = "fas fa-trash", value = "reset"} + Options[#Options + 1] = {title = TranslateCap("menu_edit"), description = TranslateCap("menu_edit_desc"), icon = "fas fa-archive", value = "edit"} + + end + ESX.OpenContext("right", Options, function(data, element) + if element.value then + if element.value == "store" then + FurnitureStores(PropertyId) + elseif element.value == "edit" then + FurnitureEditSelect(PropertyId) + elseif element.value == "reset" then + ESX.TriggerServerCallback("esx_property:RemoveAllfurniture", function(Removed) + if Removed then + ESX.ShowNotification(TranslateCap("furni_reset_success"), "success") + else + ESX.ShowNotification(TranslateCap("furni_reset_error"), "error") + end + end, PropertyId) + end + end + end) + end + + ESX.RegisterInput(TranslateCap("furni_command"), TranslateCap("furni_command_desc"), "keyboard", "M", function() + if InProperty then + ESX.TriggerServerCallback('esx_property:CanOpenFurniture', function(Access) + if Access then + if not inFurniture then + FurnitureMenu(CurrentId) + else + FurnitureStores(CurrentId) + end + else + ESX.ShowNotification(TranslateCap("furni_command_permission"), 5000, "error") + end + end, CurrentId) + else + return + end + end) +end diff --git a/[esx_addons]/esx_property/client/html/copy.html b/[esx_addons]/esx_property/client/html/copy.html new file mode 100644 index 00000000..5d62698d --- /dev/null +++ b/[esx_addons]/esx_property/client/html/copy.html @@ -0,0 +1,25 @@ + + + + + + + + \ No newline at end of file diff --git a/[esx_addons]/esx_property/client/main.lua b/[esx_addons]/esx_property/client/main.lua new file mode 100644 index 00000000..df7b2a60 --- /dev/null +++ b/[esx_addons]/esx_property/client/main.lua @@ -0,0 +1,1516 @@ +--[[ + ESX Property - Properties Made Right! + Copyright (C) 2023 ESX-Framework + + 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 . +]] local GameBuild = GetGameBuildNumber() +Properties = {} +CurrentId = 0 +local CurrentDrawing = {} +InProperty = false +PlayerKeys = {} +InCCTV = false +local Blips = {} +local Shell = nil +local PM = Config.PlayerManagement +local CreateThread = CreateThread +local Wait = Wait +local ShowingUIs = {Exit = false, Wardrobe = false, Storage = false, ExitShell = false} +local ox_inventory = exports.ox_inventory +local DoScreenFadeIn = DoScreenFadeIn +local PlayerPedId = PlayerPedId +local GetEntityCoords = GetEntityCoords +local GetEntityHeading = GetEntityHeading +local IsControlJustPressed = IsControlJustPressed +local IsControlPressed = IsControlPressed +local DoScreenFadeOut = DoScreenFadeOut +function RefreshBlips() + for i = 1, #Blips, 1 do + RemoveBlip(Blips[i]) + Blips[i] = nil + end + + for k, v in pairs(Properties) do + if v.Owned and Config.OwnedBlips then + if v.Owner == ESX.PlayerData.identifier then + local Blip = AddBlipForCoord(v.Entrance.x, v.Entrance.y, v.Entrance.z) + SetBlipSprite(Blip, 40) + SetBlipAsShortRange(Blip, true) + SetBlipScale(Blip, 0.8) + SetBlipColour(Blip, 0) + BeginTextCommandSetBlipName("STRING") + AddTextComponentString(v.Name) + EndTextCommandSetBlipName(Blip) + SetBlipCategory(Blip, 11) + Blips[#Blips + 1] = Blip + elseif PlayerKeys[k] then + local Blip = AddBlipForCoord(v.Entrance.x, v.Entrance.y, v.Entrance.z) + SetBlipSprite(Blip, GameBuild >= 2699 and 811 or 134) + SetBlipAsShortRange(Blip, true) + SetBlipScale(Blip, 0.9) + SetBlipColour(Blip, 26) + BeginTextCommandSetBlipName("STRING") + AddTextComponentString(v.Name) + EndTextCommandSetBlipName(Blip) + SetBlipCategory(Blip, 11) + Blips[#Blips + 1] = Blip + end + elseif not v.Owned and Config.ForSaleBlips then + local Blip = AddBlipForCoord(v.Entrance.x, v.Entrance.y, v.Entrance.z) + SetBlipSprite(Blip, 350) + SetBlipAsShortRange(Blip, true) + SetBlipScale(Blip, 0.7) + BeginTextCommandSetBlipName("STRING") + AddTextComponentString(v.Name) + EndTextCommandSetBlipName(Blip) + SetBlipCategory(Blip, 10) + Blips[#Blips + 1] = Blip + end + end + + if PM.Enabled then + local Blip = AddBlipForCoord(PM.Locations.Entrance) + SetBlipSprite(Blip, 374) + SetBlipColour(Blip, 45) + SetBlipAsShortRange(Blip, true) + SetBlipScale(Blip, 0.7) + BeginTextCommandSetBlipName("STRING") + AddTextComponentString(TranslateCap("office_blip",PM.joblabel)) + EndTextCommandSetBlipName(Blip) + Blips[#Blips + 1] = Blip + end +end + +RegisterNetEvent("esx_property:syncProperties", function(properties, lastProperty) + while not ESX.PlayerLoaded and not ESX.PlayerData.identifier do + Wait(0) + end + Properties = properties + for house, data in pairs(Properties) do + if data.Keys then + for ident, vaues in pairs(data.Keys) do + if vaues and ident == ESX.PlayerData.identifier then + PlayerKeys[house] = true + end + end + end + end + if lastProperty then + if Properties[lastProperty.id] and (Properties[lastProperty.id].Owner == ESX.PlayerData.identifier or PlayerKeys[lastProperty.id]) then + AttemptHouseEntry(lastProperty.id) + else + ESX.TriggerServerCallback('esx_property:RemoveLastProperty', function() + SetEntityCoords(ESX.PlayerData.ped, vector3(lastProperty.coords.x, lastProperty.coords.y, lastProperty.coords.z)) + end) + end + end + RefreshBlips() +end) + +RegisterNetEvent("esx_property:giveKeyAccess", function(Property) + ESX.TriggerServerCallback("esx_property:ShouldHaveKey", function(Should) + if Should then + PlayerKeys[Property] = true + end + end, Property) +end) + +RegisterNetEvent("esx_property:RemoveKey", function(Property) + PlayerKeys[Property] = false +end) + +RegisterNetEvent('esx:setJob') +AddEventHandler('esx:setJob', function(job) + RefreshBlips() +end) + +exports("GetProperties", function() + return Properties +end) + +function OpenInteractionMenu(PropertyId, Interaction) + local Property = Properties[PropertyId] + if Property.Owned then + if Interaction == "Wardrobe" then + Config.WardrobeInteraction(PropertyId, Interaction) + elseif Interaction == "Storage" then + if Config.OxInventory then + exports.ox_inventory:openInventory('stash', {id = 'property-' .. PropertyId, owner = Property.Owner}) + end + end + end +end + +function GiveKeysMenu(Property) + ESX.TriggerServerCallback("esx_property:GetInsidePlayers", function(Players) + local Elements = {{unselectable = true, title = TranslateCap("nearby"), icon = "fas fa-user-plus"}, + {title = TranslateCap("back"), icon = "fas fa-arrow-left", value = "go_back"}} + for i = 1, #Players, 1 do + Elements[#Elements + 1] = {title = Players[i].Name, icon = "far fa-user", index = Players[i].Id, value = "user"} + end + ESX.OpenContext("right", Elements, function(menu, element) + if element.value == "go_back" then + ManageKeys(Property) + elseif element.value == "user" then + ESX.TriggerServerCallback("esx_property:GiveKey", function(KeyGiven) + if KeyGiven then + ESX.ShowNotification(TranslateCap("gave_key",element.title), "success") + ESX.CloseContext() + else + ESX.ShowNotification(TranslateCap("key_cannot_give"), "error") + end + end, Property, element.index) + end + end) + end, Property) +end + +function RemoveKeysMenu(Property) + ESX.TriggerServerCallback("esx_property:GetPlayersWithKeys", function(Players) + local Elements = {{unselectable = true, title = TranslateCap("remove_title"), icon = "fas fa-user-plus"}, + {title = TranslateCap("back"), icon = "fas fa-arrow-left", value = "go_back"}} + for k, v in pairs(Players) do + local name = v.name + local Id = k + Elements[#Elements + 1] = {title = name, icon = "far fa-user", value = "user", id = Id} + end + ESX.OpenContext("right", Elements, function(menu, element) + if element.value == "go_back" then + ManageKeys(Property) + elseif element.value == "user" then + ESX.TriggerServerCallback("esx_property:RemoveKey", function(KeyGiven) + if KeyGiven then + ESX.ShowNotification(TranslateCap("key_revoke_success", element.title), "success") + ESX.CloseContext() + else + ESX.ShowNotification(TranslateCap("key_revoke_error"), "error") + end + end, Property, element.id) + end + end) + end, Property) +end + +function ManageKeys(Property) + ESX.HideUI() + local Elements = {{unselectable = true, title = TranslateCap("key_management"), icon = "fas fa-key"}, + {title = TranslateCap("back"), icon = "fas fa-arrow-left", value = "go_back"}, + {title = TranslateCap("give_keys"), icon = "fas fa-plus", value = "give_keys"}, + {title = TranslateCap("remove_keys"), icon = "fas fa-minus", value = "remove_keys"}} + + ESX.OpenContext("right", Elements, function(menu, element) + if element.value == "go_back" then + OpenPropertyMenu(Property) + end + if element.value == "give_keys" then + GiveKeysMenu(Property) + end + if element.value == "remove_keys" then + RemoveKeysMenu(Property) + end + end) +end + +function SetPropertyName(Property) + local Name = Properties[Property].setName ~= "" and Properties[Property].setName or Properties[Property].Name + local Elements = {{unselectable = true, title = TranslateCap("name_edit"), icon = "fa-solid fa-signature"}, + {icon = "", title = TranslateCap("name"), input = true, inputType = "text", inputValue = Name, inputPlaceholder = Properties[Property].Name, + name = "setName"}, {icon = "fa-solid fa-check", title = TranslateCap("confirm"), name = "confirm"}} + + ESX.OpenContext("right", Elements, function(menu, element) + if element.name == "confirm" then + ESX.TriggerServerCallback("esx_property:SetPropertyName", function(Set) + if Set then + ESX.ShowNotification(TranslateCap("name_edit_success",menu.eles[2].inputValue), "success") + ESX.CloseContext() + else + ESX.ShowNotification(TranslateCap("name_edit_error",menu.eles[2].inputValue), "error") + end + end, Property, menu.eles[2].inputValue) + end + end) +end + +local SettingValue = "" + +function PropertyMenuElements(PropertyId) + local Property = Properties[PropertyId] + local elements = {{unselectable = true, title = Property.setName ~= "" and Property.setName or Property.Name, icon = "fas fa-home"}} + if Property.Owned then + if Property.Locked then + table.insert(elements, {title = TranslateCap("door_locked"), icon = "fas fa-lock", value = 'property_unlock'}) + else + table.insert(elements, {title = TranslateCap("door_unlocked"), icon = "fas fa-unlock", value = 'property_lock'}) + end + if ESX.PlayerData.identifier == Property.Owner then + table.insert(elements, + {title = TranslateCap("name_manage"), description = TranslateCap("name_manage_desc"), icon = "fa-solid fa-signature", value = 'property_name'}) + end + if not InProperty then + if ESX.PlayerData.identifier == Property.Owner then + table.insert(elements, {title = TranslateCap("key_management"), description = TranslateCap("key_management_desc"), icon = "fas fa-key", value = 'property_keys'}) + table.insert(elements, + {title = TranslateCap("sell_title"), description = TranslateCap("sell_desc", ESX.Math.GroupDigits(ESX.Round(Property.Price * 0.6))), + icon = "fas fa-dollar-sign", value = 'property_sell'}) + end + if Config.Raiding.Enabled and Property.Locked and ESX.PlayerData.job and ESX.GetPlayerData().job.name == "police" then + table.insert(elements, {title = TranslateCap("raid_title"), description = TranslateCap("raid_desc"), icon = "fas fa-bomb", value = 'property_raid'}) + end + else + if (Config.CCTV.Enabled and Properties[PropertyId].cctv.enabled) and (ESX.PlayerData.identifier == Property.Owner or PlayerKeys[PropertyId]) then + table.insert(elements, {title = TranslateCap("cctv_title"), description = TranslateCap("cctv_desc"), icon = "fas fa-video", value = 'property_cctv'}) + end + if (ESX.PlayerData.identifier == Property.Owner or PlayerKeys[PropertyId]) then + if Config.CanCustomiseInventoryAndWardrobePositions then + if Config.OxInventory then + table.insert(elements, {title = TranslateCap("inventory_title"), description = TranslateCap("inventory_desc"), + icon = "fa-solid fa-up-down-left-right", value = 'property_inventory'}) + end + table.insert(elements, {title = TranslateCap("wardrobe_title"), description = TranslateCap("wardrobe_desc"), icon = "fa-solid fa-up-down-left-right", + value = 'property_wardrobe'}) + end + table.insert(elements, + {title = TranslateCap("furniture_title"), description = TranslateCap("furniture_desc"), icon = "fas fa-boxes-stacked", value = 'property_furniture'}) + end + end + if (not Property.Locked or Config.OwnerCanAlwaysEnter and ESX.PlayerData.identifier == Property.Owner) and not InProperty then + table.insert(elements, {title = TranslateCap("enter_title"), icon = "fas fa-door-open", value = 'property_enter'}) + end + if Property.Locked and not InProperty and + not (Config.OwnerCanAlwaysEnter and ESX.PlayerData.identifier == Property.Owner or PlayerKeys[PropertyId]) then + table.insert(elements, {title = TranslateCap("knock_title"), icon = "fa-solid fa-hand-sparkles", value = 'property_knock'}) + end + else + if not PM.Enabled then + table.insert(elements, + {title = TranslateCap("buy_title"), description = TranslateCap("buy_desc", ESX.Math.GroupDigits(ESX.Round(Property.Price))), icon = "fas fa-shopping-cart", + value = 'property_buy'}) + else + if ESX.PlayerData.job.name == PM.job and ESX.PlayerData.job.grade >= PM.Permissions.SellProperty then + table.insert(elements, {title = TranslateCap("sellplayer_title"), description = TranslateCap("sellplayer_desc", ESX.Math.GroupDigits(ESX.Round(Property.Price))), + icon = "fas fa-shopping-cart", value = 'property_sell_re'}) + end + end + if not Property.Locked and not InProperty then + table.insert(elements, {title = TranslateCap("view_title"), icon = "fas fa-door-open", value = 'property_enter'}) + end + end + + if InProperty and (not Property.Locked or Config.CanAlwaysExit) then + table.insert(elements, {title = TranslateCap("exit_title"), icon = "fas fa-sign-out-alt", value = 'property_exit'}) + end + + return elements +end + +function OpenPropertyMenu(PropertyId) + if SettingValue ~= "" then + ESX.ShowNotification(TranslateCap("property_editing_error")) + return + end + ESX.HideUI() + local Property = Properties[PropertyId] + local elements = PropertyMenuElements(PropertyId) + + ESX.OpenContext("right", elements, function(menu, element) + if element.value == "property_unlock" then + ESX.TriggerServerCallback("esx_property:toggleLock", function(IsUnlocked) + if IsUnlocked then + local eles = PropertyMenuElements(PropertyId) + exports["esx_context"]:Refresh(eles) + else + ESX.ShowNotification(TranslateCap("unlock_error"), "error") + end + end, PropertyId) + end + if element.value == "property_lock" then + ESX.TriggerServerCallback("esx_property:toggleLock", function(IsUnlocked) + if IsUnlocked then + local eles = PropertyMenuElements(PropertyId) + exports["esx_context"]:Refresh(eles) + else + ESX.ShowNotification(TranslateCap("lock_error"), "error") + end + end, PropertyId) + end + if element.value == "property_cctv" then + CCTV(PropertyId) + end + if element.value == "property_raid" then + ESX.TriggerServerCallback("esx_property:CanRaid", function(CanRaid) + if CanRaid then + ESX.Progressbar(TranslateCap("prep_raid"), 15000, {FreezePlayer = true, animation = Config.Raiding.Animation, onFinish = function() + ESX.ShowNotification(TranslateCap("raiding"), "success") + AttemptHouseEntry(PropertyId) + end, onCancel = function() + ESX.ShowNotification(TranslateCap("cancel_raiding"), "error") + end}) + else + ESX.ShowNotification(TranslateCap("cannot_raid"), "error") + end + end, PropertyId) + end + if element.value == "property_enter" then + ESX.CloseContext() + AttemptHouseEntry(PropertyId) + end + if element.value == "property_keys" then + ESX.CloseContext() + ManageKeys(PropertyId) + end + if element.value == "property_name" then + ESX.CloseContext() + SetPropertyName(PropertyId) + end + if element.value == "property_furniture" then + ESX.CloseContext() + FurnitureMenu(PropertyId) + end + if element.value == "property_inventory" then + ESX.CloseContext() + ShowingUIs.Exit = false + SettingValue = "Storage" + Wait(20) + ESX.TextUI(TranslateCap("storage_pos_textui")) + while SettingValue ~= "" do + Wait(1) + if IsControlJustPressed(0, 47) then + SettingValue = "" + ESX.HideUI() + ESX.TriggerServerCallback("esx_property:SetInventoryPosition", function(Success) + if Success then + ESX.ShowNotification(TranslateCap("storage_pos_success"), "success") + else + ESX.ShowNotification(TranslateCap("storage_pos_error"), "error") + end + end, PropertyId, GetEntityCoords(ESX.PlayerData.ped)) + break + end + end + end + if element.value == "property_wardrobe" then + ESX.CloseContext() + ShowingUIs.Exit = false + SettingValue = "Wardrobe" + Wait(20) + ESX.TextUI(TranslateCap("wardrobe_pos_textui")) + while SettingValue ~= "" do + Wait(1) + if IsControlJustPressed(0, 47) then + SettingValue = "" + ESX.HideUI() + ESX.TriggerServerCallback("esx_property:SetWardrobePosition", function(Success) + if Success then + ESX.ShowNotification(TranslateCap("wardrobe_pos_success"), "success") + else + ESX.ShowNotification(TranslateCap("wardrobe_pos_error"), "error") + end + end, PropertyId, GetEntityCoords(ESX.PlayerData.ped)) + break + end + end + end + if element.value == "property_exit" then + ESX.CloseContext() + if SettingValue == "" then + AttemptHouseExit(PropertyId) + else + ESX.ShowNotification(TranslateCap("please_finish", SettingValue)) + end + end + if element.value == "property_buy" then + ESX.TriggerServerCallback("esx_property:buyProperty", function(IsBought) + if IsBought then + local eles = PropertyMenuElements(PropertyId) + exports["esx_context"]:Refresh(eles) + else + ESX.ShowNotification(TranslateCap("cannot_afford"), "error") + end + end, PropertyId) + end + if element.value == "property_sell_re" then + local Elements = {{unselectable = true, title = TranslateCap("select_player")}} + ESX.TriggerServerCallback("esx_property:GetNearbyPlayers", function(Players) + if Players then + for i = 1, #Players do + Elements[#Elements + 1] = {title = Players[i].name, value = Players[i].source} + end + + ESX.OpenContext("right", Elements, function(menu, element) + if element.value then + ESX.TriggerServerCallback("esx_property:attemptSellToPlayer", function(IsBought) + if IsBought then + local eles = PropertyMenuElements(PropertyId) + exports["esx_context"]:Refresh(eles) + else + ESX.ShowNotification(TranslateCap("cannot_sell"), "error") + end + end, PropertyId, element.value) + end + end) + end + end, PropertyId) + end + if element.value == "property_knock" then + ESX.ShowNotification(TranslateCap("knock_on_door"), "success") + ESX.TriggerServerCallback("esx_property:KnockOnDoor", function(HasKnocked) + if not HasKnocked then + ESX.ShowNotification(TranslateCap("nobody_home"), "error") + end + end, PropertyId) + end + if element.value == "property_sell" then + ESX.TriggerServerCallback("esx_property:sellProperty", function(IsSold) + if IsSold then + local eles = PropertyMenuElements(PropertyId) + exports["esx_context"]:Refresh(eles) + else + ESX.ShowNotification(TranslateCap("cannot_sell"), "error") + end + end, PropertyId) + end + end, function(menu) + CurrentDrawing.Showing = false + end) +end + +function AttemptHouseExit(PropertyId) + local Property = Properties[PropertyId] + + ESX.ShowNotification(TranslateCap("exiting"), "success") + FreezeEntityPosition(ESX.PlayerData.ped, true) + InProperty = false + CurrentId = 0 + SettingValue = "" + ESX.HideUI() + ESX.UI.Menu.CloseAll() + SetRainLevel(-1) + DoScreenFadeOut(1500) + Wait(1500) + TriggerServerEvent("esx_property:leave", PropertyId) + if Shell then + DeleteObject(Shell) + Shell = nil + end + if Config.Furniture.Enabled then + for k, v in pairs(SpawnedFurniture) do + DeleteObject(v.obj) + end + SpawnedFurniture = {} + end + Wait(1500) + FreezeEntityPosition(ESX.PlayerData.ped, false) + DoScreenFadeIn(1500) +end + +RegisterCommand("getoffset", function(source) + if InProperty then + local PlayerPed = ESX.PlayerData.ped + local Pcoords = GetEntityCoords(PlayerPed) + local Property = Properties[CurrentId] + local Interior = GetInteriorValues(Property.Interior) + print(vector3(Property.Entrance.x, Property.Entrance.y, 2000) - Pcoords) + end +end) + +function AttemptHouseEntry(PropertyId) + local Property = Properties[PropertyId] + local Interior = GetInteriorValues(Property.Interior) + if Interior.type == "shell" and not Config.Shells then + ESX.ShowNotification(TranslateCap("shell_disabled"), "error") + return + end + ESX.ShowNotification(TranslateCap("entering"), "success") + CurrentId = PropertyId + ESX.UI.Menu.CloseAll() + local Property = Properties[CurrentId] + FreezeEntityPosition(ESX.PlayerData.ped, true) + DoScreenFadeOut(1500) + Wait(1500) + if Interior.type == "shell" then + ESX.Streaming.RequestModel(joaat(Property.Interior), function() + if Shell then + DeleteObject(Shell) + Shell = nil + end + local Pos = vector3(Property.Entrance.x, Property.Entrance.y, 2000) + Shell = CreateObjectNoOffset(joaat(Property.Interior), Pos + Interior.pos, false, false, false) + SetEntityHeading(Shell, 0.0) + while not DoesEntityExist(Shell) do + Wait(1) + end + FreezeEntityPosition(Shell, true) + end) + end + if Properties[PropertyId].furniture then + for k, v in pairs(Properties[PropertyId].furniture) do + ESX.Game.SpawnLocalObject(v.Name, v.Pos, function(object) + SetEntityCoordsNoOffset(object, v.Pos.x, v.Pos.y, v.Pos.z) + SetEntityHeading(object, v.Heading) + SetEntityAsMissionEntity(object, true, true) + FreezeEntityPosition(object, true) + SpawnedFurniture[k] = {obj = object, data = v} + end) + end + end + local ShowingTextUI2 = false + FreezeEntityPosition(ESX.PlayerData.ped, false) + TriggerServerEvent("esx_property:enter", PropertyId) + Wait(1500) + DoScreenFadeIn(1800) + InProperty = true + if not Config.OxInventory then + Interior.positions.Storage = nil + Properties[CurrentId].positions.Storage = nil + end + + CreateThread(function() + while InProperty do + local Property = Properties[CurrentId] + local Sleep = 1000 + local Near = false + SetRainLevel(0.0) + local PlayerPed = ESX.PlayerData.ped + local PlayerCoords = GetEntityCoords(PlayerPed) + if Interior.type == "shell" then + if #(PlayerCoords - vector3(Property.Entrance.x, Property.Entrance.y, 1999)) < 5.0 then + Sleep = 0 + DrawMarker(27, vector3(Property.Entrance.x, Property.Entrance.y, 2000.2), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 50, 50, 200, 200, + false, false, 2, true, nil, nil, false) + if #(PlayerCoords.xy - vector2(Property.Entrance.x, Property.Entrance.y)) <= 2.5 then + Near = true + if not ShowingUIs.Exit then + + local Pname = Properties[CurrentId].setName ~= "" and Properties[CurrentId].setName or Properties[CurrentId].Name + ESX.TextUI(TranslateCap("access_textui", Pname)) + ShowingUIs.Exit = true + end + if IsControlJustPressed(0, 38) then + OpenPropertyMenu(CurrentId) + end + else + if not Near and ShowingUIs.Exit and SettingValue == "" then + ShowingUIs.Exit = false + ESX.HideUI() + ESX.CloseContext() + end + end + end + + if Property.Owned then + for k, v in pairs(Properties[CurrentId].positions) do + local v = vector3(v.x, v.y, v.z) + local CanDo = true + if CanDo then + local Poss = vector3(Property.Entrance.x, Property.Entrance.y, 1999) - v + if #(PlayerCoords - Poss) < 5.0 then + Sleep = 0 + DrawMarker(27, Poss, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 200, 50, 50, 200, false, false, 2, true, nil, nil, false) + if #(PlayerCoords - Poss) < 2.0 and SettingValue == "" then + Near = true + if not ShowingUIs[k] then + ShowingUIs[k] = true + + ESX.TextUI(TranslateCap("access_textui", k)) + end + if IsControlJustPressed(0, 38) then + OpenInteractionMenu(CurrentId, k) + end + else + if not Near and ShowingUIs[k] and SettingValue == "" then + ShowingUIs[k] = false + ESX.HideUI() + end + end + end + end + end + if not Near and ShowingUIs and SettingValue == "" then + ShowingTextUI2 = false + ESX.HideUI() + end + end + else + if #(PlayerCoords - Interior.pos) < 5.0 then + Sleep = 0 + DrawMarker(27, vector3(Interior.pos.xy, Interior.pos.z - 0.98), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 50, 50, 200, 200, false, false, + 2, true, nil, nil, false) + if #(PlayerCoords - Interior.pos) < 2.0 then + if not ShowingUIs.Exit then + ShowingUIs.Exit = true + local Pname = Properties[CurrentId].setName ~= "" and Properties[CurrentId].setName or Properties[CurrentId].Name + ESX.TextUI(TranslateCap("access_textui", Pname)) + end + if IsControlJustPressed(0, 38) then + OpenPropertyMenu(CurrentId) + end + else + if ShowingUIs.Exit and SettingValue == "" then + ShowingUIs.Exit = false + ESX.HideUI() + ESX.CloseContext() + end + end + end + + if Property.Owned then + for k, v in pairs(Properties[CurrentId].positions) do + v = vector3(v.x, v.y, v.z) + local CanDo = true + + if CanDo then + if #(PlayerCoords - v) < 5.0 then + Sleep = 0 + DrawMarker(27, vector3(v.xy, v.z - 0.98), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 200, 50, 50, 200, false, false, 2, true, nil, + nil, false) + if #(PlayerCoords - v) < 2.0 then + if not ShowingUIs[k] then + ShowingUIs[k] = true + ESX.TextUI(TranslateCap("access_textui", k)) + end + if IsControlJustPressed(0, 38) then + OpenInteractionMenu(CurrentId, k) + end + else + if ShowingUIs[k] and SettingValue == "" then + ShowingUIs[k] = false + ESX.HideUI() + end + end + end + end + end + end + end + Wait(Sleep) + end + end) +end + +function StoreVehicle(PropertyId) + local Vehicle = GetVehiclePedIsIn(ESX.PlayerData.ped, false) + if Vehicle then + local VehProperties = ESX.Game.GetVehicleProperties(Vehicle) + VehProperties.DisplayName = GetLabelText(GetDisplayNameFromVehicleModel(VehProperties.model)) + ESX.TriggerServerCallback("esx_property:StoreVehicle", function(result) + if result then + SetEntityAsMissionEntity(Vehicle, true, true) + DeleteVehicle(Vehicle) + ESX.ShowNotification(TranslateCap("store_success"), "success") + return + else + ESX.ShowNotification(TranslateCap("store_error"), "error") + return + end + end, PropertyId, VehProperties) + end +end + +function AccessGarage(PropertyId) + ESX.TriggerServerCallback("esx_property:AccessGarage", function(Vehicles) + if Vehicles then + local elements = {{unselectable = true, icon = "fas fa-warehouse", title = TranslateCap("property_garage")}} + for k, v in pairs(Vehicles) do + elements[#elements + 1] = {title = v.vehicle.DisplayName .. " | " .. v.vehicle.plate, Properties = v.vehicle, index = k} + end + ESX.OpenContext("right", elements, function(menu, element) + if element.Properties then + ESX.CloseContext() + ESX.ShowNotification(TranslateCap("retriving_notify",element.Properties.DisplayName)) + if ESX.Game.IsSpawnPointClear(vector3(Properties[PropertyId].garage.pos.x, Properties[PropertyId].garage.pos.y, + Properties[PropertyId].garage.pos.z), 3.0) then + ESX.Game.SpawnVehicle(element.Properties.model, Properties[PropertyId].garage.pos, Properties[PropertyId].garage.Heading, + function(vehicle) + SetEntityAsMissionEntity(vehicle, true, true) + ESX.Game.SetVehicleProperties(vehicle, element.Properties) + TaskWarpPedIntoVehicle(ESX.PlayerData.ped, vehicle, -1) + SetModelAsNoLongerNeeded(element.Properties.model) + TriggerServerEvent("esx_property:SetVehicleOut", PropertyId, element.index) + end) + end + end + end) + else + ESX.ShowNotification(TranslateCap("cannot_access"), "error") + return + end + end, PropertyId) +end + +CreateThread(function() + local ShowingTextUI = false + while true do + local Sleep = 2000 + + if #(Properties) > 0 then + Sleep = 800 + local nearby = false + for i = 1, #(Properties) do + if Properties[i].Entrance then + local GetEntityCoords = GetEntityCoords + local IsControlJustPressed = IsControlJustPressed + local DrawMarker = DrawMarker + local Coords = GetEntityCoords(ESX.PlayerData.ped) + local Entrance = vector3(Properties[i].Entrance.x, Properties[i].Entrance.y, Properties[i].Entrance.z) + if not InCCTV then + if #(Coords - Entrance) < 10.0 then + Sleep = 0 + DrawMarker(27, Entrance, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 50, 200, 50, 200, false, false, 2, true, nil, nil, false) + if #(Coords - Entrance) < 1.5 then + nearby = true + local PropertyName = Properties[i].setName ~= "" and Properties[i].setName or Properties[i].Name + if not CurrentDrawing.Showing or CurrentDrawing.Name ~= PropertyName then + CurrentDrawing.Name = PropertyName + CurrentDrawing.Showing = true + ESX.TextUI(TranslateCap("access_textui", PropertyName)) + end + if IsControlJustPressed(0, 38) then + OpenPropertyMenu(i) + end + end + end + end + if Properties[i].garage.enabled and Properties[i].garage.pos and (ESX.PlayerData.identifier == Properties[i].Owner or PlayerKeys[i]) then + local Garage = vector3(Properties[i].garage.pos.x, Properties[i].garage.pos.y, Properties[i].garage.pos.z) + if #(Coords - Garage) < 10.0 then + Sleep = 0 + DrawMarker(36, Garage, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.5, 1.5, 1.5, 50, 200, 50, 200, false, false, 2, true, nil, nil, false) + if #(Coords - Garage) < 3.0 then + nearby = true + if GetVehiclePedIsUsing(ESX.PlayerData.ped) ~= 0 then + local veh = GetVehiclePedIsIn(ESX.PlayerData.ped, false) + local vehmodel = GetEntityModel(veh) + local DisplayName = GetLabelText(GetDisplayNameFromVehicleModel(vehmodel)) + if not CurrentDrawing.Showing or CurrentDrawing.Name ~= DisplayName then + CurrentDrawing.Name = DisplayName + CurrentDrawing.Showing = true + ESX.TextUI(TranslateCap("store_textui", DisplayName)) + end + else + if not CurrentDrawing.Showing or CurrentDrawing.Name ~= "Garage" then + CurrentDrawing.Name = "Garage" + CurrentDrawing.Showing = true + ESX.TextUI(TranslateCap("access_textui", "garage")) + end + end + if IsControlJustPressed(0, 38) then + if GetVehiclePedIsUsing(ESX.PlayerData.ped) ~= 0 then + StoreVehicle(i) + else + AccessGarage(i) + end + end + end + end + end + end + end + if not nearby and CurrentDrawing.Showing and SettingValue == "" then + ESX.HideUI() + CurrentDrawing.Showing = false + ESX.CloseContext() + end + end + Wait(Sleep) + end +end) + +function OpenPMQuickMenu(Action) + if Action == "Entrance" then + DoScreenFadeOut(1500) + Wait(1500) + ESX.TriggerServerCallback("esx_property:PMenterOffice", function(HasEntered) + if HasEntered then + ESX.ShowNotification(TranslateCap("enter_office"), "success") + else + ESX.ShowNotification(TranslateCap("enter_office_error"), "error") + end + Wait(1500) + DoScreenFadeIn(1500) + end) + elseif Action == "Exit" then + DoScreenFadeOut(1500) + Wait(1500) + ESX.TriggerServerCallback("esx_property:PMexitOffice", function(HasExited) + if HasExited then + ESX.ShowNotification(TranslateCap("exit_office"), "success") + else + ESX.ShowNotification(TranslateCap("exit_office_error"), "error") + end + Wait(1500) + DoScreenFadeIn(1500) + end) + elseif Action == "Properties" then + TriggerEvent("esx_property:AdminMenu") + + elseif Action == "ActionsMenu" then + local elements = {{unselectable = true, title = TranslateCap("actions"), value = "RealEstateActions"}} + + if ESX.PlayerData.job.name == PM.job then + if ESX.PlayerData.job.grade >= PM.Permissions.CreateProperty then + elements[#elements + 1] = {title = TranslateCap("property_create"), value = "CreateProperty"} + end + if ESX.PlayerData.job.grade >= PM.Permissions.ManagePropertiesFromQuickActions then + elements[#elements + 1] = {title = TranslateCap("property_manage"), value = "manage"} + end + end + ESX.OpenContext("right", elements, function(menu, element) + if element.value == "CreateProperty" then + TriggerEvent("esx_property:CreateProperty") + end + if element.value == "manage" then + TriggerEvent("esx_property:AdminMenu") + end + end) + end +end + +ESX.RegisterInput(TranslateCap("realestate_command"), TranslateCap("realestate_command_desc"), "keyboard", "F5", function() + ESX.TriggerServerCallback('esx_property:CanAccessRealEstateMenu', function(Access) + if Access then + OpenPMQuickMenu("ActionsMenu") + end + end) +end) + +local PMdrawing = {Entrance = false, Exit = false} +CreateThread(function() + while PM.Enabled do + local Sleep = 2500 + local DrawMarker = DrawMarker + if ESX.IsPlayerLoaded() then + if ESX.PlayerData.job and ESX.PlayerData.job.name == PM.job then + Sleep = 1500 + + local Coords = GetEntityCoords(ESX.PlayerData.ped) + local nearby = false + + for k, v in pairs(PM.Locations) do + local Dist = #(Coords - v) + if Dist <= 10.0 then + nearby = true + Sleep = 0 + DrawMarker(27, v, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 50, 200, 50, 200, false, false, 2, true, nil, nil, false) + if Dist <= 1.5 then + if not PMdrawing[k] then + PMdrawing[k] = true + ESX.TextUI(TranslateCap("realestate_textui", k)) + end + if IsControlJustPressed(0, 38) then + OpenPMQuickMenu(k) + end + end + else + if not nearby and PMdrawing[k] then + ESX.HideUI() + PMdrawing[k] = false + ESX.CloseContext() + end + end + end + end + end + Wait(Sleep) + end +end) + +local HouseData = {} + +RegisterNetEvent("esx_property:CreateProperty", function() + ESX.TriggerServerCallback('esx_property:CanCreateProperty', function(data) + if data then + local GetEntityCoords = GetEntityCoords + local GetStreetNameAtCoord = GetStreetNameAtCoord + local GetStreetNameFromHashKey = GetStreetNameFromHashKey + local Pcoords = GetEntityCoords(ESX.PlayerData.ped) + local StreetHash = GetStreetNameAtCoord(Pcoords.x, Pcoords.y, Pcoords.z) + local StreetName = GetStreetNameFromHashKey(StreetHash) + local Zone = GetZoneAtCoords(Pcoords.x, Pcoords.y, Pcoords.z) + local ZoneScum = GetZoneScumminess(Zone) + local SuggestedPrice = Config.ZonePriceOptions.Enabled and Config.ZonePriceOptions.Default * Config.ZonePrices[ZoneScum] or nil + HouseData = {} + local Property = {{unselectable = true, icon = "fas fa-plus", title = TranslateCap("menu_title")}, + {value = 0, title = TranslateCap("element_title1"), icon = "fas fa-list-ol", description = TranslateCap("element_description1"), input = true, + inputType = "number", inputPlaceholder = "Number...", inputValue = nil, inputMin = 1, inputMax = 90000, index = "hnumber"}, + {title = TranslateCap("element_title2"), icon = "fas fa-dollar-sign", input = true, inputType = "number",description = TranslateCap("element_description2"), + inputPlaceholder = "Price...", inputValue = SuggestedPrice, inputMin = 1, inputMax = 900000000, index = "price"}, + {title = TranslateCap("element_title3"), description = TranslateCap("element_description3"), icon = "fas fa-home", index = "interior"}, + {title = TranslateCap("element_title4"), description = TranslateCap("element_description4"), icon = "fas fa-warehouse", value = {enabled = false}, + index = "garage", disabled = not (Config.Garage.Enabled)}, + {title = TranslateCap("element_title5"), description = TranslateCap("element_description5"), icon = "fas fa-video", + value = {enabled = false, rot = GetGameplayCamRot(2), maxleft = 80, maxright = -20}, index = "cctv", + disabled = not (Config.CCTV.Enabled)}, + {title = TranslateCap("element_title6"),description = TranslateCap("element_description6"), icon = "fas fa-map-marker-alt", index = "entrance"}, + {title = TranslateCap("element_create_title"), icon = "fas fa-check", description = TranslateCap("element_create_desc_1"), index = "creation"}} + local function OpenCreate() + local opos = {} + ESX.OpenContext("right", Property, function(menu, element) + if menu.eles[2] and menu.eles[2].inputValue and menu.eles[1].title == TranslateCap("menu_title") then + Property[2].inputValue = menu.eles[2].inputValue + HouseData.name = menu.eles[2].inputValue .. " " .. StreetName + end + if menu.eles[3] and menu.eles[3].inputValue and menu.eles[1].title == TranslateCap("menu_title") then + Property[3].inputValue = menu.eles[3].inputValue + HouseData.price = menu.eles[3].inputValue + end + if element.index then + if element.index == "entrance" then + local PlayerPos = GetEntityCoords(ESX.PlayerData.ped) + HouseData.entrance = {x = ESX.Math.Round(PlayerPos.x, 2), y = ESX.Math.Round(PlayerPos.y, 2), z = ESX.Math.Round(PlayerPos.z, 2) - 0.98} + Property[7].title = TranslateCap("entrance_set_title") + Property[7].description = TranslateCap("entrance_set_description",HouseData.entrance.x, HouseData.entrance.y, HouseData.entrance.z) + OpenCreate() + end + if element.index == "selectedinterior" then + HouseData.interior = element.value + Property[4].title = TranslateCap("interior_set_title") + Property[4].description = TranslateCap("interior_set_description",element.title) + OpenCreate() + end + if element.index == "IPL" then + local ints = {{unselectable = true, icon = "fas fa-warehouse", title = TranslateCap("ipl_title")}} + for i = 1, #(Config.Interiors.IPL) do + ints[#ints + 1] = {title = Config.Interiors.IPL[i].label, index = "selectedinterior", value = Config.Interiors.IPL[i].value} + exports["esx_context"]:Refresh(ints, "right") + end + end + if element.index == "Shells" then + local ints = {{unselectable = true, icon = "fas fa-warehouse", title = TranslateCap("shell_title")}} + for i = 1, #(Config.Interiors.Shells) do + ints[#ints + 1] = {title = Config.Interiors.Shells[i].label, index = "selectedinterior", value = Config.Interiors.Shells[i].value} + exports["esx_context"]:Refresh(ints, "right") + end + end + if element.index == "interior" then + local catsa = {{unselectable = true, icon = "fas fa-warehouse", title = TranslateCap("types_title")}, + {title = TranslateCap("ipl_title"), description = TranslateCap("ipl_description"), index = "IPL"}} + if Config.Shells then + catsa[3] = {title = TranslateCap("shell_title"), description = TranslateCap("shell_description"), index = "Shells"} + end + exports["esx_context"]:Refresh(catsa, "right") + end + if element.index == "return" then + OpenCreate() + end + if element.index == "cctv" then + local status = Property[6].value.enabled and TranslateCap("enabled") or TranslateCap("disabled") + opos = {{unselectable = true, icon = "fas fa-video", title = TranslateCap("cctv_settings")}, + {title = TranslateCap("toggle_title"), icon = status == TranslateCap("enabled") and "fas fa-eye" or "fas fa-eye-slash", + description = TranslateCap("toggle_description",status), index = "ToggleCCTV"}, + {title = TranslateCap("cctv_set_title"), icon = "fas fa-rotate", disabled = not Property[6].value.enabled, + description = TranslateCap("cctv_set_description"), index = "SetCCTVangle"}, + {title = TranslateCap("back"), icon = "fas fa-arrow-left", description = TranslateCap("back_description"), index = "return"}} + exports["esx_context"]:Refresh(opos, "right") + end + if element.index == "ToggleCCTV" then + Property[6].value.enabled = not Property[6].value.enabled + local status = Property[6].value.enabled and TranslateCap("enabled") or TranslateCap("disabled") + opos = {{unselectable = true, icon = "fas fa-video", title = TranslateCap("cctv_settings")}, + {title = TranslateCap("toggle_title"), icon = status == TranslateCap("enabled") and "fas fa-eye" or "fas fa-eye-slash", + description = TranslateCap("toggle_description",status), index = "ToggleCCTV"}, + {title = TranslateCap("cctv_set_title"), icon = "fas fa-rotate", disabled = not Property[6].value.enabled, + description = TranslateCap("cctv_set_description"), index = "SetCCTVangle"}, + {title = TranslateCap("back"), icon = "fas fa-arrow-left", description = TranslateCap("back_description"), index = "return"}} + exports["esx_context"]:Refresh(opos, "right") + end + if Config.Garage.Enabled and element.index == "garage" then + local status = Property[5].value.enabled and TranslateCap("enabled") or TranslateCap("disabled") + opos = {{unselectable = true, icon = "fas fa-warehouse", title = TranslateCap("garage_settings")}, + {title = TranslateCap("toggle_title"), icon = status == TranslateCap("enabled") and "fa-solid fa-toggle-on" or "fa-solid fa-toggle-off", + description = TranslateCap("toggle_description",status), index = "ToggleGarage"}} + if Property[5].value.enabled then + opos[#opos + 1] = {title = TranslateCap("garage_set_title"), icon = "fas fa-map-marker-alt", disabled = not Property[5].value.enabled, + description = TranslateCap("garage_set_description"), index = "SetGaragePos"} + if Property[5].value.pos then + opos[#opos + 1] = {title = TranslateCap("back"), icon = "fas fa-arrow-left", description = TranslateCap("back_description"), index = "return"} + end + else + opos[#opos + 1] = {title = TranslateCap("back"), icon = "fas fa-arrow-left", description = TranslateCap("back_description"), index = "return"} + end + exports["esx_context"]:Refresh(opos, "right") + end + if element.index == "ToggleGarage" then + Property[5].value.enabled = not Property[5].value.enabled + local status = Property[5].value.enabled and TranslateCap("enabled") or TranslateCap("disabled") + opos = {{unselectable = true, icon = "fas fa-warehouse", title = TranslateCap("garage_settings")}, + {title = TranslateCap("toggle_title"), icon = status == TranslateCap("enabled") and "fa-solid fa-toggle-on" or "fa-solid fa-toggle-off", + description = TranslateCap("toggle_description",status), index = "ToggleGarage"}} + if Property[5].value.enabled then + opos[#opos + 1] = {title = TranslateCap("garage_set_title"), icon = "fas fa-map-marker-alt", disabled = not Property[5].value.enabled, + description = TranslateCap("garage_set_description"), index = "SetGaragePos"} + else + opos[#opos + 1] = {title = TranslateCap("back"), icon = "fas fa-arrow-left", description = TranslateCap("back_description"), index = "return"} + end + exports["esx_context"]:Refresh(opos, "right") + end + if element.index == "SetGaragePos" then + ESX.CloseContext() + ESX.TextUI(TranslateCap("garage_textui")) + while true do + Wait(0) + if IsControlJustPressed(0, 38) then + local PlayerPos = GetEntityCoords(ESX.PlayerData.ped) + Property[5].value.pos = GetEntityCoords(ESX.PlayerData.ped) + Property[5].value.heading = GetEntityHeading(ESX.PlayerData.ped) + ESX.HideUI() + OpenCreate() + break + end + end + end + if element.index == "SetCCTVangle" then + ESX.CloseContext() + ESX.TextUI(TranslateCap("cctv_textui_1")) + local stage = "angle" + while true do + Wait(0) + if IsControlJustPressed(0, 38) then + if stage == "angle" then + Property[6].value.rot = GetGameplayCamRot(2) + ESX.TextUI(TranslateCap("cctv_textui_2")) + stage = "maxright" + elseif stage == "maxright" then + Property[6].value.maxright = GetGameplayCamRot(2).z + ESX.TextUI(TranslateCap("cctv_textui_3")) + stage = "maxleft" + elseif stage == "maxleft" then + Property[6].value.maxleft = GetGameplayCamRot(2).z + ESX.HideUI() + OpenCreate() + break + end + end + end + end + if element.index == "creation" then + if HouseData.price and HouseData.name and HouseData.entrance and HouseData.interior then + local newProperty = {name = HouseData.name, price = HouseData.price, interior = HouseData.interior, entrance = HouseData.entrance, + cctv = Property[6].value, garage = Property[5].value} + TriggerServerEvent("esx_property:server:createProperty", newProperty) + ESX.ShowNotification(TranslateCap("create_success"), "success") + ESX.CloseContext() + HouseData = {} + else + ESX.ShowNotification(TranslateCap("missing_data"), "error") + end + end + end + end) + end + OpenCreate() + end + end) +end) + +RegisterNetEvent("esx_property:AdminMenu", function() + ESX.TriggerServerCallback('esx_property:IsAdmin', function(data) + if data then + + function ManageProperty(currentProperty) + local Interior = GetInteriorValues(Properties[currentProperty].Interior) + ESX.TriggerServerCallback('esx_property:IsAdmin', function(data) + if data then + local opos = {} + local function GetData() + local elements = {{unselectable = true, icon = "fas fa-cogs", title = "Property Management"}, + {title = TranslateCap("back"), icon = "fas fa-arrow-left", value = "back"}, + {title = "Toggle Lock", icon = (Properties[currentProperty].Locked and "fas fa-lock") or "fas fa-unlock", + description = "Lock/Unlock The Property.", value = "lock"}, + {title = "Enter", description = "Force Entry Into The Property.", icon = "fas fa-door-open", value = "enter"}, + {title = "Price", icon = "fas fa-dollar-sign", description = "Alter The Price Of The Property.", value = "price"}, + {title = "Set Interior", description = "Renovate The Property`s Interior.", icon = "fas fa-home", value = "interior"}, + {title = "Entrance", description = "Set The Entrance As Your Position.", icon = "fas fa-map-marker-alt", + value = "entrance"}} + if Properties[currentProperty].setName ~= "" then + elements[#elements + 1] = {title = "Clear Custom Name", icon = "fa-solid fa-ban", + description = "Current Name: " .. Properties[currentProperty].setName, value = "remove_custom_name"} + end + if Config.Furniture.Enabled and #(Properties[currentProperty].furniture) > 0 then + elements[#elements + 1] = {title = "Reset Furniture", description = "Delete All Property Furniture", icon = "fas fa-eraser", + value = "refurni"} + end + if Config.Garage.Enabled then + elements[#elements + 1] = {title = "Garage", description = "Change Garage Settings", icon = "fa-solid fa-warehouse", value = "garage"} + end + if Config.CCTV.Enabled then + elements[#elements + 1] = {title = "CCTV", description = "Change CCTV Settings", icon = "fa-solid fa-camera", value = "cctv"} + end + if (Config.OxInventory) and Properties[currentProperty].positions.Storage and + (ESX.Round(Interior.positions.Storage.x, 2) ~= Properties[currentProperty].positions.Storage.x or + ESX.Round(Interior.positions.Storage.y, 2) ~= Properties[currentProperty].positions.Storage.y) then + elements[#elements + 1] = {title = "Reset Storage Position", description = "Set Storage Position To Interior Default.", + icon = "fas fa-eraser", value = "restorage"} + end + if Interior.positions.Wardrobe then + if ESX.Round(Interior.positions.Wardrobe.x, 2) ~= ESX.Round(Properties[currentProperty].positions.Wardrobe.x, 2) or + ESX.Round(Interior.positions.Wardrobe.y, 2) ~= ESX.Round(Properties[currentProperty].positions.Wardrobe.y, 2) then + elements[#elements + 1] = {title = "Reset Wardrobe Position", description = "Set Wardrobe Position To Interior Default.", + icon = "fas fa-eraser", value = "rewardrobe"} + end + end + if Properties[currentProperty].Owned then + elements[#elements + 1] = {title = "Remove Owner", icon = "fas fa-user-times", description = "Evict The Owner Of The Property.", + value = "removeowner"} + end + return elements + end + ESX.OpenContext("right", GetData(), function(menu, element) + if element.value then + if element.value == "lock" then + ESX.TriggerServerCallback("esx_property:toggleLock", function(IsUnlocked) + if IsUnlocked then + ESX.ShowNotification("Lock Toggled!", "success") + exports["esx_context"]:Refresh(GetData()) + else + ESX.ShowNotification("You Cannot Lock This Property", "error") + end + end, currentProperty) + end + if element.value == "enter" then + AttemptHouseEntry(currentProperty) + end + if element.value == "removeowner" then + ESX.TriggerServerCallback("esx_property:evictOwner", function(Evicted) + if Evicted then + ESX.ShowNotification("Owner Evicted!", "success") + exports["esx_context"]:Refresh(GetData()) + else + ESX.ShowNotification("You Cannot Evict This Owner!", "error") + end + end, currentProperty) + end + if element.value == "garage" then + local status = Properties[currentProperty].garage.enabled and TranslateCap("enabled") or TranslateCap("disabled") + opos = {{unselectable = true, icon = "fas fa-warehouse", title = TranslateCap("garage_settings")}, + {title = "Toggle Usage", icon = status == TranslateCap("enabled") and "fa-solid fa-toggle-on" or "fa-solid fa-toggle-off", + description = "Current Status: " .. status, value = "ToggleGarage"}} + if Properties[currentProperty].garage.enabled then + opos[#opos + 1] = {title = "Set Position", icon = "fas fa-map-marker-alt", + disabled = not Properties[currentProperty].garage.enabled, + description = "Sets the Garage Position to your Players Position", value = "SetGaragePos"} + if Properties[currentProperty].garage.pos then + opos[#opos + 1] = {title = TranslateCap("back"), icon = "fas fa-arrow-left", description = "return to Property Management.", + value = "return"} + end + else + opos[#opos + 1] = {title = TranslateCap("back"), icon = "fas fa-arrow-left", description = "return to Property Management", value = "return"} + end + exports["esx_context"]:Refresh(opos, "right") + end + if element.value == "cctv" then + local status = Properties[currentProperty].cctv.enabled and TranslateCap("enabled") or TranslateCap("disabled") + opos = {{unselectable = true, icon = "fas fa-warehouse", title = TranslateCap("cctv_settings")}, + {title = "Toggle Usage", icon = status == TranslateCap("enabled") and "fa-solid fa-toggle-on" or "fa-solid fa-toggle-off", + description = "Current Status: " .. status, value = "ToggleCCTV"}} + if Properties[currentProperty].cctv.enabled then + opos[#opos + 1] = {title = "Set Angle", icon = "fas fa-map-marker-alt", disabled = not Properties[currentProperty].cctv.enabled, + description = "Sets the Angle of the Camera.", value = "SetCCTVangle"} + if Properties[currentProperty].cctv.rot then + opos[#opos + 1] = {title = TranslateCap("back"), icon = "fas fa-arrow-left", description = "return to Property Management.", + value = "return"} + end + else + opos[#opos + 1] = {title = TranslateCap("back"), icon = "fas fa-arrow-left", description = "return to Property Management", value = "return"} + end + exports["esx_context"]:Refresh(opos, "right") + end + if element.value == "ToggleGarage" then + ESX.TriggerServerCallback("esx_property:toggleGarage", function(IsUnlocked, enabled) + if IsUnlocked then + ESX.ShowNotification("Garage Toggled!", "success") + local status = enabled and TranslateCap("enabled") or TranslateCap("disabled") + opos = {{unselectable = true, icon = "fas fa-warehouse", title = TranslateCap("garage_settings")}, + {title = "Toggle Usage", icon = status == TranslateCap("enabled") and "fa-solid fa-toggle-on" or "fa-solid fa-toggle-off", + description = "Current Status: " .. status, value = "ToggleGarage"}} + if enabled then + opos[#opos + 1] = {title = "Set Position", icon = "fas fa-map-marker-alt", disabled = not enabled, + description = "Sets the Garage Position to your Players Position", value = "SetGaragePos"} + if Properties[currentProperty].garage.pos then + opos[#opos + 1] = {title = TranslateCap("back"), icon = "fas fa-arrow-left", description = "return to Property Management.", + value = "return"} + end + else + opos[#opos + 1] = {title = TranslateCap("back"), icon = "fas fa-arrow-left", description = "return to Property Management", + value = "return"} + end + exports["esx_context"]:Refresh(opos, "right") + else + ESX.ShowNotification("You ~r~Cannot~s~ Toggle This Option!", "error") + end + end, currentProperty) + end + if element.value == "ToggleCCTV" then + ESX.TriggerServerCallback("esx_property:toggleCCTV", function(IsUnlocked, enabled) + if IsUnlocked then + ESX.ShowNotification("CCTV Toggled!", "success") + local status = enabled and TranslateCap("enabled") or TranslateCap("disabled") + opos = {{unselectable = true, icon = "fas fa-warehouse", title = TranslateCap("cctv_settings")}, + {title = "Toggle Usage", icon = status == TranslateCap("enabled") and "fa-solid fa-toggle-on" or "fa-solid fa-toggle-off", + description = "Current Status: " .. status, value = "ToggleCCTV"}} + if enabled then + opos[#opos + 1] = {title = "Set Angle", icon = "fas fa-map-marker-alt", disabled = not enabled, + description = "Sets the Angle of the Camera.", value = "SetCCTVangle"} + if Properties[currentProperty].cctv.rot then + opos[#opos + 1] = {title = TranslateCap("back"), icon = "fas fa-arrow-left", description = "return to Property Management.", + value = "return"} + end + else + opos[#opos + 1] = {title = TranslateCap("back"), icon = "fas fa-arrow-left", description = "return to Property Management", + value = "return"} + end + exports["esx_context"]:Refresh(opos, "right") + else + ESX.ShowNotification("You ~r~Cannot~s~ Toggle This Option!", "error") + end + end, currentProperty) + end + if element.value == "SetGaragePos" then + ESX.CloseContext() + ESX.TextUI("Press ~b~[E]~s~ to Set Position") + SettingValue = "Garage" + while SettingValue ~= "" do + Wait(0) + if IsControlJustPressed(0, 38) then + ESX.TriggerServerCallback("esx_property:SetGaragePos", function(IsChanged) + if IsChanged then + ESX.HideUI() + SettingValue = "" + ESX.ShowNotification("Position Changed!", "success") + ManageProperty(currentProperty) + else + ESX.ShowNotification("You ~r~Cannot~s~ Change This Option!", "error") + end + end, currentProperty, GetEntityHeading(ESX.PlayerData.ped)) + break + end + end + end + if element.value == "SetCCTVangle" then + ESX.CloseContext() + ESX.TextUI("Press ~b~[E]~s~ to Set Angle") + local stage = "angle" + SettingValue = "cctv" + local Angles = {} + while stage do + Wait(0) + if IsControlJustPressed(0, 38) then + if stage == "angle" then + Angles.rot = GetGameplayCamRot(2) + ESX.TextUI("Press ~b~[E]~s~ to Set Max Right Roation") + stage = "maxright" + elseif stage == "maxright" then + Angles.maxright = GetGameplayCamRot(2).z + ESX.TextUI("Press ~b~[E]~s~ to Set Max Left Roation") + stage = "maxleft" + elseif stage == "maxleft" then + Angles.maxleft = GetGameplayCamRot(2).z + ESX.TriggerServerCallback("esx_property:SetCCTVangle", function(IsChanged) + if IsChanged then + SettingValue = "" + stage = nil + ESX.HideUI() + ESX.ShowNotification("Angle Changed!", "success") + ManageProperty(currentProperty) + else + ESX.ShowNotification("You ~r~Cannot~s~ Change This Option!", "error") + end + end, currentProperty, Angles) + break + end + end + end + end + if element.value == "remove_custom_name" then + ESX.TriggerServerCallback("esx_property:RemoveCustomName", function(Cleared) + if Cleared then + ESX.ShowNotification("Property Name Reset!", "success") + exports["esx_context"]:Refresh(GetData()) + else + ESX.ShowNotification("You Cannot Reset This Property`s Name!", "error") + end + end, currentProperty) + end + if element.value == "refurni" then + ESX.TriggerServerCallback("esx_property:RemoveAllfurniture", function(Removed) + if Removed then + ESX.ShowNotification("Furniture Reset!", "success") + exports["esx_context"]:Refresh(GetData()) + else + ESX.ShowNotification("You Cannot Reset This Property!", "error") + end + end, currentProperty) + end + if element.value == "restorage" then + ESX.TriggerServerCallback("esx_property:SetInventoryPosition", function(Reset) + if Reset then + ESX.ShowNotification("~b~Storage~s~ Position Reset!", "success") + exports["esx_context"]:Refresh(GetData()) + else + ESX.ShowNotification("You Cannot Reset This Property!", "error") + end + end, currentProperty, Interior.positions.Storage, true) + end + if element.value == "rewardrobe" then + ESX.TriggerServerCallback("esx_property:SetWardrobePosition", function(Reset) + if Reset then + ESX.ShowNotification("~b~Wardrobe~s~ Position Reset!", "success") + exports["esx_context"]:Refresh(GetData()) + else + ESX.ShowNotification("You Cannot Reset This Property!", "error") + end + end, currentProperty, Interior.positions.Wardrobe, true) + end + if element.value == "back" then + AdminOptions(currentProperty) + end + if element.value == "return" then + exports["esx_context"]:Refresh(GetData()) + end + if element.value == "price" then + ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'PropertyPrice', {title = "Property Price"}, function(data4, menu4) + if data4.value then + ESX.TriggerServerCallback("esx_property:ChangePrice", function(IsChanged) + if IsChanged then + ESX.ShowNotification("Price Changed!", "success") + menu4.close() + else + ESX.ShowNotification("You Cannot Change this property!", "error") + end + end, currentProperty, tonumber(data4.value)) + end + end, function(data4, menu4) + menu4.close() + end) + end + if element.value == "interior" then + local elements = {{unselectable = true, icon = "fas fa-warehouse", title = "Interior Types"}, + {title = "IPL Interiors", description = "Native GTA Interiors, Made by R*", value = "IPL"}} + if Config.Shells then + elements[3] = {title = "Custom Interiors", description = "Custom Interiors, Made by You", value = "Shells"} + end + ESX.OpenContext("right", elements, function(menu, element) + if element.value then + local elements = {{unselectable = true, icon = "fas fa-warehouse", title = "Interiors"}} + for i = 1, #(Config.Interiors[element.value]) do + elements[#elements + 1] = {title = Config.Interiors[element.value][i].label, value = Config.Interiors[element.value][i].value} + end + ESX.OpenContext("right", elements, function(menu, element) + if element.value then + ESX.TriggerServerCallback("esx_property:ChangeInterior", function(IsChanged) + if IsChanged then + ESX.ShowNotification("Interior Changed!", "success") + ESX.CloseContext() + else + ESX.ShowNotification("You Cannot Change this property!", "error") + end + end, currentProperty, element.value) + end + end) + end + end, function() + ManageProperty(currentProperty) + end) + end + if element.value == "entrance" then + ESX.TriggerServerCallback("esx_property:ChangeEntrance", function(IsChanged) + if IsChanged then + ESX.ShowNotification("Entrance Changed!", "success") + else + ESX.ShowNotification("You Cannot Change this property!", "error") + end + end, currentProperty, GetEntityCoords(ESX.PlayerData.ped)) + end + end + end) + end + end) + end + + function AdminOptions(currentProperty) + ESX.TriggerServerCallback('esx_property:IsAdmin', function(data) + if data then + local elements = {{unselectable = true, icon = "fas fa-home", title = "Property Options"}, + {title = TranslateCap("back"), icon = "fas fa-arrow-left", value = "back"}, + {title = "Manage", icon = "fas fa-cogs", description = "Alter This Property's Settings.", value = "manage"}, + {title = "Teleport", description = "Teleport To This Property.", icon = "fas fa-map-marker-alt", value = "goto"}, + {title = "Set GPS", description = "Set GPS position To Property.", icon = "fa-solid fa-location-dot", value = "gps"}, + {title = "Delete", icon = "fas fa-trash-alt", description = "Remove Current Property.", value = "delete"}} + + ESX.OpenContext("right", elements, function(menu, element) + if element.value then + if element.value == "goto" then + SetEntityCoords(ESX.PlayerData.ped, Properties[currentProperty].Entrance.x, Properties[currentProperty].Entrance.y, + Properties[currentProperty].Entrance.z) + ESX.ShowNotification("Teleported to Property!") + end + if element.value == "gps" then + SetNewWaypoint(Properties[currentProperty].Entrance.x, Properties[currentProperty].Entrance.y) + ESX.ShowNotification("GPS Set!") + end + if element.value == "back" then + AdminMenu() + end + if element.value == "delete" then + ESX.TriggerServerCallback("esx_property:deleteProperty", function(response) + if response then + ESX.ShowNotification("Property Deleted!", "success") + ESX.CloseContext() + else + ESX.ShowNotification("You Cannot Delete This Property", "error") + end + end, currentProperty) + end + + if element.value == "manage" then + ManageProperty(currentProperty) + end + end + end) + end + end) + end + + function AdminMenu() + ESX.TriggerServerCallback('esx_property:IsAdmin', function(data) + if data then + local elements = {{unselectable = true, icon = "fas fa-home", title = "Properties Management"}} + for i = 1, #(Properties) do + if Properties[i].Entrance then + local description = "" + if Properties[i].setName ~= "" then + description = description .. "\nName: " .. Properties[i].setName + end + if Properties[i].Owned then + description = description .. "\nOwner: " .. Properties[i].OwnerName + end + table.insert(elements, {title = Properties[i].Name, value = i, description = description, icon = "fas fa-home"}) + end + end + ESX.OpenContext("right", elements, function(menu, element) + if element.value then + ESX.CloseContext() + AdminOptions(element.value) + end + end) + end + end) + end + + AdminMenu() + else + ESX.ShowNotification("You ~r~Cannot~s~ Access This Menu!", 5000, "error") + end + end) +end) + diff --git a/[esx_addons]/esx_property/config.lua b/[esx_addons]/esx_property/config.lua new file mode 100644 index 00000000..68ed348b --- /dev/null +++ b/[esx_addons]/esx_property/config.lua @@ -0,0 +1,665 @@ +Config = {} + +-------- Note: Can Cause quite abit of clutter --------------- +Config.ForSaleBlips = false -- Add Blips to For Sale Properties +Config.OwnedBlips = true -- Add blips for Owned Properties +--------------------------------------------------------------- + +--------------------- General Settings --------------------------------- +Config.Locale = GetConvar('esx:locale', 'en') +Config.Shells = false -- Enable/Disable Shell Interiors Default: false +Config.SaveInterval = 5 -- Interval in Minutes to Save Properties +Config.CanAlwaysExit = true -- Disabling this allows players to be locked in +Config.OwnerCanAlwaysEnter = true -- Disabling this means the owner can't enter the property unless door is unlocked +Config.MaxNameLength = 20 -- Max Name Length for Owned Properties Default: 20 +Config.CanCustomiseInventoryAndWardrobePositions = true -- Allow users to customise inventory and wardrobe positions Default: true +Config.WipeCustomNameOnSell = true -- Wipe custom name on sell Default: true +Config.WipeFurnitureOnSell = true -- Wipe custom name on sell Default: true + + +--------------------- Zone Suggested Prices --------------------------------- +Config.ZonePriceOptions = { + Enabled = true, -- Enable/Disable Zone Prices Modifiers Default: true + Default = 250000, -- Default Price of a property Default: 250000 +} + +-- The Amount to Multiply the Default Price by (if the above is enabled): +Config.ZonePrices = { + [0] = 10, -- Posh + [1] = 7, -- Nice + [2] = 5, -- Above Average + [3] = 3, -- Bellow Average + [4] = 2, -- Crap + [5] = 1, -- Scum +} + +--------------------- Raid Settings --------------------------------- +Config.Raiding = { + Enabled = true, -- Enable/Disable Raiding Default: true + CanAdminsRaid = true, -- Can Admins Raid Houses Default: true + ItemRequired = { -- Item Required to Raid -- Remove To Disable + RemoveItem = true, -- Remove Item from Inventory Default: true + name = "bread", -- Item Name Default: "bread" + label = "Bread", -- Item label Default: "Bread" + ItemCount = 1, -- Item Count Default: 1 + }, + Animation = { + type = "Scenario", + Scenario = "WORLD_HUMAN_HAMMERING", + }, +} + +--------------------- Garage Settings --------------------------------- +Config.Garage = { + Enabled = true, -- Enable/Disable Garage Default: true + OwnedVehiclesOnly = true, -- Only allow owned vehicles to be stored Default: true + MySQLquery = "UPDATE `owned_vehicles` SET `stored` = ? WHERE `plate` = ?" -- MySQL Query to store vehicles `?` = True/false, Vehicle Plate +} + +--------------------- Log Settings --------------------------------- +if IsDuplicityVersion() then + Config.Logs = { + Webhook = "", + LogLevel = 1 + + ----------- Log Levels ------------ + -- 0 = No Logs + -- 1 = Logs Major Actions + -- 2 = Logs Major + Minor Actions + -- 3 = Logs All Actions + ------------------------------------- + } +end +--------------------- Furniture Settings --------------------------------- +Config.Furniture = { + Enabled = true, + RotationSpeed = 0.4, -- Object Rotation Speed + MovementSpeed = 0.01, -- Object Movement Speed + MovementZspeed = 0.05, -- Object Z Movement Speed + WipeFurnitureOnSell = true, -- Wipe Furniture On Sell Default: true + Controls = { + PlusX = 174, -- lEFT Arrow + MinusX = 175, -- RIGHT Arrow + RotateRight = 19, -- Alt, + RotateLeft = 21, -- Shift, + Up = 96, -- UP Arrow + Down = 97, -- DOWN Arrow + Confirm = 201, -- ENTER + Exit = 194, -- BACKSPACE + PlusY = 172, -- SHIFT + MinusY = 173, -- SHIFT + } +} + +--------------------- CCTV Settings --------------------------------- +Config.CCTV = { + Enabled = true, + PictureWebook = IsDuplicityVersion() and "" or "DO NOT CHANGE THIS STRING", -- Set a discord webhook here to enable taking pictures of the CCTV (link is copied to user`s clipboard) + HeightAboveDoor = 2.5, -- Height above the door to place the cctv camera + FOV = 80.0, -- Camera Field of View + MaxLeftRotation = 80, + MaxZoom = 30, + MinZoom = 100, + MaxRightRotation = -50, + MaxUpRotation = 10, + MaxDownRotation = -45, + RotateSpeed = 0.3, -- Camera Rotation Speed + Controls = { + Left = 34, -- lEFT Arrow + Right = 35, -- RIGHT Arrow + Screenshot = 201, -- ENTER + NightVision = 38, -- E + ZoomIn = 96, -- UP Arrow + ZoomOut = 97, -- DOWN Arrow + Up = 32, -- UP Arrow + Down = 33, -- DOWN Arrow + Exit = 194, -- BACKSPACE + } +} + + +-------- Groups allowed to use Admin Functions ------------------- +Config.AllowedGroups = { + -- Note: Superadmin is not a group In ESX + "admin" +} + +------------------Interacting With Wardrobe Markers ------------------------------ +Config.WardrobeInteraction = function(PropertyId, Interaction) + ESX.TriggerServerCallback('esx_property:getPlayerDressing', function(dressing) + local elements = {{unselectable = true, icon = "fas fa-tshirt", title = "Wardrobe"}} + + for i=1, #dressing, 1 do + elements[#elements + 1] = { + title = dressing[i], + value = i + } + end + + ESX.OpenContext("left", elements, function(menu, element) + TriggerEvent('skinchanger:getSkin', function(skin) + ESX.TriggerServerCallback('esx_property:getPlayerOutfit', function(clothes) + TriggerEvent('skinchanger:loadClothes', skin, clothes) + TriggerEvent('esx_skin:setLastSkin', skin) + + TriggerEvent('skinchanger:getSkin', function(skin) + TriggerServerEvent('esx_skin:save', skin) + end) + end, element.value) + end) + end) +end) +end + +--------------------- Real Estate Settings ---------- +Config.PlayerManagement = { + Enabled = false, -- Enable/Disable Player Management Default: true + job = "realestateagent", -- Job Required to Manage Players Default: "realestateagent" + joblabel = "Estate Agent", -- Job Label Default: "Estate Agent" + society = "society_realestateagent", -- Society Required to Manage Players Default: "society_realestateagent" + SalePercentage = 0.25, -- Sale Percentage Default: 0.25 -- Note: This is a percentage of the price of the house + jobRanks = { + { + grade = 0, + name = "trainee", + label = "Trainee", + salary = 15, + }, + { + grade = 1, + name = "agent", + label = "Experienced Agent", + salary = 30, + }, + { + grade = 2, + name = "boss", + label = "Chief Agent", + salary = 45, + }, + }, + Permissions = { -- Minimum Grade Required for Action + CreateProperty = 0, -- Create Property + DeleteProperty = 2, -- Delete Property + ViewProperties = 0, -- View All Properties + SellProperty = 0, -- Sell Property to players + ToggleCCTV = 1, -- Change CCTV settings + ToggleLock = 0, -- Change Lock Settings + ToggleGarage = 1, -- Change Garage Settings + SetPropertyName =1, -- Change Property Name + RemovePropertyName = 1, -- Remove Property Name + SetPropertyPrice = 0, -- Change Property Price + ChangeInterior = 1, -- Change Interior + ResetFurniture = 0, -- Reset Furniture + EvictOwner = 0, -- Evict Owners + ChangeEntrance = 0, -- Change Entrance + EditInteriorPositions = 1, -- Edit Interior Positions + ManagePropertiesFromQuickActions = 1, -- Manage Properties From Quick Actions (F6) + }, + Locations = { + Entrance = vector3( -199.151, -575.000, 39.489 ), -- Entrance Location Default: vector3( -199.151, -575.000, 39.489 ) + Exit = vector3( -141.226, -614.166, 167.820 ), -- Exit Location (Interior Location) Default: vector3( -141.226, -614.166, 167.820 ) + Properties = vector3(-138.9228, -634.1255, 167.8504), -- Property Management Menu Default: vector3(-138.9228, -634.1255, 167.8504) + } +} + +----------------------Long Lists---------------------------------------- +Config.FurnitureStores = { + { + title = "Ikea", + Catagories = {"Decorations", "Tables", "Sofas", "Bedroom"} + }, + { + title = "Electronics Store", + Catagories = {"Electronics","Kitchen"} + }, +} + +Config.Interiors = { + IPL = { + { + label = "Modern Apartment", + value = "apa_v_mp_h_01_a", + positions = { + Wardrobe = vec3(-797.72, 328.03, 220.42), + Storage = vec3(-795.67, 326.67, 217.037), -- Only Works with Ox Inventory + }, + type = "ipl", + pos = vector3(-786.8663, 315.7642, 217.6385) + }, + { + label = "Mody Apartment", + value = "apa_v_mp_h_02_a", + positions = { + Wardrobe = vec3(-797.591187, 327.995605, 220.424194), + Storage = vec3(-795.441772, 326.307678, 217.037354), -- Only Works with Ox Inventory + }, + type = "ipl", + pos = vector3(-787.0749, 315.8198, 217.6386) + }, + { + label = "Vibrant Apartment", + value = "apa_v_mp_h_03_a", + positions = { + Wardrobe = vec3(-798.131897, 328.417572, 220.424194), + Storage = vec3(-796.786804, 327.164825, 217.037354),-- Only Works with Ox Inventory + }, + type = "ipl", + pos = vector3(-786.6245, 315.6175, 217.6385) + }, + { + label = "Regal Apartment", + value = " apa_v_mp_h_07_c", + positions = { + Wardrobe = vector3(-797.6594, 328.4619, 190.5122), + Storage = vector3(-796.0188, 326.7346, 187.3131), -- Only Works with Ox Inventory + }, + type = "ipl", + pos = vector3(-787.0574, 315.6567, 187.9135) + }, + { + label = "Tinsel Towers", + value = "tinsel_towers", + positions = { + Wardrobe = vector3(-594.5938, 55.6803, 96.9996), + Storage = vector3(-622.8556, 54.7504, 97.5995), -- Only Works with Ox Inventory + }, + type = "ipl", + pos = vector3(-603.7109, 59.0251, 98.2002) + }, + { + label = "Dell Perro Heights", + value = "dell_perro_heights", + positions = { + Wardrobe = vector3(-1467.2574, -536.9599, 50.7325), + Storage = vector3(-1457.0121, -531.0082, 56.9373), -- Only Works with Ox Inventory + }, + type = "ipl", + pos = vector3(-1449.7212, -526.1263, 56.9290) + }, + { + label = "Mid-Tier Apartment", + value = "mid-end", + positions = { + Wardrobe = vector3(350.7425, -994.2987, -99.1472), + Storage = vector3(343.8686, -1001.1404, -99.1962), -- Only Works with Ox Inventory + }, + type = "ipl", + pos = vector3(346.5085, -1012.7023, -99.1962) + }, + { + label = "Low-End Apartment", + value = "low-end", + positions = { + Wardrobe = vector3(259.9943, -1003.4595, -99.0086), + Storage = vector3(265.9162, -999.3954, -99.0086), -- Only Works with Ox Inventory + }, + type = "ipl", + pos = vector3(266.0285, -1007.4129, -101.0086) + }, + { + label = "High-End House 1", + value = "wild_oats", + positions = { + Wardrobe = vector3(-167.4227, 487.7173, 133.0), + Storage = vector3(-174.4463, 492.5583, 130.0436), -- Only Works with Ox Inventory + }, + type = "ipl", + pos = vector3(-174.3548, 497.7895, 137.6538) + }, + { + label = "Clubhouse", + value = "bkr_biker_interior_placement_interior_0_biker_dlc_int_01_milo", + positions = { + Wardrobe = vector3(1116.9374, -3162.8467, -36.8705), + Storage = vector3(1112.0820, -3151.4019, -37.5186), -- Only Works with Ox Inventory + }, + type = "ipl", + pos = vector3(1121.1871, -3152.6177, -37.0628) + }, + }, + Shells = { + { + label = "Michael House", + value = "shell_michael", + positions = { + Wardrobe = vector3(-12.71,8.36,-5.8), -- Wardrobe Location + Storage = vector3(-177.77,-2.05,-1.44), -- Only Works with Ox Inventory + }, + type = "shell", + pos = vector3(9.290245, -5.563965, 5.053642) + }, + { + label = "Standard Motel", + value = "standardmotel_shell", + positions = { + Wardrobe = vector3(-1.435, -4.74, -1.0), + Storage = vector3(2.45, -4.37, -1.0), -- Only Works with Ox Inventory + }, + type = "shell", + pos = vector3(0.054924, 2.459473, 1.546776) + }, + { + label = "Mid-Tier apartment", + value = "furnitured_midapart", + positions = { + Wardrobe = vector3(-4.5, -18.99, -1.2), + Storage = vector3(-5.1, -13.68, -1.2), -- Only Works with Ox Inventory + }, + type = "shell", + pos = vector3(-1.434044, 9.802368, 1.511887) + }, + { + label = "Trever`s Trailer", + value = "shell_trevor", + positions = { + Wardrobe = vector3(-0.58, -4.85, -1.0), + Storage = vector3(3.02, -1.467, -1.0), -- Only Works with Ox Inventory + }, + type = "shell", + pos = vector3(-0.156189, 3.585266, 1.398056) + }, + { + label = "Trailer", + value = "shell_trailer", + positions = { + Wardrobe = vector3(3.8, -2.92, -1.0), + Storage = vector3(-5.69, -0.57, -1.12), -- Only Works with Ox Inventory + }, + type = "shell", + pos = vector3(1.282555, 1.713379, 1.469521) + }, + { + label = "Low-End Apartment", + value = "shell_v16low", + positions = { + Wardrobe = vector3(7.31, -6.71, -3.0), + Storage = vector3(0.61, -8.30, -3.0), -- Only Works with Ox Inventory + }, + type = "shell", + pos = vector3(-4.798767, 6.197479, 2.644226) + }, + { + label = "Store", + value = "shell_store1", + positions = { + Storage = vector3(0.03, -8.4, -1.1), -- Only Works with Ox Inventory + }, + type = "shell", + pos = vector3(2.666809, 4.603638, 1.609573) + }, + { + label = "Ranch", + value = "shell_ranch", + positions = { + Wardrobe = vector3(-2.78, -10.76, -1.0), + Storage = vector3(3.1, 8.04, -1.0), -- Only Works with Ox Inventory + }, + type = "shell", + pos = vector3(0.873413, -5.749237, 2.416748) + }, + } +} + +Config.FurnitureCatagories = +{Decorations = {{name = "apa_mp_h_acc_bottle_01", title = "Bottle", price = 700}, + {name = "apa_mp_h_acc_candles_01", title = "Candles", price = 700}, + {name = "p_int_jewel_mirror", title = "Mirror", price = 700}, + {name = "apa_mp_h_acc_dec_plate_01", title = "Decorative Plate", price = 700}, + {name = "apa_mp_h_acc_vase_01", title = "Vase", price = 700}, + {name = "v_res_desktidy", title = "Desk Supplies", price = 700}, + {name = "ex_prop_ashtray_luxe_02", title = "Ashtray", price = 700}, + {name = "v_res_mp_ashtrayb", title = "Ashtray 2", price = 300}, + {name = "prop_bong_01", title = "Bong", price = 700}, + {name = "prop_mr_rasberryclean", title = "Mr Rasberry Clean", price = 700}, + {name = "prop_acc_guitar_01", title = "Guitar", price = 1000}, + {name = "p_planning_board_04", title = "Planning Board", price = 500}, + {name = "prop_hotel_clock_01", title = "Hotel Clock", price = 500}, + {name = "p_cs_pamphlet_01_s", title = "Pamphlet", price = 700}, + {name = "prop_big_clock_01", title = "Big Clock", price = 500}, + {name = "prop_egg_clock_01", title = "Egg Clock", price = 500}, + {name = "prop_ld_greenscreen_01", title = "Green Screen", price = 100}, + {name = "prop_dart_bd_cab_01", title = "Dart", price = 500}, + {name = "prop_dart_bd_01", title = "Dart 2", price = 500}, + {name = "prop_exercisebike", title = "Exercise Bike", price = 500}, + {name = "p_laz_j02_s", title = "Laz", price = 500}, + {name = "v_res_cherubvase", title = "White Vase", price = 500}, + {name = "v_res_d_paddedwall", title = "Padded Wall", price = 500}, + {name = "prop_dummy_01", title = "Dummy", price = 100}, + {name = "prop_el_guitar_01", title = "E Guitar 1", price = 100}, + {name = "prop_el_guitar_02", title = "E Guitar 2", price = 100}, + {name = "prop_el_guitar_03", title = "E Guitar 2", price = 100}, + {name = "v_res_mbowlornate", title = "Ornate Bowl", price = 300}, + {name = "v_res_mbronzvase", title = "Bronze Vase", price = 300}, + {name = "prop_ceramic_jug_01", title = "Ceramic Jug", price = 100}, + {name = "v_res_m_candle", title = "Candle Large 1", price = 300}, + {name = "v_res_m_candlelrg", title = "Candle Large 2", price = 300}, + {name = "apa_mp_h_acc_candles_06", title = "Candles 1", price = 50}, + {name = "apa_mp_h_acc_candles_05", title = "Candles 2", price = 50}, + {name = "apa_mp_h_acc_candles_04", title = "Candles 3", price = 50}, + {name = "apa_mp_h_acc_rugwools_01", title = "Rug 1", price = 300}, + {name = "apa_mp_h_acc_rugwoolm_01", title = "Rug 2", price = 300}, + {name = "apa_mp_h_acc_rugwooll_04", title = "Rug 3", price = 300}, + {name = "apa_mp_h_acc_rugwooll_03", title = "Rug 4", price = 300}, + {name = "apa_mp_h_acc_rugwoolm_04", title = "Rug 5", price = 300}, + {name = "apa_mp_h_acc_rugwools_03", title = "Rug 6", price = 300}, + {name = "v_res_fh_pouf", title = "Pouf", price = 300}, + {name = "v_res_fh_sculptmod", title = "Sculpture", price = 300}, + {name = "prop_v_5_bclock", title = "Vintage Clock", price = 300}, + {name = "prop_v_15_cars_clock", title = "American Flag Clock", price = 300}, + {name = "prop_sm_19_clock", title = "Modern Clock", price = 300}, + {name = "prop_sports_clock_01", title = "Sports Clock", price = 300}, + {name = "prop_mem_candle_01", title = "Candle 1", price = 300}, + {name = "prop_game_clock_01", title = "Crown Clock", price = 300}, + {name = "prop_game_clock_02", title = "Kronos Clock", price = 300}, + {name = "prop_id2_20_clock", title = "Modern Clock 2", price = 300}, + {name = "ex_office_citymodel_01", title = "CIty name", price = 300}, + {name = "apa_mp_h_acc_dec_head_01", title = "Mask", price = 300}, + {name = "ex_mp_h_acc_vase_06", title = "Vase 1", price = 300}, + {name = "ex_mp_h_acc_vase_02", title = "Red Vase", price = 300}, + {name = "hei_prop_hei_bust_01", title = "Bust", price = 300}, + {name = "prop_arcade_01", title = "Arcade Machine", price = 300}, + {price = 6500, name = 'prop_beer_neon_01', title = 'Neon Sign 1'}, + {price = 6500, name = 'prop_beer_neon_02', title = 'Neon Sign 2'}, + {price = 6500, name = 'prop_beer_neon_03', title = 'Neon Sign 3'}, + {price = 6500, name = 'prop_beer_neon_04', title = 'Neon Sign 3'}, + {price = 6500, name = 'prop_patriotneon', title = 'Neon Sign Patriot'}, + {price = 6500, name = 'prop_barrachneon', title = 'Neon Sign Pussy Beer'}}, + Electronics = {{price = 0, title = 'Lamp', name = 'prop_cd_lamp'}, + {price = 1800, title = 'Shredder', name = 'v_ret_gc_shred'}, + {price = 800, title = 'Antique telephone', name = 'apa_mp_h_acc_phone_01'}, + {price = 14700, title = 'TV wall white-gray with electronics', name = 'apa_mp_h_str_avunitl_04'}, + {price = 6700, title = 'TV wooden wall with television', name = 'apa_mp_h_str_avunitl_01_b'}, + {price = 14300, title = 'Television with yellow speakers', name = 'apa_mp_h_str_avunitm_01'}, + {price = 12000, title = 'TV with white speakers', name = 'apa_mp_h_str_avunitm_03'}, + {price = 12900, title = 'Television with accessories', name = 'apa_mp_h_str_avunits_01'}, + {price = 6900, title = 'TV on a metal table', name = 'apa_mp_h_str_avunits_01'}, + {price = 5500, title = 'Notebook', name = 'bkr_prop_clubhouse_laptop_01a'}, + {price = 4400, title = 'Notebook', name = 'bkr_prop_clubhouse_laptop_01b'}, + {price = 12400, title = 'Money counter', name = 'bkr_prop_money_counter'}, + {price = 700, title = 'Large upright fan', name = 'bkr_prop_weed_fan_floor_01a'}, + {price = 2400, title = 'Tvsmash', name = 'des_tvsmash_start'}, + {price = 2700, title = 'Wall TV', name = 'ex_prop_ex_tv_flat_01'}, + {price = 3500, title = 'Desktop monitor with keyboard', name = 'ex_prop_monitor_01_ex'}, + {price = 4700, title = 'Desktop monitor with keyboard', name = 'ex_prop_trailer_monitor_01'}, + {price = 200, title = 'TV driver', name = 'ex_prop_tv_settop_remote'}, + {price = 2200, title = 'TV box', name = 'ex_prop_tv_settop_box'}, + {price = 1000, title = 'Table fan', name = 'gr_prop_bunker_deskfan_01a'}, + {price = 8400, title = 'Television with speakers and all equipment', name = 'hei_heist_str_avunitl_03'}, + {price = 1700, title = 'telephone landline', name = 'hei_prop_hei_bank_phone_01'}, + {price = 3800, title = 'Alarm', name = 'hei_prop_hei_bio_panel'}, + {price = 2100, title = 'Keyboard', name = 'hei_prop_hei_cs_keyboard'}, + {price = 8900, title = 'Project board', name = 'hei_prop_hei_muster_01'}, + {price = 1800, title = 'WIFI', name = 'hei_prop_server_piece_01'}, + {price = 3300, title = 'White notebook', name = 'p_laptop_02_s'}, + {price = 10500, title = 'Safe', name = 'p_v_43_safe_s'}, + {price = 7900, title = 'Table Hockey', name = 'prop_airhockey_01'}, + {price = 2400, title = 'Portable Radio', name = 'prop_boombox_01'}, + {price = 2500, title = 'DVD player', name = 'prop_cctv_cont_03'}, + {price = 3300, title = 'CD player', name = 'prop_cctv_cont_04'}, + {price = 900, title = 'PC Mouse', name = 'prop_cs_mouse_01'}, + {price = 900, title = 'Wall clock', name = 'prop_game_clock_01'}, + {price = 600, title = 'Wall clock black', name = 'prop_game_clock_02'}, + {price = 3400, title = 'HiFi system', name = 'prop_hifi_01'}, + {price = 1500, title = 'square clock', name = 'prop_hotel_clock_01'}, + {price = 1500, title = 'Clock', name = 'prop_id2_20_clock'}, + {price = 3400, title = 'Nikon Handheld Camera', name = 'prop_ing_camera_01'}, + {price = 1700, title = 'White keyboard', name = 'prop_keyboard_01a'}, + {price = 1600, title = 'Router', name = 'prop_ld_armour'}, + {price = 1700, title = 'Old monitor', name = 'prop_ld_monitor_01'}, + {price = 2300, title = 'Small old monitor', name = 'prop_monitor_01b'}, + {price = 400, title = 'RETRO monitor', name = 'prop_monitor_03b'}, + {price = 5900, title = 'Monitor', name = 'prop_monitor_w_large'}, + {price = 4800, title = 'Repráček', name = 'prop_mp3_dock'}, + {price = 4000, title = 'White PC', name = 'prop_pc_01a'}, + {price = 4800, title = 'Black PC', name = 'prop_pc_02a'}, + {price = 2500, title = 'Mobile', name = 'prop_phone_ing'}, + {price = 2100, title = 'Mobile', name = 'prop_phone_ing_02'}, + {price = 2000, title = 'Mobile', name = 'prop_phone_ing_02_lod'}, + {price = 2300, title = 'Mobile', name = 'prop_phone_ing_03'}, + {price = 1000, title = 'RETRO radio', name = 'prop_radio_01'}, + {price = 1100, title = 'Small speaker', name = 'prop_speaker_05'}, + {price = 1000, title = 'Speaker', name = 'prop_speaker_06'}, + {price = 1900, title = 'Speaker', name = 'prop_speaker_08'}, + {price = 2000, title = 'Old TV', name = 'prop_trev_tv_01'}, + {price = 500, title = 'Old TV', name = 'prop_tv_03'}, + {price = 300, title = 'Old TV', name = 'prop_tv_01'}, + {price = 400, title = 'RETRO TV', name = 'prop_tv_04'}, + {price = 1700, title = 'Old TV', name = 'prop_tv_06'}, + {price = 6500, title = 'Plasma big screen', name = 'prop_tv_flat_01'}, + {price = 12500, title = 'Plasma thin TV', name = 'prop_tv_flat_01_screen'}, + {price = 1600, title = 'Plasma small television', name = 'prop_tv_flat_02'}, + {price = 2100, title = 'Plasma small television', name = 'prop_tv_flat_02b'}, + {price = 900, title = 'Small TV with stand', name = 'prop_tv_flat_03'}, + {price = 300, title = 'Small TV on the wall', name = 'prop_tv_flat_03b'}, + {price = 9200, title = 'Television Michael 50cm', name = 'prop_tv_flat_michael'}, + {price = 1000, title = 'Little US Clock', name = 'prop_v_15_cars_clock'}, + {price = 4000, title = 'Professional camera', name = 'prop_v_cam_01'}, + {price = 4700, title = 'VET player RETRO', name = 'prop_vcr_01'}, + {price = 9900, title = 'Mixing desk', name = 'v_club_vu_deckcase'}, + {price = 1500, title = 'RETRO Laptop', name = 'v_ind_ss_laptop'}, + {price = 2500, title = 'CD seda', name = 'v_res_cdstorage'}, + {price = 3300, title = 'Ipod', name = 'v_res_ipoddock'}, + {price = 2800, title = 'Silver Monitor', name = 'v_res_monitorwidelarge'}, + {price = 2400, title = 'Mouse and as a gift pad', name = 'v_res_mousemat'}, + {price = 100, title = 'PC Headphones', name = 'v_res_pcheadset'}, + {price = 1200, title = 'PC speaker', name = 'v_res_pcspeaker'}, + {price = 5000, title = 'VHS white RETRO player', name = 'v_res_vhsplayer'}, + {price = 2200, title = 'Vacuum Cleaner', name = 'v_res_vacuum'}, + {price = 100, title = 'Stapler', name = 'v_ret_gc_staple'}, + {price = 1900, title = 'Hardisk', name = 'xm_prop_x17_harddisk_01a'}, + {price = 5300, title = 'Computer', name = 'xm_prop_x17_res_pctower'}, + {price = 12900, title = 'Plasma TV', name = 'xm_prop_x17_tv_flat_01'}, + {price = 6600, title = 'Plasma TV', name = 'xm_prop_x17_tv_flat_02'}, + {price = 14000, title = 'Jukebox', name = 'bkr_prop_clubhouse_jukebox_01b'}, + {price = 1700, title = 'USB', name = 'hei_prop_hst_usb_drive'}, + {price = 700, title = 'Flashlight', name = 'p_cs_police_torch_s'}, + {price = 1000, title = 'Microphone', name = 'p_ing_microphonel_01'}, + {price = 1600, title = 'Radio', name = 'prop_tapeplayer_01'}, + {price = 4500, title = 'Multifunction Laser Printer', name = 'prop_printer_01'}, + {price = 11200, title = 'Multifunction Laser Printer', name = 'prop_printer_02'}, + {price = 20300, title = 'Jukebox 2', name = 'prop_50s_jukebox'}, + {price = 21200, title = 'Arcade games', name = 'prop_arcade_01'}, + {price = 19400, title = 'Safe', name = 'prop_ld_int_safe_01'}, + {price = 3800, title = 'Astronomical Clock', name = 'prop_v_5_bclock'}, + {price = 22200, title = 'Table with three monitors', name = 'xm_prop_base_staff_desk_01'}, + {price = 17900, title = 'Table with three monitors', name = 'xm_prop_base_staff_desk_02'}, + {price = 1500, title = 'Napkin machine', name = 'prop_handdry_01'}, + {price = 2700, title = 'Washing Machine', name = 'prop_washer_02'}, + {price = 600, title = 'Washing machine with its years', name = 'prop_washer_03'}, + {price = 700, title = 'RETRO washing machine', name = 'v_ret_fh_dryer'}}, + Tables = {{price = 5600, title = 'Glass table', name = 'apa_mp_h_din_table_04'}, + {price = 5000, title = 'Glass table', name = 'apa_mp_h_din_table_11'}, + {price = 5300, title = 'Glass table', name = 'apa_mp_h_tab_sidelrg_07'}, + {price = 1200, title = 'Black Round Table', name = 'apa_mp_h_tab_sidelrg_04'}, + {price = 1600, title = 'Glass table', name = 'apa_mp_h_tab_sidelrg_01'}, + {price = 5700, title = 'Decorative glass table', name = 'apa_mp_h_tab_sidelrg_02'}, + {price = 2600, title = 'Black coffee table', name = 'apa_mp_h_yacht_coffee_table_01'}, + {price = 4200, title = 'Square table', name = 'apa_mp_h_yacht_side_table_01'}, + {price = 3400, title = 'Small table', name = 'gr_dlc_gr_yacht_props_table_01'}, + {price = 4700, title = 'Long table', name = 'gr_dlc_gr_yacht_props_table_02'}, + {price = 1000, title = 'Particleboard table', name = 'prop_rub_table_01'}, + {price = 700, title = 'Particleboard dining table', name = 'prop_rub_table_02'}, + {price = 700, title = 'TV table', name = 'prop_tv_cabinet_03'}, + {price = 300, title = 'TV table', name = 'prop_tv_cabinet_04'}, + {price = 800, title = 'TV table', name = 'prop_tv_cabinet_05'}, + {price = 5300, title = 'Black modern table', name = 'v_ilev_liconftable_sml'}, + {price = 4100, title = 'Bar', name = 'xm_prop_lab_desk_01'}}, + Sofas = {{price = 11500, title = 'Couch with pillows', name = 'prop_couch_01'}, + {price = 6500, title = 'Padded bench', name = 'prop_wait_bench_01'}, + {price = 4400, title = 'White leather sofa', name = 'xm_lab_sofa_01'}}, + Kitchen = {{price = 800, title = 'Kitchen scale', name = 'bkr_prop_coke_scale_01'}, + {price = 1000, title = 'Home coffee maker', name = 'prop_coffee_mac_02'}, + {price = 5200, title = 'Automatic juice mixer', name = 'prop_juice_dispenser'}, + {price = 200, title = 'White wall phone', name = 'prop_office_phone_tnt'}, + {price = 2300, title = 'Fruit Blender', name = 'p_kitch_juicer_s'}, + {price = 1500, title = 'Kettle', name = 'prop_kettle_01'}, + {price = 2600, title = 'Crushing machine', name = 'prop_slush_dispenser'}, + {price = 700, title = 'Coffee pot', name = 'xm_prop_x17_coffee_jug'}, + {price = 3700, title = 'Mini bar fridge', name = 'prop_bar_fridge_03'}, + {price = 800, title = 'Plastic red cup', name = 'apa_prop_cs_plastic_cup_01'}, + {price = 1000, title = 'Trash', name = 'prop_bin_10a'}, + {price = 400, title = 'Universal Cleaner', name = 'prop_blox_spray'}, + {price = 200, title = 'Green bucket', name = 'prop_buck_spade_05'}, + {price = 400, title = 'Blue bucket', name = 'prop_buck_spade_06'}, + {price = 200, title = 'Red bucket', name = 'prop_buck_spade_07'}, + {price = 700, title = 'Cups', name = 'prop_food_cups2'}, + {price = 400, title = 'White Cup', name = 'prop_mug_02'}, + {price = 800, title = 'Bowl with donut lid', name = 'v_res_cakedome'}, + {price = 1000, title = 'Loose tea container', name = 'v_res_fa_pottea'}, + {price = 300, title = 'Deep Plate', name = 'v_res_mbowl'}, + {price = 500, title = 'Paper napkins', name = 'v_ret_ta_paproll'}, + {price = 400, title = 'Glasses', name = 'p_w_grass_gls_s'}, + {price = 300, title = 'Glasses', name = 'prop_cocktail'}, + {price = 600, title = 'Knife', name = 'prop_cs_bowie_knife'}}, + Bedroom = {{price = 3300, title = 'Single bed', name = 'v_res_msonbed'}, + {price = 100, title = 'Double bed', name = 'p_lestersbed_s'}, + {price = 600, title = 'Double bed', name = 'p_v_res_tt_bed_s'}, + {price = 400, title = 'Double modern bed', name = 'apa_mp_h_bed_double_08'}, + {price = 1100, title = 'Double modern bed', name = 'apa_mp_h_bed_wide_05'}, + {price = 2200, title = 'Double modern bed', name = 'apa_mp_h_yacht_bed_02'}, + {price = 700, title = 'Single sofa bed', name = 'ex_prop_exec_bed_01'}, + {price = 3100, title = 'Double modern bed', name = 'hei_heist_bed_double_08'}, + {price = 4400, title = 'Chest of drawers', name = 'apa_mp_h_bed_chestdrawer_02'}, + {price = 400, title = 'RETRO wardrobe', name = 'apa_mp_h_str_shelffloorm_02'}, + {price = 100, title = 'RETRO chest of drawers low', name = 'apa_mp_h_str_sideboardl_11'}, + {price = 2500, title = 'Gray-white low cabinet', name = 'apa_mp_h_str_sideboardl_13'}, + {price = 700, title = 'Wooden chest of drawers', name = 'apa_mp_h_str_sideboardl_14'}, + {price = 500, title = 'Wood brindle feather duster', name = 'apa_mp_h_str_sideboardm_02'}, + {price = 900, title = 'Iron open cabinet', name = 'p_cs_locker_01'}, + {price = 300, title = 'Iron used closed cabinet', name = 'p_cs_locker_01_s'}}} + + + +-------------------DONT TOUCH ------------------------- +Config.OxInventory = ESX.GetConfig().OxInventory -- + -- +function GetInteriorValues(Interior) -- + for _,type in pairs(Config.Interiors) do -- + for _, interior in pairs(type) do -- + if interior.value == Interior then -- + return interior -- + end -- + end -- + end -- +end -- +-------------------------------------------------------- + + +--[[ + ESX Property - Properties Made Right! + Copyright (C) 2023 ESX-Framework + + 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 . +]] diff --git a/[esx_addons]/esx_property/fxmanifest.lua b/[esx_addons]/esx_property/fxmanifest.lua new file mode 100644 index 00000000..0ed90afb --- /dev/null +++ b/[esx_addons]/esx_property/fxmanifest.lua @@ -0,0 +1,47 @@ +--[[ + ESX Property - Properties Made Right! + Copyright (C) 2023 ESX-Framework + + 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 . +]] +fx_version 'adamant' + +game 'gta5' +lua54 'yes' + +author 'ESX-Framework' +description 'Official ESX-Legacy Property System' +version '1.9.0' + +shared_scripts {'@es_extended/imports.lua', '@es_extended/locale.lua', 'locales/*.lua'} +file "client/html/copy.html" +ui_page "client/html/copy.html" + +server_scripts { + '@oxmysql/lib/MySQL.lua', + 'config.lua', + 'server/*.lua' +} + +client_scripts { + 'config.lua', + 'client/cctv.lua', + 'client/main.lua', + 'client/furniture.lua' +} + +dependencies { + 'es_extended', + 'esx_society' +} diff --git a/[esx_addons]/esx_property/locales/en.lua b/[esx_addons]/esx_property/locales/en.lua new file mode 100644 index 00000000..44adbcaa --- /dev/null +++ b/[esx_addons]/esx_property/locales/en.lua @@ -0,0 +1,218 @@ +Locales['en'] = { + --- CCTV Strings ------ + + ["take_picture"] = "Take Picture", + ["rot_left_right"] = "Left/Right", + ["rot_up_down"] = "Up/Down", + ["zoom"] = "Zoom In/Out", + ["zoom_level"] = "Zoom Level: %s %%", + ["night_vision"] = "Toggle Night Vision", + ["clipboard"] = "Link Copied To ~b~Cipboard", + ["picture_taken"] = "Picture Taken!", + ["please_wait"] = "Please Wait Before taking another ~b~Picture", + ["exit"] = "Exit", + + --- Furniture Strings ------ + + ["height"] = "Height", + ["rotate"] = "Rotation", + ["place"] = "Place Furniture", + ["delete_furni"] = "Delete", + ["confirm_buy"] = "Do You Want To Buy %s ?", + ["price"] = "Price: $%s", + ["yes"] = "Yes", + ["no"] = "No", + ["action"] = "You %s ~b~%s~s~ !", + ["bought_furni"] = "You Have ~g~Bought~s~ A ~b~%s~s~ !", + ["edited_furni"] = "You Have Edited ~b~%s~s~ !", + ["cannot_buy"] = "You ~r~Cannot~s~ Buy This!", + ["cannot_edit"] = "You ~r~Cannot~s~ Edit This!", + ["store_title"] = "Store - %s", + ["back"] = "Return", + ["edit_title"] = "Editing - %s", + ["move_title"] = "Move", + ["deleted_confirm"] = "Deleting ~b~%s~s~!", + ["deleted_error"] = "Cannot Delete ~b~%s~s~!", + ["owned_furni"] = "Owned Furniture", + ["menu_stores"] = "Furniture Stores", + ["menu_stores_desc"] = "Buy Furniture", + ["menu_reset"] = "Reset", + ["menu_reset_desc"] = "Clears All Furniture", + ["menu_edit"] = "Edit", + ["menu_edit_desc"] = "Move and/or Delete furniture items", + ["furni_command"] = "furniture", + ["furni_command_desc"] = "(ESX Property) Open Furniture Menu", + ["furni_command_permission"] = "You ~r~Cannot~s~ Access This Menu!", + ["furni_reset_success"] = "Furniture Reset!", + ["furni_cannot_afford"] = "You Cannot Afford Todo this!", + ["furni_reset_error"] = "You ~r~Cannot~s~ Reset This Property!", + ["furni_management"] = "Manage Furniture", + + --------- Key Strings --------------- + + ["you_granted"] = 'You Have Been Granted Keys To ~b~%s~s~.', + ["already_has"] = "This Player Already Has Keys!", + ["do_not_own"] = 'You do ~r~not~s~ own this property.', + ["key_revoked"] = 'Your Key Access To ~b~%s~s~. Has Been ~r~Revoked~s~', + ["no_keys"] = "This Player Does Not Have Keys!", + ["nearby"] = "Nearby Players", + ["gave_key"] = "Giving Keys to %s!", + ["key_cannot_give"] = "You Cannot Give This Player A ~r~Key", + ["remove_title"] = "Remove Keys From Player", + ["key_revoke_success"] = "Revoking Keys From ~b~%s~s~.", + ["key_revoke_error"] = "You Cannot ~b~Remove~s~ A ~r~Key~s~ From this Person", + ["key_management"] = "Key Management", + ["key_management_desc"] = "Control Property Access.", + ["give_keys"] = "Give Keys", + ["remove_keys"] = "Remove Keys", + + + --------- Real Estate Strings --------------- + ["office_blip"] = "%s Office", + ["actions"] = "Real Estate Actions", + ["property_create"] = "Create Property", + ["property_manage"] = "Manage Properties", + ["realestate_command"] = "realestatequickmenu", + ["realestate_command_desc"] = "(ESX Property) Open Real Estate Quick Actions", + ["enter_office"] = "~b~Entering~s~ Office.", + ["enter_office_error"] = "You ~r~Cannot~s~ Enter The Office!", + ["exit_office"] = "~b~Exiting~s~ Office.", + ["exit_office_error"] = "You ~r~Cannot~s~ Exit The Office!", + ["realestate_textui"] = "Press ~b~[E]~s~ to Access ~b~%s", + + ------------Command Strings----------------------- + ["refresh_name"] = "property:refresh", + ["refresh_desc"] = "Refresh to Server Start State", + ["save_name"] = "property:save", + ["save_desc"] = "Force Save Properties", + ["create_name"] = "property:create", + ["create_desc"] = "Create A New Property", + ["admin_name"] = "property:admin", + ["admin_desc"] = "Manage/view all properties", + + + ---------- Property Actions Menu ------------------------- + + ["knocking"] = "Someone Is ~b~Knocking~s~ On The Door.", + ["name_edit"] = "Edit Property Name", + ["name"] = "Name", + ["confirm"] = "Confirm", + ["name_edit_success"] = "You Have Set The Property Name To ~b~%s~s~.", + ["name_edit_error"] = "You Cannot Set The Property Name To ~r~%s~s~.", + ["door_locked"] = "Door: Locked", + ["door_unlocked"] = "Door: Unlocked", + ["name_manage"] = "Manage Name", + ["name_manage_desc"] = "Set The Name of the Property.", + ["sell_title"] = "Sell", + ["sell_desc"] = "Sell This Property For $%s", + ["raid_title"] = "Raid", + ["raid_desc"] = "Force Entry Into Property.", + ["cctv_title"] = "CCTV", + ["cctv_desc"] = "Check the CCTV Camera.", + ["inventory_title"] = "Inventory", + ["inventory_desc"] = "Change Position of Property Storage.", + ["wardrobe_title"] = "Wardrobe", + ["wardrobe_desc"] = "Change Position of Property Wardrobe.", + ["furniture_title"] = "Furniture", + ["furniture_desc"] = "Change Position of Property Furniture.", + ["enter_title"] = "Enter", + ["knock_title"] = "Knock On Door", + ["buy_title"] = "Buy", + ["buy_desc"] = "Buy This Property For $%s", + ["sellplayer_title"] = "Sell To Player", + ["sellplayer_desc"] = "Sell This Property For $%s", + ["view_title"] = "Preview Interior", + ["exit_title"] = "Exit", + ["property_editing_error"] = "You Are Currently Editing The Property.", + ["unlock_error"] = "You Cannot ~b~Unlock~s~ This Property", + ["lock_error"] = "You Cannot ~b~Lock~s~ This Property", + ["prep_raid"] = "~b~Preparing~s~ Raid!", + ["raiding"] = "Raiding...", + ["cancel_raiding"] = "~r~Cancelled~s~ Raid!", + ["cannot_raid"] = "You Cannot ~b~Raid~s~ This Property.", + ["storage_pos_textui"] = "Press ~b~[G]~s~ To Set Storage Position", + ["storage_pos_success"] = "~b~Storage~s~ Position Set.", + ["storage_pos_error"] = "~r~Cannot~s~ Set ~b~Storage~s~ Position.", + ["wardrobe_pos_textui"] = "Press ~b~[G]~s~ To Set Wardrobe Position", + ["wardrobe_pos_success"] = "~b~Wardrobe~s~ Position Set.", + ["wardrobe_pos_error"] = "~r~Cannot~s~ Set ~b~Wardrobe~s~ Position.", + ["please_finish"] = "Please Finish Setting ~b~%s~s~ Position", + ["cannot_afford"] = "You Cannot Purchase This Property!", + ["select_player"] = "Select Player", + ["cannot_sell"] = "Cannot Sell To This Player!", + ["knock_on_door"] = "Knocking On Door...", + ["nobody_home"] = "It Seems Nobody is home...", + + ---------- General Strings ---------------- + + ["enabled"] = "Enabled", + ["disabled"] = "Disabled", + ["exiting"] = "Exiting property...", + ["entering"] = "Entering property...", + ["shell_disabled"] ="This Interior Uses Shells, which are disabled!", + ["access_textui"] = "Press ~b~[E]~s~ to Access ~b~%s", + ["raid_notify_error"] = "You need ~b~ %sx %s~s~ to be able to raid!", + ["raid_notify_success"] = "Your Property is Currently Being ~b~Raided!", + + --------------- Garage Strings -------------- + + ["store_success"] = "Vehicle ~b~Stored!", + ["store_error"] = "You Cannot Store This Vehicle!", + ["property_garage"] = "Property Garage", + ["retriving_notify"] = "Retrieving ~b~%s~s~ ...", + ["cannot_access"] = "You Cannot Access This Garage!", + ["store_textui"] = "Press ~b~[E]~s~ to Store ~b~%s", + ["garage_not_enabled"] = 'Garage Not Enabled On This Property.', + ["cannot_access_property"] = 'You ~r~Cannot~s~ Access this property.', + + + ----------------- Creation Menu Strings ---------------- + + ["menu_title"] = "Property Creation", + ["element_title1"] = "Street Number", + ["element_description1"] = "Set the Property Street Number.", + ["element_title2"] = "Price", + ["element_description2"] = "Set the Price of the Property.", + ["element_title3"] = "Interior", + ["element_description3"] = "Select An Interior For The Property", + ["element_title4"] = "Garage", + ["element_description4"] = "(Optional) Manage Garage Settings", + ["element_title5"] = "CCTV", + ["element_description5"] = "(Optional) Manage CCTV Settings", + ["element_title6"] = "Entrance", + ["element_description6"] = "Set The Property`s Entrance Location.", + ["element_create_title"] = "Create Property", + ["element_create_desc_1"] = "Please Fill Out all Required Inputs!", + ["entrance_set_title"] = "Entrance Set.", + ["entrance_set_description"] = "Entrance: %s, %s, %s", + ["interior_set_title"] = "Interior Selected.", + ["interior_set_description"] = "Selected: %s", + ["ipl_title"] = "IPL Interiors", + ["types_title"] = "Interior Types", + ["ipl_description"] = "Native GTA Interiors, Made by R*", + ["shell_title"] = "Custom Interiors", + ["shell_description"] = "Custom Interiors, Made by You", + ["cctv_settings"] = "CCTV Settings", + ["garage_settings"] = "Garage Settings", + ["toggle_title"] = "Toggle Usage", + ["toggle_description"] = "Current Status: %s", + ["cctv_set_title"] = "Set CCTV Angle", + ["cctv_set_description"] = "Sets the Camera angle to your Cameras Direction", + ["back_description"] = "return to property creation.", + ["garage_set_title"] = "Set Garage Position", + ["garage_set_description"] = "Set the position of the Property Garage.", + ["garage_textui"] = "Press ~b~[E]~s~ to Set Position", + ["cctv_textui_1"] = "Press ~b~[E]~s~ to Set Angle", + ["cctv_textui_2"] = "Press ~b~[E]~s~ to Set Max Right Roation", + ["cctv_textui_3"] = "Press ~b~[E]~s~ to Set Max Left Roation", + ["create_success"] = "Property created!", + ["missing_data"] = "Please Fill Out all Required Inputs!", + + -- Saving Translations + ["server_restart"] = "Server Restarting", + ["server_shutdown"] = "Server Shutdown", + ["manual_save"] = "Manual Save (Requested By %s)", + ["resource_stop"] = "Resource Stopping", + ["force_save"] = "Force Save (Requested By %s)", + ["interval_saving"] = "Interval Saving" + } diff --git a/[esx_addons]/esx_property/locales/es.lua b/[esx_addons]/esx_property/locales/es.lua new file mode 100644 index 00000000..1a6e2bf5 --- /dev/null +++ b/[esx_addons]/esx_property/locales/es.lua @@ -0,0 +1,217 @@ +Locales['es'] = { + --- CCTV Strings ------ + + ["take_picture"] = "Tomar foto", + ["rot_left_right"] = "Izquierda/Derecha", + ["rot_up_down"] = "Arriba/Abajo", + ["zoom"] = "Zoom +/-", + ["zoom_level"] = "Nivel de Zoom: %s %%", + ["night_vision"] = "Alternar Visión Nocturna", + ["clipboard"] = "Enlace copiado al ~b~Portapapeles", + ["picture_taken"] = "¡Foto tomada!", + ["please_wait"] = "Espere antes de tomar otra ~b~Foto", + ["exit"] = "Salir", + + --- Furniture Strings ------ + + ["height"] = "Altura", + ["rotate"] = "Rotación", + ["place"] = "Colocar mueble", + ["delete_furni"] = "Borrar", + ["confirm_buy"] = "¿Quieres comprar %s?", + ["price"] = "Precio: $%s", + ["yes"] = "Si", + ["no"] = "No", + ["action"] = "¡ Tu %s ~b~%s~s~ !", + ["bought_furni"] = "¡ Has ~g~comprado~s~ un ~b~%s~s~ !", + ["edited_furni"] = "¡ Has editado ~b~%s~s~ !", + ["cannot_buy"] = "¡~r~No puedes~s~ comprar esto!", + ["cannot_edit"] = "¡Usted ~r~no puede~s~ editar esto!", + ["store_title"] = "Tienda - %s", + ["back"] = "Volver", + ["edit_title"] = "Edición - %s", + ["move_title"] = "Mover", + ["delete_confirm"] = "¡Borrado ~b~%s~s~!", + ["delete_error"] = "No se puede borrar ~b~%s~s~!", + ["owned_furni"] = "Mobiliario propio", + ["menu_stores"] = "Tiendas de muebles", + ["menu_stores_desc"] = "Comprar mueble", + ["menu_reset"] = "Reiniciar", + ["menu_reset_desc"] = "Limpia todos los muebles", + ["menu_edit"] = "Editar", + ["menu_edit_desc"] = "Mover y/o Eliminar muebles", + ["furni_command"] = "muebles", + ["furni_command_desc"] = "Abrir menú de muebles", + ["furni_command_permission"] = "~r~No~s~ puede acceder a este menú.", + ["furni_reset_success"] = "¡Todos los muebles reiniciados!", + ["furni_cannot_afford"] = "¡Usted no puede permitirse el lujo de hacer esto!", + ["furni_reset_error"] = "~r~No puede~s~ ¡Restablecer esta propiedad!", + ["furni_management"] = "Administrar muebles", + + --------- Key Strings --------------- + + ["you_granted"] = 'Se le han otorgado llaves a ~b~%s~s~.', + ["already_has"] = "¡Este jugador ya tiene llaves!", + ["do_not_own"] = 'Usted ~r~no~s~ es dueño de esta propiedad.', + ["key_revoked"] = 'Su llave de acceso a ~b~%s~s~. ha sido ~r~revocada~s~', + ["no_keys"] = "¡Este jugador no tiene llaves!", + ["nearby"] = "Jugadores cercanos", + ["gave_key"] = "Entrega de llaves a %s!", + ["key_cannot_give"] = "No puedes darle a este jugador una ~r~Llave", + ["remove_title"] = "Eliminar llaves del jugador", + ["key_revoke_success"] = "Revocación de llaves de ~b~%s~s~.", + ["key_revoke_error"] = "No puede ~b~quitar~s~ las ~r~llave~s~ a esta persona", + ["key_management"] = "Gestión de llaves", + ["key_management_desc"] = "Controlar el acceso a la propiedad.", + ["give_keys"] = "Dar llaves", + ["remove_keys"] = "Quitar llaves", + + --------- Real Estate Strings --------------- + + ["office_blip"] = "Oficina de %s", + ["actions"] = "Acciones Inmobiliarias", + ["property_create"] = "Crear propiedad", + ["property_manage"] = "Administrar propiedades", + ["realestate_command"] = "realestatequickmenu", + ["realestate_command_desc"] = "(ESX Property) Abrir acciones rápidas inmobiliarias", + ["enter_office"] = "~b~Entrando~a~la oficina.", + ["enter_office_error"] = "¡Usted ~r~no puede~s~ entrar en la oficina!", + ["exit_office"] = "~b~Saliendo~s~ de la oficina.", + ["exit_office_error"] = "¡Usted ~r~no puede~s~ salir de la oficina!", + ["realestate_textui"] = "Presione ~b~[E]~s~ para acceder ~b~%s", + + ------------Command Strings------------------------------- + + ["refresh_name"] = "property:refresh", + ["refresh_desc"] = "Actualizar al estado de inicio del servidor", + ["save_name"] = "property:save", + ["save_desc"] = "Forzar guardar propiedades", + ["create_name"] = "property:create", + ["create_desc"] = "Crear una nueva propiedad", + ["admin_name"] = "property:admin", + ["admin_desc"] = "Administrar/ver todas las propiedades", + + ---------- Property Actions Menu ------------------------- + + ["knocking"] = "Alguien Está ~b~Llamando~s~ A La Puerta.", + ["name_edit"] = "Editar nombre de propiedad", + ["name"] = "Nombre", + ["confirm"] = "Confirmar", + ["name_edit_success"] = "Ha establecido el nombre de la propiedad a ~b~%s~s~.", + ["name_edit_error"] = "No puede establecer el nombre de la propiedad a ~r~%s~s~.", + ["door_locked"] = "Puerta: cerrada", + ["door_unlocked"] = "Puerta: abierta", + ["name_manage"] = "Administrar nombre", + ["name_manage_desc"] = "Establezca el nombre de la propiedad.", + ["sell_title"] = "Vender", + ["sell_desc"] = "Vender esta propiedad por $%s", + ["raid_title"] = "Redada", + ["raid_desc"] = "Forzar la entrada a la propiedad.", + ["cctv_title"] = "CCTV", + ["cctv_desc"] = "Compruebe el circuito cerrado de televisión.", + ["inventory_title"] = "Inventario", + ["inventory_desc"] = "Cambiar la posición del inventario de propiedad.", + ["wardrobe_title"] = "Armario", + ["wardrobe_desc"] = "Cambiar la posición del armario de la propiedad.", + ["furniture_title"] = "Muebles", + ["furniture_desc"] = "Cambiar Posición de Mobiliario de Propiedad.", + ["enter_title"] = "Entrar", + ["knock_title"] = "Tocar la puerta", + ["buy_title"] = "Comprar", + ["buy_desc"] = "Compre esta propiedad por $%s", + ["sellplayer_title"] = "Vender al jugador", + ["sellplayer_desc"] = "Vender esta propiedad por $%s", + ["view_title"] = "Vista previa del interior", + ["exit_title"] = "Salir", + ["property_editing_error"] = "Actualmente está editando la propiedad.", + ["unlock_error"] = "No puede ~b~desbloquear~s~ esta propiedad", + ["lock_error"] = "No puede ~bloquear~a~ esta propiedad", + ["prep_raid"] = "¡~b~Preparando~s~ Redada!", + ["raiding"] = "Asaltando...", + ["cancel_raiding"] = "¡Redada ~r~Cancelada~s~!", + ["cannot_raid"] = "No puedes ~b~Asaltar~s~ esta propiedad.", + ["storage_pos_textui"] = "Presione ~b~[G]~s~ para establecer la posición del inventario", + ["storage_pos_success"] = "Posición del ~b~Inventario~s~ establecida.", + ["storage_pos_error"] = "~r~No se puede~s~ establecer la posición de ~b~inventario~s~.", + ["wardrobe_pos_textui"] = "Presione ~b~[G]~s~ para establecer la posición del Armario", + ["wardrobe_pos_success"] = "Posición del ~b~Armario~s~ establecida.", + ["wardrobe_pos_error"] = "~r~No se puede~s~ establecer la posición de ~b~armario~s~.", + ["please_finish"] = "Finalice la configuración de posición de ~b~%s~s~", + ["cannot_afford"] = "¡Usted no puede comprar esta propiedad!", + ["select_player"] = "Seleccionar jugador", + ["cannot_sell"] = "¡No se puede vender a este jugador!", + ["knock_on_door"] = "Llamando a la puerta...", + ["nobody_home"] = "Parece que nadie está en casa...", + + ---------- General Strings ---------------- + + ["enabled"] = "Activado", + ["disabled"] = "Desactivado", + ["exiting"] = "Saliendo de la propiedad...", + ["entering"] = "Entrando a la propiedad...", + ["shell_disabled"] = "¡Este interior usa shells, que están deshabilitados!", + ["access_textui"] = "Pulsa ~b~[E]~s~ para acceder ~b~%s", + ["raid_notify_error"] = "Necesitas ~b~ %sx %s~s~ para poder asaltar!", + ["raid_notify_success"] = "¡Su propiedad está siendo actualmente ~b~Asaltada!", + + --------------- Garage Strings -------------- + + ["store_success"] = "Vehículo ~b~¡Almacenado!", + ["store_error"] = "¡No puede almacenar este vehículo!", + ["property_garage"] = "Garaje de propiedad", + ["retriving_notify"] = "Sacando ~b~%s~s~ ...", + ["cannot_access"] = "¡No puede acceder a este garaje!", + ["store_textui"] = "Pulsa ~b~[E]~s~ para almacenar ~b~%s", + ["garage_not_enabled"] = 'Garaje No Habilitado En Esta Propiedad.', + ["cannot_access_property"] = '~r~No puede~s~ Acceder a esta propiedad.', + + ----------------- Creation Menu Strings ---------------- + + ["menu_title"] = "Creación de propiedad", + ["element_title1"] = "Número de calle", + ["element_description1"] = "Establezca el número de calle de la propiedad.", + ["element_title2"] = "Precio", + ["element_description2"] = "Fijar el Precio de la Propiedad.", + ["element_title3"] = "Interior", + ["element_description3"] = "Seleccione un interior para la propiedad", + ["element_title4"] = "Garaje", + ["element_description4"] = "(Opcional) Administrar la configuración del garaje", + ["element_title5"] = "CCTV", + ["element_description5"] = "(Opcional) Administrar la configuración de CCTV", + ["element_title6"] = "Entrada", + ["element_description6"] = "Establezca la ubicación de entrada de la propiedad.", + ["element_create_title"] = "Crear propiedad", + ["element_create_desc_1"] = "¡Complete todas las entradas requeridas!", + ["entrance_set_title"] = "Entrada establecida.", + ["entrance_set_description"] = "Entrada: %s, %s, %s", + ["interior_set_title"] = "Interior seleccionado.", + ["interior_set_description"] = "Selected: %s", + ["ipl_title"] = "Interiores IPL", + ["types_title"] = "Tipos de interiores", + ["ipl_description"] = "Interiores nativos de GTA, Hecho por R*", + ["shell_title"] = "Interiores personalizados", + ["shell_description"] = "Interiores personalizados, hechos por Ti", + ["cctv_settings"] = "Ajustes CCTV", + ["garage_settings"] = "Configuración del garaje", + ["toggle_title"] = "Alternar uso", + ["toggle_description"] = "Estado actual: %s", + ["cctv_set_title"] = "Establecer angulo de CCTV", + ["cctv_set_description"] = "Establece el angulo de las cámaras para tus direcciones de Cámaras", + ["back_description"] = "Volver a la creación de propiedad.", + ["garage_set_title"] = "Establecer posición de garaje", + ["garage_set_description"] = "Establece la posición del garaje de la propiedad.", + ["garage_textui"] = "Presione ~b~[E]~s~ para establecer la posición", + ["cctv_textui_1"] = "Presione ~b~[E]~s~ para establecer el ángulo", + ["cctv_textui_2"] = "Presione ~b~[E]~s~ para establecer la rotación máxima a la derecha", + ["cctv_textui_3"] = "Presione ~b~[E]~s~ para establecer la rotación máxima a la izquierda", + ["create_success"] = "¡Propiedad creada!", + ["missing_data"] = "¡Complete todas las entradas requeridas!", + + -- Saving Translations + ["server_restart"] = "Reinicio del servidor", + ["server_shutdown"] = "Apagado del servidor", + ["manual_save"] = "Guardado manual (solicitado por %s)", + ["resource_stop"] = "Detención de recurso", + ["force_save"] = "Forzar guardado (solicitado por %s)", + ["interval_saving"] = "Intervalo de Guardado" +} diff --git a/[esx_addons]/esx_property/locales/et.lua b/[esx_addons]/esx_property/locales/et.lua new file mode 100644 index 00000000..b56287a9 --- /dev/null +++ b/[esx_addons]/esx_property/locales/et.lua @@ -0,0 +1,206 @@ +Locales['et'] = { + --- CCTV Strings ------ + + ["take_picture"] = "Tee pilt", + ["rot_left_right"] = "Vasak/parem", + ["rot_up_down"] = "Ülesse/alla", + ["Zoom"] = "Suumi Sisse/välja", + ["Zoom_level"] = "Suumi protsent: %s %", + ["night_vision"] = "Lülita sisse/välja öine nägemine ", + ["clipboard"] = "~b~Link kopeeritud", + ["picture_taken"] = "Pilt tehtud!", + ["please_wait"] = "Palun oota, kuni teed uut ~b~Pilti", + ["exit"] = "Kinni", + + --- Furniture Strings ------ + + ["Height"] = "Kõrgus", + ["rotate"] = "Keera", + ["place"] = "Aseta sisustus", + ["delete_furni"] = "Kustuta", + ["confirm_buy"] = "Kas sa soovid osta %s ?", + ["price"] = "Maksab: $&s", + ["yes"] = "Jah", + ["no"] = "Ei", + ["action"] = "Sa %s ~b~%s~s~ !", + ["bought_furni"] = "Sa ~g~ostsid~s~ ~b~%s~s~ !", + ["edited_furni"] = "Sa muutsid ~b~%s~s~ !", + ["cannot_buy"] = "Sa ~r~Ei saa~s~ seda osta!", + ["cannot_edit"] = "Sa ~r~Ei saa~s~ seda muuta!", + ["store_title"] = "Hoiusta - %s", + ["back"] = "Tagasi", + ["edit_title"] = "Muuda - %s", + ["move_title"] = "Liiguta", + ["deleted_confirm"] = "Kustutad ~b~%s~s~!", + ["deleted_error"] = "Ei saa kustutada ~b~%s~s~!", + ["owned_furni"] = "Omatud sisustus", + ["menu_stores"] = "Mööbli pood", + ["menu_stores_desc"] = "Osta mööblit", + ["menu_reset"] = "Lähtesta", + ["menu_reset_desc"] = "Lähtesta kogu mööbel", + ["menu_edit"] = "Muuda", + ["menu_edit_desc"] = "Muuda või eemalda mööblit", + ["furni_command"] = "mööbel", + ["furni_Command_desc"] = "(ESX Property) Ava mööbli menüü", + ["furni_command_permission"] = "Sul ~r~ pole~s~ piisavalt õiguseid, et avada seda menüüd!", + ["furni_reset_success"] = "Mööbel lähtestatud!", + ["furni_cannot_afford"] = "Sul pole piisavalt raha, et seda teha!", + ["furni_reset_error"] = "Sa ~r~ei saa~s~ lähtestada seda korterit!", + ["furni_management"] = "Muuda mööblit", + + --------- Key Strings --------------- + + ["you_granted"] = 'Sulle anti võtmed ~b~%s~s~.', + ["already_has"] = "Sellel isikul on juba võtmed!", + ["do_not_own"] = 'Sa ~r~ei~s~ oma seda korterit.', + ["key_revoked"] = 'Su võtmed korteri ~b~%s~s~. On ~r~ära võetud~s~ !', + ["no_keys"] = "Sellel isikul pole võtmeid!", + ["nearby"] = "Isikud sinu lähedal:", + ["gave_key"] = "Annad võtmed %s!", + ["key_cannot_give"] = "Sa ei saa anda sellele isikule ~r~Võtmeid", + ["remove_title"] = "Võta isikult võtmed ära", + ["key_revoke_success"] = "Võtad isikult ~b~%s~s~ võtmed ära.", + ["key_revoke_error"] = "Sa ei saa ~b~ära võtta~s~ ~r~võtmeid~s~ sellelt isikult", + ["key_management"] = "Võtmete muutmine", + ["key_management_desc"] = "Vaata kellel on võtmed.", + ["give_keys"] = "Anna võtmed", + ["remove_keys"] = "Võta võtmed", + + + --------- Real Estate Strings --------------- + ["actions"] = "Kinnisvaraalased tegevused", + ["property_create"] = "Loo kinnisvara", + ["property_manage"] = "Halda kinnisvara", + ["realestate_command"] = "kinnisvaramenu", + ["realestate_command_desc"] = "(ESX Property) Ava kinnisvara menüü", + ["enter_office"] = "~b~Sisened~s~ kontorihoonesse.", + ["enter_office_error"] = "Sa ~r~ei saa~s~ siseneda kontorisse!", + ["exit_office"] = "~b~Lahkud~s~ Kontorist.", + ["exit_office_error"] = "Sa ~r~ei saa~s~ lahkuda kontorist!", + ["realestate_textui"] = "Vajuta ~b~[E]~s~, et kasutada ~b~%s", + + ------------Command Strings----------------------- + ["refresh_name"] = "property:refresh", + ["refresh_desc"] = "Tehaseseaded", + ["save_name"] = "property:save", + ["save_desc"] = "Sundsalvesta kinnisvara", + ["create_name"] = "property:create", + ["create_desc"] = "Loo kinnisvara", + ["admin_name"] = "property:admin", + ["admin_desc"] = "Vaata kõiki kinnisvarasid", + + + ---------- Property Actions Menu ------------------------- + + ["knocking"] = "Keegi ~b~koputab~s~ uksele.", + ["door_locked"] = "Uks: Lukus", + ["door_unlocked"] = "Uks: Lahti", + ["name_manage"] = "Muuda nime", + ["name_manage_desc"] = "Muuda korteri nime.", + ["sell_title"] = "Müü", + ["sell_desc"] = "Müü korterit $%s eest", + ["raid_title"] = "Reid", + ["raid_desc"] = "Reidi maja.", + ["cctv_title"] = "turvakaamera", + ["cctv_desc"] = "Vaata turvakaameraid.", + ["inventory_title"] = "Kapp", + ["inventory_desc"] = "Muuda kapi asukohta.", + ["wardrobe_title"] = "Riidekapp", + ["wardrobe_desc"] = "Muuda riidekapi asukohta.", + ["Furniture_title"] = "Mööbel", + ["Furniture_desc"] = "Muudad mööbli asukohta.", + ["enter_title"] = "Sisene", + ["knock_title"] = "Koputad uksele", + ["buy_title"] = "Osta", + ["buy_desc"] = "Osta korter $%s eest", + ["sellplayer_title"] = "Müü isikule", + ["sellplayer_desc"] = "Müü korter $%s eest", + ["view_title"] = "Vaata sisustust", + ["exit_title"] = "Lahku", + ["property_editing_error"] = "Lahkud korterist.", + ["unlock_error"] = "Sa ei saa ~b~ust lahti teha~s~ sellel korteril", + ["lock_error"] = "Sa ei saa ~b~ust lukku panna~s~ sellel kontoril", + ["prep_raid"] = "~b~Reidi ette valmistamine~s~!", + ["raiding"] = "Reidimine...!", + ["cancel_raiding"] = "~r~Reid katkestatud~s~!", + ["cannot_raid"] = "Sa ei saa ~b~Reidida~s~ seda korterit.", + ["storage_pos_textui"] = "Vajuta ~b~[G]~s~ ,et panna kapp maha", + ["storage_pos_success"] = "~b~Kapp~s~ maha pandud.", + ["storage_pos_error"] = "~r~Ei saa~s~ ~b~kappi~s~ siia panna.", + ["wardrobe_pos_textui"] = "Vajuta ~b~[G]~s~ et panna riidekapp maha", + ["wardrobe_pos_success"] = "~b~Riidekapp~s~ maha pandud.", + ["wardrobe_pos_error"] = "~r~EI saa~s~ ~b~riidekappi~s~ siia panna.", + ["please_finish"] = "Palun aseta ~b~%s~s~ korteri enne!", + ["cannot_afford"] = "Sa ei saa seda korterit osta!", + ["select_player"] = "Vali isik", + ["cannot_Sell"] = "Ei saa sellele isikule müüa!", + ["knock_on_door"] = "Koputad uksele...", + ["nobody_home"] = "Tundub, et kedagi pole kodus...", + + ---------- General Strings ---------------- + + ["exiting"] = "Väljud korterist...", + ["entering"] = "Sisened korterisse...", + ["shell_disabled"] ="See sisustus kasutab Shelli, mis on välja lülitatud!", + ["access_textui"] = "Vajuta ~b~[E]~s~, et avada ~b~%s", + ["raid_notify_error"] = "Sul on vaja ~b~ %sx %s~s~, et reidida korteri!", + ["raid_notify_success"] = "Sinu korterit hetkel ~b~Reiditakse!", + + --------------- Garage Strings -------------- + + ["store_success"] = "Sõiduk ~b~pargitud!", + ["store_error"] = "Sa ei saa seda sõidukit parkida!", + ["retriving_notify"] = "Väljastad ~b~%s~s~ ...", + ["cannot_access"] = "Sa ei saa seda garaaži avada!", + ["store_textui"] = "PVajuta ~b~[E]~s~, et parkida ~b~%s", + ["garage_not_enabled"] = 'Garaaž puudub sellel hoonel.', + ["cannot_access_property"] = 'Sa ~r~ei oma~s~ seda korterit.', + + + ----------------- Creation Menu Strings ---------------- + + ["menu_title"] = "Kinnisvara tegemine", + ["element_title1"] = "Tänava nr.", + ["element_description1"] = "Sisesta tänava nr.", + ["element_title2"] = "Hind", + ["element_description2"] = "Sisesta hind.", + ["element_title3"] = "Sisustus", + ["element_description3"] = "Vali sisustus sellele korterile", + ["element_title4"] = "Garage", + ["element_description4"] = "(Valikuline) Muuda garaaži sätteid", + ["element_title5"] = "Kaameraid", + ["element_description5"] = "(Valikuline) Muuda kaamerate sätteid", + ["element_title6"] = "Sissepääs", + ["element_description6"] = "Sea kinnisvara sissepääsu asukoht.", + ["element_create_title"] = "Loo kinnisvara", + ["element_create_desc_1"] = "Palun sisesta kõik vajalikud andmed!", + ["entrance_set_title"] = "Sissepääs olemas.", + ["entrance_set_description"] = "Sissepääs: %s, %s, %s", + ["interior_set_title"] = "Sisustus valitud.", + ["interior_set_description"] = "Valitud: %s", + ["ipl_title"] = "IPL Sisustused", + ["types_title"] = "Sisustuse tüüp", + ["ipl_description"] = "Tava GTA sisustus", + ["shell_title"] = "Custom sisustus", + ["shell_description"] = "Custom sisustus, sinu poolt tehtud", + ["toggle_title"] = "Lülitage kasutamine sisse", + ["toggle_description"] = "Praegune seis: %s", + ["cctv_set_title"] = "Sea nurk", + ["cctv_set_description"] = "Seab kaamera nurga sinu vaatenurgaga", + ["garage_set_title"] = "Sea positsioon", + ["garage_set_description"] = "Sea garaaži asukoht.", + ["garage_textui"] = "Vajuta ~b~[E]~s~ ,et seada positsioon", + ["cctv_textui_1"] = "Vajuta ~b~[E]~s~ ,et muuta nurka", + ["cctv_textui_2"] = "Vajuta ~b~[E]~s~ ,et seada paremale", + ["cctv_textui_3"] = "Vajuta ~b~[E]~s~ ,et seada vasakule", + ["create_success"] = "Korter valmis!", + ["missing_data"] = "Palun sisesta kõik andmed!", + + -- Saving Translations + ["server_restart"] = "Server Restardib!", + ["server_shutdown"] = "Server läheb kinni!", + ["manual_save"] = "Manuaalne salvestus! (%s)", + ["resource_stop"] = "Resource Peatub!", + ["interval_saving"] = "Automaalne salvestamine!", + ["force_save"] = "Sund salvestamine! (%s)" + } diff --git a/[esx_addons]/esx_property/locales/fr.lua b/[esx_addons]/esx_property/locales/fr.lua new file mode 100644 index 00000000..d2eee5e4 --- /dev/null +++ b/[esx_addons]/esx_property/locales/fr.lua @@ -0,0 +1,218 @@ +Locales[ fr ] = { + --- CCTV Strings ------ + + ["take_picture"] = "Prendre une photo", + ["rot_left_right"] = "Gauche/Droite", + ["rot_up_down"] = "Haut/Bas", + ["zoom"] = "Zoom avant/ arrière", + ["zoom_level"] = "Niveau de zoom : %s %%", + ["night_vision"] = "Basculer la vision nocturne", + ["clipboard"] = "Lien copié vers ~b~Cipboard", + ["picture_taken"] = "Photo prise !", + ["please_wait"] = "Veuillez patienter avant de prendre une autre ~b~photo", + ["exit"] = "Quitter", + + -- - Cordes de meubles ------ + + ["hauteur"] = "Hauteur", + ["tourner"] = "Rotation", + ["place"] = "Placer les meubles", + ["delete_furni"] = "Supprimer", + ["confirm_buy"] = "Voulez-vous acheter %s ?", + ["prix"] = "Prix : $%s", + ["yes"] = "Oui", + ["no"] = "Non", + ["action"] = "Vous %s ~b~%s~s~ !", + ["buyer_furni"] = "Vous avez ~g~acheté~s~ A ~b~%s~s~ !", + ["edited_furni"] = "Vous avez modifié ~b~%s~s~ !", + ["cant_buy"] = "Vous ~r~ne pouvez pas~s~ acheter ceci !", + ["cant_edit"] = "Vous ~r~ne pouvez pas~s~ modifier ceci !", + ["store_title"] = "Magasin - %s", + ["retour"] = "Retour", + ["edit_title"] = "Modification - %s", + ["move_title"] = "Déplacer", + ["delete_confirm"] = "Suppression de ~b~%s~s~ !", + ["delete_error"] = "Impossible de supprimer ~b~%s~s~ !", + ["Own_furni"] = "Meubles possédés", + ["menu_stores"] = "Magasins de meubles", + ["menu_stores_desc"] = "Acheter des meubles", + ["menu_reset"] = "Réinitialiser", + ["menu_reset_desc"] = "Efface tous les meubles", + ["menu_edit"] = "Modifier", + ["menu_edit_desc"] = "Déplacer et/ou supprimer des meubles", + ["furni_command"] = "meubles", + ["furni_command_desc"] = "(Propriété ESX) Ouvrir le menu des meubles", + ["furni_command_permission"] = "Vous ~r~ne pouvez pas~s~ accéder à ce menu !", + ["furni_reset_success"] = "Réinitialiser les meubles !", + ["furni_cannot_afford"] = "Vous ne pouvez pas vous permettre de faire ça !", + ["furni_reset_error"] = "Vous ~r~ne pouvez pas~s~ réinitialiser cette propriété !", + ["furni_management"] = "Gérer les meubles", + + -- ------- Chaînes de clés --------------- + + ["you_granted"] = "Vous avez reçu les clés de ~b~%s~s~.", + ["exists_has"] = "Ce joueur a déjà des clés !", + ["do_not_own"] = "Vous ne possédez ~r~pas~s~ cette propriété.", + ["key_revoked"] = "Votre clé d accès à ~b~%s~s~. A été ~r~révoqué~s~", + ["no_keys"] = "Ce joueur n a pas de clés !", + ["à proximité"] = "Joueurs à proximité", + ["gave_key"] = "Donner les clés à %s !", + ["key_cannot_give"] = "Vous ne pouvez pas donner une ~r~clé à ce joueur", + ["remove_title"] = "Supprimer les clés du lecteur", + ["key_revoke_success"] = "Révocation des clés de ~b~%s~s~.", + ["key_revoke_error"] = "Vous ne pouvez pas ~b~supprimer~s~ une ~r~clé~s~ de cette personne", + ["key_management"] = "Gestion des clés", + ["key_management_desc"] = "Contrôler l accès à la propriété.", + ["give_keys"] = "Donner des clés", + ["remove_keys"] = "Supprimer les clés", + + + -- ------- Chaînes immobilières --------------- + ["office_blip"] = "%s Bureau", + ["actions"] = "Actions immobilières", + ["property_create"] = "Créer une propriété", + ["property_manage"] = "Gérer les propriétés", + ["realestate_command"] = "realestatequickmenu", + ["realestate_command_desc"] = "(Propriété ESX) Ouvrir les actions rapides de l immobilier", + ["enter_office"] = "~b~Entrée~s~ Bureau.", + ["enter_office_error"] = "Vous ~r~ne pouvez pas~s~ entrer dans le bureau !", + ["exit_office"] = "~b~Sortie~s~ du bureau.", + ["exit_office_error"] = "Vous ~r~ne pouvez pas~s~ quitter le bureau !", + ["realestate_textui"] = "Appuyez sur ~b~[E]~s~ pour accéder à ~b~%s", + + -- ----------Chaînes de commande----------------------- + ["refresh_name"] = "propriété:refresh", + ["refresh_desc"] = "Actualiser à l état de démarrage du serveur", + ["save_name"] = "propriété:save", + ["save_desc"] = "Forcer l enregistrement des propriétés", + ["nom_création"] = "propriété:créer", + ["create_desc"] = "Créer une nouvelle propriété", + ["nom_admin"] = "propriété:admin", + ["admin_desc"] = "Gérer/afficher toutes les propriétés", + + + -- -------- Menu Actions propriété ------------------------- + + ["knocking"] = "Quelqu un ~b~frappe~s~ à la porte.", + ["name_edit"] = "Modifier le nom de la propriété", + ["nom"] = "Nom", + ["confirmer"] = "Confirmer", + ["name_edit_success"] = "Vous avez défini le nom de la propriété sur ~b~%s~s~.", + ["name_edit_error"] = "Vous ne pouvez pas définir le nom de la propriété sur ~r~%s~s~.", + ["door_locked"] = "Porte : verrouillée", + ["door_unlocked"] = "Porte : Déverrouillée", + ["name_manage"] = "Gérer le nom", + ["name_manage_desc"] = "Définir le nom de la propriété.", + ["sell_title"] = "Vendre", + ["sell_desc"] = "Vendre cette propriété pour $%s", + ["raid_title"] = "Raid", + ["raid_desc"] = "Forcer l entrée dans la propriété.", + ["titre_cctv"] = "CCTV", + ["cctv_desc"] = "Vérifiez la caméra CCTV.", + ["Inventory_title"] = "Inventaire", + ["Inventory_desc"] = "Modifier la position du stockage des propriétés.", + ["garde -robe_title"] = "Garde- robe", + ["armoire_desc"] = "Modifier la position de l armoire de propriété.", + ["meuble_titre"] = "Meuble", + ["furniture_desc"] = "Modifier la position des meubles de la propriété.", + ["enter_title"] = "Entrez", + ["knock_title"] = "Frappez à la porte", + ["buy_title"] = "Acheter", + ["buy_desc"] = "Acheter cette propriété pour $%s", + ["sellplayer_title"] = "Vendre au joueur", + ["sellplayer_desc"] = "Vendre cette propriété pour $%s", + ["view_title"] = "Aperçu de l intérieur", + ["exit_title"] = "Quitter", + ["property_editing_error"] = "Vous modifiez actuellement la propriété.", + ["unlock_error"] = "Vous ne pouvez pas ~b~déverrouiller~s~ cette propriété", + ["lock_error"] = "Vous ne pouvez pas ~b~verrouiller~s~ cette propriété", + ["prep_raid"] = "~b~Préparation~s~ Raid !", + ["raiding"] = "Raidage...", + ["cancel_raiding"] = "~r~Annulé~s~ Raid !", + ["cant_raid"] = "Vous ne pouvez pas ~b~Raid~s~ cette propriété.", + ["storage_pos_textui"] = "Appuyez sur ~b~[G]~s~ pour définir la position de stockage", + ["storage_pos_success"] = "~b~Stockage~s~ Position définie.", + ["storage_pos_error"] = "~r~Impossible~s~ de définir la position de ~b~stockage~s~.", + ["armoire_pos_textui"] = "Appuyez sur ~b~[G]~s~ pour définir la position de la garde -robe", + ["armoire_pos_success"] = "~b~Armoire~s~ Définir la position.", + ["armoire_pos_error"] = "~r~Impossible~s~ de définir la position de ~b~armoire~s~.", + ["please_finish"] = "Veuillez finir de définir la position ~b~%s~s~", + ["cant_afford"] = "Vous ne pouvez pas acheter cette propriété !", + ["select_player"] = "Sélectionner un joueur", + ["cant_sell"] = "Impossible de vendre à ce joueur !", + ["knock_on_door"] = "Frapper à la porte...", + ["nobody_home"] = "Il semble que personne n est à la maison...", + + -- -------- Chaînes générales ---------------- + + ["enabled"] = "Activé", + ["disabled"] = "Désactivé", + ["exiting"] = "Sortie de la propriété...", + ["entering"] = "Saisie de la propriété...", + ["shell_disabled"] ="Cet intérieur utilise des coques, qui sont désactivées !", + ["access_textui"] = "Appuyez sur ~b~[E]~s~ pour accéder à ~b~%s", + ["raid_notify_error"] = "Vous avez besoin de ~b~ %sx %s~s~ pour pouvoir effectuer un raid !", + ["raid_notify_success"] = "Votre propriété fait actuellement l objet d un ~b~raid !", + + -------------- Cordes de garage -------------- + + ["store_success"] = "Véhicule ~b~stocké !", + ["store_error"] = "Vous ne pouvez pas stocker ce véhicule !", + ["property_garage"] = "Propriété Garage", + ["retriving_notify"] = "Récupération de ~b~%s~s~ ...", + ["cant_access"] = "Vous ne pouvez pas accéder à ce garage !", + ["store_textui"] = "Appuyez sur ~b~[E]~s~ pour stocker ~b~%s", + ["garage_not_enabled"] = "Garage non activé sur cette propriété.", + ["cannot_access_property"] = "Vous ~r~ne pouvez pas~s~ accéder à cette propriété.", + + + -- --------------- Chaînes de menu de création ---------------- + + ["menu_title"] = "Création de propriété", + ["element_title1"] = "Numéro de rue", + ["element_description1"] = "Définissez le numéro de rue de la propriété.", + ["element_title2"] = "Prix", + ["element_description2"] = "Définir le prix de la propriété.", + ["element_title3"] = "Intérieur", + ["element_description3"] = "Sélectionnez un intérieur pour la propriété", + ["element_title4"] = "Garage", + ["element_description4"] = "(Facultatif) Gérer les paramètres du garage", + ["element_title5"] = "CCTV", + ["element_description5"] = "(Facultatif) Gérer les paramètres CCTV", + ["element_title6"] = "Entrée", + ["element_description6"] = "Définir l emplacement de l entrée de la propriété.", + ["element_create_title"] = "Créer une propriété", + ["element_create_desc_1"] = "Veuillez remplir toutes les entrées requises !", + ["entry_set_title"] = "Ensemble d entrée.", + ["entry_set_description"] = "Entrée : %s, %s, %s", + ["interior_set_title"] = "Intérieur sélectionné.", + ["interior_set_description"] = "Sélectionné : %s", + ["ipl_title"] = "Intérieurs IPL", + ["types_title"] = "Types intérieurs", + ["ipl_description"] = "Intérieurs GTA natifs, fabriqués par R*", + ["shell_title"] = "Intérieurs personnalisés", + ["shell_description"] = "Intérieurs personnalisés, faits par vous", + ["cctv_settings"] = "Paramètres CCTV", + ["garage_settings"] = "Paramètres du garage", + ["toggle_title"] = "Basculer l utilisation", + ["toggle_description"] = "État actuel : %s", + ["cctv_set_title"] = "Définir l angle CCTV", + ["cctv_set_description"] = "Règle l angle de la caméra sur la direction de vos caméras", + ["back_description"] = "retour à la création de la propriété.", + ["garage_set_title"] = "Définir la position du garage", + ["garage_set_description"] = "Définir la position du garage de la propriété.", + ["garage_textui"] = "Appuyez sur ~b~[E]~s~ pour définir la position", + ["cctv_textui_1"] = "Appuyez sur ~b~[E]~s~ pour régler l angle", + ["cctv_textui_2"] = "Appuyez sur ~b~[E]~s~ pour définir la rotation maximale à droite", + ["cctv_textui_3"] = "Appuyez sur ~b~[E]~s~ pour définir la rotation maximale à gauche", + ["create_success"] = "Propriété créée !", + ["missing_data"] = "Veuillez remplir toutes les entrées requises !", + + -- Enregistrement des traductions + ["server_restart"] = "Redémarrage du serveur", + ["server_shutdown"] = "Arrêt du serveur", + ["manual_save"] = "Enregistrement manuel (demandé par %s)", + ["resource_stop"] = "Arrêt de la ressource", + ["force_save"] = "Forcer l enregistrement (demandé par %s)", + ["interval_saving"] = "Enregistrement d intervalle" + } diff --git a/[esx_addons]/esx_property/locales/nl.lua b/[esx_addons]/esx_property/locales/nl.lua new file mode 100644 index 00000000..aa7bc704 --- /dev/null +++ b/[esx_addons]/esx_property/locales/nl.lua @@ -0,0 +1,218 @@ +Locales['nl'] = { + --- CCTV Strings ------ + + ["take_picture"] = "Neem foto", + ["rot_left_right"] = "Links/Rechts", + ["rot_up_down"] = "Omhoog/Omblaag", + ["zoom"] = "Zoom In/Uit", + ["zoom_level"] = "Zoom Level: %s %", + ["night_vision"] = "Nachtcamera aanzetten", + ["clipboard"] = "Link gekopierd naar ~b~klembord", + ["picture_taken"] = "Foto genomen!", + ["please_wait"] = "Wacht even voordat je een nieuwe ~b~Foto neeemt", + ["exit"] = "Sluit", + + --- Furniture Strings ------ + + ["height"] = "Hoogte", + ["rotate"] = "Rotatie", + ["place"] = "Plaats Meubel", + ["delete_furni"] = "Verwijder", + ["confirm_buy"] = "Wil je %s kopen?", + ["price"] = "Prijs: $&s", + ["yes"] = "Ja", + ["no"] = "Nee", + ["action"] = "Jij %s ~b~%s~s~ !", + ["bought_furni"] = "Je hebt een ~b~%s~s~ gekocht!", + ["edited_furni"] = "Je hebt ~b~%s~s~ aangepast!", + ["cannot_buy"] = "Je kan ~r~Dit~s~ Niet kopen!", + ["cannot_edit"] = "Je ~r~Kan niet~s~ aanpassen!", + ["store_title"] = "Winkel - %s", + ["back"] = "Ga terug", + ["edit_title"] = "Aanpassen - %s", + ["move_title"] = "Verplaats", + ["deleted_confirm"] = "Verwijderen van ~b~%s~s~!", + ["deleted_error"] = "Kan ~b~%s~s~ niet verwijderen!", + ["owned_furni"] = "Mijn meubels", + ["menu_stores"] = "Meubel winkels", + ["menu_stores_desc"] = "Koop meubels", + ["menu_reset"] = "Reset", + ["menu_reset_desc"] = "Verwijder alle meubels", + ["menu_edit"] = "Aanpassen", + ["menu_edit_desc"] = "Verplaats en/of verwijder meubels", + ["furni_command"] = "meubel", + ["furni_command_desc"] = "(ESX Property) Open meubel menu", + ["furni_command_permission"] = "Je ~r~Kan dit~s~ menu niet betreden!", + ["furni_reset_success"] = "Meubel Reset!", + ["furni_cannot_afford"] = "Je kan dit niet betalen!", + ["furni_reset_error"] = "Je ~r~Kan niet~s~ dit eigendom niet resetten!", + ["furni_management"] = "Beheer meubels", + + --------- Key Strings --------------- + + ["you_granted"] = 'Je hebt de sleutels van ~b~%s~s~ gekregen.', + ["already_has"] = "Deze speler heeft al sleutels!", + ["do_not_own"] = 'Dit is ~r~niet~s~ jou eigendom.', + ["key_revoked"] = 'Je sleutel van ~b~%s~s~. is ~r~afgenomen~s~', + ["no_keys"] = "Deze speler heeft geen sleutels!", + ["nearby"] = "Spelers Dichtbij", + ["gave_key"] = "Je hebt een sleutel gegeven aan %s!", + ["key_cannot_give"] = "Je kan deze speler geen ~r~sleutel~s~ geven.", + ["remove_title"] = "Neem sleutels van speler", + ["key_revoke_success"] = "Sleutels afgenomen van~b~%s~s~.", + ["key_revoke_error"] = "Je kan de ~r~sleutels~s~ ~b~niet afnemen~s~ van deze speler", + ["key_management"] = "Sleutel Management", + ["key_management_desc"] = "Beheer uitgegeven sleutels.", + ["give_keys"] = "Geef sleutels", + ["remove_keys"] = "Verwijder sleutels", + + + --------- Real Estate Strings --------------- + ["office_blip"] = "%s Kantoor", + ["actions"] = "Vastgoed acties", + ["property_create"] = "Creeër kantoor", + ["property_manage"] = "Beheer kantoor", + ["realestate_command"] = "vastgoedsnelmenu", + ["realestate_command_desc"] = "(ESX Property) Open Vastgoed snelle acties", + ["enter_office"] = "Ga kantoor ~b~naar binnen~s~.", + ["enter_office_error"] = "Je kan dit kantoor ~r~niet~s~ naar binnen!", + ["exit_office"] = "~b~Verlaat~s~ kantoor.", + ["exit_office_error"] = "Je kan dit kantoor ~r~niet~s~ naar buiten!", + ["realestate_textui"] = "Klik op ~b~[E]~s~ om naar binnen te gaan bij ~b~%s", + + ------------Command Strings----------------------- + ["refresh_name"] = "property:refresh", + ["refresh_desc"] = "Ververs naar server start status.", + ["save_name"] = "property:save", + ["save_desc"] = "Forceer eigendom save", + ["create_name"] = "property:create", + ["create_desc"] = "Creeër een nieuw gebouw", + ["admin_name"] = "property:admin", + ["admin_desc"] = "Beheer/bekijk alle gebouwen", + + + ---------- Property Actions Menu ------------------------- + + ["knocking"] = "Iemand ~b~klopt~s~ op de deur.", + ["name_edit"] = "Verander gebouw naam", + ["name"] = "Naam", + ["confirm"] = "Bevestig", + ["name_edit_success"] = "Je hebt de naam van het gebouw veranderd naar ~b~%s~s~.", + ["name_edit_error"] = "Je kan dit gebouw niet deze naam geven ~r~%s~s~.", + ["door_locked"] = "Deur: Vergrendeld", + ["door_unlocked"] = "Deur: Ontgrendeld", + ["name_manage"] = "Beheer naam", + ["name_manage_desc"] = "Verander de naam van het gebouw.", + ["sell_title"] = "Verkoop", + ["sell_desc"] = "Verkoop dit gebouw voor $%s", + ["raid_title"] = "Binnenvallen", + ["raid_desc"] = "Forceer jezelf naar binnen.", + ["cctv_title"] = "Camera systeem", + ["cctv_desc"] = "Check het camera systeem.", + ["inventory_title"] = "Inventaris", + ["inventory_desc"] = "Verander positie van de berging.", + ["wardrobe_title"] = "Kledingkast", + ["wardrobe_desc"] = "Verander de positie van de kledingkast.", + ["furniture_title"] = "Meubels", + ["furniture_desc"] = "Verander de positie van een meubel", + ["enter_title"] = "Ga naar binnen", + ["knock_title"] = "Klop op de deur", + ["buy_title"] = "Koop", + ["buy_desc"] = "Koop dit gebouw voor $%s", + ["sellplayer_title"] = "Verkoop aan speler", + ["sellplayer_desc"] = "Verkoop dit gebouw voor $%s", + ["view_title"] = "Bekijk Interieur", + ["exit_title"] = "Verlaat", + ["property_editing_error"] = "Je bent momenteel dit gebouw aan aan het passen.", + ["unlock_error"] = "Je kan dit gebouw niet ~b~ontgrendelen", + ["lock_error"] = "Je kan dit gebouw niet ~b~vergrendelen", + ["prep_raid"] = "Deur forceren ~b~voorbereiden~s~!", + ["raiding"] = "Deur forceren...", + ["cancel_raiding"] = "Deur forceren ~r~geannuleerd~s~!", + ["cannot_raid"] = "You Cannot ~b~Raid~s~ This Property.", + ["storage_pos_textui"] = "Klik op ~b~[G]~s~ om de berging te plaatsen", + ["storage_pos_success"] = "~b~Berging~s~ positie veranderd.", + ["storage_pos_error"] = "De ~b~berging~s~ positie ~r~kan niet~s~ veranderd worden.", + ["wardrobe_pos_textui"] = "Klik op ~b~[G]~s~ om de kledingkast te plaatsen", + ["wardrobe_pos_success"] = "~b~Kledingkast~s~ positie veranderd.", + ["wardrobe_pos_error"] = "De ~b~kledingkast~s~ positie ~r~kan niet~s~ veranderd worden.", + ["please_finish"] = "Maak het plaatsen van ~b~%s~s~ eerst af.", + ["cannot_afford"] = "Je kan dit gebouw niet kopen!", + ["select_player"] = "Selecteer speler", + ["cannot_sell"] = "Kan niet aan deze speler verkopen!", + ["knock_on_door"] = "Op deur kloppen...", + ["nobody_home"] = "Lijkt erop alsof niemand thuis is...", + + ---------- General Strings ---------------- + + ["enabled"] = "Aan", + ["disabled"] = "Uit", + ["exiting"] = "Verlaat gebouw...", + ["entering"] = "Gebouw binnen gaan...", + ["shell_disabled"] ="Dit Interieur gebruikt Shells, en die staan uit!", + ["access_textui"] = "Klik op ~b~[E]~s~ om ~b~%s~s~ te betreden", + ["raid_notify_error"] = "Je hebt ~b~ %sx %s~s~ nodig om de deur te forceren!", + ["raid_notify_success"] = "Je gebouw word momenteel ~b~geforceerd!", + + --------------- Garage Strings -------------- + + ["store_success"] = "Voertuig ~b~Opgeslagen!", + ["store_error"] = "Je kan dit voertuig niet opslaan!", + ["property_garage"] = "Gebouw garage", + ["retriving_notify"] = "~b~%s~s~ ophalen ...", + ["cannot_access"] = "Je kan deze garage niet gebruiken!", + ["store_textui"] = "Klik op ~b~[E]~s~ om ~b~%s~s~ op te slaan.", + ["garage_not_enabled"] = 'De garage is niet actief op dit gebouw.', + ["cannot_access_property"] = 'Je ~r~kan niet~s~ dit gebouw betreden.', + + + ----------------- Creation Menu Strings ---------------- + + ["menu_title"] = "Gebouw creatie", + ["element_title1"] = "Straat nummer", + ["element_description1"] = "Kies het straat nummer van het gebouw.", + ["element_title2"] = "Prijs", + ["element_description2"] = "Kies de prijs van het gebouw.", + ["element_title3"] = "Interieur", + ["element_description3"] = "Kies een interieur voor dit gebouw.", + ["element_title4"] = "Garage", + ["element_description4"] = "(Optional) Beheer Garage instellingen", + ["element_title5"] = "Camera systeem", + ["element_description5"] = "(Optional) Beheer Camera systeem instellingen", + ["element_title6"] = "Ingang", + ["element_description6"] = "Kies de locatie voor de ingang van het gebouw.", + ["element_create_title"] = "Creeër gebouw", + ["element_create_desc_1"] = "Vul alle velden in!", + ["entrance_set_title"] = "Ingang gekozen.", + ["entrance_set_description"] = "Ingang: %s, %s, %s", + ["interior_set_title"] = "Interieur geselecteerd.", + ["interior_set_description"] = "Geselecteerd: %s", + ["ipl_title"] = "IPL Interieuren", + ["types_title"] = "Interieur Types", + ["ipl_description"] = "Orginele GTA Interiors, Made by R*", + ["shell_title"] = "Custom Interieuren", + ["shell_description"] = "Custom Interieuren, gemaakt door jou", + ["cctv_settings"] = "Camera systeem instellingen", + ["garage_settings"] = "Garage instellingen", + ["toggle_title"] = "Schakel gebruik aan/uit", + ["toggle_description"] = "Momentele status: %s", + ["cctv_set_title"] = "Kies hoek", + ["cctv_set_description"] = "Past de camera hoek aan naar waar jou camera naar richt.", + ["back_description"] = "ga terug naar gebouw creatie.", + ["garage_set_title"] = "Garage positie", + ["garage_set_description"] = "Kies de positie van de garage.", + ["garage_textui"] = "Klik op ~b~[E]~s~ om de locatie te kiezen", + ["cctv_textui_1"] = "Klik op ~b~[E]~s~ om de hoek te kiezen", + ["cctv_textui_2"] = "Klik op ~b~[E]~s~ om maximale rechtse draai te kiezen", + ["cctv_textui_3"] = "Klik op ~b~[E]~s~ om maximale linkse draai te kiezen", + ["create_success"] = "Gebouw gemaakt!", + ["missing_data"] = "Vul alle velden in!", + + -- Saving Translations + ["server_restart"] = "Server word opnieuw opgestart", + ["server_shutdown"] = "Server gaat uit", + ["manual_save"] = "Handmatig opgeslagen (Aangevraagd door %s)", + ["resource_stop"] = "Resource Stopping", + ["force_save"] = "Opslaan geforceerd (Aangevraagd door %s)", + ["interval_saving"] = "Tussentijds opslaan" + } diff --git a/[esx_addons]/esx_property/locales/tc.lua b/[esx_addons]/esx_property/locales/tc.lua new file mode 100644 index 00000000..30db8f83 --- /dev/null +++ b/[esx_addons]/esx_property/locales/tc.lua @@ -0,0 +1,218 @@ +Locales['tc'] = { + --- CCTV Strings ------ + + ["take_picture"] = "拍攝照片", + ["rot_left_right"] = "左/右", + ["rot_up_down"] = "上/下", + ["zoom"] = "放大/縮小", + ["zoom_level"] = "縮放等級: %s %", + ["night_vision"] = "切換夜視模式", + ["clipboard"] = "圖片連結已複製至 ~b~剪貼簿", + ["picture_taken"] = "已拍攝照片!", + ["please_wait"] = "請稍後再拍攝另一張 ~b~照片", + ["exit"] = "離開", + + --- Furniture Strings ------ + + ["height"] = "高度", + ["rotate"] = "角度", + ["place"] = "放置家具", + ["delete_furni"] = "移除", + ["confirm_buy"] = "是否購買 %s ?", + ["price"] = "價格: $&s", + ["yes"] = "是", + ["no"] = "否", + ["action"] = "你 %s ~b~%s~s~ !", + ["bought_furni"] = "你 ~g~購買~s~ 了 ~b~%s~s~ !", + ["edited_furni"] = "你編輯了 ~b~%s~s~ !", + ["cannot_buy"] = "你 ~r~無法~s~ 購買這個!", + ["cannot_edit"] = "你 ~r~無法~s~ 編輯這個!", + ["store_title"] = "商店 - %s", + ["back"] = "返回", + ["edit_title"] = "正在編輯 - %s", + ["move_title"] = "移動", + ["deleted_confirm"] = "移除 ~b~%s~s~!", + ["deleted_error"] = "無法移除 ~b~%s~s~!", + ["owned_furni"] = "已擁有的家具", + ["menu_stores"] = "家具店", + ["menu_stores_desc"] = "購買家具", + ["menu_reset"] = "重設", + ["menu_reset_desc"] = "移除所有家具", + ["menu_edit"] = "編輯", + ["menu_edit_desc"] = "移動、移除家具物品", + ["furni_command"] = "furniture", + ["furni_command_desc"] = "(ESX Property) 打開家具選單", + ["furni_command_permission"] = "你 ~r~沒有~s~ 此選單的權限!", + ["furni_reset_success"] = "家具已重設!", + ["furni_cannot_afford"] = "你沒有足夠的金錢進行此操作!", + ["furni_reset_error"] = "你 ~r~無法~s~ 重設這個房產!", + ["furni_management"] = "家具管理", + + --------- Key Strings --------------- + + ["you_granted"] = '你獲得了 ~b~%s~s~ 的門鎖權限', + ["already_has"] = "對方已擁有門鎖權限!", + ["do_not_own"] = '你 ~r~並未~s~ 擁有這個房產', + ["key_revoked"] = '你在 ~b~%s~s~ 的門鎖權限已被 ~r~撤銷~s~', + ["no_keys"] = "對方沒有門鎖權限!", + ["nearby"] = "附近的人", + ["gave_key"] = "給予 %s 門鎖權限", + ["key_cannot_give"] = "你無法給予對方門鎖權限", + ["remove_title"] = "撤銷門鎖權限", + ["key_revoke_success"] = "已撤銷 ~b~%s~s~ 的門鎖權限", + ["key_revoke_error"] = "你 ~r~無法~s~ 撤銷對方的門鎖權限", + ["key_management"] = "權限管理", + ["key_management_desc"] = "操作房產門鎖的權限", + ["give_keys"] = "給予權限", + ["remove_keys"] = "移除權限", + + + --------- Real Estate Strings --------------- + ["office_blip"] = "%s 辦公室", + ["actions"] = "房地產操作", + ["property_create"] = "建立房產", + ["property_manage"] = "管理房產", + ["realestate_command"] = "realestatequickmenu", + ["realestate_command_desc"] = "(ESX Property) 打開房地產快速操作選單", + ["enter_office"] = "~b~進入~s~ 辦公室", + ["enter_office_error"] = "你 ~r~無法~s~ 進入這個辦公室!", + ["exit_office"] = "~b~離開~s~ 辦公室", + ["exit_office_error"] = "你 ~r~無法~s~ 離開這個辦公室!", + ["realestate_textui"] = "按下 ~b~[E]~s~ 來打開 ~b~%s", + + ------------Command Strings----------------------- + ["refresh_name"] = "property:refresh", + ["refresh_desc"] = "重新整理至伺服器啟動狀態", + ["save_name"] = "property:save", + ["save_desc"] = "強制保存房產資料", + ["create_name"] = "property:create", + ["create_desc"] = "建立新的房產", + ["admin_name"] = "property:admin", + ["admin_desc"] = "管理或檢視所有房產", + + + ---------- Property Actions Menu ------------------------- + + ["knocking"] = "有人正在外面 ~b~敲門~s~", + ["name_edit"] = "編輯房產名稱", + ["name"] = "名稱", + ["confirm"] = "確認", + ["name_edit_success"] = "你將房產名稱設為 ~b~%s~s~.", + ["name_edit_error"] = "你無法將房產名稱設為 ~r~%s~s~.", + ["door_locked"] = "門鎖:已上鎖", + ["door_unlocked"] = "門鎖:未上鎖", + ["name_manage"] = "管理名稱", + ["name_manage_desc"] = "設定房產的名稱", + ["sell_title"] = "賣出", + ["sell_desc"] = "將房產以 $%s 賣出", + ["raid_title"] = "破門", + ["raid_desc"] = "強制打開房產門鎖", + ["cctv_title"] = "閉路電視", + ["cctv_desc"] = "檢視閉路電視攝影機", + ["inventory_title"] = "儲物櫃", + ["inventory_desc"] = "移動房產儲物櫃的位置", + ["wardrobe_title"] = "衣櫃", + ["wardrobe_desc"] = "移動房產衣櫃的位置", + ["furniture_title"] = "家具", + ["furniture_desc"] = "移動房產家具的位置", + ["enter_title"] = "進入", + ["knock_title"] = "敲門", + ["buy_title"] = "購買", + ["buy_desc"] = "花費 $%s 購買該房產", + ["sellplayer_title"] = "賣給其他人", + ["sellplayer_desc"] = "以 $%s 賣出這個房產", + ["view_title"] = "內部預覽", + ["exit_title"] = "離開", + ["property_editing_error"] = "你正在編輯該房產", + ["unlock_error"] = "你無法 ~b~解鎖~s~ 該門鎖", + ["lock_error"] = "你無法 ~b~鎖上~s~ 該門鎖", + ["prep_raid"] = "~b~準備~s~ 破門!", + ["raiding"] = "破門中…", + ["cancel_raiding"] = "~r~取消~s~ 破門!", + ["cannot_raid"] = "你無法對該房產 ~b~破門~s~", + ["storage_pos_textui"] = "按下 ~b~[G]~s~ 確認設定儲物櫃位置", + ["storage_pos_success"] = "~b~儲物櫃~s~ 位置已設定", + ["storage_pos_error"] = "~r~無法~s~ 設定 ~b~儲物櫃~s~ 位置", + ["wardrobe_pos_textui"] = "按下 ~b~[G]~s~ 來設定衣櫃位置", + ["wardrobe_pos_success"] = "~b~衣櫃~s~ 位置已設定", + ["wardrobe_pos_error"] = "~r~無法~s~ 設定 ~b~衣櫃~s~ 位置", + ["please_finish"] = "請完成 ~b~%s~s~ 的位置設定", + ["cannot_afford"] = "你無法購買這個房產!", + ["select_player"] = "選擇對象", + ["cannot_sell"] = "無法賣給對方!", + ["knock_on_door"] = "敲門…", + ["nobody_home"] = "看起來沒人在家…", + + ---------- General Strings ---------------- + + ["enabled"] = "啟用", + ["disabled"] = "禁用", + ["exiting"] = "離開房產…", + ["entering"] = "進入房產…", + ["shell_disabled"] ="此內部使用已禁用的內殼!", + ["access_textui"] = "按下 ~b~[E]~s~ 訪問 ~b~%s", + ["raid_notify_error"] = "你需要 ~b~ %s 個 %s~s~ 才可以破門!", + ["raid_notify_success"] = "你的房產門鎖正在被~b~破壞", + + --------------- Garage Strings -------------- + + ["store_success"] = "載具 ~b~已停入", + ["store_error"] = "你無法將該載具停入!", + ["property_garage"] = "房產車庫", + ["retriving_notify"] = "取出 ~b~%s~s~ …", + ["cannot_access"] = "你無權進入該車庫", + ["store_textui"] = "按下 ~b~[E]~s~ 將 ~b~%s~s~ 停入", + ["garage_not_enabled"] = '該房產並未啟用車庫', + ["cannot_access_property"] = '你 ~r~沒有~s~ 該房產的權限', + + + ----------------- Creation Menu Strings ---------------- + + ["menu_title"] = "房產創建", + ["element_title1"] = "街道號碼", + ["element_description1"] = "設定房產的街道號碼.", + ["element_title2"] = "價格", + ["element_description2"] = "設定房產價格", + ["element_title3"] = "內部樣式", + ["element_description3"] = "選擇房產的內部樣式", + ["element_title4"] = "車庫", + ["element_description4"] = "(可選)管理車庫設定", + ["element_title5"] = "閉路電視", + ["element_description5"] = "(可選)管理閉路電視設定", + ["element_title6"] = "出入口", + ["element_description6"] = "設定房產的出入口位置", + ["element_create_title"] = "建立房產", + ["element_create_desc_1"] = "請填妥所有必要的選項!", + ["entrance_set_title"] = "出入口位置已設置", + ["entrance_set_description"] = "出入口: %s, %s, %s", + ["interior_set_title"] = "內部樣式已選擇", + ["interior_set_description"] = "內部樣式: %s", + ["ipl_title"] = "IPL 內部", + ["types_title"] = "內部樣式類型", + ["ipl_description"] = "GTA 原生內部樣式,由 R* 製作", + ["shell_title"] = "自訂內部樣式", + ["shell_description"] = "自訂的內部樣式", + ["cctv_settings"] = "閉路電視設定", + ["garage_settings"] = "車庫設定", + ["toggle_title"] = "切換啟用狀態", + ["toggle_description"] = "目前狀態: %s", + ["cctv_set_title"] = "設定閉路電視角度", + ["cctv_set_description"] = "將攝影機角度設為你鏡頭看向的方向", + ["back_description"] = "返回到房產創建", + ["garage_set_title"] = "設定車庫位置", + ["garage_set_description"] = "設定房產的車庫位置", + ["garage_textui"] = "按下 ~b~[E]~s~ 來設定位置", + ["cctv_textui_1"] = "按下 ~b~[E]~s~ 來設定角度", + ["cctv_textui_2"] = "按下 ~b~[E]~s~ 來設定最大向右角度", + ["cctv_textui_3"] = "按下 ~b~[E]~s~ 來設定最大向左角度", + ["create_success"] = "房產創建完成!", + ["missing_data"] = "請填妥所有必要選項!", + + -- Saving Translations + ["server_restart"] = "伺服器重新啟動", + ["server_shutdown"] = "伺服器關閉", + ["manual_save"] = "手動保存 (由 %s 進行的操作)", + ["resource_stop"] = "資源停止", + ["force_save"] = "強制保存 (由 %s 進行的操作)", + ["interval_saving"] = "間隔保存" + } diff --git a/[esx_addons]/esx_property/properties.json b/[esx_addons]/esx_property/properties.json new file mode 100644 index 00000000..8f0fafc1 --- /dev/null +++ b/[esx_addons]/esx_property/properties.json @@ -0,0 +1 @@ +[{"OwnerName":"","furniture":[],"Owned":false,"Interior":"low-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":2.7542073726654,"y":2.7045992112562097e-8,"x":-9.43104267120361},"maxleft":90.71163940429688,"enabled":true,"maxright":-88.02642059326172},"Name":"1076 Procopio Dr","positions":{"Wardrobe":{"z":-99.00859832763672,"y":-1003.45947265625,"x":259.9942932128906}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":28.57,"y":6206.16,"x":-467.88},"Price":25000},{"OwnerName":"","furniture":[],"Owned":false,"Interior":"low-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":162.9940643310547,"y":-0.0,"x":3.75689458847045},"maxleft":-113.61099243164064,"enabled":true,"maxright":70.65039825439453},"Name":"1075 Procopio Dr","positions":{"Wardrobe":{"z":-99.00859832763672,"y":-1003.45947265625,"x":259.9942932128906}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":29.07,"y":6260.23,"x":-448.02},"Price":25000},{"furniture":[],"Owned":false,"Interior":"low-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-138.95835876464845,"y":-0.0,"x":-1.16786921024322},"maxleft":-54.77568435668945,"enabled":true,"maxright":135.13072204589845},"Name":"1074 Procopio Dr","positions":{"Wardrobe":{"z":-99.00859832763672,"y":-1003.45947265625,"x":259.9942932128906}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":27.96,"y":6314.13,"x":-407.35},"Price":25000},{"furniture":[],"Owned":false,"Interior":"low-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-139.94163513183598,"y":-0.0,"x":-2.56643605232238},"maxleft":-51.56189727783203,"enabled":true,"maxright":132.70008850097657},"Name":"1073 Procopio Dr","positions":{"Wardrobe":{"z":-99.00859832763672,"y":-1003.45947265625,"x":259.9942932128906}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":28.86,"y":6341.62,"x":-368.23},"Price":25000},{"furniture":[],"Owned":false,"Interior":"low-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-152.39810180664066,"y":-0.0,"x":-7.54235982894897},"maxleft":-65.34387969970703,"enabled":true,"maxright":123.2501983642578},"Name":"1071 Procopio Dr","positions":{"Wardrobe":{"z":-99.00859832763672,"y":-1003.45947265625,"x":259.9942932128906}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":30.52,"y":6400.88,"x":-272.61},"Price":25000},{"furniture":[],"Owned":false,"Interior":"low-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":128.27305603027345,"y":4.379791960218428e-7,"x":-12.92249584197998},"maxleft":-148.38644409179688,"enabled":true,"maxright":38.33782577514648},"Name":"1071 Procopio Dr","positions":{"Wardrobe":{"z":-99.00859832763672,"y":-1003.45947265625,"x":259.9942932128906}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":30.48,"y":6414.46,"x":-246.14},"Price":25000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":137.8870849609375,"y":2.1444458297992242e-7,"x":-5.53862285614013},"maxleft":-135.48313903808598,"enabled":true,"maxright":48.30059432983398},"Name":"1070 Procopio Dr","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":30.22,"y":6445.48,"x":-229.63},"Price":27500},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-134.93411254882813,"y":1.0691521623584777e-7,"x":3.44796895980834},"maxleft":-46.79578399658203,"enabled":true,"maxright":138.85032653808598},"Name":"1067 Procopio Dr","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":28.89,"y":6551.76,"x":-130.8},"Price":27500},{"furniture":[],"Owned":false,"Interior":"low-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-144.0503692626953,"y":-1.3340336835199196e-8,"x":-0.24611411988735},"maxleft":-56.39479827880859,"enabled":true,"maxright":129.07382202148438},"Name":"1065 Procopio Dr","positions":{"Wardrobe":{"z":-99.00859832763672,"y":-1003.45947265625,"x":259.9942932128906}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":30.11,"y":6637.3,"x":-41.72},"Price":25000},{"furniture":[],"Owned":false,"Interior":"low-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-155.01153564453126,"y":-1.068413766347477e-7,"x":-2.71219563484191},"maxleft":-68.07413482666016,"enabled":true,"maxright":116.67019653320313},"Name":"1064 Procopio Dr","positions":{"Wardrobe":{"z":-99.00859832763672,"y":-1003.45947265625,"x":259.9942932128906}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":30.72,"y":6654.13,"x":-9.62},"Price":25000},{"furniture":[],"Owned":false,"Interior":"low-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-133.8831787109375,"y":-0.0,"x":-2.77191710472106},"maxleft":-45.94052505493164,"enabled":true,"maxright":135.7574005126953},"Name":"1034 Paleto Blvd","positions":{"Wardrobe":{"z":-99.00859832763672,"y":-1003.45947265625,"x":259.9942932128906}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":30.86,"y":6207.33,"x":-356.82},"Price":25000},{"furniture":[],"Owned":false,"Interior":"low-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-40.4444465637207,"y":4.32035335506953e-7,"x":-8.85426330566406},"maxleft":42.09032440185547,"enabled":true,"maxright":-131.2773895263672},"Name":"1034 Procopio Dr","positions":{"Wardrobe":{"z":-99.00859832763672,"y":-1003.45947265625,"x":259.9942932128906}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":30.87,"y":6252.75,"x":-379.92},"Price":25000},{"furniture":[],"Owned":false,"Interior":"low-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":44.16030502319336,"y":-9.440947223993136e-7,"x":-25.26673126220703},"maxleft":133.55870056152345,"enabled":true,"maxright":-42.54082870483398},"Name":"1047 Paleto Blvd","positions":{"Wardrobe":{"z":-99.00859832763672,"y":-1003.45947265625,"x":259.9942932128906}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":31.91,"y":6326.99,"x":-302.19},"Price":25000},{"furniture":[],"Owned":false,"Interior":"low-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-137.5096435546875,"y":-0.0,"x":-1.57497417926788},"maxleft":-43.60107040405273,"enabled":true,"maxright":134.7738800048828},"Name":"1043 Paleto Blvd","positions":{"Wardrobe":{"z":-99.00859832763672,"y":-1003.45947265625,"x":259.9942932128906}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":30.9,"y":6225.21,"x":-347.3},"Price":25000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-45.87245941162109,"y":-0.0,"x":-11.80154037475586},"maxleft":43.89247512817383,"enabled":true,"maxright":-133.83499145507813},"Name":"1059 Paleto Blvd","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":32.26,"y":6557.45,"x":-15.3},"Price":25000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":129.4863433837891,"y":2.144746105159357e-7,"x":-5.62087059020996},"maxleft":-139.30752563476566,"enabled":true,"maxright":44.53319549560547},"Name":"1061 Paleto Blvd","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":32.1,"y":6568.19,"x":4.43},"Price":27500},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-94.7632293701172,"y":-0.0,"x":-5.83577966690063},"maxleft":-43.43285751342773,"enabled":true,"maxright":-159.96804809570313},"Name":"1061 Paleto Blvd","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":31.84,"y":6596.46,"x":31.0},"Price":27500},{"furniture":[],"Owned":false,"Interior":"low-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-63.00457000732422,"y":-0.0,"x":-6.35934734344482},"maxleft":80,"enabled":false,"maxright":-20},"Name":"2016 Grapeseed Main St","positions":{"Wardrobe":{"z":-99.00859832763672,"y":-1003.45947265625,"x":259.9942932128906}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":42.9,"y":4642.33,"x":1725.06},"Price":12500},{"furniture":[],"Owned":false,"Interior":"low-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":91.53390502929688,"y":2.7858778395284394e-8,"x":-16.72389602661132},"maxleft":80,"enabled":false,"maxright":-20},"Name":"2015 Grapeseed Main St","positions":{"Wardrobe":{"z":-99.00859832763672,"y":-1003.45947265625,"x":259.9942932128906}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":42.39,"y":4658.22,"x":1674.01},"Price":12500},{"furniture":[],"Owned":false,"Interior":"low-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-93.13695526123049,"y":-0.0,"x":-29.83987236022949},"maxleft":80,"enabled":false,"maxright":-20},"Name":"2014 Grapeseed Main St","positions":{"Wardrobe":{"z":-99.00859832763672,"y":-1003.45947265625,"x":259.9942932128906}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":42.68,"y":4677.34,"x":1718.91},"Price":7500},{"furniture":[],"Owned":false,"Interior":"low-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":91.7155303955078,"y":-0.0,"x":-6.32857131958007},"maxleft":80,"enabled":false,"maxright":-20},"Name":"2013 Grapeseed Main St","positions":{"Wardrobe":{"z":-99.00859832763672,"y":-1003.45947265625,"x":259.9942932128906}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":42.09,"y":4689.52,"x":1682.85},"Price":7500},{"furniture":[],"Owned":false,"Interior":"low-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":110.03758239746094,"y":-0.0,"x":-18.96443367004394},"maxleft":80,"enabled":false,"maxright":-20},"Name":"2011 Grapeseed Main St","positions":{"Wardrobe":{"z":-99.00859832763672,"y":-1003.45947265625,"x":259.9942932128906}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":41.03,"y":4739.5,"x":1664.0},"Price":10000},{"furniture":[],"Owned":false,"Interior":"low-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-77.30774688720703,"y":-0.0,"x":-14.36374378204345},"maxleft":80,"enabled":false,"maxright":-20},"Name":"3012 Niland Ave","positions":{"Wardrobe":{"z":-99.00859832763672,"y":-1003.45947265625,"x":259.9942932128906}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":32.23,"y":3920.59,"x":1880.27},"Price":10000},{"furniture":[],"Owned":false,"Interior":"low-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":103.60260009765624,"y":-2.1725810483985698e-7,"x":-10.75266551971435},"maxleft":80,"enabled":false,"maxright":-20},"Name":"3013 Niland Ave","positions":{"Wardrobe":{"z":-99.00859832763672,"y":-1003.45947265625,"x":259.9942932128906}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":32.48,"y":3914.59,"x":1846.06},"Price":9000},{"furniture":[],"Owned":false,"Interior":"low-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-76.59026336669922,"y":-0.0,"x":-20.23343658447265},"maxleft":80,"enabled":false,"maxright":-20},"Name":"3013 Marina Dr","positions":{"Wardrobe":{"z":-99.00859832763672,"y":-1003.45947265625,"x":259.9942932128906}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":36.08,"y":3913.8,"x":1803.57},"Price":11500},{"furniture":[],"Owned":false,"Interior":"low-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":95.02767944335938,"y":-0.0,"x":-5.87784767150878},"maxleft":80,"enabled":false,"maxright":-20},"Name":"3025 Lesbos Ln","positions":{"Wardrobe":{"z":-99.00859832763672,"y":-1003.45947265625,"x":259.9942932128906}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":33.45,"y":3657.13,"x":1435.31},"Price":11500},{"furniture":[],"Owned":false,"Interior":"low-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-166.2356719970703,"y":-0.0,"x":-20.86568069458007},"maxleft":80,"enabled":false,"maxright":-20},"Name":"4018 Route 68","positions":{"Wardrobe":{"z":-99.00859832763672,"y":-1003.45947265625,"x":259.9942932128906}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":43.5,"y":2607.8,"x":471.15},"Price":12500},{"furniture":[],"Owned":false,"Interior":"low-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-93.07178497314452,"y":-0.0,"x":-11.2086534500122},"maxleft":80,"enabled":false,"maxright":-20},"Name":"4013 Joshua Rd","positions":{"Wardrobe":{"z":-99.00859832763672,"y":-1003.45947265625,"x":259.9942932128906}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":42.28,"y":3087.1,"x":181.03},"Price":7500},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-127.72049713134766,"y":-0.0,"x":-9.48588275909423},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7340 Nikola Pl","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":73.50999999999999,"y":-593.38,"x":1386.22},"Price":45000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-69.5700912475586,"y":-0.0,"x":-9.84068393707275},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7341 Nikola Pl","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":73.52,"y":-569.49,"x":1388.94},"Price":45000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-114.24230194091796,"y":-0.0,"x":-12.52571487426757},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7341 Nikola Pl","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":73.71,"y":-555.82,"x":1373.19},"Price":4500},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-177.74884033203126,"y":-0.0,"x":-10.93433380126953},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7340 Nikola Pl","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":73.72999999999999,"y":-606.62,"x":1367.33},"Price":45000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":62.37366104125976,"y":-0.0,"x":-17.39539337158203},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7339 Nikola Pl","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":73.72,"y":-597.26,"x":1341.64},"Price":45000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-27.96370315551757,"y":4.342483350683324e-7,"x":-10.56496334075927},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7342 Nikola Pl","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":72.91,"y":-546.97,"x":1348.31},"Price":45000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":152.2796173095703,"y":4.441767487151084e-7,"x":-16.03893852233886},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7339 Nikola Pl","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":72.27,"y":-583.06,"x":1323.3},"Price":45000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-111.59012603759766,"y":-0.00000144736395,"x":-53.85140228271484},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7342 Nikola Pl","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":71.46,"y":-535.91,"x":1328.57},"Price":45000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":164.71957397460938,"y":4.6078031346041828e-7,"x":-22.11302947998047},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7339 Nikola Pl","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":70.75,"y":-574.08,"x":1301.02},"Price":45000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-19.26140213012695,"y":4.363083689895575e-7,"x":-11.92860603332519},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7342 Nikola Pl","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":70.47999999999999,"y":-527.3,"x":1303.1},"Price":45000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":125.62109375,"y":-0.0,"x":-58.0705451965332},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7322 West Mirror Drive","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":56.84,"y":-729.5,"x":996.89},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":131.13587951660157,"y":-0.0,"x":-15.06083393096923},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7320 West Mirror Drive","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":57.24,"y":-716.31,"x":979.11},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":170.76788330078126,"y":3.3350637806961464e-9,"x":-0.14884614944458},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7320 West Mirror Drive","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":57.5,"y":-701.3,"x":970.88},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":115.8887939453125,"y":4.346124455878453e-7,"x":-10.81925582885742},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7319 West Mirror Drive","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":57.47,"y":-669.85,"x":960.15},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":38.34314727783203,"y":0.00000168464464,"x":-59.54927444458008},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7319 West Mirror Drive","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":57.45,"y":-653.51,"x":943.45},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-144.15000915527345,"y":-0.0,"x":-36.16230392456055},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7318 West Mirror Drive","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":58.26,"y":-627.65,"x":980.25},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":137.4777984619141,"y":-0.0,"x":-15.65773868560791},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7317 West Mirror Drive","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":57.26,"y":-639.71,"x":928.82},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":46.20460510253906,"y":-0.00000160100864,"x":-57.77318572998047},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7317 West Mirror Drive","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":57.47,"y":-615.51,"x":902.95},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":138.07872009277345,"y":-8.718344588487525e-7,"x":-11.68268966674804},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7316 West Mirror Drive","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":57.47,"y":-608.21,"x":886.77},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-176.59844970703126,"y":-0.0,"x":-3.38041257858276},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7316 West Mirror Drive","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":57.18,"y":-583.65,"x":861.7},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":12.50613498687744,"y":-2.1754524937023245e-7,"x":-11.14390087127685},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7312 West Mirror Drive","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":57.01,"y":-562.66,"x":844.12},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":85.02394104003906,"y":-5.362977262279856e-8,"x":-5.74017667770385},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7314 West Mirror Drive","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":56.95,"y":-532.68,"x":850.25},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":46.49221038818359,"y":0.00000154111978,"x":-56.35844421386719},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7313 West Mirror Drive","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":56.74,"y":-508.98,"x":861.51},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":44.91729354858398,"y":-0.0,"x":-64.80823516845703},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7313 West Mirror Drive","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":57.11000000000001,"y":-497.87,"x":878.44},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":19.29909515380859,"y":-0.0,"x":-14.44456386566162},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7311 West Mirror Drive","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":58.46,"y":-489.76,"x":906.46},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-8.25692367553711,"y":-0.0,"x":-19.33738899230957},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7311 West Mirror Drive","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":60.1,"y":-477.8,"x":921.78},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-55.23443603515625,"y":-8.953837777880835e-7,"x":-17.53591918945312},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7309 West Mirror Drive","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":60.57,"y":-463.17,"x":944.54},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":33.32376480102539,"y":8.936335120779404e-7,"x":-17.17726707458496},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7309 West Mirror Drive","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":61.81,"y":-451.65,"x":967.16},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":34.80197525024414,"y":8.771137913754501e-7,"x":-13.24740600585937},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7307 West Mirror Drive","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":63.06000000000001,"y":-433.03,"x":987.57},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":123.14452362060549,"y":-4.402644719903037e-7,"x":-14.16050624847412},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7307 West Mirror Drive","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":64.36999999999999,"y":-423.38,"x":1010.38},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":41.270263671875,"y":-4.386202476780454e-7,"x":-13.28245830535888},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7305 West Mirror Drive","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":65.36,"y":-408.36,"x":1028.78},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":54.3464241027832,"y":-8.817532943794504e-7,"x":-14.47243404388427},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7305 Bridge St","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":67.25,"y":-378.13,"x":1060.52},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-144.52737426757813,"y":-9.047982416632294e-7,"x":-19.33366966247558},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7306 West Mirror Drive","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":63.52,"y":-469.3,"x":1014.67},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-107.44925689697266,"y":-0.0,"x":-8.07564449310302},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7308 West Mirror Drive","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":61.16,"y":-502.36,"x":970.55},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":119.70294189453124,"y":-0.0,"x":-61.49639892578125},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7310 West Mirror Drive","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":59.64,"y":-518.94,"x":945.9},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-151.43536376953126,"y":-0.0,"x":-17.66978073120117},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7312 West Mirror Drive","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":58.81,"y":-526.05,"x":924.39},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-69.45809936523438,"y":-9.24586970540986e-7,"x":-22.57007217407226},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7312 West Mirror Drive","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":57.53,"y":-540.58,"x":893.24},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":28.74713134765625,"y":4.412431167111208e-7,"x":-14.65564727783203},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7312 Nikola Ave","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":57.39,"y":-569.56,"x":919.7},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":32.70853805541992,"y":-4.381802227726439e-7,"x":-13.03651428222656},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7310 Nikola Ave","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":58.75,"y":-541.93,"x":965.25},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":30.89822769165039,"y":9.366781910102872e-7,"x":-24.28778457641601},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7310 Nikola Ave","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":59.71,"y":-525.76,"x":987.84},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-65.29899597167969,"y":-0.0,"x":-16.08703422546386},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7308 Nikola Ave","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":60.01,"y":-510.98,"x":1006.48},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":144.13137817382813,"y":9.091479000744585e-7,"x":-20.10037040710449},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7306 Bridge St","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":63.1,"y":-498.06,"x":1046.29},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":76.4620132446289,"y":-0.0,"x":-11.98972129821777},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7306 Bridge St","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":63.32,"y":-470.58,"x":1051.04},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":162.82366943359376,"y":-0.0,"x":-8.78071689605712},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7306 Bridge St","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":65.28,"y":-448.93,"x":1056.24},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-102.9858856201172,"y":-4.4310172597761268e-7,"x":-15.54805183410644},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7344 Bridge St","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":64.67999999999999,"y":-484.37,"x":1090.46},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-15.62946987152099,"y":2.17306606487e-7,"x":-10.81984233856201},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7346 Bridge St","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":66.33999999999999,"y":-464.52,"x":1098.58},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":179.49822998046876,"y":-0.0,"x":-11.32894706726074},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7346 Bridge St","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":66.81,"y":-438.69,"x":1099.44},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-93.88529205322266,"y":-5.391471091797939e-8,"x":-8.21971225738525},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7348 Bridge St","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":66.58,"y":-411.33,"x":1101.06},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-112.49811553955078,"y":-0.0,"x":-24.5419979095459},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7348 West Mirror Drive","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":67.97,"y":-391.27,"x":1114.44},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":112.37248229980468,"y":-2.144359569911103e-7,"x":-5.51487922668457},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7345 East Mirror Dr","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":69.03999999999999,"y":-429.86,"x":1262.35},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":94.98734283447266,"y":-0.0,"x":-14.86165904998779},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7945 East Mirror Dr","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":69.53999999999999,"y":-458.06,"x":1265.74},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":125.15465545654296,"y":-0.0,"x":-10.50986766815185},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7343 East Mirror Dr","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":69.21,"y":-480.18,"x":1259.51},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":63.34117126464844,"y":-0.0,"x":-16.31183433532715},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7343 East Mirror Dr","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":68.92999999999999,"y":-494.1,"x":1251.53},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":77.79755401611328,"y":-0.0,"x":-17.28229522705078},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7343 East Mirror Dr","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":68.36999999999999,"y":-515.5,"x":1250.9},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":130.3302459716797,"y":-0.0,"x":-22.43321228027343},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7338 East Mirror Dr","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":68.67999999999999,"y":-566.43,"x":1241.53},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":91.53223419189452,"y":-1.3435412782314417e-8,"x":-6.82489442825317},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7338 East Mirror Dr","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":68.8,"y":-601.65,"x":1240.54},"Price":40000},{"OwnerName":"","furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":27.77294158935547,"y":-2.145688853261163e-7,"x":-5.87094974517822},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7336 East Mirror Dr","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":68.58999999999999,"y":-620.99,"x":1250.79},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-152.5341949462891,"y":-0.0,"x":-14.65502071380615},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7333 East Mirror Dr","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":67.14,"y":-648.63,"x":1265.69},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-171.3050994873047,"y":-0.0,"x":-12.5356969833374},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7333 East Mirror Dr","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":65.05,"y":-683.53,"x":1270.98},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":58.4541015625,"y":0.00000175048376,"x":-12.71638584136962},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7328 East Mirror Dr","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":63.93,"y":-702.82,"x":1264.75},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-88.46087646484375,"y":-0.0,"x":-11.09668827056884},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7328 East Mirror Dr","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":59.98,"y":-725.27,"x":1229.58},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-81.23240661621094,"y":-0.0,"x":-17.37718200683593},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7328 Mirror Park Blvd","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":59.82,"y":-696.93,"x":1223.0},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-164.38833618164066,"y":-0.0,"x":-11.55613040924072},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7333 Mirror Park Blvd","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":62.71,"y":-669.31,"x":1221.46},"Price":40000},{"furniture":[],"Owned":false,"Interior":"mid-end","plysinside":[],"Locked":false,"cctv":{"rot":{"z":-87.679443359375,"y":1.3399391818325056e-8,"x":-5.38702487945556},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7336 Mirror Park Blvd","positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":65.46,"y":-620.26,"x":1207.46},"Price":40000},{"furniture":[],"Owned":false,"positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"plysinside":[],"Locked":false,"cctv":{"rot":{"z":3.90023970603942,"y":-0.0,"x":-16.58763313293457},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7338 Mirror Park Blvd","Interior":"mid-end","garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":67.08,"y":-598.41,"x":1203.75},"Price":40000},{"furniture":[],"Owned":false,"positions":{"Wardrobe":{"z":-99.14720153808594,"y":-994.2987060546876,"x":350.7424926757813}},"plysinside":[],"Locked":false,"cctv":{"rot":{"z":-37.31895446777344,"y":9.099596240957908e-7,"x":-20.23956108093261},"maxleft":80,"enabled":false,"maxright":-20},"Name":"7338 Mirror Park Blvd","Interior":"mid-end","garage":{"enabled":false,"StoredVehicles":[]},"Keys":[],"Owner":"","setName":"","Entrance":{"z":68.16,"y":-575.59,"x":1201.01},"Price":40000}] \ No newline at end of file diff --git a/[esx_addons]/esx_property/server/main.lua b/[esx_addons]/esx_property/server/main.lua new file mode 100644 index 00000000..af13382d --- /dev/null +++ b/[esx_addons]/esx_property/server/main.lua @@ -0,0 +1,1191 @@ +--[[ + ESX Property - Properties Made Right! + Copyright (C) 2023 ESX-Framework + + 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 . +]] local function Log(title, color, fields, Level) + if Level <= Config.Logs.LogLevel then + local webHook = Config.Logs.Webhook + local embedData = {{['title'] = title, ['color'] = color, ['footer'] = {['text'] = "ESX-Property | " .. os.date(), + ['icon_url'] = 'https://cdn.discordapp.com/attachments/944789399852417096/1004915039414788116/imageedit_1_2564956129.png'}, + ['fields'] = fields, ['description'] = "", ['author'] = {['name'] = "ESX-Framework | Log Level " .. Level, + ['icon_url'] = 'https://cdn.discordapp.com/emojis/939245183621558362.webp?size=128&quality=lossless'}}} + PerformHttpRequest(webHook, function(err, text, headers) + end, 'POST', json.encode({username = 'ESX-Framework', embeds = embedData}), {['Content-Type'] = 'application/json'}) + end +end + +local PM = Config.PlayerManagement +local Properties = {} + +function PropertiesRefresh() + Properties = {} + local PropertiesList = LoadResourceFile(GetCurrentResourceName(), 'properties.json') + if PropertiesList then + Properties = json.decode(PropertiesList) + Wait(10) + for i = 1, #Properties do + if not Properties[i].furniture then + Properties[i].furniture = {} + end + if not Properties[i].cctv then + Properties[i].cctv = {enabled = false} + end + if not Properties[i].garage then + Properties[i].garage = {enabled = false} + end + if not Properties[i].garage.StoredVehicles then + Properties[i].garage.StoredVehicles = {} + end + if not Properties[i].setName then + Properties[i].setName = "" + end + if not Properties[i].positions then + local Interior = GetInteriorValues(Properties[i].Interior) + Properties[i].positions = Interior.positions + end + Properties[i].plysinside = {} + if Config.OxInventory then + if Properties[i].Owned then + exports.ox_inventory:RegisterStash("property-" .. i, Properties[i].Name, 15, 100000, Properties[i].Owner) + end + else + Properties[i].positions.Storage = nil + end + end + local Players = ESX.GetExtendedPlayers() + Log("ESX-Property Loaded", 11141375, {{name = "Property Count", value = #Properties, inline = true}, + {name = "OX Inventory", value = Config.OxInventory and "Enabled" or "Disabled", inline = true}}, 1) + for _, xPlayer in pairs(Players) do + TriggerClientEvent("esx_property:syncProperties", xPlayer.source, Properties, xPlayer.get("lastProperty")) + end + else + Properties = {} + print("[^1ERROR^7]: ^5Properties.json^7 Not Found!") + end +end + +function IsPlayerAdmin(player, action) + local xPlayer = ESX.GetPlayerFromId(player) + + for i = 1, #Config.AllowedGroups do + if xPlayer.group == Config.AllowedGroups[i] then + return true + end + end + + if Config.PlayerManagement.Enabled and action then + if xPlayer.job.name == Config.PlayerManagement.job and xPlayer.job.grade >= Config.PlayerManagement.Permissions[action] then + return true + end + end + + return false +end + +CreateThread(function() + Wait(3000) + PropertiesRefresh() + + MySQL.query("ALTER TABLE `users` ADD COLUMN IF NOT EXISTS `last_property` LONGTEXT NULL", function(result) + if result?.affectedRows > 0 then + print("[^2INFO^7] Added ^5last_property^7 column to users table") + end + end) + + -- Check if datastore table exists before to insert values. + if MySQL.scalar.await("SELECT EXISTS (SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_TYPE LIKE 'BASE TABLE' AND TABLE_NAME = 'datastore')") > 0 then + MySQL.insert("INSERT IGNORE INTO `datastore` (name, label, shared) VALUES ('property', 'Property' , 1)", function(affectedRows) + if affectedRows > 0 then + print("[^2INFO^7] Added ^5Property^7 into ^5datastore^7 table") + end + end) + MySQL.insert("INSERT IGNORE INTO `datastore_data` (name, owner, data) VALUES ('property', NULL, '{}')", function(affectedRows) + if affectedRows > 0 then + print("[^2INFO^7] Added ^5Property^7 into ^5datastore_data^7 table") + end + end) + end + + if PM.Enabled then + if MySQL.scalar.await("SELECT EXISTS (SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_TYPE LIKE 'BASE TABLE' AND TABLE_NAME = 'datastore')") > 0 then + MySQL.insert("INSERT IGNORE INTO `addon_account` (name, label, shared) VALUES (?, ? , 1)", {PM.society, PM.joblabel}, function(affectedRows) + if affectedRows > 0 then + print("[^2INFO^7] Added ^5" .. PM.society .. " - " .. PM.joblabel .. "^7 into ^5addon_account^7 table") + end + end) + end + if not ESX.DoesJobExist(PM.job, 0) then + MySQL.insert("INSERT INTO `jobs` SET name = ?, label = ?, whitelisted = 1", {PM.job, PM.joblabel}, function(affectedRows) + if affectedRows > 0 then + print("[^2INFO^7] Inserted ^5" .. PM.job .. " - " .. PM.joblabel .. "^7 into ^5jobs^7 table") + end + end) + end + + local QUERIES = {} + for i = 1, #PM.jobRanks do + if not ESX.DoesJobExist(PM.job, PM.jobRanks[i].grade) then + QUERIES[i] = { + query = "INSERT INTO `job_grades` SET job_name = ?, grade = ?, name = ?, label = ?, salary = ?, skin_male = '{}', skin_female = '{}'", + parameters = { PM.job, PM.jobRanks[i].grade, PM.jobRanks[i].name, PM.jobRanks[i].label, PM.jobRanks[i].salary } + } + end + end + MySQL.transaction(QUERIES) + + Wait(10) + ESX.RefreshJobs() + exports["esx_society"]:registerSociety('realestateagent', 'realestateagent', 'society_realestateagent', 'society_realestateagent', 'society_realestateagent', {type = 'private'}) + end +end) + +AddEventHandler("esx:playerLoaded", function(playerId, xPlayer) + Wait(1000) + local lastProperty = nil + MySQL.query("SELECT last_property FROM users WHERE identifier = ?", {xPlayer.identifier}, function(result) + if result then + if result[1].last_property then + local Data = json.decode(result[1].last_property) + xPlayer.set("lastProperty", Data) + lastProperty = Data + end + end + TriggerClientEvent("esx_property:syncProperties", playerId, Properties, lastProperty) + end) +end) + +--- Commands +ESX.RegisterCommand(_("refresh_name"), Config.AllowedGroups, function(xPlayer) + PropertiesRefresh() +end, false, {help = TranslateCap("refresh_desc")}) + +ESX.RegisterCommand(_("create_name"), "user", function(xPlayer) + if IsPlayerAdmin(xPlayer.source) or (PM.Enabled and xPlayer.job.name == PM.job) then + xPlayer.triggerEvent("esx_property:CreateProperty") + end +end, false,{help = TranslateCap("create_desc")}) + +ESX.RegisterCommand(_("admin_name"), Config.AllowedGroups, function(xPlayer) + xPlayer.triggerEvent("esx_property:AdminMenu") +end, false,{help = TranslateCap("admin_desc")}) + +-- Buy Property +ESX.RegisterServerCallback("esx_property:buyProperty", function(source, cb, PropertyId) + local xPlayer = ESX.GetPlayerFromId(source) + local Price = Properties[PropertyId].Price + if xPlayer.getAccount("bank").money >= Price then + xPlayer.removeAccountMoney("bank", Price, "Bought Property") + Properties[PropertyId].Owner = xPlayer.identifier + Properties[PropertyId].OwnerName = xPlayer.getName() + Properties[PropertyId].Owned = true + Log("Property Bought", 65280, {{name = "**Property Name**", value = Properties[PropertyId].Name, inline = true}, + {name = "**Price**", value = ESX.Math.GroupDigits(Price), inline = true}, + {name = "**Player**", value = xPlayer.getName(), inline = true}}, 1) + TriggerClientEvent("esx_property:syncProperties", -1, Properties) + if Config.OxInventory then + exports.ox_inventory:RegisterStash("property-" .. PropertyId, Properties[PropertyId].Name, 15, 100000, xPlayer.identifier) + end + end + cb(xPlayer.getAccount("bank").money >= Price) +end) + +ESX.RegisterServerCallback("esx_property:attemptSellToPlayer", function(source, cb, PropertyId, PlayerId) + local xPlayer = ESX.GetPlayerFromId(source) + local xTarget = ESX.GetPlayerFromId(PlayerId) + local Price = Properties[PropertyId].Price + if xTarget and (xTarget.getAccount("bank").money >= Price) and (xPlayer.job.name == PM.job) then + xTarget.removeAccountMoney("bank", Price, "Sold Property") + Properties[PropertyId].Owner = xTarget.identifier + Properties[PropertyId].OwnerName = xTarget.getName() + Properties[PropertyId].Owned = true + Log("Property Sold To Player", 65280, {{name = "**Property Name**", value = Properties[PropertyId].Name, inline = true}, + {name = "**Price**", value = ESX.Math.GroupDigits(Price), inline = true}, + {name = "**Player**", value = xTarget.getName(), inline = true}, + {name = "**Agent**", value = xPlayer.getName(), inline = true}}, 1) + TriggerClientEvent("esx_property:syncProperties", -1, Properties) + if Config.OxInventory then + exports.ox_inventory:RegisterStash("property-" .. PropertyId, Properties[PropertyId].Name, 15, 100000, xTarget.identifier) + end + if PM.Enabled then + local PlayerPrice = Price * PM.SalePercentage + local SocietyPrice = Price - PlayerPrice + TriggerEvent('esx_addonaccount:getSharedAccount', PM.society, function(account) + account.addMoney(SocietyPrice) + end) + xPlayer.addAccountMoney("bank", PlayerPrice, "Sold Property") + end + end + cb(xPlayer.getAccount("bank").money >= Price) +end) + +-- Buy Property +ESX.RegisterServerCallback("esx_property:buyFurniture", function(source, cb, PropertyId, PropName, PropIndex, PropCatagory, pos, heading) + local xPlayer = ESX.GetPlayerFromId(source) + local Owner = Properties[PropertyId].Owner + if xPlayer.identifier == Owner or IsPlayerAdmin(source) or (Properties[PropertyId].Keys and Properties[PropertyId].Keys[xPlayer.identifier]) then + local Price = Config.FurnitureCatagories[PropCatagory][PropIndex].price + if xPlayer.getAccount("bank").money >= Price then + xPlayer.removeAccountMoney("bank", Price, "Furniture") + cb(true) + local furniture = {Name = PropName, Index = PropIndex, Catagory = PropCatagory, Pos = pos, Heading = heading, Price = Price} + table.insert(Properties[PropertyId].furniture, furniture) + for i = 1, #Properties[PropertyId].plysinside do + TriggerClientEvent("esx_property:placeFurniture", Properties[PropertyId].plysinside[i], PropertyId, furniture, + #Properties[PropertyId].furniture) + end + TriggerClientEvent("esx_property:syncFurniture", -1, PropertyId, Properties[PropertyId].furniture) + else + cb(false) + ESX.ShowNotification(TranslateCap("furni_cannot_afford")) + end + else + cb(false) + end + Log("Furniture Bought", 3640511, + {{name = "**Property Name**", value = Properties[PropertyId].Name, inline = true}, + {name = "**Player**", value = xPlayer.getName(), inline = true}, {name = "**Has Access**", + value = (xPlayer.identifier == Owner or IsPlayerAdmin(source) or + (Properties[PropertyId].Keys and Properties[PropertyId].Keys[xPlayer.identifier])) and "Yes" or "No", inline = true}, + {name = "**Prop Name**", value = Config.FurnitureCatagories[PropCatagory][PropIndex].title, inline = true}, + {name = "**Price**", value = tostring(Config.FurnitureCatagories[PropCatagory][PropIndex].price), inline = true}, + {name = "**Can Afford**", + value = xPlayer.getAccount("bank").money >= Config.FurnitureCatagories[PropCatagory][PropIndex].price and "Yes" or "No", inline = true}}, 1) +end) + +-- Selling Property + +ESX.RegisterServerCallback("esx_property:sellProperty", function(source, cb, PropertyId) + local xPlayer = ESX.GetPlayerFromId(source) + local Owner = Properties[PropertyId].Owner + if xPlayer.identifier == Owner then + local Price = ESX.Math.Round(Properties[PropertyId].Price * 0.6) + xPlayer.addAccountMoney("bank", Price, "Sold Property") + Properties[PropertyId].Owner = "" + Properties[PropertyId].OwnerName = "" + Properties[PropertyId].Owned = false + Properties[PropertyId].Locked = false + Properties[PropertyId].Keys = {} + local furn = #(Properties[PropertyId].furniture) + if Config.WipeFurnitureOnSell then + Properties[PropertyId].furniture = {} + end + if Config.WipeCustomNameOnSell then + Properties[PropertyId].setName = "" + end + Properties[PropertyId].plysinside = {} + Log("Property Sold", 16711680, {{name = "**Property Name**", value = Properties[PropertyId].Name, inline = true}, + {name = "**Price**", value = ESX.Math.GroupDigits(Price), inline = true}, + {name = "**Owner**", value = xPlayer.getName(), inline = true}, + {name = "**Furniture Count**", value = tostring(furn), inline = true}, + {name = "**Vehicle Count**", value = tostring(Properties[PropertyId].garage.StoredVehicles and #Properties[PropertyId].garage.StoredVehicles or "N/A"), inline = true}}, 1) + if Properties[PropertyId].garage.StoredVehicles then + Properties[PropertyId].garage.StoredVehicles = {} + end + TriggerClientEvent("esx_property:syncProperties", -1, Properties) + if Config.OxInventory then + exports.ox_inventory:ClearInventory("property-" .. PropertyId) + end + end + cb(xPlayer.identifier == Owner) +end) + +-- Admin Menu Options + +ESX.RegisterServerCallback("esx_property:toggleLock", function(source, cb, PropertyId) + local xPlayer = ESX.GetPlayerFromId(source) + local Owner = Properties[PropertyId].Owner + if xPlayer.identifier == Owner or IsPlayerAdmin(source, "ToggleLock") or + (Properties[PropertyId].Keys and Properties[PropertyId].Keys[xPlayer.identifier]) then + Properties[PropertyId].Locked = not Properties[PropertyId].Locked + TriggerClientEvent("esx_property:syncProperties", -1, Properties) + end + Log("Lock Toggled", 3640511, {{name = "**Property Name**", value = Properties[PropertyId].Name, inline = true}, + {name = "**Owner**", value = Properties[PropertyId].OwnerName, inline = true}, + {name = "**Executing User**", value = xPlayer.getName(), inline = true}, + {name = "**Status**", value = Properties[PropertyId].Locked and "Locked" or "Unlocked", inline = true}}, 3) + cb(xPlayer.identifier == Owner or IsPlayerAdmin(source, "ToggleLock") or + (Properties[PropertyId].Keys and Properties[PropertyId].Keys[xPlayer.identifier])) +end) + +ESX.RegisterServerCallback("esx_property:toggleGarage", function(source, cb, PropertyId) + local xPlayer = ESX.GetPlayerFromId(source) + if IsPlayerAdmin(source, "ToggleGarage") then + Properties[PropertyId].garage.enabled = not Properties[PropertyId].garage.enabled + TriggerClientEvent("esx_property:syncProperties", -1, Properties) + Log("Property Garage Toggled", 3640511, {{name = "**Property Name**", value = Properties[PropertyId].Name, inline = true}, + {name = "**Owner**", value = Properties[PropertyId].OwnerName, inline = true}, + {name = "**Admin**", value = xPlayer.getName(), inline = true}, + {name = "**Status**", value = Properties[PropertyId].garage.enabled and "Enabled" or "Disabled", + inline = true}}, 2) + cb(true, Properties[PropertyId].garage.enabled) + else + cb(false) + end +end) + +ESX.RegisterServerCallback("esx_property:toggleCCTV", function(source, cb, PropertyId) + local xPlayer = ESX.GetPlayerFromId(source) + if IsPlayerAdmin(source, "ToggleCCTV") then + Properties[PropertyId].cctv.enabled = not Properties[PropertyId].cctv.enabled + TriggerClientEvent("esx_property:syncProperties", -1, Properties) + cb(true, Properties[PropertyId].cctv.enabled) + Log("Property CCTV Toggled", 3640511, {{name = "**Property Name**", value = Properties[PropertyId].Name, inline = true}, + {name = "**Owner**", value = Properties[PropertyId].OwnerName, inline = true}, + {name = "**Admin**", value = xPlayer.getName(), inline = true}, + {name = "**Status**", value = Properties[PropertyId].cctv.enabled and "Enabled" or "Disabled", + inline = true}}, 2) + else + cb(false) + end +end) + +ESX.RegisterServerCallback("esx_property:SetGaragePos", function(source, cb, PropertyId, heading) + local xPlayer = ESX.GetPlayerFromId(source) + if IsPlayerAdmin(source, "ToggleGarage") then + local PlayerPed = GetPlayerPed(source) + local PlayerPos = GetEntityCoords(PlayerPed) + local Property = Properties[PropertyId] + local Original = Properties[PropertyId].garage.pos and Properties[PropertyId].garage.pos.x .. ", " .. Properties[PropertyId].garage.pos.y .. ", " .. Properties[PropertyId].garage.pos.z or "N/A" + Properties[PropertyId].garage.pos = PlayerPos + Properties[PropertyId].garage.Heading = heading + TriggerClientEvent("esx_property:syncProperties", -1, Properties) + Log("Property Garage Location Changed", 3640511, {{name = "**Property Name**", value = Properties[PropertyId].Name, inline = true}, + {name = "**Owner**", value = Properties[PropertyId].OwnerName, inline = true}, + {name = "**Admin**", value = xPlayer.getName(), inline = true}, + {name = "**Original Position**", value = tostring(Original), inline = true}, + {name = "**New Position**", value = tostring(PlayerPos), inline = true}}, 2) + cb(true) + else + cb(false) + end +end) + +ESX.RegisterServerCallback("esx_property:SetCCTVangle", function(source, cb, PropertyId, angles) + local xPlayer = ESX.GetPlayerFromId(source) + if IsPlayerAdmin(source, "ToggleCCTV") then + local Property = Properties[PropertyId] + Properties[PropertyId].cctv.rot = angles.rot + Properties[PropertyId].cctv.maxleft = angles.maxleft + Properties[PropertyId].cctv.maxright = angles.maxright + TriggerClientEvent("esx_property:syncProperties", -1, Properties) + cb(true) + Log("Property CCTV Angle Changed", 3640511, {{name = "**Property Name**", value = Properties[PropertyId].Name, inline = true}, + {name = "**Owner**", value = Properties[PropertyId].OwnerName, inline = true}, + {name = "**Admin**", value = xPlayer.getName(), inline = true}}, 2) + else + cb(false) + end +end) + +ESX.RegisterServerCallback("esx_property:CCTV", function(source, cb, PropertyId) + local xPlayer = ESX.GetPlayerFromId(source) + local Owner = Properties[PropertyId].Owner + local Property = Properties[PropertyId] + if xPlayer.identifier == Owner or IsPlayerAdmin(source) or (Properties[PropertyId].Keys and Properties[PropertyId].Keys[xPlayer.identifier]) then + SetEntityCoords(GetPlayerPed(source), vector3(Property.Entrance.x, Property.Entrance.y, Property.Entrance.z + 5.0)) + SetPlayerRoutingBucket(source, 0) + end + Log("Player Entered CCTV", 3640511, {{name = "**Property Name**", value = Properties[PropertyId].Name, inline = true}, + {name = "**Player**", value = xPlayer.getName(), inline = true}}, 3) + cb(xPlayer.identifier == Owner or IsPlayerAdmin(source) or (Properties[PropertyId].Keys and Properties[PropertyId].Keys[xPlayer.identifier])) +end) + +ESX.RegisterServerCallback("esx_property:ExitCCTV", function(source, cb, PropertyId) + local xPlayer = ESX.GetPlayerFromId(source) + local Owner = Properties[PropertyId].Owner + local Property = Properties[PropertyId] + if xPlayer.identifier == Owner or IsPlayerAdmin(source) or (Properties[PropertyId].Keys and Properties[PropertyId].Keys[xPlayer.identifier]) then + local Interior = GetInteriorValues(Property.Interior) + if Interior.type == "shell" then + SetEntityCoords(GetPlayerPed(source), vector3(Property.Entrance.x, Property.Entrance.y, 2001)) + else + SetEntityCoords(GetPlayerPed(source), Interior.pos) + end + SetPlayerRoutingBucket(source, PropertyId + 1) + end + Log("Player Exited CCTV", 3640511, {{name = "**Property Name**", value = Properties[PropertyId].Name, inline = true}, + {name = "**Player**", value = xPlayer.getName(), inline = true}}, 3) + cb(xPlayer.identifier == Owner or IsPlayerAdmin(source) or (Properties[PropertyId].Keys and Properties[PropertyId].Keys[xPlayer.identifier])) +end) + +ESX.RegisterServerCallback("esx_property:SetPropertyName", function(source, cb, PropertyId, name) + local xPlayer = ESX.GetPlayerFromId(source) + local Owner = Properties[PropertyId].Owner + local Property = Properties[PropertyId] + if xPlayer.identifier == Owner or IsPlayerAdmin(source) then + if name and #name <= Config.MaxNameLength then + Properties[PropertyId].setName = name + TriggerClientEvent("esx_property:syncProperties", -1, Properties) + Log("Property Name Changed", 3640511, + {{name = "**Property Name**", value = Properties[PropertyId].Name, inline = true}, + {name = "**Player**", value = xPlayer.getName(), inline = true}, {name = "**New Name**", value = name, inline = true}}, 2) + end + end + cb((xPlayer.identifier == Owner or IsPlayerAdmin(source, "SetPropertyName")) and name and #name <= Config.MaxNameLength) +end) + +ESX.RegisterServerCallback("esx_property:KnockOnDoor", function(source, cb, PropertyId, name) + local xPlayer = ESX.GetPlayerFromId(source) + local Property = Properties[PropertyId] + local Owner = ESX.GetPlayerFromIdentifier(Property.Owner) + if Owner then + for i = 1, #(Property.plysinside) do + if Property.plysinside[i] == Owner.source then + Owner.showNotification(TranslateCap("knocking"), "info") + cb(true) + Log("Player Knocked On Door", 3640511, {{name = "**Property Name**", value = Properties[PropertyId].Name, inline = true}, + {name = "**Owner**", value = Properties[PropertyId].OwnerName, inline = true}, + {name = "**Player**", value = xPlayer.getName(), inline = true}}, 3) + end + end + cb(false) + else + cb(false) + end +end) + +ESX.RegisterServerCallback("esx_property:RemoveCustomName", function(source, cb, PropertyId, name) + local Property = Properties[PropertyId] + local xPlayer = ESX.GetPlayerFromId(source) + if IsPlayerAdmin(source, "RemovePropertyName") then + local n = Properties[PropertyId].setName + Properties[PropertyId].setName = "" + TriggerClientEvent("esx_property:syncProperties", -1, Properties) + Log("Property Name Reset", 3640511, {{name = "**Property Name**", value = Properties[PropertyId].Name, inline = true}, + {name = "**Owner**", value = Properties[PropertyId].OwnerName, inline = true}, + {name = "**Admin**", value = xPlayer.getName(), inline = true}, + {name = "**Removed Name**", value = n, inline = true}}, 3) + cb(true) + else + cb(false) + end +end) + +ESX.RegisterServerCallback("esx_property:deleteProperty", function(source, cb, PropertyId) + local xPlayer = ESX.GetPlayerFromId(source) + if IsPlayerAdmin(source, "DeleteProperty") then + Log("Property Deleted", 16711680, + {{name = "**Property Name**", value = Properties[PropertyId].Name, inline = true}, + {name = "**Admin**", value = xPlayer.getName(), inline = true}, + {name = "**Owner**", value = Properties[PropertyId].OwnerName ~= "" and Properties[PropertyId].OwnerName or "N/A", inline = true}, + {name = "**Furniture Count**", value = #(Properties[PropertyId].furniture), inline = true}, + {name = "**Vehicle Count**", value = Properties[PropertyId].garage.StoredVehicles and #(Properties[PropertyId].garage.StoredVehicles) or "N/A", inline = true}}, 1) + table.remove(Properties, PropertyId) + TriggerClientEvent("esx_property:syncProperties", -1, Properties) + if Config.OxInventory then + exports.ox_inventory:ClearInventory("property-" .. PropertyId) + end + end + cb(IsPlayerAdmin(source, "DeleteProperty")) +end) + +ESX.RegisterServerCallback("esx_property:ChangePrice", function(source, cb, PropertyId, NewPrice) + local xPlayer = ESX.GetPlayerFromId(source) + if IsPlayerAdmin(source, "SetPropertyPrice") then + local Original = Properties[PropertyId].Price + Properties[PropertyId].Price = NewPrice + TriggerClientEvent("esx_property:syncProperties", -1, Properties) + Log("Property Price Changed", 3640511, + {{name = "**Property Name**", value = Properties[PropertyId].Name, inline = true}, + {name = "**Admin**", value = xPlayer.getName(), inline = true}, {name = "**Original Price**", value = tostring(Original), inline = true}, + {name = "**New Price**", value = tostring(NewPrice), inline = true}}, 2) + end + cb(IsPlayerAdmin(source, "SetPropertyPrice")) +end) + +ESX.RegisterServerCallback("esx_property:ChangeInterior", function(source, cb, PropertyId, Interior) + local xPlayer = ESX.GetPlayerFromId(source) + if IsPlayerAdmin(source, "ChangeInterior") then + local Original = GetInteriorValues(Properties[PropertyId].Interior).label + Properties[PropertyId].Interior = Interior + Properties[PropertyId].furniture = {} + Properties[PropertyId].positions = GetInteriorValues(Interior).positions + if not Config.OxInventory then + Properties[PropertyId].positions.Storage = nil + end + TriggerClientEvent("esx_property:syncProperties", -1, Properties) + Log("Property Interior Changed", 3640511, + {{name = "**Property Name**", value = Properties[PropertyId].Name, inline = true}, + {name = "**Admin**", value = xPlayer.getName(), inline = true}, {name = "**Original**", value = tostring(Original), inline = true}, + {name = "**New Interior**", value = GetInteriorValues(Properties[PropertyId].Interior).label, inline = true}}, 2) + end + cb(IsPlayerAdmin(source, "ChangeInterior")) +end) + +ESX.RegisterServerCallback("esx_property:RemoveAllfurniture", function(source, cb, PropertyId) + local xPlayer = ESX.GetPlayerFromId(source) + local Owner = Properties[PropertyId].Owner + if xPlayer.identifier == Owner or IsPlayerAdmin(source, "ResetFurniture") or + (Properties[PropertyId].Keys and Properties[PropertyId].Keys[xPlayer.identifier]) then + for i = 1, #Properties[PropertyId].plysinside do + for furniture = 1, #Properties[PropertyId].furniture do + TriggerClientEvent("esx_property:removeFurniture", Properties[PropertyId].plysinside[i], PropertyId, furniture) + end + end + Properties[PropertyId].furniture = {} + TriggerClientEvent("esx_property:syncFurniture", -1, PropertyId, Properties[PropertyId].furniture) + end + Log("Property Furniture Reset", 16711680, {{name = "**Property Name**", value = Properties[PropertyId].Name, inline = true}, + {name = "**Admin**", value = xPlayer.getName(), inline = true}}, 1) + cb(xPlayer.identifier == Owner or IsPlayerAdmin(source, "ResetFurniture") or + (Properties[PropertyId].Keys and Properties[PropertyId].Keys[xPlayer.identifier])) +end) + +ESX.RegisterServerCallback("esx_property:deleteFurniture", function(source, cb, PropertyId, furnitureIndex) + local xPlayer = ESX.GetPlayerFromId(source) + local Owner = Properties[PropertyId].Owner + if xPlayer.identifier == Owner or IsPlayerAdmin(source) or (Properties[PropertyId].Keys and Properties[PropertyId].Keys[xPlayer.identifier]) then + if Properties[PropertyId].furniture[furnitureIndex] then + Properties[PropertyId].furniture[furnitureIndex] = nil + TriggerClientEvent("esx_property:syncFurniture", -1, PropertyId, Properties[PropertyId].furniture) + end + for i = 1, #Properties[PropertyId].plysinside do + TriggerClientEvent("esx_property:removeFurniture", Properties[PropertyId].plysinside[i], PropertyId, furnitureIndex) + end + end + Log("Property Furniture Deleted", 16711680, + {{name = "**Property Name**", value = Properties[PropertyId].Name, inline = true}, {name = "**Admin**", value = xPlayer.getName(), inline = true}, + {name = "**Furniture Name**", value = xPlayer.getName(), inline = true}}, 3) + cb(xPlayer.identifier == Owner or IsPlayerAdmin(source) or (Properties[PropertyId].Keys and Properties[PropertyId].Keys[xPlayer.identifier])) +end) + +ESX.RegisterServerCallback("esx_property:editFurniture", function(source, cb, PropertyId, furnitureIndex, Pos, Heading) + local xPlayer = ESX.GetPlayerFromId(source) + local Owner = Properties[PropertyId].Owner + if xPlayer.identifier == Owner or IsPlayerAdmin(source) or (Properties[PropertyId].Keys and Properties[PropertyId].Keys[xPlayer.identifier]) then + if Properties[PropertyId].furniture[furnitureIndex] then + Properties[PropertyId].furniture[furnitureIndex].Pos = Pos + Properties[PropertyId].furniture[furnitureIndex].Heading = Heading + TriggerClientEvent("esx_property:syncFurniture", -1, PropertyId, Properties[PropertyId].furniture) + for i = 1, #Properties[PropertyId].plysinside do + TriggerClientEvent("esx_property:editFurniture", Properties[PropertyId].plysinside[i], PropertyId, furnitureIndex, Pos, Heading) + end + end + end + cb(xPlayer.identifier == Owner or IsPlayerAdmin(source) or (Properties[PropertyId].Keys and Properties[PropertyId].Keys[xPlayer.identifier])) +end) + +ESX.RegisterServerCallback("esx_property:evictOwner", function(source, cb, PropertyId, Interior) + local xPlayer = ESX.GetPlayerFromId(source) + if IsPlayerAdmin(source, "EvictOwner") then + local xOwner = ESX.GetPlayerFromIdentifier(Properties[PropertyId].Owner) + if xOwner then + xOwner.showNotification("Your Have Been ~r~Evicted~s~.", "error") + end + local pName = Properties[PropertyId].OwnerName + Properties[PropertyId].Owner = "" + Properties[PropertyId].Owned = false + Properties[PropertyId].OwnerName = "" + Properties[PropertyId].Locked = false + Properties[PropertyId].Keys = {} + if Config.WipeFurnitureOnSell then + Properties[PropertyId].furniture = {} + end + Properties[PropertyId].setName = "" + Properties[PropertyId].plysinside = {} + if Properties[PropertyId].garage.StoredVehicles then + Properties[PropertyId].garage.StoredVehicles = {} + end + TriggerClientEvent("esx_property:syncProperties", -1, Properties) + if Config.OxInventory then + exports.ox_inventory:ClearInventory("property-" .. PropertyId) + end + Log("Property Owner Evicted", 3640511, + {{name = "**Property Name**", value = Properties[PropertyId].Name, inline = true}, {name = "**Owner**", value = pName, inline = true}, + {name = "**Admin**", value = xPlayer.getName(), inline = true}, + {name = "**Has Access**", value = IsPlayerAdmin(source, "EvictOwner") and "Yes" or "No", inline = true}}, 1) + end + cb(IsPlayerAdmin(source, "EvictOwner")) +end) + +ESX.RegisterServerCallback("esx_property:CanRaid", function(source, cb, PropertyId, Interior) + local xPlayer = ESX.GetPlayerFromId(source) + local Can = false + if Config.Raiding.Enabled then + if (Config.CanAdminsRaid and IsPlayerAdmin(source)) or xPlayer.job.name == "police" then + if Config.Raiding.ItemRequired then + local itemCount = xPlayer.getInventoryItem(Config.Raiding.ItemRequired.name).count + if itemCount >= Config.Raiding.ItemRequired.ItemCount then + if Config.Raiding.ItemRequired.RemoveItem then + xPlayer.removeInventoryItem(Config.Raiding.ItemRequired.name, Config.Raiding.ItemRequired.ItemCount) + end + Can = true + else + xPlayer.showNotification(TranslateCap("raid_notify_error", Config.Raiding.ItemRequired.ItemCount, Config.Raiding.ItemRequired.name), "error") + end + else + Can = true + end + end + end + cb(Can) + if Can then + local xOwner = ESX.GetPlayerFromIdentifier(Properties[PropertyId].Owner) + if xOwner then + xOwner.showNotification(TranslateCap("raid_notify_success"), "error") + end + Wait(15000) + Properties[PropertyId].Locked = false + TriggerClientEvent("esx_property:syncProperties", -1, Properties) + end +end) + +ESX.RegisterServerCallback("esx_property:ChangeEntrance", function(source, cb, PropertyId, Coords) + local xPlayer = ESX.GetPlayerFromId(source) + if IsPlayerAdmin(source, "ChangeEntrance") then + local Origonal = Properties[PropertyId].Entrance.x .. "," .. Properties[PropertyId].Entrance.y .. "," .. Properties[PropertyId].Entrance.z + Properties[PropertyId].Entrance = {x = ESX.Math.Round(Coords.x, 2), y = ESX.Math.Round(Coords.y, 2), z = ESX.Math.Round(Coords.z, 2) - 0.8} + TriggerClientEvent("esx_property:syncProperties", -1, Properties) + Log("Property Entrance Changed", 3640511, {{name = "**Property Name**", value = Properties[PropertyId].Name, inline = true}, + {name = "**Owner**", value = Properties[PropertyId].OwnerName, inline = true}, + {name = "**Admin**", value = xPlayer.getName(), inline = true}, + {name = "**Has Access**", value = IsPlayerAdmin(source, "ChangeEntrance") and "Yes" or "No", + inline = true}, {name = "**Original**", value = Origonal, inline = true}, + {name = "**New**", + value = Properties[PropertyId].Entrance.x .. "," .. Properties[PropertyId].Entrance.y .. "," .. + Properties[PropertyId].Entrance.z, inline = true}}, 1) + end + cb(IsPlayerAdmin(source, "ChangeEntrance")) +end) + +ESX.RegisterServerCallback("esx_property:SetInventoryPosition", function(source, cb, PropertyId, Coords, Reset) + if Config.OxInventory then + local Property = Properties[PropertyId] + local xPlayer = ESX.GetPlayerFromId(source) + if IsPlayerAdmin(source, "EditInteriorPositions") or (Property.Owner == xPlayer.identifier or Properties[PropertyId].Keys[xPlayer.identifier]) then + local Interior = GetInteriorValues(Property.Interior) + if Reset then + Properties[PropertyId].positions.Storage = {x = ESX.Math.Round(Coords.x, 2), y = ESX.Math.Round(Coords.y, 2), z = ESX.Math.Round(Coords.z, 2)} + else + if Interior.type == "ipl" then + Properties[PropertyId].positions.Storage = {x = ESX.Math.Round(Coords.x, 2), y = ESX.Math.Round(Coords.y, 2), + z = ESX.Math.Round(Coords.z, 2)} + else + Properties[PropertyId].positions.Storage = vector3(Property.Entrance.x, Property.Entrance.y, 2000) - Coords + end + end + Log("Property Storage Location Set", 3640511, + {{name = "**Property Name**", value = Property.Name, inline = true}, {name = "**Owner**", value = Property.OwnerName, inline = true}, + {name = "**Player**", value = xPlayer.getName(), inline = true}, {name = "**Has Access**", + value = (IsPlayerAdmin(source, "EditInteriorPositions") or + (Property.Owner == xPlayer.identifier or Properties[PropertyId].Keys[xPlayer.identifier])) and "Yes" or "No", inline = true}, + {name = "**Reset?**", value = Reset and "Yes" or "No", inline = true}}, 1) + TriggerClientEvent("esx_property:syncProperties", -1, Properties) + end + cb(IsPlayerAdmin(source, "EditInteriorPositions") or (Property.Owner == xPlayer.identifier or Properties[PropertyId].Keys[xPlayer.identifier])) + else + cb(false) + end +end) +-- Wardrobe +ESX.RegisterServerCallback("esx_property:SetWardrobePosition", function(source, cb, PropertyId, Coords, Reset) + local Property = Properties[PropertyId] + local xPlayer = ESX.GetPlayerFromId(source) + if IsPlayerAdmin(source, "EditInteriorPositions") or (Property.Owner == xPlayer.identifier or Properties[PropertyId].Keys[xPlayer.identifier]) then + local Interior = GetInteriorValues(Property.Interior) + if Reset then + Properties[PropertyId].positions.Wardrobe = Interior.positions.Wardrobe + else + if Interior.type == "ipl" then + Properties[PropertyId].positions.Wardrobe = + {x = ESX.Math.Round(Coords.x, 2), y = ESX.Math.Round(Coords.y, 2), z = ESX.Math.Round(Coords.z, 2)} + else + Properties[PropertyId].positions.Wardrobe = vector3(Property.Entrance.x, Property.Entrance.y, 1999.8) - Coords + end + Log("Property Wardrobe Location Set", 3640511, + {{name = "**Property Name**", value = Property.Name, inline = true}, {name = "**Owner**", value = Property.OwnerName, inline = true}, + {name = "**Player**", value = xPlayer.getName(), inline = true}, {name = "**Has Access**", + value = (IsPlayerAdmin(source, "EditInteriorPositions") or + (Property.Owner == xPlayer.identifier or Properties[PropertyId].Keys[xPlayer.identifier])) and "Yes" or "No", inline = true}, + {name = "**Reset?**", value = Reset and "Yes" or "No", inline = true}}, 1) + end + TriggerClientEvent("esx_property:syncProperties", -1, Properties) + end + cb(IsPlayerAdmin(source, "EditInteriorPositions") or (Property.Owner == xPlayer.identifier or Properties[PropertyId].Keys[xPlayer.identifier])) +end) + +ESX.RegisterServerCallback('esx_property:getPlayerDressing', function(source, cb) + local xPlayer = ESX.GetPlayerFromId(source) + + TriggerEvent('esx_datastore:getDataStore', 'property', xPlayer.identifier, function(store) + local count = store.count('dressing') + local labels = {} + + for i = 1, count, 1 do + local entry = store.get('dressing', i) + table.insert(labels, entry.label) + end + + cb(labels) + end) +end) + +ESX.RegisterServerCallback('esx_property:GetInsidePlayers', function(source, cb, property) + local Property = Properties[property] + local Players = {} + local xPlayer = ESX.GetPlayerFromId(source) + local NearbyPlayers = Property.plysinside + + for k, v in pairs(NearbyPlayers) do + local xPlayer = ESX.GetPlayerFromId(v) + if not Properties[property].Keys then + Properties[property].Keys = {} + end + if xPlayer.identifier ~= Property.Owner and not Properties[property].Keys[xPlayer.identifier] then + Players[#Players + 1] = {Name = xPlayer.getName(), Id = xPlayer.source} + end + end + cb(Players) +end) + +ESX.RegisterServerCallback('esx_property:GetNearbyPlayers', function(source, cb, property) + local Property = Properties[property] + local Players = {} + local xPlayer = ESX.GetPlayerFromId(source) + local NearbyPlayers = ESX.OneSync.GetPlayersInArea(vector3(Property.Entrance.x, Property.Entrance.y, Property.Entrance.z), 5.0) + Wait(100) + for k, v in pairs(NearbyPlayers) do + local xTarget = ESX.GetPlayerFromId(v.id) + if xPlayer.identifier ~= xTarget.identifier then + Players[#Players + 1] = {name = xTarget.getName(), source = xTarget.source} + end + end + cb(Players) +end) + +ESX.RegisterServerCallback('esx_property:GetPlayersWithKeys', function(source, cb, property) + local Property = Properties[property] + local Players = {} + local xPlayer = ESX.GetPlayerFromId(source) + if xPlayer.identifier == Property.Owner then + cb(Property.Keys or {}) + end +end) + +ESX.RegisterServerCallback('esx_property:ShouldHaveKey', function(source, cb, property) + local xPlayer = ESX.GetPlayerFromId(source) + cb(Properties[property].Keys[xPlayer.identifier]) +end) + +ESX.RegisterServerCallback('esx_property:GetWebhook', function(source, cb, property) + cb(Config.CCTV.PictureWebook) +end) + +ESX.RegisterServerCallback('esx_property:RemoveLastProperty', function(source, cb, property) + local xPlayer = ESX.GetPlayerFromId(source) + MySQL.query("UPDATE `users` SET `last_property` = NULL WHERE `identifier` = ?", {xPlayer.identifier}) -- Remove Saved Data + SetPlayerRoutingBucket(source, 0) -- Reset Routing Bucket + xPlayer.set("lastProperty", nil) + cb() +end) + +ESX.RegisterServerCallback('esx_property:GiveKey', function(source, cb, property, player) + local xPlayer = ESX.GetPlayerFromId(source) + local xTarget = ESX.GetPlayerFromId(player) + local Property = Properties[property] + + if Property.Owner == xPlayer.identifier then + if not Property.Keys then + Properties[property].Keys = {} + end + + local id = xTarget.identifier + if not Properties[property].Keys[id] then + Property.Keys[id] = {name = xTarget.getName(), identifier = id} + xTarget.showNotification(TranslateCap("you_granted", Property.Name), 'success') + xTarget.triggerEvent("esx_property:giveKeyAccess") + cb(true) + else + xPlayer.showNotification(TranslateCap("already_has"), 'error') + cb(false) + end + else + xPlayer.showNotification(TranslateCap("do_not_own"), 'error') + cb(false) + end + Log("Property Key Given", 3640511, + {{name = "**Property Name**", value = Property.Name, inline = true}, {name = "**Owner**", value = Property.OwnerName, inline = true}, + {name = "**Player**", value = xPlayer.getName(), inline = true}, + {name = "**Has Access**", value = Property.Owner == xPlayer.identifier and "Yes" or "No", inline = true}}, 1) +end) + +ESX.RegisterServerCallback('esx_property:StoreVehicle', function(source, cb, PropertyId, VehicleProperties) + local xPlayer = ESX.GetPlayerFromId(source) + local Property = Properties[PropertyId] + + if Property.Owner == xPlayer.identifier or Properties[PropertyId].Keys[xPlayer.identifier] then + if Property.garage.enabled then + if Config.Garage.OwnedVehiclesOnly then + MySQL.scalar("SELECT `owner` FROM `owned_vehicles` WHERE `plate` = ?", {VehicleProperties.plate}, function(result) + if result then + if result == xPlayer.identifier then + Properties[PropertyId].garage.StoredVehicles[#Properties[PropertyId].garage.StoredVehicles + 1] = {owner = xPlayer.identifier, + vehicle = VehicleProperties} + cb(true) + elseif (Properties[PropertyId].Keys[result] or Property.Owner == result) then + Properties[PropertyId].garage.StoredVehicles[#Properties[PropertyId].garage.StoredVehicles + 1] = {owner = xPlayer.identifier, + vehicle = VehicleProperties} + cb(true) + else + cb(false) + end + else + cb(false) + end + end) + else + Properties[PropertyId].garage.StoredVehicles[#Properties[PropertyId].garage.StoredVehicles + 1] = {owner = xPlayer.identifier, + vehicle = VehicleProperties} + cb(true) + end + MySQL.query(Config.Garage.MySQLquery, {1, VehicleProperties.plate}) -- Set vehicle as stored in MySQL + else + xPlayer.showNotification(TranslateCap("garage_not_enabled"), 'error') + cb(false) + end + else + xPlayer.showNotification(TranslateCap("cannot_access_property"), 'error') + cb(false) + end + Log("User Attempted To Store Vehicle", 3640511, + {{name = "**Property Name**", value = Property.Name, inline = true}, {name = "**Owner**", value = Property.OwnerName, inline = true}, + {name = "**Player**", value = xPlayer.getName(), inline = true}, + {name = "**Has Access**", value = (Property.Owner == xPlayer.identifier or Properties[PropertyId].Keys[xPlayer.identifier]) and "Yes" or "No", + inline = true}, {name = "**Garage Status**", value = Property.garage.enabled and "Enabled" or "Disabled", inline = true}, + {name = "**Vehicle Name**", value = VehicleProperties.DisplayName, inline = true}}, 2) +end) + +ESX.RegisterServerCallback('esx_property:AccessGarage', function(source, cb, PropertyId, VehicleProperties) + local xPlayer = ESX.GetPlayerFromId(source) + local Property = Properties[PropertyId] + + if Property.Owner == xPlayer.identifier or Properties[PropertyId].Keys[xPlayer.identifier] then + if Property.garage.enabled then + cb(Property.garage.StoredVehicles) + else + xPlayer.showNotification(TranslateCap("garage_not_enabled"), 'error') + cb(false) + end + else + xPlayer.showNotification(TranslateCap("cannot_access_property"), 'error') + cb(false) + end + + Log("User Opened Garage Menu", 3640511, + {{name = "**Property Name**", value = Property.Name, inline = true}, {name = "**Owner**", value = Property.OwnerName, inline = true}, + {name = "**Player**", value = xPlayer.getName(), inline = true}, + {name = "**Garage Status**", value = Property.garage.enabled and "Enabled" or "Disabled", inline = true}}, 2) +end) + +ESX.RegisterServerCallback('esx_property:RemoveKey', function(source, cb, property, player) + local xPlayer = ESX.GetPlayerFromId(source) + local xTarget = ESX.GetPlayerFromIdentifier(player) + local Property = Properties[property] + + if Property.Owner == xPlayer.identifier then + if Property.Keys then + if Properties[property].Keys[player] then + Log("Property Key Revoked", 3640511, + {{name = "**Property Name**", value = Property.Name, inline = true}, {name = "**Owner**", value = xPlayer.getName(), inline = true}, + {name = "**Removed From**", value = tostring(Properties[property].Keys[player].name), inline = true}}, 3) + Properties[property].Keys[player] = nil + xTarget.showNotification(TranslateCap("key_revoked", Property.Name), 'error') + xTarget.triggerEvent("esx_property:RemoveKeyAccess", property) + cb(true) + else + xPlayer.showNotification(TranslateCap("no_keys"), 'error') + cb(false) + end + else + cb(false) + end + else + xPlayer.showNotification(TranslateCap("do_not_own"), 'error') + cb(false) + end +end) + +ESX.RegisterServerCallback('esx_property:CanOpenFurniture', function(source, cb, property) + local xPlayer = ESX.GetPlayerFromId(source) + local Property = Properties[property] + cb(Property.Owner == xPlayer.identifier or (Property.Keys and Properties[property].Keys[xPlayer.identifier])) +end) + +ESX.RegisterServerCallback('esx_property:getPlayerOutfit', function(source, cb, num) + local xPlayer = ESX.GetPlayerFromId(source) + + TriggerEvent('esx_datastore:getDataStore', 'property', xPlayer.identifier, function(store) + local outfit = store.get('dressing', num) + cb(outfit.skin) + end) +end) + +-- Player Management +if PM.Enabled then + ESX.RegisterServerCallback('esx_property:PMenterOffice', function(source, cb) + local xPlayer = ESX.GetPlayerFromId(source) + local PlayerPed = GetPlayerPed(source) + + if xPlayer.job.name == PM.job then + SetEntityCoords(PlayerPed, PM.Locations.Exit) + SetPlayerRoutingBucket(source, 1) + cb(true) + else + cb(false) + end + end) + + ESX.RegisterServerCallback('esx_property:PMexitOffice', function(source, cb) + local xPlayer = ESX.GetPlayerFromId(source) + local PlayerPed = GetPlayerPed(source) + + if xPlayer.job.name == PM.job then + SetEntityCoords(PlayerPed, PM.Locations.Entrance) + SetPlayerRoutingBucket(source, 0) + cb(true) + else + cb(false) + end + end) +end + +-- Enter/leave Events + +RegisterNetEvent('esx_property:enter', function(PropertyId) + local player = source + local PlayerPed = GetPlayerPed(player) + local xPlayer = ESX.GetPlayerFromId(player) + local Property = Properties[PropertyId] + local Interior = GetInteriorValues(Property.Interior) + if not Properties[PropertyId].plysinside then + Properties[PropertyId].plysinside = {} + end + table.insert(Properties[PropertyId].plysinside, player) + + local PropertyData = {id = PropertyId, coords = Property.Entrance} -- Save the property data to the table + MySQL.query("UPDATE `users` SET `last_property` = ? WHERE `identifier` = ?", {json.encode(PropertyData), xPlayer.identifier}) -- Save the property data to the database + xPlayer.set("lastProperty", PropertyData) + if Interior.type == "shell" then + SetEntityCoords(PlayerPed, vector3(Property.Entrance.x, Property.Entrance.y, 2001)) + else + SetEntityCoords(PlayerPed, Interior.pos) + SetEntityHeading(PlayerPed, 0.0) + end + SetPlayerRoutingBucket(player, PropertyId + 1) + Log("Player Entered Property", 3640511, + {{name = "**Property Name**", value = Properties[PropertyId].Name, inline = true}, + {name = "**Player**", value = xPlayer.getName(), inline = true}, + {name = "**Property Player Count**", value = tostring(#(Properties[PropertyId].plysinside)), inline = true}}, 3) +end) + +RegisterNetEvent('esx_property:leave', function(PropertyId) + local player = source + local Property = Properties[PropertyId] + local xPlayer = ESX.GetPlayerFromId(player) + MySQL.query("UPDATE `users` SET `last_property` = NULL WHERE `identifier` = ?", {xPlayer.identifier}) -- Remove Saved Data + xPlayer.set("lastProperty", nil) + SetEntityCoords(player, vector3(Property.Entrance.x, Property.Entrance.y, Property.Entrance.z)) + SetEntityHeading(player, 0.0) + SetPlayerRoutingBucket(player, 0) + for i = 1, #(Properties[PropertyId].plysinside) do + if Properties[PropertyId].plysinside[i] == player then + table.remove(Properties[PropertyId].plysinside, i) + break + end + end + Log("Player Left Property", 3640511, + {{name = "**Property Name**", value = Properties[PropertyId].Name, inline = true}, + {name = "**Player**", value = xPlayer.getName(), inline = true}, + {name = "**Property Player Count**", value = tostring(#(Properties[PropertyId].plysinside)), inline = true}}, 3) +end) + +RegisterNetEvent('esx_property:SetVehicleOut', function(PropertyId, VehIndex) + local VehicleData = Properties[PropertyId].garage.StoredVehicles[VehIndex] + local plate = VehicleData.vehicle.plate + table.remove(Properties[PropertyId].garage.StoredVehicles, VehIndex) + MySQL.query(Config.Garage.MySQLquery, {0, plate}) -- Set vehicle as no longer stored +end) + + +AddEventHandler('playerDropped', function() + local source = source + for PropertyId = 1, #Properties do + for i = 1, #(Properties[PropertyId].plysinside) do + if Properties[PropertyId].plysinside[i] == source then + table.remove(Properties[PropertyId].plysinside, i) + break + end + end + end +end) + +ESX.RegisterServerCallback('esx_property:CanCreateProperty', function(source, cb) + local Re = false + local xPlayer = ESX.GetPlayerFromId(source) + + if xPlayer then + if IsPlayerAdmin(source, "CreateProperty") then + Re = true + end + end + + cb(Re) +end) + +ESX.RegisterServerCallback('esx_property:IsAdmin', function(source, cb) + cb(IsPlayerAdmin(source, "ViewProperties")) +end) + +ESX.RegisterServerCallback('esx_property:CanAccessRealEstateMenu', function(source, cb) + local xPlayer = ESX.GetPlayerFromId(source) + local Re = (Config.PlayerManagement.Enabled and xPlayer.job.name == Config.PlayerManagement.job and xPlayer.job.grade >= Config.PlayerManagement.Permissions.ManagePropertiesFromQuickActions) and true or false + cb(Re) +end) + +RegisterNetEvent('esx_property:server:createProperty', function(Property) + local source = source + local xPlayer = ESX.GetPlayerFromId(source) + local Interior = GetInteriorValues(Property.interior) + local garageData = + Property.garage.enabled and {enabled = true, pos = Property.garage.pos, Heading = Property.garage.heading, StoredVehicles = {}} or + {enabled = false} + if IsPlayerAdmin(source, "CreateProperty") then + local ActualProperty = {Name = Property.name, setName = "", Price = Property.price, furniture = {}, plysinside = {}, Interior = Property.interior, + Entrance = Property.entrance, Owner = "", Keys = {}, positions = Interior.positions, cctv = Property.cctv, + garage = garageData, Owned = false, Locked = false} + Properties[#Properties + 1] = ActualProperty + end + Log("Property Created", 65280, + {{name = "**Admin**", value = xPlayer.getName(), inline = true}, {name = "**Name**", value = Property.name, inline = true}, + {name = "**Price**", value = ESX.Math.GroupDigits(Property.price), inline = true}, + {name = "**Interior**", value = Interior.label, inline = true}, + {name = "**Garage Status**", value = Property.garage.enabled and "Enabled" or "Disabled", inline = true}, + {name = "**CCTV Status**", value = Property.cctv.enabled and "Enabled" or "Disabled", inline = true}, + {name = "**Entrance**", value = tostring(Property.entrance.x .. ", " .. Property.entrance.y .. ", " .. Property.entrance.z), inline = true}}, 1) + TriggerClientEvent("esx_property:syncProperties", -1, Properties) +end) + +-- Json File Saving + +--- Save Properties On Server Scheduled Restart +AddEventHandler('txAdmin:events:scheduledRestart', function(eventData) + if eventData.secondsRemaining == 60 then + CreateThread(function() + Wait(50000) + if Properties and #Properties > 0 then + SaveResourceFile(GetCurrentResourceName(), 'properties.json', json.encode(Properties)) + Log("Properties Saving", 11141375, {{name = "**Reason**", value = "Scheduled Server Restart", inline = true}, + {name = "**Property Count**", value = tostring(#Properties), inline = true}}, 1) + end + end) + end +end) + +function PropertySave(Reason) + if Properties and #Properties > 0 then + SaveResourceFile(GetCurrentResourceName(), 'properties.json', json.encode(Properties)) + Log("Properties Saving", 11141375, + {{name = "**Reason**", value = Reason, inline = true}, {name = "**Property Count**", value = tostring(#Properties), inline = true}}, 1) + end +end + +--- Save Properties On Server Stop/Restart +AddEventHandler('txAdmin:events:serverShuttingDown', function() + PropertySave(TranslateCap("server_shutdown")) +end) + +--- Save Properties On Resource Stop/Restart + +AddEventHandler('onResourceStop', function(ResourceName) + if ResourceName == GetCurrentResourceName() then + PropertySave(TranslateCap("resource_stop")) + end +end) + +AddEventHandler('onServerResourceStop', function(ResourceName) + if ResourceName == GetCurrentResourceName() then + PropertySave(TranslateCap("resource_stop")) + end +end) + +-- Save Properties every x Minutes + +CreateThread(function() + while true do + Wait(60000 * Config.SaveInterval) + PropertySave(TranslateCap("interval_saving")) + end +end) + +ESX.RegisterCommand(_("save_name"), Config.AllowedGroups, function(xPlayer) + PropertySave(TranslateCap("manual_save", GetPlayerName(xPlayer.source))) +end, false,{help = TranslateCap("save_desc")}) + +----- Exports ----- + +exports("GetProperties", function() + return Properties +end) + +exports("GetOwnedProperties", function() + local OwnedProperties = {} + for i=1, #Properties do + if Properties[i].Owned then + OwnedProperties[#OwnedProperties + 1] = Properties[i] + end + end + return OwnedProperties +end) + +exports("GetNonOwnedProperties", function() + local NonOwnedProperties = {} + for i=1, #Properties do + if not Properties[i].Owned then + NonOwnedProperties[#NonOwnedProperties + 1] = Properties[i] + end + end + return NonOwnedProperties +end) + +exports("GetPlayerProperties", function(identifier) + local PlayerProperties = {} + for i=1, #Properties do + if Properties[i].Owned and Properties[i].Owner == identifier then + PlayerProperties[#PlayerProperties + 1] = Properties[i] + end + end + return PlayerProperties +end) + +exports("GetPropertyKeys", function(PropertyId) + local Property = Properties[PropertyId] + if Property.Keys then + return Property.Keys + end + return {} +end) + +exports("DoesPlayerHaveKeys", function(PropertyId, Identifier) + local Property = Properties[PropertyId] + if Property.Keys then + return Property.Keys[Identifier] and true or false + end + return {} +end) + +exports("ForceSaveProperties", function() + local ExecutingResource = GetInvokingResource() + PropertySave(TranslateCap("forced_save", ExecutingResource)) +end) diff --git a/[esx_addons]/esx_rpchat/.editorconfig b/[esx_addons]/esx_rpchat/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_rpchat/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_rpchat/LICENSE b/[esx_addons]/esx_rpchat/LICENSE new file mode 100644 index 00000000..44dad71d --- /dev/null +++ b/[esx_addons]/esx_rpchat/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_rpchat + Copyright (C) 2015-2023 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 . + +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_rpchat Copyright (C) 2015-2023 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 +. + + 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 +. diff --git a/[esx_addons]/esx_rpchat/README.md b/[esx_addons]/esx_rpchat/README.md new file mode 100644 index 00000000..93c6f10d --- /dev/null +++ b/[esx_addons]/esx_rpchat/README.md @@ -0,0 +1,17 @@ +

[ESX] RP Chat

Discord - Website - Documentation + +This Resource adds a proximity chat along with a few cool commands such as `/me` , `/ooc` and `/twt` + +> *Note: Elon Musk Not Included* + +# Legal + +esx_rpchat - Chat closely with your friends. + +Copyright (C) 2015-2023 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 . diff --git a/[esx_addons]/esx_rpchat/client/main.lua b/[esx_addons]/esx_rpchat/client/main.lua new file mode 100644 index 00000000..4f81acb4 --- /dev/null +++ b/[esx_addons]/esx_rpchat/client/main.lua @@ -0,0 +1,32 @@ +RegisterNetEvent('esx_rpchat:sendProximityMessage') +AddEventHandler('esx_rpchat:sendProximityMessage', function(playerId, title, message, color) + local player = PlayerId() + local target = GetPlayerFromServerId(playerId) + + local playerPed = PlayerPedId() + local targetPed = GetPlayerPed(target) + local playerCoords = GetEntityCoords(playerPed) + local targetCoords = GetEntityCoords(targetPed) + + if target ~= -1 then + if target == player or #(playerCoords - targetCoords) < 20 then + TriggerEvent('chat:addMessage', {args = {title, message}, color = color}) + end + end +end) + +CreateThread(function() + TriggerEvent('chat:addSuggestion', '/twt', TranslateCap('twt_help'), {{name = TranslateCap('generic_argument_name'), help = TranslateCap('generic_argument_help')}}) + TriggerEvent('chat:addSuggestion', '/anontwt', TranslateCap('twtanon_help'), {{name = TranslateCap('generic_argument_name'), help = TranslateCap('generic_argument_help')}}) + TriggerEvent('chat:addSuggestion', '/me', TranslateCap('me_help'), {{name = TranslateCap('generic_argument_name'), help = TranslateCap('generic_argument_help')}}) + TriggerEvent('chat:addSuggestion', '/do', TranslateCap('do_help'), {{name = TranslateCap('generic_argument_name'), help = TranslateCap('generic_argument_help')}}) +end) + +AddEventHandler('onResourceStop', function(resource) + if resource == GetCurrentResourceName() then + TriggerEvent('chat:removeSuggestion', '/twt') + TriggerEvent('chat:removeSuggestion', '/me') + TriggerEvent('chat:removeSuggestion', '/do') + end +end) + diff --git a/[esx_addons]/esx_rpchat/config.lua b/[esx_addons]/esx_rpchat/config.lua new file mode 100644 index 00000000..2e081cb2 --- /dev/null +++ b/[esx_addons]/esx_rpchat/config.lua @@ -0,0 +1,5 @@ +Config = {} + +Config.Locale = GetConvar('esx:locale', 'en') +Config.OnlyFirstname = false +Config.EnableESXIdentity = true -- RP names diff --git a/[esx_addons]/esx_rpchat/fxmanifest.lua b/[esx_addons]/esx_rpchat/fxmanifest.lua new file mode 100644 index 00000000..dc916ea9 --- /dev/null +++ b/[esx_addons]/esx_rpchat/fxmanifest.lua @@ -0,0 +1,25 @@ +fx_version 'adamant' + +game 'gta5' + +description 'ESX RP Chat' +lua54 'yes' +version '1.9.0' + +shared_script '@es_extended/imports.lua' + +server_scripts { + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'server/main.lua' +} + +client_scripts { + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'client/main.lua' +} + +dependency 'es_extended' diff --git a/[esx_addons]/esx_rpchat/locales/cs.lua b/[esx_addons]/esx_rpchat/locales/cs.lua new file mode 100644 index 00000000..eccbecb3 --- /dev/null +++ b/[esx_addons]/esx_rpchat/locales/cs.lua @@ -0,0 +1,11 @@ +Locales['cs'] = { + ['ooc_prefix'] = 'OOC | %s', + ['twt_help'] = 'odeslat tweet', + ['twt_prefix'] = '^0[^4Twitter^0] (^5@%s^0)', + ['me_help'] = 'osobní akce', + ['me_prefix'] = 'me | %s', + ['do_help'] = 'RP informace', + ['do_prefix'] = 'do | %s', + ['generic_argument_name'] = 'zpráva', + ['generic_argument_help'] = 'zpráva', +} diff --git a/[esx_addons]/esx_rpchat/locales/de.lua b/[esx_addons]/esx_rpchat/locales/de.lua new file mode 100644 index 00000000..61494d94 --- /dev/null +++ b/[esx_addons]/esx_rpchat/locales/de.lua @@ -0,0 +1,12 @@ +Locales['de'] = { + ['ooc_prefix'] = 'OOC | %s', + ['twt_help'] = 'Sende eine twitter nachricht', + ['twt_prefix'] = '^0[^4Twitter^0] (^5@%s^0)', + ['me_help'] = 'personal action', + ['me_prefix'] = 'ich | %s', + ['do_help'] = 'RP information', + ['do_prefix'] = 'do | %s', + ['generic_argument_name'] = 'nachricht', + ['generic_argument_help'] = 'die nachricht', + } + \ No newline at end of file diff --git a/[esx_addons]/esx_rpchat/locales/en.lua b/[esx_addons]/esx_rpchat/locales/en.lua new file mode 100644 index 00000000..ab717d9e --- /dev/null +++ b/[esx_addons]/esx_rpchat/locales/en.lua @@ -0,0 +1,11 @@ +Locales['en'] = { + ['ooc_prefix'] = 'OOC | %s', + ['twt_help'] = 'send a tweet', + ['twt_prefix'] = '^0[^4Twitter^0] (^5@%s^0)', + ['me_help'] = 'personal action', + ['me_prefix'] = 'me | %s', + ['do_help'] = 'RP information', + ['do_prefix'] = 'do | %s', + ['generic_argument_name'] = 'message', + ['generic_argument_help'] = 'the message', +} diff --git a/[esx_addons]/esx_rpchat/locales/es.lua b/[esx_addons]/esx_rpchat/locales/es.lua new file mode 100644 index 00000000..315c6467 --- /dev/null +++ b/[esx_addons]/esx_rpchat/locales/es.lua @@ -0,0 +1,12 @@ +Locales['es'] = { + ['ooc_prefix'] = 'OOC | %s', + ['twt_help'] = 'Mandar tweet', + ['twtanon_help'] = 'Mandar tweet anonimo', + ['twt_prefix'] = '^0[^4Twitter^0] (^5@%s^0)', + ['me_help'] = 'Accion Global', + ['me_prefix'] = 'me | %s', + ['do_help'] = 'Accion Personal', + ['do_prefix'] = 'do | %s', + ['generic_argument_name'] = 'mensaje', + ['generic_argument_help'] = 'el mensaje', +} diff --git a/[esx_addons]/esx_rpchat/locales/et.lua b/[esx_addons]/esx_rpchat/locales/et.lua new file mode 100644 index 00000000..8a7a9909 --- /dev/null +++ b/[esx_addons]/esx_rpchat/locales/et.lua @@ -0,0 +1,11 @@ +Locales['et'] = { + ['ooc_prefix'] = 'OOC | %s', + ['twt_help'] = 'Saada tweet', + ['twt_prefix'] = '^0[^4Twitter^0] (^5@%s^0)', + ['me_help'] = 'Isiku tegevus', + ['me_prefix'] = 'me | %s', + ['do_help'] = 'RP informatsioon', + ['do_prefix'] = 'do | %s', + ['generic_argument_name'] = 'sõnum', + ['generic_argument_help'] = 'sõnum', +} diff --git a/[esx_addons]/esx_rpchat/locales/fi.lua b/[esx_addons]/esx_rpchat/locales/fi.lua new file mode 100644 index 00000000..d76bde47 --- /dev/null +++ b/[esx_addons]/esx_rpchat/locales/fi.lua @@ -0,0 +1,11 @@ +Locales['fi'] = { + ['ooc_prefix'] = 'OOC | %s', + ['twt_help'] = 'lähetä twiitti', + ['twt_prefix'] = '^0[^4Twitter^0] (^5@%s^0)', + ['me_help'] = 'teet jotain', + ['me_prefix'] = 'me | %s', + ['do_help'] = 'roolipeliä tiedot', + ['do_prefix'] = 'do | %s', + ['generic_argument_name'] = 'viesti', + ['generic_argument_help'] = 'viestin sisältö', +} diff --git a/[esx_addons]/esx_rpchat/locales/fr.lua b/[esx_addons]/esx_rpchat/locales/fr.lua new file mode 100644 index 00000000..edb9e02a --- /dev/null +++ b/[esx_addons]/esx_rpchat/locales/fr.lua @@ -0,0 +1,11 @@ +Locales['fr'] = { + ['ooc_prefix'] = 'hrp | %s', + ['twt_help'] = 'envoie un tweet', + ['twt_prefix'] = '^0[^4Twitter^0] (^5@%s^0)', + ['me_help'] = 'action personnelle', + ['me_prefix'] = 'me | %s', + ['do_help'] = 'RP information', + ['do_prefix'] = 'faire | %s', + ['generic_argument_name'] = 'message', + ['generic_argument_help'] = 'le message', +} diff --git a/[esx_addons]/esx_rpchat/locales/hu.lua b/[esx_addons]/esx_rpchat/locales/hu.lua new file mode 100644 index 00000000..0e7e5ac5 --- /dev/null +++ b/[esx_addons]/esx_rpchat/locales/hu.lua @@ -0,0 +1,11 @@ +Locales['hu'] = { + ['ooc_prefix'] = 'OOC | %s', + ['twt_help'] = 'tweet küldése', + ['twt_prefix'] = '^0[^4Twitter^0] (^5@%s^0)', + ['me_help'] = 'személyes cselekvés', + ['me_prefix'] = 'me | %s', + ['do_help'] = 'RP információ', + ['do_prefix'] = 'do | %s', + ['generic_argument_name'] = 'üzenet', + ['generic_argument_help'] = 'az üzenet', +} diff --git a/[esx_addons]/esx_rpchat/locales/it.lua b/[esx_addons]/esx_rpchat/locales/it.lua new file mode 100644 index 00000000..69309054 --- /dev/null +++ b/[esx_addons]/esx_rpchat/locales/it.lua @@ -0,0 +1,12 @@ +Locales['it'] = { + ['ooc_prefix'] = 'OOC | %s', + ['twt_help'] = 'Invia tweet', + ['twtanon_help'] = 'Invia tweet anonimo', + ['twt_prefix'] = '^0[^4Twitter^0] (^5@%s^0)', + ['me_help'] = 'Azione Globale', + ['me_prefix'] = 'me | %s', + ['do_help'] = 'Azione personale', + ['do_prefix'] = 'do | %s', + ['generic_argument_name'] = 'Messaggio', + ['generic_argument_help'] = 'il messaggio', +} diff --git a/[esx_addons]/esx_rpchat/locales/nl.lua b/[esx_addons]/esx_rpchat/locales/nl.lua new file mode 100644 index 00000000..12a8cb09 --- /dev/null +++ b/[esx_addons]/esx_rpchat/locales/nl.lua @@ -0,0 +1,11 @@ +Locales['nl'] = { + ['ooc_prefix'] = 'OOC | %s', + ['twt_help'] = 'stuur tweet', + ['twt_prefix'] = '^0[^4Twitter^0] (^5@%s^0)', + ['me_help'] = 'persoonlijke actie', + ['me_prefix'] = 'ik | %s', + ['do_help'] = 'RP informatie', + ['do_prefix'] = 'doe | %s', + ['generic_argument_name'] = 'bericht', + ['generic_argument_help'] = 'het bericht', +} diff --git a/[esx_addons]/esx_rpchat/locales/pl.lua b/[esx_addons]/esx_rpchat/locales/pl.lua new file mode 100644 index 00000000..4383af67 --- /dev/null +++ b/[esx_addons]/esx_rpchat/locales/pl.lua @@ -0,0 +1,11 @@ +Locales['pl'] = { + ['ooc_prefix'] = 'OOC | %s', + ['twt_help'] = 'wyślij tweeta', + ['twt_prefix'] = '^0[^4Twitter^0] (^5@%s^0)', + ['me_help'] = 'opisz akcję', + ['me_prefix'] = 'me | %s', + ['do_help'] = 'opisz sytuację', + ['do_prefix'] = 'do | %s', + ['generic_argument_name'] = 'wiadomość', + ['generic_argument_help'] = 'wysyłana wiadomość', +} diff --git a/[esx_addons]/esx_rpchat/locales/si.lua b/[esx_addons]/esx_rpchat/locales/si.lua new file mode 100644 index 00000000..2616c533 --- /dev/null +++ b/[esx_addons]/esx_rpchat/locales/si.lua @@ -0,0 +1,11 @@ +Locales['si'] = { + ['ooc_prefix'] = 'OOC | %s', + ['twt_help'] = 'pošlji tweet', + ['twt_prefix'] = '^0[^4Twitter^0] (^5@%s^0)', + ['me_help'] = 'osebno dejanje', + ['me_prefix'] = 'jaz | %s', + ['do_help'] = 'Informacije o RP', + ['do_prefix'] = 'naredi | %s', + ['generic_argument_name'] = 'sporočilo', + ['generic_argument_help'] = 'sporočilo', +} \ No newline at end of file diff --git a/[esx_addons]/esx_rpchat/locales/sv.lua b/[esx_addons]/esx_rpchat/locales/sv.lua new file mode 100644 index 00000000..5dd7fb02 --- /dev/null +++ b/[esx_addons]/esx_rpchat/locales/sv.lua @@ -0,0 +1,11 @@ +Locales['sv'] = { + ['ooc_prefix'] = 'OOC | %s', + ['twt_help'] = 'skicka en tweet', + ['twt_prefix'] = '^5@%s^0', + ['me_help'] = 'skriv en händelse, t.ex \'visar körkort\'', + ['me_prefix'] = 'jag | %s', + ['do_help'] = 'något karaktären gör inom rollspel', + ['do_prefix'] = 'gör | %s', + ['generic_argument_name'] = 'meddelande', + ['generic_argument_help'] = 'det meddelandet du vill skicka', +} diff --git a/[esx_addons]/esx_rpchat/server/main.lua b/[esx_addons]/esx_rpchat/server/main.lua new file mode 100644 index 00000000..2ad81bda --- /dev/null +++ b/[esx_addons]/esx_rpchat/server/main.lua @@ -0,0 +1,86 @@ +AddEventHandler('chatMessage', function(playerId, playerName, message) + if string.sub(message, 1, string.len('/')) ~= '/' then + CancelEvent() + + playerName = GetRealPlayerName(playerId) + TriggerClientEvent('chat:addMessage', -1, {args = {TranslateCap('ooc_prefix', playerName), message}, color = {128, 128, 128}}) + end +end) + +RegisterCommand('twt', function(playerId, args, rawCommand) + if playerId == 0 then + print('[^1ERROR^7] This Command Cannot Be Used By The Console!') + else + args = table.concat(args, ' ') + + local playerName = GetRealPlayerName(playerId) + + TriggerClientEvent('chat:addMessage', -1, {args = {TranslateCap('twt_prefix', playerName), args}, color = {0, 153, 204}}) + end +end, false) + +RegisterCommand('anontwt', function(playerId, args, rawCommand) + if playerId == 0 then + print('[^1ERROR^7] This Command Cannot Be Used By The Console!') + else + args = table.concat(args, ' ') + + local playerName = GetRealPlayerName(playerId) + + TriggerClientEvent('chat:addMessage', -1, {args = {TranslateCap('twt_prefix', "Anonymous"), args}, color = {0, 153, 204}}) + end +end, false) + +RegisterCommand('me', function(playerId, args, rawCommand) + if playerId == 0 then + print('[^1ERROR^7] This Command Cannot Be Used By The Console!') + else + args = table.concat(args, ' ') + local playerName = GetRealPlayerName(playerId) + + TriggerClientEvent('esx_rpchat:sendProximityMessage', -1, playerId, TranslateCap('me_prefix', playerName), args, {255, 0, 0}) + end +end, false) + +RegisterCommand('do', function(playerId, args, rawCommand) + if playerId == 0 then + print('[^1ERROR^7] This Command Cannot Be Used By The Console!') + else + args = table.concat(args, ' ') + local playerName = GetRealPlayerName(playerId) + + TriggerClientEvent('esx_rpchat:sendProximityMessage', -1, playerId, TranslateCap('do_prefix', playerName), args, {0, 0, 255}) + end +end, false) + +RegisterCommand('msg', function(source, args, user) + + if GetPlayerName(tonumber(args[1])) then + local player = tonumber(args[1]) + table.remove(args, 1) + + TriggerClientEvent('chat:addMessage', player, {args = {"^1PM from "..GetPlayerName(source).. "[" .. source .. "]: ^7" ..table.concat(args, " ")}, color = {255, 153, 0}}) + TriggerClientEvent('chat:addMessage', source, {args = {"^1PM SEND TO "..GetPlayerName(player).. "[" .. player .. "]: ^7" ..table.concat(args, " ")}, color = {255, 153, 0}}) + else + TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Specified Player Does Not Exist!") + end + +end,false) + +function GetRealPlayerName(playerId) + local xPlayer = ESX.GetPlayerFromId(playerId) + + if xPlayer then + if Config.EnableESXIdentity then + if Config.OnlyFirstname then + return xPlayer.get('firstName') + else + return xPlayer.getName() + end + else + return xPlayer.getName() + end + else + return GetPlayerName(playerId) + end +end diff --git a/[esx_addons]/esx_service/.editorconfig b/[esx_addons]/esx_service/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_service/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_service/LICENSE b/[esx_addons]/esx_service/LICENSE new file mode 100644 index 00000000..85b9ebc1 --- /dev/null +++ b/[esx_addons]/esx_service/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_service + Copyright (C) 2015-2023 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 . + +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_service Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_service/README.md b/[esx_addons]/esx_service/README.md new file mode 100644 index 00000000..5011ad8e --- /dev/null +++ b/[esx_addons]/esx_service/README.md @@ -0,0 +1,54 @@ +# esx_service + +## Download & Installation + +### Using [fvm](https://github.com/qlaffont/fvm-installer) +``` +fvm install --save --folder=esx esx-org/esx_service +``` + +### Using Git +``` +cd resources +git clone https://github.com/ESX-Org/esx_service [esx]/esx_service +``` + +### Manually +- Download https://github.com/ESX-Org/esx_service/archive/master.zip +- Put it in the `[esx]` directory + +## Installation +- Add this to your `server.cfg`: + +``` +start esx_service +``` + +## Usage +```lua +-- Enable service +ESX.TriggerServerCallback('esx_service:enableService', function(canTakeService, maxInService, inServiceCount) + + if canTakeService then + ESX.ShowNotification('You enabled service') + else + ESX.ShowNotification('Service is full: ' .. inServiceCount .. '/' .. maxInService) + end + +end, 'taxi') + +-- Disable service +TriggerServerEvent('esx_service:disableService', 'taxi') +``` + +# Legal +### License +esx_service - be in service + +Copyright (C) 2015-2023 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/. diff --git a/[esx_addons]/esx_service/client/main.lua b/[esx_addons]/esx_service/client/main.lua new file mode 100644 index 00000000..8c677006 --- /dev/null +++ b/[esx_addons]/esx_service/client/main.lua @@ -0,0 +1,11 @@ +RegisterNetEvent('esx_service:notifyAllInService') +AddEventHandler('esx_service:notifyAllInService', function(notification, target) + target = GetPlayerFromServerId(target) + if target == PlayerId() then return end + + local targetPed = GetPlayerPed(target) + local mugshot, mugshotStr = ESX.Game.GetPedMugshot(targetPed) + + ESX.ShowAdvancedNotification(notification.title, notification.subject, notification.msg, mugshotStr, notification.iconType) + UnregisterPedheadshot(mugshot) +end) \ No newline at end of file diff --git a/[esx_addons]/esx_service/fxmanifest.lua b/[esx_addons]/esx_service/fxmanifest.lua new file mode 100644 index 00000000..fba8a77c --- /dev/null +++ b/[esx_addons]/esx_service/fxmanifest.lua @@ -0,0 +1,19 @@ +fx_version 'adamant' + +game 'gta5' +lua54 'yes' +description 'ESX Service' + +version '1.9.0' + +shared_script '@es_extended/imports.lua' + +server_scripts { + 'server/main.lua' +} + +client_scripts { + 'client/main.lua' +} + +dependency 'es_extended' diff --git a/[esx_addons]/esx_service/server/main.lua b/[esx_addons]/esx_service/server/main.lua new file mode 100644 index 00000000..4b62e369 --- /dev/null +++ b/[esx_addons]/esx_service/server/main.lua @@ -0,0 +1,87 @@ +local InService = {} +local MaxInService = {} + +function GetInServiceCount(name) + local count = 0 + + for k,v in pairs(InService[name]) do + if v == true then + count = count + 1 + end + end + + return count +end + +RegisterServerEvent('esx_service:activateService') +AddEventHandler('esx_service:activateService', function(name, max) + InService[name] = {} + MaxInService[name] = max + GlobalState[name] = GetInServiceCount(name) +end) + +RegisterServerEvent('esx_service:disableService') +AddEventHandler('esx_service:disableService', function(name) + InService[name][source] = nil + GlobalState[name] = GetInServiceCount(name) +end) + +RegisterServerEvent('esx_service:notifyAllInService') +AddEventHandler('esx_service:notifyAllInService', function(notification, name) + for k,v in pairs(InService[name]) do + if v == true then + TriggerClientEvent('esx_service:notifyAllInService', k, notification, source) + end + end +end) + +ESX.RegisterServerCallback('esx_service:enableService', function(source, cb, name) + local inServiceCount = GetInServiceCount(name) + + if inServiceCount >= MaxInService[name] then + cb(false, MaxInService[name], inServiceCount) + else + InService[name][source] = true + GlobalState[name] = GetInServiceCount(name) + cb(true, MaxInService[name], inServiceCount) + end +end) + +ESX.RegisterServerCallback('esx_service:isInService', function(source, cb, name) + local isInService = false + + if InService[name] ~= nil then + if InService[name][source] then + isInService = true + end + else + print(('[^3WARNING^7] Attempted To Use Inactive Service - ^5%s^7'):format(name)) + end + + cb(isInService) +end) + +ESX.RegisterServerCallback('esx_service:isPlayerInService', function(source, cb, name, target) + local isPlayerInService = false + local targetXPlayer = ESX.GetPlayerFromId(target) + + if InService[name][targetXPlayer.source] then + isPlayerInService = true + end + + cb(isPlayerInService) +end) + +ESX.RegisterServerCallback('esx_service:getInServiceList', function(source, cb, name) + cb(InService[name]) +end) + +AddEventHandler('esx:playerDropped', function(playerId, reason) + for k,v in pairs(InService) do + if v[playerId] == true then + v[playerId] = nil + GlobalState[k] = GetInServiceCount(k) + end + end +end) + diff --git a/[esx_addons]/esx_shops/.editorconfig b/[esx_addons]/esx_shops/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_shops/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_shops/LICENSE b/[esx_addons]/esx_shops/LICENSE new file mode 100644 index 00000000..2eb0d447 --- /dev/null +++ b/[esx_addons]/esx_shops/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_shops + Copyright (C) 2015-2023 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 . + +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_shops Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_shops/README.md b/[esx_addons]/esx_shops/README.md new file mode 100644 index 00000000..e3663f76 --- /dev/null +++ b/[esx_addons]/esx_shops/README.md @@ -0,0 +1,15 @@ +

[ESX] Shops

Discord - Website - Documentation + +This Resource allows Players to shop til they Drop! You Configure *everything* within the Config.lua, and don't worry about those pesky cheaters, we have Security Steve on the door to protect you and your city! + +# Legal + +esx_shops - shop til you drop! + +Copyright (C) 2015-2023 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 . diff --git a/[esx_addons]/esx_shops/client/main.lua b/[esx_addons]/esx_shops/client/main.lua new file mode 100644 index 00000000..f2077b0f --- /dev/null +++ b/[esx_addons]/esx_shops/client/main.lua @@ -0,0 +1,124 @@ +local hasAlreadyEnteredMarker, lastZone +local currentAction, currentActionMsg, currentActionData = nil, nil, {} + +function OpenShopMenu(zone) + local elements = { + {unselectable = true, icon = "fas fa-shopping-basket", title = TranslateCap('shop') } + } + + for i=1, #Config.Zones[zone].Items, 1 do + local item = Config.Zones[zone].Items[i] + + elements[#elements+1] = { + icon = "fas fa-shopping-basket", + title = ('%s - %s'):format(item.label, TranslateCap('shop_item', ESX.Math.GroupDigits(item.price))), + itemLabel = item.label, + item = item.name, + price = item.price + } + end + + ESX.OpenContext("right", elements, function(menu,element) + local elements2 = { + {unselectable = true, icon = "fas fa-shopping-basket", title = element.title}, + {icon = "fas fa-shopping-basket", title = "Amount", input = true, inputType = "number", inputPlaceholder = "Amount you want to buy", inputMin = 1, inputMax = 25}, + {icon = "fas fa-check-double", title = "Confirm", val = "confirm"} + } + + ESX.OpenContext("right", elements2, function(menu2,element2) + local amount = menu2.eles[2].inputValue + ESX.CloseContext() + TriggerServerEvent('esx_shops:buyItem', element.item, amount, zone) + end, function(menu) + currentAction = 'shop_menu' + currentActionMsg = TranslateCap('press_menu') + currentActionData = {zone = zone} + end) + end, function(menu) + currentAction = 'shop_menu' + currentActionMsg = TranslateCap('press_menu') + currentActionData = {zone = zone} + end) +end + +AddEventHandler('esx_shops:hasEnteredMarker', function(zone) + currentAction = 'shop_menu' + currentActionMsg = TranslateCap('press_menu') + currentActionData = {zone = zone} +end) + +AddEventHandler('esx_shops:hasExitedMarker', function(zone) + currentAction = nil + ESX.CloseContext() +end) + +-- Create Blips +CreateThread(function() + for k,v in pairs(Config.Zones) do + for i = 1, #v.Pos, 1 do + if v.ShowBlip then + local blip = AddBlipForCoord(v.Pos[i]) + + SetBlipSprite (blip, v.Type) + SetBlipScale (blip, v.Size) + SetBlipColour (blip, v.Color) + SetBlipAsShortRange(blip, true) + + BeginTextCommandSetBlipName('STRING') + AddTextComponentSubstringPlayerName(TranslateCap('shops')) + EndTextCommandSetBlipName(blip) + end + end + end +end) + +-- Enter / Exit marker events +CreateThread(function() + while true do + local Sleep = 1500 + + if currentAction then + Sleep = 0 + + if IsControlJustReleased(0, 38) and currentAction == 'shop_menu' then + currentAction = nil + ESX.HideUI() + OpenShopMenu(currentActionData.zone) + end + end + + local playerCoords = GetEntityCoords(PlayerPedId()) + local isInMarker, currentZone = false, nil + + for k,v in pairs(Config.Zones) do + for i = 1, #v.Pos, 1 do + local distance = #(playerCoords - v.Pos[i]) + + if distance < Config.DrawDistance then + Sleep = 0 + if v.ShowMarker then + DrawMarker(Config.MarkerType, v.Pos[i], 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Config.MarkerSize.x, Config.MarkerSize.y, Config.MarkerSize.z, Config.MarkerColor.r, Config.MarkerColor.g, Config.MarkerColor.b, 100, false, true, 2, false, nil, nil, false) + end + if distance < 2.0 then + isInMarker = true + currentZone = k + lastZone = k + end + end + end + end + + if isInMarker and not hasAlreadyEnteredMarker then + hasAlreadyEnteredMarker = true + ESX.TextUI(currentActionMsg) + TriggerEvent('esx_shops:hasEnteredMarker', currentZone) + end + + if not isInMarker and hasAlreadyEnteredMarker then + hasAlreadyEnteredMarker = false + ESX.HideUI() + TriggerEvent('esx_shops:hasExitedMarker', lastZone) + end + Wait(Sleep) + end +end) diff --git a/[esx_addons]/esx_shops/config.lua b/[esx_addons]/esx_shops/config.lua new file mode 100644 index 00000000..07705f55 --- /dev/null +++ b/[esx_addons]/esx_shops/config.lua @@ -0,0 +1,98 @@ +Config = {} +Config.DrawDistance = 7.5 +Config.MarkerSize = {x = 1.1, y = 0.7, z = 1.1} +Config.MarkerType = 29 +Config.MarkerColor = {r = 50, g = 200, b = 50, a = 200} +Config.Locale = GetConvar('esx:locale', 'en') + +Config.Zones = { + + TwentyFourSeven = { + Items = { + { + name = "bread", + label = "bread", + price = 100 + }, + { + name = "water", + label = "water", + price = 100 + } + }, + Pos = { + vector3(373.8, 325.8, 103.5), + vector3(2557.4, 382.2, 108.6), + vector3(-3038.9, 585.9, 7.9), + vector3(-3241.9, 1001.4, 12.8), + vector3(547.4, 2671.7, 42.1), + vector3(1961.4, 3740.6, 32.3), + vector3(2678.9, 3280.6, 55.2), + vector3(1729.2, 6414.1, 35.0) + }, + Size = 0.8, + Type = 59, + Color = 25, + ShowBlip = true, + ShowMarker = true +}, + + RobsLiquor = { + Items = { + { + name = "bread", + label = "bread", + price = 100 + }, + { + name = "water", + label = "water", + price = 100 + } + }, + Pos = { + vector3(1135.8, -982.2, 46.4), + vector3(-1222.9, -906.9, 12.3), + vector3(-1487.5, -379.1, 40.1), + vector3(-2968.2, 390.9, 15.0), + vector3(1166.0, 2708.9, 38.1), + vector3(1392.5, 3604.6, 34.9), + vector3(127.8, -1284.7, 29.2), --StripClub + vector3(-1393.4, -606.6, 30.3), --Tequila la + vector3(-559.9, 287.0, 82.1) --Bahamamas + }, + Size = 0.8, + Type = 59, + Color = 25, + ShowBlip = true, + ShowMarker = true +}, + + LTDgasoline = { + Items = { + { + name = "bread", + label = "bread", + price = 100 + }, + { + name = "water", + label = "water", + price = 100 + } + }, + Pos = { + vector3(-48.5, -1757.5, 29.4), + vector3(1163.3, -323.8, 69.2), + vector3(-707.5, -914.2, 19.2), + vector3(-1820.5, 792.5, 138.1), + vector3(1698.3, 4924.4, 42.0) + }, + Size = 0.8, + Type = 59, + Color = 25, + ShowBlip = true, + ShowMarker = true +} +} + diff --git a/[esx_addons]/esx_shops/fxmanifest.lua b/[esx_addons]/esx_shops/fxmanifest.lua new file mode 100644 index 00000000..ca06117a --- /dev/null +++ b/[esx_addons]/esx_shops/fxmanifest.lua @@ -0,0 +1,26 @@ +fx_version 'adamant' + +game 'gta5' + +description 'ESX Shops' +lua54 'yes' +version '1.9.0' + +shared_script '@es_extended/imports.lua' + +client_scripts { + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'client/main.lua' +} + +server_scripts { + '@es_extended/locale.lua', + '@oxmysql/lib/MySQL.lua', + 'locales/*.lua', + 'config.lua', + 'server/main.lua' +} + +dependency 'es_extended' diff --git a/[esx_addons]/esx_shops/locales/br.lua b/[esx_addons]/esx_shops/locales/br.lua new file mode 100644 index 00000000..a84bd697 --- /dev/null +++ b/[esx_addons]/esx_shops/locales/br.lua @@ -0,0 +1,12 @@ +Locales['br'] = { + ['shop'] = 'comprar', + ['shops'] = 'lojas', + ['press_menu'] = 'pressione [E] para acessar a loja.', + ['shop_item'] = '$%s', + ['bought'] = 'você acabou de comprar %sx %s por ~r~$%s', + ['not_enough'] = 'você não tem ~r~dinheiro suficiente: %s', + ['player_cannot_hold'] = 'você ~r~não tem bastante espaço livre no seu inventário!', + ['shop_confirm'] = 'comprou %sx %s por $%s?', + ['no'] = 'não', + ['yes'] = 'sim', +} diff --git a/[esx_addons]/esx_shops/locales/de.lua b/[esx_addons]/esx_shops/locales/de.lua new file mode 100644 index 00000000..bcc504a4 --- /dev/null +++ b/[esx_addons]/esx_shops/locales/de.lua @@ -0,0 +1,12 @@ +Locales['de'] = { + ['shop'] = 'geschäft', + ['shops'] = 'geschäfte', + ['press_menu'] = 'Drücke [E] um auf das Geschäft zuzugreifen.', + ['shop_item'] = '$%s', + ['bought'] = 'Du kaufst %sx %s für $%s', + ['not_enough'] = 'Du hast nicht genug geld: %s', + ['player_cannot_hold'] = 'Du hast nicht genug Platz in deinem Inventar', + ['shop_confirm'] = 'Kaufe %sx %s für $%s?', + ['no'] = 'nein', + ['yes'] = 'ja', +} diff --git a/[esx_addons]/esx_shops/locales/en.lua b/[esx_addons]/esx_shops/locales/en.lua new file mode 100644 index 00000000..6cdab3aa --- /dev/null +++ b/[esx_addons]/esx_shops/locales/en.lua @@ -0,0 +1,12 @@ +Locales['en'] = { + ['shop'] = 'shop', + ['shops'] = 'shops', + ['press_menu'] = 'press [E] to access the ~g~store.', + ['shop_item'] = '$%s', + ['bought'] = 'You Have Bought ~b~%sx %s~s~ for ~b~$%s', + ['not_enough'] = 'you do ~r~not~s~ have enough money, you\'re missing ~b~$%s!', + ['player_cannot_hold'] = 'you do ~r~not~s~ have enough free space in your inventory!', + ['shop_confirm'] = 'buy %sx %s for $%s?', + ['no'] = 'no', + ['yes'] = 'yes', +} diff --git a/[esx_addons]/esx_shops/locales/es.lua b/[esx_addons]/esx_shops/locales/es.lua new file mode 100644 index 00000000..185a78d3 --- /dev/null +++ b/[esx_addons]/esx_shops/locales/es.lua @@ -0,0 +1,12 @@ +Locales['es'] = { + ['shop'] = 'tienda', + ['shops'] = 'tiendas', + ['press_menu'] = 'pulsa [E] para comprar en la tienda.', + ['shop_item'] = '%s€', + ['bought'] = 'has comprado %sx %s por ~r~%s€', + ['not_enough'] = 'no tienes ~r~suficiente dinero: %s', + ['player_cannot_hold'] = 'no tienes espacio libre en tu inventario...', + ['shop_confirm'] = '¿Comprar %sx %s por $%s?', + ['no'] = 'no', + ['yes'] = 'si', +} diff --git a/[esx_addons]/esx_shops/locales/et.lua b/[esx_addons]/esx_shops/locales/et.lua new file mode 100644 index 00000000..89cceea4 --- /dev/null +++ b/[esx_addons]/esx_shops/locales/et.lua @@ -0,0 +1,12 @@ +Locales['et'] = { + ['shop'] = 'Pood', + ['shops'] = 'Poed', + ['press_menu'] = 'Vajuta [E] ,et kuvada ~g~poodi.', + ['shop_item'] = '$%s', + ['bought'] = 'Sa ostsid ~b~%sx %s~s~ ~b~$%s eest', + ['not_enough'] = 'Sul ~r~pole~s~ piisavalt palju raha, sul on puudu ~b~$%s!', + ['player_cannot_hold'] = 'Sul ~r~pole~s~ piisavalt palju ruumi!', + ['shop_confirm'] = 'Osta %sx %s $%s eest?', + ['no'] = 'ei', + ['yes'] = 'jah', +} diff --git a/[esx_addons]/esx_shops/locales/fi.lua b/[esx_addons]/esx_shops/locales/fi.lua new file mode 100644 index 00000000..56b08faf --- /dev/null +++ b/[esx_addons]/esx_shops/locales/fi.lua @@ -0,0 +1,12 @@ +Locales['fi'] = { + ['shop'] = 'kauppa', + ['shops'] = 'kaupat', + ['press_menu'] = 'paina [E] ostaaksesi jotain kaupasta.', + ['shop_item'] = '$%s', + ['bought'] = 'Sinä ostit juuri %sx %s. Summaksi tuli ~r~$%s', + ['not_enough'] = 'sinulla ei ole ~r~tarpeeksi rahaa, sinulta puuttuu ~r~$%s!', + ['player_cannot_hold'] = 'sinulla ~r~ei ole tarpeeksi tilaa repussasi!', + ['shop_confirm'] = 'osta %sx %s summa olisi $%s?', + ['no'] = 'ei', + ['yes'] = 'kyllä', +} diff --git a/[esx_addons]/esx_shops/locales/fr.lua b/[esx_addons]/esx_shops/locales/fr.lua new file mode 100644 index 00000000..52ce343f --- /dev/null +++ b/[esx_addons]/esx_shops/locales/fr.lua @@ -0,0 +1,12 @@ +Locales['fr'] = { + ['shop'] = 'magasin', + ['shops'] = 'magasins', + ['press_menu'] = 'appuyez sur [E] pour accéder au magasin.', + ['shop_item'] = '$%s', + ['bought'] = 'vous venez d\'acheter %sx %s pour ~r~$%s', + ['not_enough'] = 'vous n\'avez ~r~pas assez d\'argent: %s', + ['player_cannot_hold'] = 'vous n\'avez ~r~pas assez de place dans votre inventaire!', + ['shop_confirm'] = 'acheter %sx %s pour $%s?', + ['no'] = 'non', + ['yes'] = 'oui', +} diff --git a/[esx_addons]/esx_shops/locales/hu.lua b/[esx_addons]/esx_shops/locales/hu.lua new file mode 100644 index 00000000..07d0e621 --- /dev/null +++ b/[esx_addons]/esx_shops/locales/hu.lua @@ -0,0 +1,12 @@ +Locales['hu'] = { + ['shop'] = 'Bolt', + ['shops'] = 'Bolt', + ['press_menu'] = 'Nyomd meg a [E] gombot hogy megnézd a kinálatot', + ['shop_item'] = '%s$', + ['bought'] = 'Vettél %sx %s ennyiért: ~r~$%s', + ['not_enough'] = 'Nincsen elég pénzed', + ['player_cannot_hold'] = 'Nincsen elég szabad helyed!', + ['shop_confirm'] = 'Veszel %sx %s ennyiért $%s?', + ['no'] = 'Nem', + ['yes'] = 'Igen', +} diff --git a/[esx_addons]/esx_shops/locales/it.lua b/[esx_addons]/esx_shops/locales/it.lua new file mode 100644 index 00000000..5326a5ef --- /dev/null +++ b/[esx_addons]/esx_shops/locales/it.lua @@ -0,0 +1,12 @@ +Locales['it'] = { + ['shop'] = 'negozio', + ['shops'] = 'negozi', + ['press_menu'] = 'premi [E] per accedere al negozio.', + ['shop_item'] = '%s$', + ['bought'] = 'hai acquistato %sx %s per ~r~%s$', + ['not_enough'] = 'non hai ~r~abbastanza soldi: %s', + ['player_cannot_hold'] = 'non hai spazio libero nel tuo inventario', + ['shop_confirm'] = 'Acquista %sx %s per $%s?', + ['no'] = 'no', + ['yes'] = 'sì', +} diff --git a/[esx_addons]/esx_shops/locales/nl.lua b/[esx_addons]/esx_shops/locales/nl.lua new file mode 100644 index 00000000..716dea60 --- /dev/null +++ b/[esx_addons]/esx_shops/locales/nl.lua @@ -0,0 +1,12 @@ +Locales['nl'] = { + ['shop'] = 'winkel', + ['shops'] = 'winkels', + ['press_menu'] = 'klik op [E] om de ~g~winkel~s~ te gebruiken.', + ['shop_item'] = '$%s', + ['bought'] = 'Je hebt ~b~%sx %s~s~ gekocht voor ~b~$%s', + ['not_enough'] = 'je hebt ~r~niet~s~ genoeg geld, je mist nog ~b~€%s!', + ['player_cannot_hold'] = 'je hebt ~r~niet~s~ genoeg ruimte in je inventaris!', + ['shop_confirm'] = 'koop %sx %s voor €%s?', + ['no'] = 'nee', + ['yes'] = 'ja', +} diff --git a/[esx_addons]/esx_shops/locales/pl.lua b/[esx_addons]/esx_shops/locales/pl.lua new file mode 100644 index 00000000..7a96b6bc --- /dev/null +++ b/[esx_addons]/esx_shops/locales/pl.lua @@ -0,0 +1,12 @@ +Locales['pl'] = { + ['shop'] = 'sklep', + ['shops'] = 'sklepy', + ['press_menu'] = 'naciśnij [E] żeby wejść do sklepu.', + ['shop_item'] = '$%s', + ['bought'] = 'właśnie zakupiłeś %s x %s za %s $', + ['not_enough'] = 'nie masz ~r~wystarczjąco pięniędzy, Brakuje Ci ~r~$%s!', + ['player_cannot_hold'] = '~r~Nie masz wystarczająco wolnego miejsca w swoim ekwipunku!', + ['shop_confirm'] = 'chcesz kupić %sx %s za $%s?', + ['no'] = 'nie', + ['yes'] = 'tak', +} diff --git a/[esx_addons]/esx_shops/locales/si.lua b/[esx_addons]/esx_shops/locales/si.lua new file mode 100644 index 00000000..78d0c7ee --- /dev/null +++ b/[esx_addons]/esx_shops/locales/si.lua @@ -0,0 +1,12 @@ +Locales['si'] = { + ['shop'] = 'shop', + ['shops'] = 'shops', + ['press_menu'] = "pritisnite [E] za dostop do store.", + ['shop_item'] = '$%s', + ['bought'] = 'pravkar ste kupili %sx %s za ~r~$%s', + ['not_enough'] = 'nimaš ~r~enough denarja, missing ~r~$%s!', + ['player_cannot_hold'] = 'v svojem inventarju nimaš dovolj prostega prostora!', + ['shop_confirm'] = 'kupi %sx %s za $%s?', + ['no'] = 'ne', + ["yes"] = "yes", +} diff --git a/[esx_addons]/esx_shops/locales/sv.lua b/[esx_addons]/esx_shops/locales/sv.lua new file mode 100644 index 00000000..d808f193 --- /dev/null +++ b/[esx_addons]/esx_shops/locales/sv.lua @@ -0,0 +1,12 @@ +Locales['sv'] = { + ['shop'] = 'affär', + ['shops'] = 'affärer', + ['press_menu'] = 'tryck [E] för att handla prylar.', + ['shop_item'] = '%s SEK', + ['bought'] = 'du har köpt %sx %s för ~r~%s SEK', + ['not_enough'] = 'du har inte ~r~tillräckligt med pengar, det saknas ~r~%s SEK!', + ['player_cannot_hold'] = 'du har ~r~inte tillräckligt med utrymme för att hålla det!', + ['shop_confirm'] = 'köpa %sx %s för %s SEK?', + ['no'] = 'nej', + ['yes'] = 'ja', +} diff --git a/[esx_addons]/esx_shops/server/main.lua b/[esx_addons]/esx_shops/server/main.lua new file mode 100644 index 00000000..9165709b --- /dev/null +++ b/[esx_addons]/esx_shops/server/main.lua @@ -0,0 +1,57 @@ +local ShopItems = {} + + +function GetItemFromShop(Item, Zone) + local item = {} + local found = false + for i=1, #Config.Zones[Zone].Items, 1 do + if Config.Zones[Zone].Items[i].name == Item then + item = Config.Zones[Zone].Items[i] + found = true + break + end + end + + if found then + return true, item.price, item.label + else + return false + end +end + + +RegisterServerEvent('esx_shops:buyItem') +AddEventHandler('esx_shops:buyItem', function(itemName, amount, zone) + local source = source + local xPlayer = ESX.GetPlayerFromId(source) + local Exists, price,label = GetItemFromShop(itemName,zone) + amount = ESX.Math.Round(amount) + + if amount < 0 then + print(('[^3WARNING^7] Player ^5%s^7 attempted to exploit the shop!'):format(source)) + return + end + + if not Exists then + print(('[^3WARNING^7] Player ^5%s^7 attempted to exploit the shop!'):format(source)) + return + end + + if Exists then + price = price * amount + -- can the player afford this item? + if xPlayer.getMoney() >= price then + -- can the player carry the said amount of x item? + if xPlayer.canCarryItem(itemName, amount) then + xPlayer.removeMoney(price, label .. " Purchase") + xPlayer.addInventoryItem(itemName, amount) + xPlayer.showNotification(TranslateCap('bought', amount, label, ESX.Math.GroupDigits(price))) + else + xPlayer.showNotification(TranslateCap('player_cannot_hold')) + end + else + local missingMoney = price - xPlayer.getMoney() + xPlayer.showNotification(TranslateCap('not_enough', ESX.Math.GroupDigits(missingMoney))) + end + end +end) diff --git a/[esx_addons]/esx_sit/.editorconfig b/[esx_addons]/esx_sit/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_sit/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_sit/LICENSE b/[esx_addons]/esx_sit/LICENSE new file mode 100644 index 00000000..815cf569 --- /dev/null +++ b/[esx_addons]/esx_sit/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_sit + Copyright (C) 2015-2023 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 . + +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_sit Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_sit/README.md b/[esx_addons]/esx_sit/README.md new file mode 100644 index 00000000..8c2394ea --- /dev/null +++ b/[esx_addons]/esx_sit/README.md @@ -0,0 +1,49 @@ +# esx_sit + +This script allow you to sit in almost every object where you should be able to, the default keybind is SHIFT + E to toggle sitting. + +## Download & Installation + +### Using [fvm](https://github.com/qlaffont/fvm-installer) + +``` +fvm install --save --folder=esx esx-org/esx_sit +``` + +### Using Git + +``` +cd resources +git clone https://github.com/ESX-Org/esx_sit [esx]/esx_sit +``` + +### Manually + +- Download https://github.com/ESX-Org/esx_sit/releases/latest +- Put it in the `resource/[esx]` directory + +### Installation + +- Add this to your server.cfg: + +``` +start esx_sit +``` + +## Credits + +- [CmJustice](https://github.com/CmJustice) - Original author + +## Legal + +### License + +esx_sit + +Copyright (C) 2015-2023 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/. diff --git a/[esx_addons]/esx_sit/client.lua b/[esx_addons]/esx_sit/client.lua new file mode 100644 index 00000000..5fa4b38b --- /dev/null +++ b/[esx_addons]/esx_sit/client.lua @@ -0,0 +1,147 @@ +local debugProps, sitting, lastPos, currentSitCoords, currentScenario = {} +local disableControls = false +local currentObj = nil + +if Config.Debug then + CreateThread(function() + while true do + Wait(0) + + for i=1, #debugProps, 1 do + local coords = GetEntityCoords(debugProps[i]) + local hash = GetEntityModel(debugProps[i]) + local id = coords.x .. coords.y .. coords.z + local model = 'unknown' + + for i=1, #Config.Interactables, 1 do + local seat = Config.Interactables[i] + + if hash == joaat(seat) then + model = seat + break + end + end + + local text = ('ID: %s~n~Hash: %s~n~Model: %s'):format(id, hash, model) + + ESX.Game.Utils.DrawText3D({ + x = coords.x, + y = coords.y, + z = coords.z + 2.0 + }, text, 0.5) + end + + if #debugProps == 0 then + Wait(500) + end + end + end) +end + +CreateThread(function() + while true do + local wait = 1000 + local playerPed = PlayerPedId() + + if sitting and not IsPedUsingScenario(playerPed, currentScenario) then + wakeup() + end + + Wait(wait) + end +end) + +RegisterCommand('sit', function() + if sitting then + wakeup() + else + local object, distance = GetNearChair() + + if Config.Debug then + table.insert(debugProps, object) + end + + if distance and distance < 1.4 then + local hash = GetEntityModel(object) + + for k,v in pairs(Config.Sitable) do + if joaat(k) == hash then + sit(object, k, v) + break + end + end + end + end +end, false) + + +RegisterKeyMapping('sit', 'Sit', 'keyboard', 'e') + +function GetNearChair() + local object, distance + local coords = GetEntityCoords(PlayerPedId()) + for i=1, #Config.Interactables do + object = GetClosestObjectOfType(coords, 3.0, joaat(Config.Interactables[i]), false, false, false) + distance = #(coords - GetEntityCoords(object)) + if distance < 1.6 then + return object, distance + end + end + return nil, nil +end + +function wakeup() + local playerPed = PlayerPedId() + local pos = GetEntityCoords(PlayerPedId()) + + TaskStartScenarioAtPosition(playerPed, currentScenario, 0.0, 0.0, 0.0, 180.0, 2, true, false) + while IsPedUsingScenario(PlayerPedId(), currentScenario) do + Wait(100) + end + ClearPedTasks(playerPed) + + FreezeEntityPosition(playerPed, false) + FreezeEntityPosition(currentObj, false) + + TriggerServerEvent('esx_sit:leavePlace', currentSitCoords) + currentSitCoords, currentScenario = nil, nil + sitting = false + disableControls = false +end + +function sit(object, modelName, data) + -- Fix for sit on chairs behind walls + if not HasEntityClearLosToEntity(PlayerPedId(), object, 17) then + return + end + disableControls = true + currentObj = object + FreezeEntityPosition(object, true) + + PlaceObjectOnGroundProperly(object) + local pos = GetEntityCoords(object) + local playerPos = GetEntityCoords(PlayerPedId()) + local objectCoords = pos.x .. pos.y .. pos.z + + ESX.TriggerServerCallback('esx_sit:getPlace', function(occupied) + if occupied then + ESX.ShowNotification('There is someone on this chair') + else + local playerPed = PlayerPedId() + lastPos, currentSitCoords = GetEntityCoords(playerPed), objectCoords + + TriggerServerEvent('esx_sit:takePlace', objectCoords) + + currentScenario = data.scenario + TaskStartScenarioAtPosition(playerPed, currentScenario, pos.x, pos.y, pos.z + (playerPos.z - pos.z)/2, GetEntityHeading(object) + 180.0, 0, true, false) + + Wait(2500) + if GetEntitySpeed(PlayerPedId()) > 0 then + ClearPedTasks(PlayerPedId()) + TaskStartScenarioAtPosition(playerPed, currentScenario, pos.x, pos.y, pos.z + (playerPos.z - pos.z)/2, GetEntityHeading(object) + 180.0, 0, true, true) + end + + sitting = true + end + end, objectCoords) +end \ No newline at end of file diff --git a/[esx_addons]/esx_sit/config.lua b/[esx_addons]/esx_sit/config.lua new file mode 100644 index 00000000..1f03df56 --- /dev/null +++ b/[esx_addons]/esx_sit/config.lua @@ -0,0 +1,116 @@ +Config = {} + +Config.MaxDistance = 1.5 +Config.Debug = ESX.GetConfig().EnableDebug + +Config.Interactables = { + 'prop_bench_01a', + 'prop_bench_01b', + 'prop_bench_01c', + 'prop_bench_02', + 'prop_bench_03', + 'prop_bench_04', + 'prop_bench_05', + 'prop_bench_06', + 'prop_bench_07', + 'prop_bench_08', + 'prop_bench_09', + 'prop_bench_10', + 'prop_bench_11', + 'prop_fib_3b_bench', + 'prop_ld_bench01', + 'prop_wait_bench_01', + 'hei_prop_heist_off_chair', + 'hei_prop_hei_skid_chair', + 'prop_chair_01a', + 'prop_chair_01b', + 'prop_chair_02', + 'prop_chair_03', + 'prop_chair_04a', + 'prop_chair_04b', + 'prop_chair_05', + 'prop_chair_06', + 'prop_chair_07', + 'prop_chair_08', + 'prop_chair_09', + 'prop_chair_10', + 'v_club_stagechair', + 'prop_chateau_chair_01', + 'prop_clown_chair', + 'prop_cs_office_chair', + 'prop_direct_chair_01', + 'prop_direct_chair_02', + 'prop_gc_chair02', + 'prop_off_chair_01', + 'prop_off_chair_03', + 'prop_off_chair_04', + 'prop_off_chair_04b', + 'prop_off_chair_04_s', + 'prop_off_chair_05', + 'prop_old_deck_chair', + 'prop_old_wood_chair', + 'prop_rock_chair_01', + 'prop_skid_chair_01', + 'prop_skid_chair_02', + 'prop_skid_chair_03', + 'prop_sol_chair', + 'prop_wheelchair_01', + 'prop_wheelchair_01_s', + 'p_armchair_01_s', + 'p_clb_officechair_s', + 'p_dinechair_01_s', + 'p_ilev_p_easychair_s', + 'p_soloffchair_s', + 'p_yacht_chair_01_s', + 'v_club_officechair', + 'v_corp_bk_chair3', + 'v_corp_cd_chair', + 'v_corp_offchair', + 'v_ilev_chair02_ped', + 'v_ilev_hd_chair', + 'v_ilev_p_easychair', + 'v_ret_gc_chair03', + 'prop_ld_farm_chair01', + 'prop_table_04_chr', + 'prop_table_05_chr', + 'prop_table_06_chr', + 'v_ilev_leath_chr', + 'prop_table_01_chr_a', + 'prop_table_01_chr_b', + 'prop_table_02_chr', + 'prop_table_03b_chr', + 'prop_table_03_chr', + 'prop_torture_ch_01', + 'v_ilev_fh_dineeamesa', + 'v_ilev_fh_kitchenstool', + 'v_ilev_tort_stool', + 'hei_prop_yah_seat_01', + 'hei_prop_yah_seat_02', + 'hei_prop_yah_seat_03', + 'prop_waiting_seat_01', + 'prop_yacht_seat_01', + 'prop_yacht_seat_02', + 'prop_yacht_seat_03', + 'prop_hobo_seat_01', + 'prop_rub_couch01', + 'miss_rub_couch_01', + 'prop_ld_farm_couch01', + 'prop_ld_farm_couch02', + 'prop_rub_couch02', + 'prop_rub_couch03', + 'prop_rub_couch04', + 'p_lev_sofa_s', + 'p_res_sofa_l_s', + 'p_v_med_p_sofa_s', + 'p_yacht_sofa_01_s', + 'v_ilev_m_sofa', + 'v_res_tre_sofa_s', + 'v_tre_sofa_mess_a_s', + 'v_tre_sofa_mess_b_s', + 'v_tre_sofa_mess_c_s', + 'prop_roller_car_01', + 'prop_roller_car_02', + -- Custom + 'v_ret_gc_chair02', + 'v_serv_ct_chair02', +} diff --git a/[esx_addons]/esx_sit/fxmanifest.lua b/[esx_addons]/esx_sit/fxmanifest.lua new file mode 100644 index 00000000..5db021b4 --- /dev/null +++ b/[esx_addons]/esx_sit/fxmanifest.lua @@ -0,0 +1,21 @@ +fx_version 'adamant' + +game 'gta5' + +description 'ESX Sit' +lua54 'yes' +version '1.9.0' + +shared_script '@es_extended/imports.lua' + +server_scripts { + 'config.lua', + 'lists/seat.lua', + 'server.lua' +} + +client_scripts { + 'config.lua', + 'lists/seat.lua', + 'client.lua' +} diff --git a/[esx_addons]/esx_sit/lists/seat.lua b/[esx_addons]/esx_sit/lists/seat.lua new file mode 100644 index 00000000..c54f51b2 --- /dev/null +++ b/[esx_addons]/esx_sit/lists/seat.lua @@ -0,0 +1,128 @@ +Config.Sitable = { + --Only verticalOffset works right now! + --all scenarios: pastebin.com/6mrYTdQv + + -- BENCH + prop_bench_01a = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_bench_01b = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_bench_01c = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_bench_02 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_bench_03 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_bench_04 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_bench_05 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_bench_06 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_bench_07 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.45, forwardOffset = 0.0, leftOffset = 0.0}, + prop_bench_08 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_bench_09 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.31, forwardOffset = 0.0, leftOffset = 0.0}, + prop_bench_10 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_bench_11 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_fib_3b_bench = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_ld_bench01 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_wait_bench_01 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + + -- CHAIR + v_club_stagechair = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + hei_prop_heist_off_chair = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + hei_prop_hei_skid_chair = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_chair_01a = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_chair_01b = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_chair_02 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_chair_03 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_chair_04a = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_chair_04b = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_chair_05 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_chair_06 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_chair_07 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_chair_08 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_chair_09 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_chair_10 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_chateau_chair_01 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_clown_chair = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_cs_office_chair = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_direct_chair_01 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_direct_chair_02 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_gc_chair02 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_off_chair_01 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_off_chair_03 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_off_chair_04 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_off_chair_04b = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_off_chair_04_s = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_off_chair_05 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.45, forwardOffset = 0.0, leftOffset = 0.0}, + prop_old_deck_chair = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_old_wood_chair = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_rock_chair_01 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_skid_chair_01 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_skid_chair_02 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_skid_chair_03 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_sol_chair = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_wheelchair_01 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_wheelchair_01_s = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + p_armchair_01_s = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + p_clb_officechair_s = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + p_dinechair_01_s = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + p_ilev_p_easychair_s = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + p_soloffchair_s = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + p_yacht_chair_01_s = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + v_club_officechair = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + v_corp_bk_chair3 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + v_corp_cd_chair = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + v_corp_offchair = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + v_ilev_chair02_ped = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + v_ilev_hd_chair = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + v_ilev_p_easychair = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + v_ret_gc_chair03 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_ld_farm_chair01 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_table_04_chr = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.56, forwardOffset = 0.0, leftOffset = 0.0}, + prop_table_05_chr = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_table_06_chr = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + v_ilev_leath_chr = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_table_01_chr_a = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_table_01_chr_b = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_table_02_chr = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_table_03b_chr = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_table_03_chr = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_torture_ch_01 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + v_ilev_fh_dineeamesa = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + + + v_ilev_tort_stool = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + v_ilev_fh_kitchenstool = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + + -- SEAT + hei_prop_yah_seat_01 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + hei_prop_yah_seat_02 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + hei_prop_yah_seat_03 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_waiting_seat_01 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_yacht_seat_01 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_yacht_seat_02 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_yacht_seat_03 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_hobo_seat_01 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.65, forwardOffset = 0.0, leftOffset = 0.0}, + + -- COUCH + prop_rub_couch01 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + miss_rub_couch_01 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_ld_farm_couch01 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_ld_farm_couch02 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_rub_couch02 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_rub_couch03 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_rub_couch04 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + + -- SOFA + p_lev_sofa_s = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + p_res_sofa_l_s = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + p_v_med_p_sofa_s = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + p_yacht_sofa_01_s = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + v_ilev_m_sofa = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + v_res_tre_sofa_s = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + v_tre_sofa_mess_a_s = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + v_tre_sofa_mess_b_s = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + v_tre_sofa_mess_c_s = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + + -- MISC + prop_roller_car_01 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + prop_roller_car_02 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + + -- CUSTOM + v_ret_gc_chair02 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, + v_serv_ct_chair02 = { scenario = 'PROP_HUMAN_SEAT_BENCH', verticalOffset = -0.5, forwardOffset = 0.0, leftOffset = 0.0}, +} diff --git a/[esx_addons]/esx_sit/server.lua b/[esx_addons]/esx_sit/server.lua new file mode 100644 index 00000000..fe2817b6 --- /dev/null +++ b/[esx_addons]/esx_sit/server.lua @@ -0,0 +1,17 @@ +local seatsTaken = {} + +RegisterNetEvent('esx_sit:takePlace') +AddEventHandler('esx_sit:takePlace', function(objectCoords) + seatsTaken[objectCoords] = true +end) + +RegisterNetEvent('esx_sit:leavePlace') +AddEventHandler('esx_sit:leavePlace', function(objectCoords) + if seatsTaken[objectCoords] then + seatsTaken[objectCoords] = nil + end +end) + +ESX.RegisterServerCallback('esx_sit:getPlace', function(source, cb, objectCoords) + cb(seatsTaken[objectCoords]) +end) \ No newline at end of file diff --git a/[esx_addons]/esx_society/.editorconfig b/[esx_addons]/esx_society/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_society/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_society/LICENSE b/[esx_addons]/esx_society/LICENSE new file mode 100644 index 00000000..7e48fa64 --- /dev/null +++ b/[esx_addons]/esx_society/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_society + Copyright (C) 2015-2023 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 . + +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_society Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_society/README.md b/[esx_addons]/esx_society/README.md new file mode 100644 index 00000000..519810be --- /dev/null +++ b/[esx_addons]/esx_society/README.md @@ -0,0 +1,33 @@ +

[ESX] Society

Discord - Website - Documentation + +Society management for ESX. Adds employee management (hire, fire, promote / demote, change salary), society bank accounts and money washing. It's crucial that this script gets started before all resources that utilize societies do, or else many things will go wrong. + +## Explanation +ESX Society works with addon accounts named 'society_xxx', for example 'society_taxi' or 'society_realestateagent'. If you job grade is 'boss' the society money will be displayed in your hud. + +## Usage +```lua +local society = 'taxi' +local amount = 100 + +TriggerServerEvent('esx_society:withdrawMoney', society, amount) +TriggerServerEvent('esx_society:depositMoney', society, amount) +TriggerServerEvent('esx_society:washMoney', society, amount) + + +TriggerEvent('esx_society:openBossMenu', society, function (data, menu) + menu.close() +end, {wash = false}) -- set custom options, e.g disable washing +``` + +# Legal +### License +esx_society - societies for ESX + +Copyright (C) 2015-2023 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/. diff --git a/[esx_addons]/esx_society/client/main.lua b/[esx_addons]/esx_society/client/main.lua new file mode 100644 index 00000000..f0797518 --- /dev/null +++ b/[esx_addons]/esx_society/client/main.lua @@ -0,0 +1,411 @@ +local base64MoneyIcon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABaCAMAAAAPdrEwAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAMAUExURQAAACmvPCmwPCuwPiywPi2wPy6xQC6xQS+yQTCxQTCyQTCyQjGyQzKyRDOzRTSzRTSzRjW0RjW0Rza0SDe0STi0STm1Sjq1Szq2Szu2TDy2TDy2TT22Tj63Tz+3UEC4UEG4UUG4UkK4U0O5VES5VEW6VUa6Vke6V0i7WEm7WUu8Wku8W0y8W028XE29XU++XlC9X1C+X1G+YFK+YVO/YlW/ZFXAZFfAZVfAZljBZlnBZ1rBaVvCaVvCalzDal7CbF/DbV/EbWHEbmLEb2LEcGTFcWfGdGjHdWrHd2vId2vIeGzIeW3JenHKfXLKfnPLf3TLgHXLgXXMgHXMgXbMgnjNg3nMhHrNhnrOhnzOiH7PiYLQjYPRjoTRjoTRj4XRkIXSkIfSkojSk4rUlYzUlo7VmJDWmpHWm5LXnJTXnZTXnpXYnpbYn5nZopzapJ3bpZ7bpp7bp6DcqKLcqqPcq6Tcq6TdrKberqjfr6jfsKnfsavgs6zgs6zgtK7hta/htrDit7LiuLLiubPjurTjurXju7bkvLbkvbnlv7rlwLrmwLzmwr3nw77nxMDnxcLox8PpyMTpycXpysXqysbqy8fqzMnrzcrrz8vsz8vs0Mzs0c3t0tHu1dHu1tPv19Tv2NXv2dXw2dbw2tfw29jw3Nnx3drx3t7z4d/z4uD04+H05OP15eP15uT15uT15+X16OX26Of26en36+r37Ov37er47Ov47ez47e347u347+758PD58fD68fD68vL69PT79fX79vb79/b89vb89/f8+Pj9+fn9+vr9+/v++/v+/Pz+/P3+/f3+/v7//wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALfZHJgAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4xLjb9TgnoAAAGdUlEQVRoQ7WZ93sURRiAFZO76O1eklt215OgBwqJgmgCRhAhRrAAiogBK4gBJEFEgWAEYiGIYEGp1kjXQECkiF0OWyjJ/k34zcy3db7Zu8fHe3/KTXnzPbPT56orRTEYAhMLUFgNKkeiGH8BNaV1KWSPVXveU9s3LW9pvhdoblm+afspTHZi5Wo1BnzpaOfcnFmWSBv29YBtpBNlZm5u59FLPDsmdJUaxQeXNugZw5IwMnrD0oO8iFKuUHNx/+bGZLWNMgm7Otm4uZ/LsVIEUs3F+Y5a3USNAlOv7cgr5ZSamQffyOnKgH1sPdfFi2PVILKaReEcmKwVIWbY2uQDvApW95HULIb+Ng0rFoXWxppcCjyqZuZjk4oNWWBrk44R7oiamXdkC3w9GTO7Q3aH1cy8OkWFnHtitstM4j/bqdWSO6Rm5nYdS4e5FbKQwxlMC6G3Q1bIHVQz8+IKLBphJLdydlRjWpiKxZAXdAfUPOak4gOO4FZOdxWmhbGTkbh9NTOvoVsDuGmAaxkdlZgWRV8Dub7bV0PyzhQWkqk5z7WMdjpqILUTslEXUEPQJ7Lq7pz9WXiBZ4iZUGBnTwTCdtVgvjgxpj+b3vTvTEteq5KbEy/6blcNVZapR3cmdc9Z4QV6Pnxzdr1GF9aWQQFUohqCPqQc3ZV17X3C6tP31kyL+Jy2dsgLW6jBPDgVc6OkR3XxCV/i9IqRRFedylxc6qk30L3DNF7ikz1Jft0oLOaT2hBSg/l8jmwOo24/amimYzkfOwfdlLtdNT1YjIaf0EFzgGhuNnB8teNcqCWDvs3vzSSLqC9Ze0F0EqaGoDeSQWt7UaHgXA0WDKFvFGEzNRS6mxot6VZhUNJNdm7zbsgSagj6UAKTQ5hnhEHJffRISIi+LdRLyNn9cTSoOExP3FZmiat2nIF66t9Xb0GFz8Df+AenVTEF2vUwAzM1BN1LfsTkcVS4bJs+fnRj84z3joqf+eFYUELvZWFzdSfZHjeeEwqXl6/myWaZ0bSVDf3uJP9NkOn01HPISXIMTJAB/hiB6WBPN+xxBpvxl4wxR6ihll8pSL1QupwLLhR22YL9ysVGrKRcfZJeAu4QSo+1yWA3rla2NGCeZGpoj13lmBJm1F/odDm+fv68phorU0l+miDlu6BFmLqbHDCWdhqVQQb/zPesW1inqxdoRqIb1SvSmBJG+wR1BF+/NkmLWUnTK1DdQq+i5gvoIbn85QPqtdRoQfU0TIgy4h/UKOi+gZ5DgGmonqIoob2CDhXHblE0ij2lgNo2YMcSy7fkhF2E2rIm/IoOFV/Q+78i1JkJheJ+jOzjnlr1GRk18swa4iC9t3U/o6LzCVLTP4dlVM14LBfC63yKIYOYeuMqcRoneZFqEW/IKAY6Q8xumla3YP2+PNnNt1Jqb6Arpifg5kXuHjNTaVi1s5/eJs0r+6gFUkxP6kkV2mKBs8UMZSYMdmAJcpxqTTGpqpcCEO1znCMTwlPFNbuF0uUs1UVwKYAWoRcwGDHsbNS/algwu+J1bvToI9TuAgZqetm1roPVk/FDazbhjaryr0SiSw/R1oFll94sWNnfsLrzS1eTkawyjKrE6HcwyeVtIix3s6Dc4ljzsTbnx74P1na83+uf8ZBn5cb0tjgsbHJjlvoMa8dxWT4XBDZmoCa3k7eH9yE0u4l9jr+dZN2P2ASnVorK8TwoVwxsglnYxNY9852oHMseogMEt+4QtnzgGDoTa8eRH4ulA4QOHCxs6ZhUBdNAIS7NIjp1+JgEaulwZzwsnXCjDDxPzB+Rwx1zS0fSoVZb/Mp4/lFqQxk5kjI1cZDWa179HTUEe8eRW9XoQZq5qeN/5fCFigWmd14VNRXLx3/et8lLC7N8XNtH0VP6mXfvV+z4iEsLFrbqqkXXho2Z8dynwgo8NdZK0SXpqxbmjrsgquhCsXrhgOYgL4h4k8Rca5VvFV7gTkySUVxrsbBjLuOGfMy1jCZFa6gv47hbeYU4ZA/XMmbRy13MFaJwqy4+Ez1cy3iSVsddfGLcdJvo33Ato5VcSeOva4WbvmQ2v+daxkrqfqXQJbNwk1fj9kOPuNwlZxdxNS7c5IW+MdRFMhd3oS/cpXmG4EOnRI8nAAt8sKsETz4AK1yahyqAy0vxvAaU7lEQcJ8yj9BPmUf+81MmR8iB//kBllOyZ2NOqR67XUAVABNjuXLlX2rCcoFjOcGoAAAAAElFTkSuQmCC' + +RegisterNetEvent('esx:setJob') +AddEventHandler('esx:setJob', function(job) + ESX.PlayerData.job = job + RefreshBussHUD() +end) + +RegisterNetEvent('esx:playerLoaded') +AddEventHandler('esx:playerLoaded', function(xPlayer) + ESX.PlayerData = xPlayer + ESX.PlayerLoaded = true + RefreshBussHUD() +end) + +function RefreshBussHUD() + DisableSocietyMoneyHUDElement() + + if ESX.PlayerData.job.grade_name == 'boss' then + EnableSocietyMoneyHUDElement() + + ESX.TriggerServerCallback('esx_society:getSocietyMoney', function(money) + UpdateSocietyMoneyHUDElement(money) + end, ESX.PlayerData.job.name) + end +end + +RegisterNetEvent('esx_addonaccount:setMoney') +AddEventHandler('esx_addonaccount:setMoney', function(society, money) + if ESX.PlayerData.job and ESX.PlayerData.job.grade_name == 'boss' and 'society_' .. ESX.PlayerData.job.name == society then + UpdateSocietyMoneyHUDElement(money) + end +end) + +function EnableSocietyMoneyHUDElement() + local societyMoneyHUDElementTpl = '

 {{money}}
' + + if ESX.GetConfig().EnableHud then + ESX.UI.HUD.RegisterElement('society_money', 3, 0, societyMoneyHUDElementTpl, { + money = 0 + }) + end + + TriggerEvent('esx_society:toggleSocietyHud', true) +end + +function DisableSocietyMoneyHUDElement() + if ESX.GetConfig().EnableHud then + ESX.UI.HUD.RemoveElement('society_money') + end + + TriggerEvent('esx_society:toggleSocietyHud', false) +end + +function UpdateSocietyMoneyHUDElement(money) + if ESX.GetConfig().EnableHud then + ESX.UI.HUD.UpdateElement('society_money', { + money = ESX.Math.GroupDigits(money) + }) + end + + TriggerEvent('esx_society:setSocietyMoney', money) +end + +function OpenBossMenu(society, close, options) + options = options or {} + local elements = { + {unselectable = true, icon = "fas fa-user", title = TranslateCap('boss_menu')} + } + + ESX.TriggerServerCallback('esx_society:isBoss', function(isBoss) + if isBoss then + local defaultOptions = { + checkBal = true, + withdraw = true, + deposit = true, + wash = true, + employees = true, + salary = true, + grades = true + } + + for k,v in pairs(defaultOptions) do + if options[k] == nil then + options[k] = v + end + end + + if options.checkBal then + elements[#elements+1] = {icon = "fas fa-wallet", title = TranslateCap('check_society_balance'), value = "check_society_balance"} + end + if options.withdraw then + elements[#elements+1] = {icon = "fas fa-wallet", title = TranslateCap('withdraw_society_money'), value = "withdraw_society_money"} + end + if options.deposit then + elements[#elements+1] = {icon = "fas fa-wallet", title = TranslateCap('deposit_society_money'), value = "deposit_money"} + end + if options.wash then + elements[#elements+1] = {icon = "fas fa-wallet", title = TranslateCap('wash_money'), value = "wash_money"} + end + if options.employees then + elements[#elements+1] = {icon = "fas fa-users", title = TranslateCap('employee_management'), value = "manage_employees"} + end + if options.salary then + elements[#elements+1] = {icon = "fas fa-wallet", title = TranslateCap('salary_management'), value = "manage_salary"} + end + if options.grades then + elements[#elements+1] = {icon = "fas fa-scroll", title = TranslateCap('grade_management'), value = "manage_grades"} + end + + ESX.OpenContext("right", elements, function(menu,element) + if element.value == "check_society_balance" then + TriggerServerEvent('esx_society:checkSocietyBalance', society) + elseif element.value == "withdraw_society_money" then + local elements = { + {unselectable = true, icon = "fas fa-wallet", title = TranslateCap('withdraw_amount'), description = "Withdraw money from the society account"}, + {icon = "fas fa-wallet", title = "Amount", input = true, inputType = "number", inputPlaceholder = "Amount to withdraw..", inputMin = 1, inputMax = 250000, name = "withdraw"}, + {icon = "fas fa-check", title = "Confirm", value = "confirm"}, + {icon = "fas fa-arrow-left", title = "Return", value = "return"} + } + ESX.RefreshContext(elements) + elseif element.value == "confirm" then + local amount = tonumber(menu.eles[2].inputValue) + if amount == nil then + ESX.ShowNotification(TranslateCap('invalid_amount')) + else + TriggerServerEvent('esx_society:withdrawMoney', society, amount) + ESX.CloseContext() + end + elseif element.value == "deposit_money" then + local elements = { + {unselectable = true, icon = "fas fa-wallet", title = TranslateCap('deposit_amount'), description = "Deposit some money into the society account"}, + {icon = "fas fa-wallet", title = "Amount", input = true, inputType = "number", inputPlaceholder = "Amount to deposit..", inputMin = 1, inputMax = 250000, name = "deposit"}, + {icon = "fas fa-check", title = "Confirm", value = "confirm2"}, + {icon = "fas fa-arrow-left", title = "Return", value = "return"} + } + ESX.RefreshContext(elements) + elseif element.value == "confirm2" then + local amount = tonumber(menu.eles[2].inputValue) + if amount == nil then + ESX.ShowNotification(TranslateCap('invalid_amount')) + else + TriggerServerEvent('esx_society:depositMoney', society, amount) + ESX.CloseContext() + end + elseif element.value == "wash_money" then + local elements = { + {unselectable = true, icon = "fas fa-wallet", title = TranslateCap('wash_money_amount'), description = "Deposit some money into the money wash"}, + {icon = "fas fa-wallet", title = "Amount", input = true, inputType = "number", inputPlaceholder = "Amount to wash..", inputMin = 1, inputMax = 250000, name = "wash"}, + {icon = "fas fa-check", title = "Confirm", value = "confirm3"}, + {icon = "fas fa-arrow-left", title = "Return", value = "return"} + } + ESX.RefreshContext(elements) + elseif element.value == "confirm3" then + local amount = tonumber(menu.eles[2].inputValue) + if amount == nil then + ESX.ShowNotification(TranslateCap('invalid_amount')) + else + TriggerServerEvent('esx_society:washMoney', society, amount) + ESX.CloseContext() + end + elseif element.value == "manage_employees" then + OpenManageEmployeesMenu(society, options) + elseif element.value == "manage_salary" then + OpenManageSalaryMenu(society, options) + elseif element.value == "manage_grades" then + OpenManageGradesMenu(society, options) + elseif element.value == "return" then + OpenBossMenu(society, nil, options) + end + end) + end + end, society) +end + +function OpenManageEmployeesMenu(society, options) + local elements = { + {unselectable = true, icon = "fas fa-users", title = TranslateCap('employee_management')}, + {icon = "fas fa-users", title = TranslateCap('employee_list'), value = "employee_list"}, + {icon = "fas fa-users", title = TranslateCap('recruit'), value = "recruit"} + } + + elements[#elements+1] = {icon = "fas fa-arrow-left", title = "Return", value = "return"} + + ESX.OpenContext("right", elements, function(menu,element) + if element.value == "employee_list" then + OpenEmployeeList(society, options) + elseif element.value == "recruit" then + OpenRecruitMenu(society, options) + elseif element.value == "return" then + OpenBossMenu(society, nil, options) + end + end) +end + +function OpenEmployeeList(society, options) + ESX.TriggerServerCallback('esx_society:getEmployees', function(employees) + local elements = { + {unselectable = true, icon = "fas fa-user", title = "Employees"} + } + + for i=1, #employees, 1 do + local gradeLabel = (employees[i].job.grade_label == '' and employees[i].job.label or employees[i].job.grade_label) + + elements[#elements+1] = {icon = "fas fa-user", title = employees[i].name .. " | " ..gradeLabel, gradeLabel = gradeLabel, data = employees[i]} + end + + elements[#elements+1] = {icon = "fas fa-arrow-left", title = "Return", value = "return"} + + ESX.OpenContext("right", elements, function(menu,element) + if element.value == "return" then + OpenManageEmployeesMenu(society, options) + else + local elements2 = { + {unselectable = true, icon = "fas fa-user", title = element.title}, + {icon = "fas fa-user", title = "Promote", value = "promote"}, + {icon = "fas fa-user", title = "Fire", value = "fire"}, + {icon = "fas fa-arrow-left", title = "Return", value = "return"} + } + ESX.OpenContext("right", elements2, function(menu2,element2) + local employee = element.data + if element2.value == "promote" then + ESX.CloseContext() + OpenPromoteMenu(society, employee, options) + elseif element2.value == "fire" then + ESX.ShowNotification(TranslateCap('you_have_fired', employee.name)) + + ESX.TriggerServerCallback('esx_society:setJob', function() + OpenEmployeeList(society, options) + end, employee.identifier, 'unemployed', 0, 'fire') + elseif element2.value == "return" then + OpenEmployeeList(society, options) + end + end) + end + end) + end, society) +end + +function OpenRecruitMenu(society, options) + ESX.TriggerServerCallback('esx_society:getOnlinePlayers', function(players) + local elements = { + {unselectable = true, icon = "fas fa-user", title = TranslateCap('recruiting')} + } + + for i=1, #players, 1 do + if players[i].job.name ~= society then + elements[#elements+1] = {icon = "fas fa-user", title = players[i].name, value = players[i].source, name = players[i].name, identifier = players[i].identifier} + end + end + + elements[#elements+1] = {icon = "fas fa-arrow-left", title = "Return", value = "return"} + + ESX.OpenContext("right", elements, function(menu,element) + if element.value == "return" then + OpenManageEmployeesMenu(society, options) + else + local elements2 = { + {unselectable = true, icon = "fas fa-user", title = "Confirm"}, + {icon = "fas fa-times", title = TranslateCap('no'), value = "no"}, + {icon = "fas fa-check", title = TranslateCap('yes'), value = "yes"}, + } + ESX.OpenContext("right", elements2, function(menu2,element2) + if element2.value == "yes" then + ESX.ShowNotification(TranslateCap('you_have_hired', element.name)) + + ESX.TriggerServerCallback('esx_society:setJob', function() + OpenRecruitMenu(society, options) + end, element.identifier, society, 0, 'hire') + end + end) + end + end) + end) +end + +function OpenPromoteMenu(society, employee, options) + ESX.TriggerServerCallback('esx_society:getJob', function(job) + if not job then + return + end + + local elements = { + {unselectable = true, icon = "fas fa-user", title = TranslateCap('promote_employee', employee.name)} + } + + for i=1, #job.grades, 1 do + local gradeLabel = (job.grades[i].label == '' and job.label or job.grades[i].label) + + elements[#elements+1] = {icon = "fas fa-user", title = gradeLabel, value = job.grades[i].grade, selected = (employee.job.grade == job.grades[i].grade)} + end + + elements[#elements+1] = {icon = "fas fa-arrow-left", title = "Return", value = "return"} + + ESX.OpenContext("right", elements, function(menu,element) + if element.value == "return" then + OpenEmployeeList(society, options) + else + ESX.ShowNotification(TranslateCap('you_have_promoted', employee.name, element.title)) + + ESX.TriggerServerCallback('esx_society:setJob', function() + OpenEmployeeList(society, options) + end, employee.identifier, society, element.value, 'promote') + end + end, function(menu) + OpenEmployeeList(society, options) + end) + end, society) +end + +function OpenManageSalaryMenu(society, options) + ESX.TriggerServerCallback('esx_society:getJob', function(job) + if not job then + return + end + + local elements = { + {unselectable = true, icon = "fas fa-wallet", title = TranslateCap('salary_management')} + } + + for i=1, #job.grades, 1 do + local gradeLabel = (job.grades[i].label == '' and job.label or job.grades[i].label) + + elements[#elements+1] = { + icon = "fas fa-wallet", + title = ('%s - %s'):format(gradeLabel, TranslateCap('money_generic', ESX.Math.GroupDigits(job.grades[i].salary))), + value = job.grades[i].grade + } + end + + elements[#elements+1] = {icon = "fas fa-arrow-left", title = "Return", value = "return"} + + ESX.OpenContext("right", elements, function(menu,element) + local elements = { + {unselectable = true, icon = "fas fa-wallet", title = element.title, description = "Change a grade salary amount", value = element.value}, + {icon = "fas fa-wallet", title = "Amount", input = true, inputType = "number", inputPlaceholder = "Amount to change grade salary..", inputMin = 1, inputMax = Config.MaxSalary, name = "gradesalary"}, + {icon = "fas fa-check", title = "Confirm", value = "confirm"} + } + + ESX.RefreshContext(elements) + if element.value == "confirm" then + local amount = tonumber(menu.eles[2].inputValue) + + if amount == nil then + ESX.ShowNotification(TranslateCap('invalid_value_nochanges')) + OpenManageSalaryMenu(society, options) + elseif amount > Config.MaxSalary then + ESX.ShowNotification(TranslateCap('invalid_amount_max')) + OpenManageSalaryMenu(society, options) + else + ESX.CloseContext() + ESX.TriggerServerCallback('esx_society:setJobSalary', function() + OpenManageSalaryMenu(society, options) + end, society, menu.eles[1].value, amount) + end + elseif element.value == "return" then + OpenBossMenu(society, nil, options) + end + end) + end, society) +end + +function OpenManageGradesMenu(society, options) + ESX.TriggerServerCallback('esx_society:getJob', function(job) + if not job then + return + end + + local elements = { + {unselectable = true, icon = "fas fa-wallet", title = TranslateCap('grade_management')} + } + + for i=1, #job.grades, 1 do + local gradeLabel = (job.grades[i].label == '' and job.label or job.grades[i].label) + + elements[#elements+1] = {icon = "fas fa-wallet", title = ('%s'):format(gradeLabel), value = job.grades[i].grade} + end + + elements[#elements+1] = {icon = "fas fa-arrow-left", title = "Return", value = "return"} + + ESX.OpenContext("right", elements, function(menu,element) + local elements = { + {unselectable = true, icon = "fas fa-wallet", title = element.title, description = "Change a grade label", value = element.value}, + {icon = "fas fa-wallet", title = "Label", input = true, inputType = "text", inputPlaceholder = "Label to change job grade label..", name = "gradelabel"}, + {icon = "fas fa-check", title = "Confirm", value = "confirm"} + } + + ESX.RefreshContext(elements) + if element.value == "confirm" then + if menu.eles[2].inputValue then + local label = tostring(menu.eles[2].inputValue) + + ESX.TriggerServerCallback('esx_society:setJobLabel', function() + OpenManageGradesMenu(society, options) + end, society, menu.eles[1].value, label) + else + ESX.ShowNotification(TranslateCap('invalid_value_nochanges')) + OpenManageGradesMenu(society, options) + end + elseif element.value == "return" then + OpenBossMenu(society, nil, options) + end + end) + end, society) +end + +AddEventHandler('esx_society:openBossMenu', function(society, close, options) + OpenBossMenu(society, close, options) +end) + +if ESX.PlayerLoaded then RefreshBussHUD() end diff --git a/[esx_addons]/esx_society/config.lua b/[esx_addons]/esx_society/config.lua new file mode 100644 index 00000000..391b3226 --- /dev/null +++ b/[esx_addons]/esx_society/config.lua @@ -0,0 +1,5 @@ +Config = {} + +Config.Locale = GetConvar('esx:locale', 'en') +Config.EnableESXIdentity = true +Config.MaxSalary = 3500 diff --git a/[esx_addons]/esx_society/esx_society.sql b/[esx_addons]/esx_society/esx_society.sql new file mode 100644 index 00000000..c65e742a --- /dev/null +++ b/[esx_addons]/esx_society/esx_society.sql @@ -0,0 +1,11 @@ + + +CREATE TABLE `society_moneywash` ( + `id` int NOT NULL AUTO_INCREMENT, + `identifier` varchar(60) NOT NULL, + `society` varchar(60) NOT NULL, + `amount` int NOT NULL, + + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + diff --git a/[esx_addons]/esx_society/fxmanifest.lua b/[esx_addons]/esx_society/fxmanifest.lua new file mode 100644 index 00000000..073f315d --- /dev/null +++ b/[esx_addons]/esx_society/fxmanifest.lua @@ -0,0 +1,30 @@ +fx_version 'adamant' + +game 'gta5' + +description 'ESX Society' +lua54 'yes' +version '1.9.0' + +shared_script '@es_extended/imports.lua' + +server_scripts { + '@oxmysql/lib/MySQL.lua', + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'server/main.lua' +} + +client_scripts { + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'client/main.lua' +} + +dependencies { + 'es_extended', + 'cron', + 'esx_addonaccount' +} diff --git a/[esx_addons]/esx_society/locales/br.lua b/[esx_addons]/esx_society/locales/br.lua new file mode 100644 index 00000000..997fb043 --- /dev/null +++ b/[esx_addons]/esx_society/locales/br.lua @@ -0,0 +1,40 @@ +Locales['br'] = { + ['actions'] = 'ações', + ['boss_menu'] = 'menu chefe', + ['money_generic'] = '$%s', + ['deposit_amount'] = 'valor do depósito', + ['deposit_society_money'] = 'depositar dinheiro da sociedade', + ['do_you_want_to_recruit'] = 'você quer recrutar %s?', + ['employee'] = 'empregado', + ['employee_list'] = 'lista de empregados', + ['employee_management'] = 'gestão de funcionários', + ['fire'] = 'fogo', + ['grade'] = 'grau(escolaridade)', + ['have_deposited'] = 'você depositou ~r~$%s', + ['have_withdrawn'] = 'você retirou $%s', + ['invalid_amount'] = 'montante inválido', + ['invalid_amount_max'] = 'esse salário não é permitido', + ['invalid_value'] = 'invalid value', + ['invalid_value_nochanges']= 'invalid value, no changes applied', + ['no'] = 'não', + ['promote'] = 'promover', + ['promote_employee'] = 'promover %s', + ['recruit'] = 'recrutar', + ['recruiting'] = 'recrutamento', + ['salary_amount'] = 'valor do salário', + ['salary_management'] = 'gestão salarial', + ['wash_money'] = 'lavar dinheiro', + ['wash_money_amount'] = 'quantidade a lavar', + ['withdraw_amount'] = 'retirar montante', + ['withdraw_society_money'] = 'retirar dinheiro da sociedade', + ['yes'] = 'sim', + ['you_have'] = 'você tem $%s esperando lavagem de dinheiro (24h).', + ['you_have_laundered'] = 'você lavou $%s do seu dinheiro ', + ['you_have_hired'] = 'você recrutou %s', + ['you_have_been_hired'] = 'você foi contratado por %s', + ['you_have_fired'] = 'você demitiu %s', + ['you_have_been_fired'] = 'você foi demitido de %s', + ['you_have_promoted'] = 'você promoveu %s a %s', + ['you_have_been_promoted'] = 'você foi promovido promoted!', +} + diff --git a/[esx_addons]/esx_society/locales/cs.lua b/[esx_addons]/esx_society/locales/cs.lua new file mode 100644 index 00000000..749e348b --- /dev/null +++ b/[esx_addons]/esx_society/locales/cs.lua @@ -0,0 +1,39 @@ +Locales['cs'] = { + ['actions'] = 'akce', + ['boss_menu'] = 'akce šéfa', + ['money_generic'] = '$%s', + ['deposit_amount'] = 'množství vkladu', + ['deposit_society_money'] = 'vložit peníze do společnosti', + ['do_you_want_to_recruit'] = 'chceš najmout %s?', + ['employee'] = 'zaměstnanec', + ['employee_list'] = 'seznam zaměstnanců', + ['employee_management'] = 'správa zaměstnanců', + ['fire'] = 'vyhodit', + ['grade'] = 'povýšit', + ['have_deposited'] = 'vložil jsi ~r~$%s', + ['have_withdrawn'] = 'vybral jsi $%s', + ['invalid_amount'] = 'neplatná částka', + ['invalid_amount_max'] = 'tento plat není povolen', + ['invalid_value'] = 'invalid value', + ['invalid_value_nochanges']= 'invalid value, no changes applied', + ['no'] = 'ne', + ['promote'] = 'povýšit', + ['promote_employee'] = 'povýšit %s', + ['recruit'] = 'najmout', + ['recruiting'] = 'najímání', + ['salary_amount'] = 'váše platu', + ['salary_management'] = 'správa platů', + ['wash_money'] = 'vyprat peníze', + ['wash_money_amount'] = 'množství na vyprání', + ['withdraw_amount'] = 'výběr peněz', + ['withdraw_society_money'] = 'vybrat peníze společnosti', + ['yes'] = 'ano', + ['you_have'] = 'máš $%s čekajících na vyprání (24h).', + ['you_have_laundered'] = '~r~Vypral jsi tvé peníze: $%s', + ['you_have_hired'] = 'najmul jsi %s', + ['you_have_been_hired'] = 'byl jsi najmut hráčem %s', + ['you_have_fired'] = 'vyhodil jsi %s', + ['you_have_been_fired'] = 'byl jsi vyhozen hráčem %s', + ['you_have_promoted'] = 'byl jsi povýšen hráčem %s na %s', + ['you_have_been_promoted'] = 'byl jsi povýšen!', +} diff --git a/[esx_addons]/esx_society/locales/en.lua b/[esx_addons]/esx_society/locales/en.lua new file mode 100644 index 00000000..17cb2d91 --- /dev/null +++ b/[esx_addons]/esx_society/locales/en.lua @@ -0,0 +1,43 @@ +Locales['en'] = { + ['actions'] = 'actions', + ['boss_menu'] = 'boss menu', + ['money_generic'] = '$%s', + ['deposit_amount'] = 'deposit amount', + ['deposit_society_money'] = 'deposit society money', + ['do_you_want_to_recruit'] = 'do you want to recruit %s?', + ['employee'] = 'employee', + ['employee_list'] = 'employee list', + ['employee_management'] = 'employee management', + ['fire'] = 'fire', + ['grade'] = 'grade', + ['have_deposited'] = 'you have deposited ~r~$%s', + ['have_withdrawn'] = 'you have withdrawn $%s', + ['check_balance'] = 'balance is ~g~$%s', + ['invalid_amount'] = 'invalid amount', + ['invalid_amount_max'] = 'that salary is not allowed', + ['invalid_value'] = 'invalid value', + ['invalid_value_nochanges']= 'invalid value, no changes applied', + ['no'] = 'no', + ['promote'] = 'promote', + ['promote_employee'] = 'promote %s', + ['recruit'] = 'recruit', + ['recruiting'] = 'recruiting', + ['salary_amount'] = 'salary amount', + ['salary_management'] = 'salary management', + ['grade_management'] = 'grade label management', + ['grade_label'] = 'grade label', + ['check_society_balance'] = 'check society balance', + ['wash_money'] = 'wash money', + ['wash_money_amount'] = 'amount to wash', + ['withdraw_amount'] = 'witdraw amount', + ['withdraw_society_money'] = 'withdraw society money', + ['yes'] = 'yes', + ['you_have'] = 'you have $%s waiting in money laundering (24h).', + ['you_have_laundered'] = 'you have ~r~laundered your money: $%s', + ['you_have_hired'] = 'you have recruited %s', + ['you_have_been_hired'] = 'you have been hired by %s', + ['you_have_fired'] = 'you have fired %s', + ['you_have_been_fired'] = 'you have been fired from %s', + ['you_have_promoted'] = 'you have promoted %s as %s', + ['you_have_been_promoted'] = 'you have been promoted!', +} diff --git a/[esx_addons]/esx_society/locales/es.lua b/[esx_addons]/esx_society/locales/es.lua new file mode 100644 index 00000000..d83853f2 --- /dev/null +++ b/[esx_addons]/esx_society/locales/es.lua @@ -0,0 +1,39 @@ +Locales['es'] = { + ['actions'] = 'Acciones', + ['boss_menu'] = 'Menú de jefe', + ['money_generic'] = '%s$', + ['deposit_amount'] = 'Depositar cantidad', + ['deposit_society_money'] = 'Depositar dinero en la sociedad', + ['do_you_want_to_recruit'] = '¿Quieres contratar a %s?', + ['employee'] = 'Empleado', + ['employee_list'] = 'Lista de empleados', + ['employee_management'] = 'Gestión de empleados', + ['fire'] = 'Despedir', + ['grade'] = 'Cargo', + ['have_deposited'] = 'Has depositado ~r~%s$', + ['have_withdrawn'] = 'Has retirado %s$', + ['invalid_amount'] = 'Cantidad inválida', + ['invalid_amount_max'] = 'Ese salario no está permitido', + ['invalid_value'] = 'invalid value', + ['invalid_value_nochanges']= 'invalid value, no changes applied', + ['no'] = 'No', + ['promote'] = 'Ascender', + ['promote_employee'] = 'Ascender %s', + ['recruit'] = 'Contratar', + ['recruiting'] = 'Contratando', + ['salary_amount'] = 'Cantidad de salario', + ['salary_management'] = 'Gestión de salario', + ['wash_money'] = 'Limpiar dinero', + ['wash_money_amount'] = 'Cantidad para limpiar', + ['withdraw_amount'] = 'Retirar cantidad', + ['withdraw_society_money'] = 'Retirar dinero de la sociedad', + ['yes'] = 'Si', + ['you_have'] = 'tienes $%s esperando en el lavado de dinero (24h).', + ['you_have_laundered'] = 'has ~r~lavado tu dinero: $%s', + ['you_have_hired'] = 'Has contratado a %s', + ['you_have_been_hired'] = 'Has sido contratado por %s', + ['you_have_fired'] = 'Has despedido a %s', + ['you_have_been_fired'] = 'Has sido despedido de %s', + ['you_have_promoted'] = 'Has ascendido a %s a %s', + ['you_have_been_promoted'] = '¡Has sido ascendido!', +} diff --git a/[esx_addons]/esx_society/locales/et.lua b/[esx_addons]/esx_society/locales/et.lua new file mode 100644 index 00000000..99abc830 --- /dev/null +++ b/[esx_addons]/esx_society/locales/et.lua @@ -0,0 +1,41 @@ +Locales['et'] = { + ['actions'] = 'Tegevused', + ['boss_menu'] = 'Bossi menüü', + ['money_generic'] = '$%s', + ['deposit_amount'] = 'Sisesta raha', + ['deposit_society_money'] = 'Pane firma arvele raha', + ['do_you_want_to_recruit'] = 'Kas sa soovid palgata %s?', + ['employee'] = 'Töötaja', + ['employee_list'] = 'Töötajate list', + ['employee_management'] = 'Töötajate juhtimine', + ['fire'] = 'Vallanda', + ['grade'] = 'Auaste', + ['have_deposited'] = 'Te sisestasite firma arvele ~r~$%s', + ['have_withdrawn'] = 'Võtsid firma arvelt $%s', + ['check_balance'] = 'Firma arvel on ~g~$%s', + ['invalid_amount'] = 'Tundmatu kogus', + ['invalid_amount_max'] = 'See palk pole lubatud!', + ['no'] = 'Ei', + ['promote'] = 'Ametikõrgendus', + ['promote_employee'] = 'Ametikõrgendasid %s', + ['recruit'] = 'Palka', + ['recruiting'] = 'Palkamine', + ['salary_amount'] = 'Palk', + ['salary_management'] = 'Palk', + ['grade_management'] = 'Auastme määramine', + ['grade_label'] = 'Auaste', + ['check_society_balance'] = 'Vaata firma arvet', + ['wash_money'] = 'Pese musta raha', + ['wash_money_amount'] = 'Musta raha kogus', + ['withdraw_amount'] = 'Väljavõtmise kogus', + ['withdraw_society_money'] = 'Võta firma arvelt raha', + ['yes'] = 'Jah', + ['you_have'] = 'Sul on $%s rahapesus (24h).', + ['you_have_laundered'] = 'Sul on ~r~raha pestud: $%s', + ['you_have_hired'] = 'Sa palkasid %s', + ['you_have_been_hired'] = 'Sind võeti tööle %s poolt', + ['you_have_fired'] = 'Sa lasid lahti isiku: %s', + ['you_have_been_fired'] = 'Sind lasti lahti %s', + ['you_have_promoted'] = 'Said ametikõrgendust %s %s', + ['you_have_been_promoted'] = 'Said ametikõrgendust!', +} diff --git a/[esx_addons]/esx_society/locales/fi.lua b/[esx_addons]/esx_society/locales/fi.lua new file mode 100644 index 00000000..602e8cc4 --- /dev/null +++ b/[esx_addons]/esx_society/locales/fi.lua @@ -0,0 +1,39 @@ +Locales['fi'] = { + ['actions'] = 'toiminnot', + ['boss_menu'] = 'boss menu', + ['money_generic'] = '€%s', + ['deposit_amount'] = 'talletus summa', + ['deposit_society_money'] = 'talleta yritykselle rahaa', + ['do_you_want_to_recruit'] = 'do you want to recruit %s?', + ['employee'] = 'työntekijä', + ['employee_list'] = 'työntekijä lista', + ['employee_management'] = 'työntekijöiden hallinta', + ['fire'] = 'anna potkut', + ['grade'] = 'taso', + ['have_deposited'] = 'sinä talletit ~r~€%s', + ['have_withdrawn'] = 'sinä nostit €%s', + ['invalid_amount'] = 'virheellinen summa', + ['invalid_amount_max'] = 'that salary is not allowed', + ['invalid_value'] = 'invalid value', + ['invalid_value_nochanges']= 'invalid value, no changes applied', + ['no'] = 'ei', + ['promote'] = 'ylennä', + ['promote_employee'] = 'ylennä henkilö %s', + ['recruit'] = 'rekrytoi', + ['recruiting'] = 'rekrytointi', + ['salary_amount'] = 'palkan määrä', + ['salary_management'] = 'palkan hallinta', + ['wash_money'] = 'pese rahaa', + ['wash_money_amount'] = 'pestävä määrä', + ['withdraw_amount'] = 'nostettava määrä', + ['withdraw_society_money'] = 'nosta yrityksen rahoja', + ['yes'] = 'kyllä', + ['you_have'] = 'you have €%s waiting in money laundering (24h).', + ['you_have_laundered'] = 'olet ~r~pessyt rahojasi: €%s', + ['you_have_hired'] = 'sinä palkkasit henkilön %s', + ['you_have_been_hired'] = 'sinut on palkattu pelaajan %s toimesta', + ['you_have_fired'] = 'sinä annoit potkut pelaajalle %s', + ['you_have_been_fired'] = 'sinulle annettiin potkut työstä %s', + ['you_have_promoted'] = 'sinä ylensit henkilön %s arvolle %s', + ['you_have_been_promoted'] = 'sinut ylennettiin', +} diff --git a/[esx_addons]/esx_society/locales/fr.lua b/[esx_addons]/esx_society/locales/fr.lua new file mode 100644 index 00000000..8b0d791f --- /dev/null +++ b/[esx_addons]/esx_society/locales/fr.lua @@ -0,0 +1,39 @@ +Locales['fr'] = { + ['actions'] = 'actions', + ['boss_menu'] = 'patron', + ['money_generic'] = '$%s', + ['deposit_amount'] = 'montant du dépôt', + ['deposit_society_money'] = 'déposer argent société', + ['do_you_want_to_recruit'] = 'Voulez-vous recruter %s?', + ['employee'] = 'employé', + ['employee_list'] = 'liste des employés', + ['employee_management'] = 'gestion employés', + ['fire'] = 'licencier', + ['grade'] = 'grade', + ['have_deposited'] = 'vous avez déposé ~r~$%s', + ['have_withdrawn'] = 'vous avez retiré $%s', + ['invalid_amount'] = 'montant invalide', + ['invalid_value'] = 'valeur invalide', + ['invalid_value_nochanges']= 'valeur invalide, aucun changements appliqués', + ['invalid_amount_max'] = 'ce salaire est non réglementaire', + ['no'] = 'non', + ['promote'] = 'promouvoir', + ['promote_employee'] = 'promouvoir %s', + ['recruit'] = 'recruter', + ['recruiting'] = 'recrutement', + ['salary_amount'] = 'montant du salaire', + ['salary_management'] = 'gestion salaires', + ['wash_money'] = 'blanchir argent', + ['wash_money_amount'] = 'montant à blanchir', + ['withdraw_amount'] = 'montant du retrait', + ['withdraw_society_money'] = 'retirer argent société', + ['yes'] = 'oui', + ['you_have'] = 'vous avez $%s en attente de ~r~blanchiement (24h).', + ['you_have_laundered'] = 'vous avez ~r~blanchi votre argent : $%s', + ['you_have_hired'] = 'Vous avez recruté %s', + ['you_have_been_hired'] = 'Vous avez été recruté dans la société %s', + ['you_have_fired'] = 'Vous avez viré %s', + ['you_have_been_fired'] = 'Vous avez été viré de la société %s', + ['you_have_promoted'] = 'Vous avez promu %s en tant que %s', + ['you_have_been_promoted'] = 'Vous avez été promu', +} diff --git a/[esx_addons]/esx_society/locales/hu.lua b/[esx_addons]/esx_society/locales/hu.lua new file mode 100644 index 00000000..2721c9cd --- /dev/null +++ b/[esx_addons]/esx_society/locales/hu.lua @@ -0,0 +1,43 @@ +Locales['hu'] = { + ['actions'] = 'Cselekvések', + ['boss_menu'] = 'Fönök Menü', + ['money_generic'] = '%s $', + ['deposit_amount'] = 'Frakcio pénz berakása', + ['deposit_society_money'] = 'Frakcio pénz berakása', + ['do_you_want_to_recruit'] = 'Felszeretnéd venni %s?', + ['employee'] = 'Munkavállalo', + ['employee_list'] = 'Munkavállalok Listája', + ['employee_management'] = 'Munkavállalok Kezelése', + ['fire'] = 'Kirugás', + ['grade'] = 'Fokozat', + ['have_deposited'] = 'Sikeresen beraktál ~r~%s $', + ['have_withdrawn'] = 'Sikeresen kivettél %s $', + ['check_balance'] = 'egyenleg ~g~%s$', + ['invalid_amount'] = 'Érvénytelen mennyiség', + ['invalid_amount_max'] = 'Ez az összeg több mint a megengedett', + ['invalid_value'] = 'érvénytelen érték', + ['invalid_value_nochanges']= 'érvénytelen érték, nem történt változtatás', + ['no'] = 'Nem', + ['promote'] = 'Elöléptetés', + ['promote_employee'] = 'Elöléptetés %s', + ['recruit'] = 'Felvétel', + ['recruiting'] = 'Felvétel', + ['salary_amount'] = 'Fizetés', + ['salary_management'] = 'Fizetések kezelése', + ['grade_management'] = 'Rangok nevének kezelése', + ['grade_label'] = 'Rang név', + ['check_society_balance'] = 'Egyenleg megtekintése', + ['wash_money'] = 'Pénz mosás', + ['wash_money_amount'] = 'Piszkos pénz mennyiség', + ['withdraw_amount'] = 'Pénz mennyiség', + ['withdraw_society_money'] = 'Frakcio pénz kivétele', + ['yes'] = 'Igen', + ['you_have'] = '%s$ várakozik a pénzmosásra (24h).', + ['you_have_laundered'] = '~r~Kimostál ennyi pénzt: %s$', + ['you_have_hired'] = 'Sikeresen felvetted %s', + ['you_have_been_hired'] = 'Sikeresen fel lettél véve %s', + ['you_have_fired'] = 'Sikeresen kirugtad %s', + ['you_have_been_fired'] = 'Ki lettél rugva innen: %s', + ['you_have_promoted'] = 'Elöléptettek: %s rang: %s', + ['you_have_been_promoted'] = 'Sikeresen elöléptettek!', +} diff --git a/[esx_addons]/esx_society/locales/it.lua b/[esx_addons]/esx_society/locales/it.lua new file mode 100644 index 00000000..eec8905a --- /dev/null +++ b/[esx_addons]/esx_society/locales/it.lua @@ -0,0 +1,39 @@ +Locales['it'] = { + ['actions'] = 'azioni', + ['boss_menu'] = 'boss menu', + ['money_generic'] = '$%s', + ['deposit_amount'] = 'importo del deposito', + ['deposit_society_money'] = 'depositare i soldi della società', + ['do_you_want_to_recruit'] = 'vuoi assumere %s?', + ['employee'] = 'dipendente', + ['employee_list'] = 'lista dipendenti', + ['employee_management'] = 'gestione dipendenti', + ['fire'] = 'licenzia', + ['grade'] = 'grado', + ['have_deposited'] = 'hai depositato ~r~$%s', + ['have_withdrawn'] = 'hai prelevato $%s', + ['invalid_amount'] = 'importo non valido', + ['invalid_amount_max'] = 'quel salario non è consentito', + ['invalid_value'] = 'valore non valido', + ['invalid_value_nochanges']= 'valore non valido, nessuna modifica applicata', + ['no'] = 'no', + ['promote'] = 'promuovi', + ['promote_employee'] = 'promuovere il dipendente %s', + ['recruit'] = 'reclutare', + ['recruiting'] = 'reclutamento', + ['salary_amount'] = 'importo dello stipendio', + ['salary_management'] = 'gestione stipendi', + ['wash_money'] = 'ricicla denaro', + ['wash_money_amount'] = 'importo da riciclare', + ['withdraw_amount'] = 'ritira importo', + ['withdraw_society_money'] = 'ritira i soldi dalla società', + ['yes'] = 'si', + ['you_have'] = 'hai $%s in attesa di riciclaggio (24h).', + ['you_have_laundered'] = 'hai ~r~riciclato i tuoi soldi: $%s', + ['you_have_hired'] = 'hai assunto %s', + ['you_have_been_hired'] = 'sei stato assunto da %s', + ['you_have_fired'] = 'hai licenziato %s', + ['you_have_been_fired'] = 'sei stato licenziato da %s', + ['you_have_promoted'] = 'hai promosso %s come %s', + ['you_have_been_promoted'] = 'hai avuto una promozione!', +} diff --git a/[esx_addons]/esx_society/locales/nl.lua b/[esx_addons]/esx_society/locales/nl.lua new file mode 100644 index 00000000..451b3a08 --- /dev/null +++ b/[esx_addons]/esx_society/locales/nl.lua @@ -0,0 +1,40 @@ +Locales['nl'] = { + ['actions'] = 'acties', + ['boss_menu'] = 'baas menu', + ['money_generic'] = '€%s', + ['deposit_amount'] = 'stort hoeveelheid', + ['deposit_society_money'] = 'stort maatschappij geld', + ['do_you_want_to_recruit'] = 'Wil je %s aannemen?', + ['employee'] = 'werknemer', + ['employee_list'] = 'werknemer lijst', + ['employee_management'] = 'werknemer beheer', + ['fire'] = 'ontslaan', + ['grade'] = 'schaal', + ['have_deposited'] = 'je hebt gestort ~r~$%s', + ['have_withdrawn'] = 'je hebt opgenomen $%s', + ['invalid_amount'] = 'ongeldige hoeveelheid', + ['invalid_amount_max'] = 'dit salaris is niet toegestaan', + ['invalid_value'] = 'invalid value', + ['invalid_value_nochanges']= 'invalid value, no changes applied', + ['no'] = 'nee', + ['promote'] = 'promoveer', + ['promote_employee'] = 'promoveer %s', + ['recruit'] = 'werv', + ['recruiting'] = 'werven', + ['salary_amount'] = 'salaris hoeveelheid', + ['salary_management'] = 'salaris beheer', + ['wash_money'] = 'witwas geld', + ['wash_money_amount'] = 'hoeveelheid om wit te wassen', + ['withdraw_amount'] = 'opneem hoeveelheid', + ['withdraw_society_money'] = 'neem maatschappelijk geld op', + ['yes'] = 'ja', + ['you_have'] = 'je hebt €%s staan in geld witwassen (24h).', + ['you_have_laundered'] = 'je hebt je geld: €%s ~r~witgewassen ', + ['you_have_hired'] = 'je bent gevraagt %s', + ['you_have_been_hired'] = 'je bent aangenomen door %s', + ['you_have_fired'] = 'je bent ontslagen %s', + ['you_have_been_fired'] = 'je bent ondslagen van %s', + ['you_have_promoted'] = 'je hebt gepromoveerd %s naar %s', + ['you_have_been_promoted'] = 'je bent gepromoveerd!', +} + diff --git a/[esx_addons]/esx_society/locales/pl.lua b/[esx_addons]/esx_society/locales/pl.lua new file mode 100644 index 00000000..7317d7a4 --- /dev/null +++ b/[esx_addons]/esx_society/locales/pl.lua @@ -0,0 +1,39 @@ +Locales['pl'] = { + ['actions'] = 'akcje', + ['boss_menu'] = 'boss menu', + ['money_generic'] = '$%s', + ['deposit_amount'] = 'ilość depozytu', + ['deposit_society_money'] = 'zdeponuj społeczne pieniądze', + ['do_you_want_to_recruit'] = 'czy chcesz zrekrutować %s?', + ['employee'] = 'pracownik', + ['employee_list'] = 'lista pracowników', + ['employee_management'] = 'zarządzanie pracownikami', + ['fire'] = 'zwolnij', + ['grade'] = 'stopień', + ['have_deposited'] = 'zdeponowałeś ~r~$%s', + ['have_withdrawn'] = 'wypłaciłeś $%s', + ['invalid_amount'] = 'nieprawidłowa wartość', + ['invalid_amount_max'] = 'that salary is not allowed', + ['invalid_value'] = 'invalid value', + ['invalid_value_nochanges']= 'invalid value, no changes applied', + ['no'] = 'nie', + ['promote'] = 'awansuj', + ['promote_employee'] = 'awansuj %s', + ['recruit'] = 'zrekrutuj', + ['recruiting'] = 'rekrutacja', + ['salary_amount'] = 'wartość wynagrodzenia', + ['salary_management'] = 'zarządzaj wynagrodzeniem', + ['wash_money'] = 'wypierz pieniądze', + ['wash_money_amount'] = 'wartość do wyprania', + ['withdraw_amount'] = 'wartość wypłaty', + ['withdraw_society_money'] = 'wypłać społeczne pieniądze', + ['yes'] = 'tak', + ['you_have'] = 'masz %s$ czekanie w pralni pieniędzmi (24h).', + ['you_have_laundered'] = '~r~Wyprałeś twoje pieniądze: $%s', + ['you_have_hired'] = 'zatrudniłeś %s', + ['you_have_been_hired'] = 'zostałeś zatrudniony przez %s', + ['you_have_fired'] = 'zwolniłeś %s', + ['you_have_been_fired'] = 'zostałeś zwolniony %s', + ['you_have_promoted'] = 'awansowałeś %s na %s', + ['you_have_been_promoted'] = 'zostałeś awansowany', +} diff --git a/[esx_addons]/esx_society/locales/si.lua b/[esx_addons]/esx_society/locales/si.lua new file mode 100644 index 00000000..cc87a3cb --- /dev/null +++ b/[esx_addons]/esx_society/locales/si.lua @@ -0,0 +1,39 @@ +Locales['si'] = { + ['actions'] = 'actions', + ['boss_menu'] = 'meni šefa', + ['money_generic'] = '$%s', + ['deposit_amount'] = 'znesek depozita', + ['deposit_society_money'] = 'denar za depozit družbe', + ['do_you_want_to_recruit'] = "ali želite zaposliti %s?", + ['employee'] = 'zaposleni', + ['employee_list'] = 'seznam zaposlenih', + ['employee_management'] = 'upravljanje zaposlenih', + ['fire'] = 'ogenj', + ['grade'] = 'razred', + ['have_deposited'] = 'deponirali ste ~r~$%s', + ['have_withdrawn'] = 'umaknili ste $%s', + ['invalid_amount'] = 'neveljaven znesek', + ['invalid_amount_max'] = 'ta plača ni dovoljena', + ['invalid_value'] = 'invalid value', + ['invalid_value_nochanges']= 'invalid value, no changes applied', + ['no'] = 'ne', + ['promote'] = 'spodbujam', + ['promote_employee'] = 'promoviraj %s', + ['recruit'] = 'zaposli', + ["recruiting"] = "recruiting", + ["salary_amount"] = "znesek plače", + ['salary_management'] = 'upravljanje plač', + ['wash_money'] = 'pranje denarja', + ['wash_money_amount'] = 'znesek za pranje', + ['withdraw_amount'] = 'znesek za izplačilo', + ['withdraw_society_money'] = 'umakni denar iz družbe', + ['yes'] = 'da', + ['you_have'] = 'imaš $%s, ki čaka v money laundering (24h).', + ['you_have_laundered'] = 'imaš ~r~laundered svoj denar: $%s', + ['you_have_hired'] = 'zaposlil si %s', + ['you_have_been_hired'] = 'najel vas je %s', + ['you_have_fired'] = 'odpustili ste %s', + ['you_have_been_fired'] = 'ste bili odpuščeni iz %s', + ['you_have_promoted'] = 'napredovali ste %s kot %s', + ['you_have_been_promoted'] = 'bil si promoviran!', +} diff --git a/[esx_addons]/esx_society/locales/sv.lua b/[esx_addons]/esx_society/locales/sv.lua new file mode 100644 index 00000000..85a1987b --- /dev/null +++ b/[esx_addons]/esx_society/locales/sv.lua @@ -0,0 +1,39 @@ +Locales['sv'] = { + ['actions'] = 'handlingar', + ['boss_menu'] = 'chefmeny', + ['money_generic'] = '%s SEK', + ['deposit_amount'] = 'insättningsbelopp', + ['deposit_society_money'] = 'insätt samhälls pengar', + ['do_you_want_to_recruit'] = 'vill du anställa %s?', + ['employee'] = 'anställd', + ['employee_list'] = 'anställningslista', + ['employee_management'] = 'medarbetarhantering', + ['fire'] = 'sparka', + ['grade'] = 'grade', + ['have_deposited'] = 'du har satt in ~r~%s SEK', + ['have_withdrawn'] = 'du har tagit ut %s SEK', + ['invalid_amount'] = 'ogiltigt belopp', + ['invalid_amount_max'] = 'den lönen är inte tillåten', + ['invalid_value'] = 'invalid value', + ['invalid_value_nochanges']= 'invalid value, no changes applied', + ['no'] = 'nej', + ['promote'] = 'befodra', + ['promote_employee'] = 'befodra %s', + ['recruit'] = 'rekrytera', + ['recruiting'] = 'rekrytering', + ['salary_amount'] = 'lön belopp', + ['salary_management'] = 'lönhantering', + ['wash_money'] = 'tvätta pengar', + ['wash_money_amount'] = 'belopp att tvätta', + ['withdraw_amount'] = 'Ta ut summan', + ['withdraw_society_money'] = 'ta ut samhällspengar', + ['yes'] = 'ja', + ['you_have'] = 'du har %s SEK som väntar på pengartvätt (24h).', + ['you_have_laundered'] = 'du har ~r~tvättat dina pengar: %s SEK', + ['you_have_hired'] = 'du har anställt %s', + ['you_have_been_hired'] = 'du har blivit anställd utav %s', + ['you_have_fired'] = 'du har ~r~sparkat %s', + ['you_have_been_fired'] = 'du har blivit ~r~sparkad utav %s', + ['you_have_promoted'] = 'du har befodrat %s till %s', + ['you_have_been_promoted'] = 'du har blivit befodrad', +} diff --git a/[esx_addons]/esx_society/locales/tr.lua b/[esx_addons]/esx_society/locales/tr.lua new file mode 100644 index 00000000..a2e790fd --- /dev/null +++ b/[esx_addons]/esx_society/locales/tr.lua @@ -0,0 +1,39 @@ +Locales['tr'] = { + ['actions'] = 'eylemler', + ['boss_menu'] = 'patron menüsü', + ['money_generic'] = '%s TL', + ['deposit_amount'] = 'yatırılacak miktar', + ['deposit_society_money'] = 'şirkete para yatır', + ['do_you_want_to_recruit'] = '%s adlı kişiyi işe almak istiyor musun?', + ['employee'] = 'işçi', + ['employee_list'] = 'işçi listesi', + ['employee_management'] = 'işçi yönetimi', + ['fire'] = 'kov', + ['grade'] = 'kıdem ver', + ['have_deposited'] = '~r~%s lira yatırdın', + ['have_withdrawn'] = '$%s lira çektin', + ['invalid_amount'] = 'miktar hatalı', + ['invalid_amount_max'] = 'bu maaşa izin verilmiyor', + ['invalid_value'] = 'invalid value', + ['invalid_value_nochanges']= 'invalid value, no changes applied', + ['no'] = 'hayır', + ['promote'] = 'yükseltme', + ['promote_employee'] = 'yükselt %s', + ['recruit'] = 'işe al', + ['recruiting'] = 'işe alım', + ['salary_amount'] = 'maaş miktarı', + ['salary_management'] = 'maaş yönetimi', + ['wash_money'] = 'para akla', + ['wash_money_amount'] = 'aklanacak miktar', + ['withdraw_amount'] = 'çekilecek miktar', + ['withdraw_society_money'] = 'çekilecek şirket parası', + ['yes'] = 'evet', + ['you_have'] = '%s Lira para zaten aklanmayı bekliyor (24s).', + ['you_have_laundered'] = '%s Lira para ~r~akladın', + ['you_have_hired'] = '%s adlı kişiyi işe aldın', + ['you_have_been_hired'] = '%s tarafından işe alındın', + ['you_have_fired'] = '%s adlı kişi kovuldu', + ['you_have_been_fired'] = '%s tarafından kovuldun', + ['you_have_promoted'] = '%s olan kıdemin, %s yükseltildi', + ['you_have_been_promoted'] = 'Kıdem aldın!', +} diff --git a/[esx_addons]/esx_society/server/main.lua b/[esx_addons]/esx_society/server/main.lua new file mode 100644 index 00000000..90d3ccf8 --- /dev/null +++ b/[esx_addons]/esx_society/server/main.lua @@ -0,0 +1,431 @@ +local Jobs = setmetatable({}, {__index = function(_, key) + return ESX.GetJobs()[key] +end +}) +local RegisteredSocieties = {} +local SocietiesByName = {} + +function GetSociety(name) + return SocietiesByName[name] +end +exports("GetSociety", GetSociety) + +function registerSociety(name, label, account, datastore, inventory, data) + if SocietiesByName[name] then + print(('[^3WARNING^7] society already registered, name: ^5%s^7'):format(name)) + return + end + + local society = { + name = name, + label = label, + account = account, + datastore = datastore, + inventory = inventory, + data = data + } + + SocietiesByName[name] = society + table.insert(RegisteredSocieties, society) +end +AddEventHandler('esx_society:registerSociety', registerSociety) +exports("registerSociety", registerSociety) + +AddEventHandler('esx_society:getSocieties', function(cb) + cb(RegisteredSocieties) +end) + +AddEventHandler('esx_society:getSociety', function(name, cb) + cb(GetSociety(name)) +end) + +RegisterServerEvent('esx_society:checkSocietyBalance') +AddEventHandler('esx_society:checkSocietyBalance', function(society) + local xPlayer = ESX.GetPlayerFromId(source) + local society = GetSociety(society) + + if xPlayer.job.name ~= society.name then + print(('esx_society: %s attempted to call checkSocietyBalance!'):format(xPlayer.identifier)) + return + end + + TriggerEvent('esx_addonaccount:getSharedAccount', society.account, function(account) + TriggerClientEvent("esx:showNotification", xPlayer.source, TranslateCap('check_balance', ESX.Math.GroupDigits(account.money))) + end) +end) + +RegisterServerEvent('esx_society:withdrawMoney') +AddEventHandler('esx_society:withdrawMoney', function(societyName, amount) + local source = source + local society = GetSociety(societyName) + if not society then + print(('[^3WARNING^7] Player ^5%s^7 attempted to withdraw from non-existing society - ^5%s^7!'):format(source, societyName)) + return + end + local xPlayer = ESX.GetPlayerFromId(source) + amount = ESX.Math.Round(tonumber(amount)) + if xPlayer.job.name ~= society.name then + return print(('[^3WARNING^7] Player ^5%s^7 attempted to withdraw from society - ^5%s^7!'):format(source, society.name)) + end + + TriggerEvent('esx_addonaccount:getSharedAccount', society.account, function(account) + if amount > 0 and account.money >= amount then + account.removeMoney(amount) + xPlayer.addMoney(amount, "Society Withdraw") + xPlayer.showNotification(TranslateCap('have_withdrawn', ESX.Math.GroupDigits(amount))) + else + xPlayer.showNotification(TranslateCap('invalid_amount')) + end + end) +end) + +RegisterServerEvent('esx_society:depositMoney') +AddEventHandler('esx_society:depositMoney', function(societyName, amount) + local source = source + local xPlayer = ESX.GetPlayerFromId(source) + local society = GetSociety(societyName) + if not society then + print(('[^3WARNING^7] Player ^5%s^7 attempted to deposit to non-existing society - ^5%s^7!'):format(source, societyName)) + return + end + amount = ESX.Math.Round(tonumber(amount)) + + if xPlayer.job.name ~= society.name then + return print(('[^3WARNING^7] Player ^5%s^7 attempted to deposit to society - ^5%s^7!'):format(source, society.name)) + end + if amount > 0 and xPlayer.getMoney() >= amount then + TriggerEvent('esx_addonaccount:getSharedAccount', society.account, function(account) + xPlayer.removeMoney(amount, "Society Deposit") + xPlayer.showNotification(TranslateCap('have_deposited', ESX.Math.GroupDigits(amount))) + account.addMoney(amount) + end) + else + xPlayer.showNotification(TranslateCap('invalid_amount')) + end +end) + +RegisterServerEvent('esx_society:washMoney') +AddEventHandler('esx_society:washMoney', function(society, amount) + local source = source + local xPlayer = ESX.GetPlayerFromId(source) + local account = xPlayer.getAccount('black_money') + amount = ESX.Math.Round(tonumber(amount)) + + if xPlayer.job.name ~= society then + return print(('[^3WARNING^7] Player ^5%s^7 attempted to wash money in society - ^5%s^7!'):format(source, society)) + end + if amount and amount > 0 and account.money >= amount then + xPlayer.removeAccountMoney('black_money', amount, "Washing") + + MySQL.insert('INSERT INTO society_moneywash (identifier, society, amount) VALUES (?, ?, ?)', {xPlayer.identifier, society, amount}, + function(rowsChanged) + xPlayer.showNotification(TranslateCap('you_have', ESX.Math.GroupDigits(amount))) + end) + else + xPlayer.showNotification(TranslateCap('invalid_amount')) + end +end) + +RegisterServerEvent('esx_society:putVehicleInGarage') +AddEventHandler('esx_society:putVehicleInGarage', function(societyName, vehicle) + local source = source + local society = GetSociety(societyName) + if not society then + print(('[^3WARNING^7] Player ^5%s^7 attempted to put vehicle in non-existing society garage - ^5%s^7!'):format(source, societyName)) + return + end + TriggerEvent('esx_datastore:getSharedDataStore', society.datastore, function(store) + local garage = store.get('garage') or {} + table.insert(garage, vehicle) + store.set('garage', garage) + end) +end) + +RegisterServerEvent('esx_society:removeVehicleFromGarage') +AddEventHandler('esx_society:removeVehicleFromGarage', function(societyName, vehicle) + local source = source + local society = GetSociety(societyName) + if not society then + print(('[^3WARNING^7] Player ^5%s^7 attempted to remove vehicle from non-existing society garage - ^5%s^7!'):format(source, societyName)) + return + end + TriggerEvent('esx_datastore:getSharedDataStore', society.datastore, function(store) + local garage = store.get('garage') or {} + + for i=1, #garage, 1 do + if garage[i].plate == vehicle.plate then + table.remove(garage, i) + break + end + end + + store.set('garage', garage) + end) +end) + +ESX.RegisterServerCallback('esx_society:getSocietyMoney', function(source, cb, societyName) + local society = GetSociety(societyName) + if not society then + print(('[^3WARNING^7] Player ^5%s^7 attempted to get money from non-existing society - ^5%s^7!'):format(source, societyName)) + return cb(0) + end + if not society then + return cb(0) + end + TriggerEvent('esx_addonaccount:getSharedAccount', society.account, function(account) + cb(account.money or 0) + end) +end) + +ESX.RegisterServerCallback('esx_society:getEmployees', function(source, cb, society) + local employees = {} + + local xPlayers = ESX.GetExtendedPlayers('job', society) + for i=1, #(xPlayers) do + local xPlayer = xPlayers[i] + + local name = xPlayer.name + if Config.EnableESXIdentity and name == GetPlayerName(xPlayer.source) then + name = xPlayer.get('firstName') .. ' ' .. xPlayer.get('lastName') + end + + table.insert(employees, { + name = name, + identifier = xPlayer.identifier, + job = { + name = society, + label = xPlayer.job.label, + grade = xPlayer.job.grade, + grade_name = xPlayer.job.grade_name, + grade_label = xPlayer.job.grade_label + } + }) + end + + local query = "SELECT identifier, job_grade FROM `users` WHERE `job`= ? ORDER BY job_grade DESC" + + if Config.EnableESXIdentity then + query = "SELECT identifier, job_grade, firstname, lastname FROM `users` WHERE `job`= ? ORDER BY job_grade DESC" + end + + MySQL.query(query, {society}, + function(result) + for k, row in pairs(result) do + local alreadyInTable + local identifier = row.identifier + + for k, v in pairs(employees) do + if v.identifier == identifier then + alreadyInTable = true + end + end + + if not alreadyInTable then + local name = "Name not found." -- maybe this should be a locale instead ¯\_(ツ)_/¯ + + if Config.EnableESXIdentity then + name = row.firstname .. ' ' .. row.lastname + end + + table.insert(employees, { + name = name, + identifier = identifier, + job = { + name = society, + label = Jobs[society].label, + grade = row.job_grade, + grade_name = Jobs[society].grades[tostring(row.job_grade)].name, + grade_label = Jobs[society].grades[tostring(row.job_grade)].label + } + }) + end + end + + cb(employees) + end) + +end) + +ESX.RegisterServerCallback('esx_society:getJob', function(source, cb, society) + if not Jobs[society] then + return cb(false) + end + + local job = json.decode(json.encode(Jobs[society])) + local grades = {} + + for k,v in pairs(job.grades) do + table.insert(grades, v) + end + + table.sort(grades, function(a, b) + return a.grade < b.grade + end) + + job.grades = grades + + cb(job) +end) + +ESX.RegisterServerCallback('esx_society:setJob', function(source, cb, identifier, job, grade, actionType) + local xPlayer = ESX.GetPlayerFromId(source) + local isBoss = xPlayer.job.grade_name == 'boss' + local xTarget = ESX.GetPlayerFromIdentifier(identifier) + + if not isBoss then + print(('[^3WARNING^7] Player ^5%s^7 attempted to setJob for Player ^5%s^7!'):format(source, xTarget.source)) + return cb() + end + + if not xTarget then + MySQL.update('UPDATE users SET job = ?, job_grade = ? WHERE identifier = ?', {job, grade, identifier}, + function() + cb() + end) + return + end + + xTarget.setJob(job, grade) + + if actionType == 'hire' then + xTarget.showNotification(TranslateCap('you_have_been_hired', job)) + xPlayer.showNotification(TranslateCap("you_have_hired", xTarget.getName())) + elseif actionType == 'promote' then + xTarget.showNotification(TranslateCap('you_have_been_promoted')) + xPlayer.showNotification(TranslateCap("you_have_promoted", xTarget.getName(), xTarget.getJob().label)) + elseif actionType == 'fire' then + xTarget.showNotification(TranslateCap('you_have_been_fired', xTarget.getJob().label)) + xPlayer.showNotification(TranslateCap("you_have_fired", xTarget.getName())) + end + + cb() +end) + + +ESX.RegisterServerCallback('esx_society:setJobSalary', function(source, cb, job, grade, salary) + local xPlayer = ESX.GetPlayerFromId(source) + + if xPlayer.job.name == job and xPlayer.job.grade_name == 'boss' then + if salary <= Config.MaxSalary then + MySQL.update('UPDATE job_grades SET salary = ? WHERE job_name = ? AND grade = ?', {salary, job, grade}, + function(rowsChanged) + Jobs[job].grades[tostring(grade)].salary = salary + ESX.RefreshJobs() + Wait(1) + local xPlayers = ESX.GetExtendedPlayers('job', job) + for _, xTarget in pairs(xPlayers) do + + if xTarget.job.grade == grade then + xTarget.setJob(job, grade) + end + end + cb() + end) + else + print(('[^3WARNING^7] Player ^5%s^7 attempted to setJobSalary over the config limit for ^5%s^7!'):format(source, job)) + cb() + end + else + print(('[^3WARNING^7] Player ^5%s^7 attempted to setJobSalary for ^5%s^7!'):format(source, job)) + cb() + end +end) + +ESX.RegisterServerCallback('esx_society:setJobLabel', function(source, cb, job, grade, label) + local xPlayer = ESX.GetPlayerFromId(source) + + if xPlayer.job.name == job and xPlayer.job.grade_name == 'boss' then + MySQL.update('UPDATE job_grades SET label = ? WHERE job_name = ? AND grade = ?', {label, job, grade}, + function(rowsChanged) + Jobs[job].grades[tostring(grade)].label = label + ESX.RefreshJobs() + Wait(1) + local xPlayers = ESX.GetExtendedPlayers('job', job) + for _, xTarget in pairs(xPlayers) do + + if xTarget.job.grade == grade then + xTarget.setJob(job, grade) + end + end + cb() + end) + else + print(('[^3WARNING^7] Player ^5%s^7 attempted to setJobLabel for ^5%s^7!'):format(source, job)) + cb() + end +end) + +local getOnlinePlayers, onlinePlayers = false, {} +ESX.RegisterServerCallback('esx_society:getOnlinePlayers', function(source, cb) + if getOnlinePlayers == false and next(onlinePlayers) == nil then -- Prevent multiple xPlayer loops from running in quick succession + getOnlinePlayers, onlinePlayers = true, {} + + local xPlayers = ESX.GetExtendedPlayers() + for i=1, #(xPlayers) do + local xPlayer = xPlayers[i] + table.insert(onlinePlayers, { + source = xPlayer.source, + identifier = xPlayer.identifier, + name = xPlayer.name, + job = xPlayer.job + }) + end + cb(onlinePlayers) + getOnlinePlayers = false + Wait(1000) -- For the next second any extra requests will receive the cached list + onlinePlayers = {} + return + end + while getOnlinePlayers do Wait(0) end -- Wait for the xPlayer loop to finish + cb(onlinePlayers) +end) + +ESX.RegisterServerCallback('esx_society:getVehiclesInGarage', function(source, cb, societyName) + local society = GetSociety(societyName) + if not society then + print(('[^3WARNING^7] Attempting To get a non-existing society - %s!'):format(societyName)) + return + end + TriggerEvent('esx_datastore:getSharedDataStore', society.datastore, function(store) + local garage = store.get('garage') or {} + cb(garage) + end) +end) + +ESX.RegisterServerCallback('esx_society:isBoss', function(source, cb, job) + cb(isPlayerBoss(source, job)) +end) + +function isPlayerBoss(playerId, job) + local xPlayer = ESX.GetPlayerFromId(playerId) + + if xPlayer.job.name == job and xPlayer.job.grade_name == 'boss' then + return true + else + print(('esx_society: %s attempted open a society boss menu!'):format(xPlayer.identifier)) + return false + end +end + +function WashMoneyCRON(d, h, m) + MySQL.query('SELECT * FROM society_moneywash', function(result) + for i=1, #result, 1 do + local society = GetSociety(result[i].society) + local xPlayer = ESX.GetPlayerFromIdentifier(result[i].identifier) + + -- add society money + TriggerEvent('esx_addonaccount:getSharedAccount', society.account, function(account) + account.addMoney(result[i].amount) + end) + + -- send notification if player is online + if xPlayer then + xPlayer.showNotification(TranslateCap('you_have_laundered', ESX.Math.GroupDigits(result[i].amount))) + end + + end + MySQL.update('DELETE FROM society_moneywash') + end) +end + +TriggerEvent('cron:runAt', 3, 0, WashMoneyCRON) diff --git a/[esx_addons]/esx_status/.editorconfig b/[esx_addons]/esx_status/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_status/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_status/LICENSE b/[esx_addons]/esx_status/LICENSE new file mode 100644 index 00000000..94ab435b --- /dev/null +++ b/[esx_addons]/esx_status/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_status + Copyright (C) 2015-2023 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 . + +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_status Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_status/README.md b/[esx_addons]/esx_status/README.md new file mode 100644 index 00000000..b678dc87 --- /dev/null +++ b/[esx_addons]/esx_status/README.md @@ -0,0 +1,37 @@ +# esx_status +ESX Status +[INSTALLATION] + +1) CD in your resources/[esx] folder +2) Clone the repository +``` +git clone https://github.com/ESX-Org/esx_status esx_status +``` +3) Import esx_status.sql in your database +4) Add this in your server.cfg : + +``` +start esx_status +``` + +[HOWTO] + +server.lua +```lua + +local name = 'hunger' +local default = 1000000 +local color = '#CFAD0F' + +TriggerEvent('esx_status:registerStatus', name, default, color, + function(status) -- Visible calllback, if it return true the status will be visible + return true + end, + function(status) -- Tick callback, what to do at each tick + status.remove(200) + end, + {remove = 200} -- Client action (add / remove) so the client can be in sync with server +) + + +``` diff --git a/[esx_addons]/esx_status/client/classes/status.lua b/[esx_addons]/esx_status/client/classes/status.lua new file mode 100644 index 00000000..15c86441 --- /dev/null +++ b/[esx_addons]/esx_status/client/classes/status.lua @@ -0,0 +1,50 @@ +function CreateStatus(name, default, color, visible, tickCallback) + + local self = {} + + self.val = default + self.name = name + self.default = default + self.color = color + self.visible = visible + self.tickCallback = tickCallback + + function self._set(k, v) + self[k] = v + end + + function self._get(k) + return self[k] + end + + function self.onTick() + self.tickCallback(self) + end + + function self.set(val) + self.val = val + end + + function self.add(val) + if self.val + val > Config.StatusMax then + self.val = Config.StatusMax + else + self.val = self.val + val + end + end + + function self.remove(val) + if self.val - val < 0 then + self.val = 0 + else + self.val = self.val - val + end + end + + function self.getPercent() + return (self.val / Config.StatusMax) * 100 + end + + return self + +end diff --git a/[esx_addons]/esx_status/client/main.lua b/[esx_addons]/esx_status/client/main.lua new file mode 100644 index 00000000..eca67d34 --- /dev/null +++ b/[esx_addons]/esx_status/client/main.lua @@ -0,0 +1,192 @@ +local Status, isPaused = {}, false + +function GetStatusData(minimal) + local status = {} + + for i=1, #Status, 1 do + if minimal then + table.insert(status, { + name = Status[i].name, + val = Status[i].val, + percent = (Status[i].val / Config.StatusMax) * 100 + }) + else + table.insert(status, { + name = Status[i].name, + val = Status[i].val, + color = Status[i].color, + visible = Status[i].visible(Status[i]), + percent = (Status[i].val / Config.StatusMax) * 100 + }) + end + end + + return status +end + +AddEventHandler('esx_status:registerStatus', function(name, default, color, visible, tickCallback) + local status = CreateStatus(name, default, color, visible, tickCallback) + table.insert(Status, status) +end) + +AddEventHandler('esx_status:unregisterStatus', function(name) + for k,v in ipairs(Status) do + if v.name == name then + table.remove(Status, k) + break + end + end +end) + +RegisterNetEvent('esx:onPlayerLogout') +AddEventHandler('esx:onPlayerLogout', function() + ESX.PlayerLoaded = false + Status = {} + if Config.Display then + SendNUIMessage({ + update = true, + status = Status + }) + end +end) + +RegisterNetEvent('esx_status:load') +AddEventHandler('esx_status:load', function(status) + ESX.PlayerLoaded = true + TriggerEvent('esx_status:loaded') + for i=1, #Status, 1 do + for j=1, #status, 1 do + if Status[i].name == status[j].name then + Status[i].set(status[j].val) + end + end + end + + if Config.Display then TriggerEvent('esx_status:setDisplay', 0.5) end + + CreateThread(function() + local data = {} + while ESX.PlayerLoaded do + for i=1, #Status do + Status[i].onTick() + table.insert(data, { + name = Status[i].name, + val = Status[i].val, + percent = (Status[i].val / 1000000) * 100 + }) + end + + if Config.Display then + local fullData = data + for i=1, #data, 1 do + fullData[i].color = Status[i].color + fullData[i].visible = Status[i].visible(Status[i]) + end + SendNUIMessage({ + update = true, + status = fullData + }) + end + + TriggerEvent('esx_status:onTick', data) + table.wipe(data) + Wait(Config.TickTime) + end + end) +end) + +RegisterNetEvent('esx_status:set') +AddEventHandler('esx_status:set', function(name, val) + for i=1, #Status, 1 do + if Status[i].name == name then + Status[i].set(val) + break + end + end + if Config.Display then + SendNUIMessage({ + update = true, + status = GetStatusData() + }) + end +end) + +RegisterNetEvent('esx_status:add') +AddEventHandler('esx_status:add', function(name, val) + for i=1, #Status, 1 do + if Status[i].name == name then + Status[i].add(val) + break + end + end + if Config.Display then + SendNUIMessage({ + update = true, + status = GetStatusData() + }) + end +end) + +RegisterNetEvent('esx_status:remove') +AddEventHandler('esx_status:remove', function(name, val) + for i=1, #Status, 1 do + if Status[i].name == name then + Status[i].remove(val) + break + end + end + if Config.Display then + SendNUIMessage({ + update = true, + status = GetStatusData() + }) + end +end) + +AddEventHandler('esx_status:getStatus', function(name, cb) + for i=1, #Status, 1 do + if Status[i].name == name then + cb(Status[i]) + return + end + end +end) + +AddEventHandler('esx_status:setDisplay', function(val) + SendNUIMessage({ + setDisplay = true, + display = val + }) +end) + +-- Pause menu disable hud display +if Config.Display then + CreateThread(function() + while true do + Wait(300) + + if IsPauseMenuActive() and not isPaused then + isPaused = true + TriggerEvent('esx_status:setDisplay', 0.0) + elseif not IsPauseMenuActive() and isPaused then + isPaused = false + TriggerEvent('esx_status:setDisplay', 0.5) + end + end + end) +end + +-- Loading screen off event +AddEventHandler('esx:loadingScreenOff', function() + if not isPaused then + TriggerEvent('esx_status:setDisplay', 0.3) + end +end) + +-- Update server +CreateThread(function() + while true do + Wait(Config.UpdateInterval) + if ESX.PlayerLoaded then TriggerServerEvent('esx_status:update', GetStatusData(true)) end + end +end) diff --git a/[esx_addons]/esx_status/config.lua b/[esx_addons]/esx_status/config.lua new file mode 100644 index 00000000..4120ac64 --- /dev/null +++ b/[esx_addons]/esx_status/config.lua @@ -0,0 +1,6 @@ +Config = {} + +Config.StatusMax = 1000000 +Config.TickTime = 1000 +Config.UpdateInterval = 30000 +Config.Display = false -- Enable the esx_status bars (disable if you are using another HUD) diff --git a/[esx_addons]/esx_status/esx_status.sql b/[esx_addons]/esx_status/esx_status.sql new file mode 100644 index 00000000..597c0d7b --- /dev/null +++ b/[esx_addons]/esx_status/esx_status.sql @@ -0,0 +1,3 @@ + + +ALTER TABLE `users` ADD COLUMN `status` LONGTEXT NULL; diff --git a/[esx_addons]/esx_status/fxmanifest.lua b/[esx_addons]/esx_status/fxmanifest.lua new file mode 100644 index 00000000..b74f3d60 --- /dev/null +++ b/[esx_addons]/esx_status/fxmanifest.lua @@ -0,0 +1,33 @@ +fx_version 'adamant' + +game 'gta5' + +description 'ESX Status' + +version '1.9.0' + +lua54 'yes' + +shared_script '@es_extended/imports.lua' + +server_scripts { + '@oxmysql/lib/MySQL.lua', + 'config.lua', + 'server/main.lua' +} + +client_scripts { + 'config.lua', + 'client/classes/status.lua', + 'client/main.lua' +} + +ui_page 'html/ui.html' + +files { + 'html/ui.html', + 'html/css/app.css', + 'html/scripts/app.js' +} + +dependency 'es_extended' diff --git a/[esx_addons]/esx_status/html/css/app.css b/[esx_addons]/esx_status/html/css/app.css new file mode 100644 index 00000000..8b2aacf5 --- /dev/null +++ b/[esx_addons]/esx_status/html/css/app.css @@ -0,0 +1,20 @@ +#status_list { + position: absolute; + left : 23; + bottom : 21%; + width : 14.5%; + opacity: 0.0; +} + +.status { + padding: 1px; + margin: 0.3em; +} + +.status_inner { + padding: 1px; +} + +.status_val { + height : 0.5em; +} \ No newline at end of file diff --git a/[esx_addons]/esx_status/html/scripts/app.js b/[esx_addons]/esx_status/html/scripts/app.js new file mode 100644 index 00000000..a5a53575 --- /dev/null +++ b/[esx_addons]/esx_status/html/scripts/app.js @@ -0,0 +1,59 @@ +(function () { + let status = []; + + let renderStatus = function () { + + $('#status_list').html(''); + + for (let i = 0; i < status.length; i++) { + + if (!status[i].visible) { + continue; + } + + let statusDiv = $( + '
' + + '
' + + '
' + + '
' + + '
'); + + statusDiv.find('.status_inner') + .css({ 'border': '1px solid ' + status[i].color }) + ; + + statusDiv.find('.status_val') + .css({ + 'background-color': status[i].color, + 'width': (status[i].percent) + '%' + }) + ; + + $('#status_list').append(statusDiv); + } + + }; + + window.onData = function (data) { + if (data.update) { + status.length = 0; + + for (let i = 0; i < data.status.length; i++) { + status.push(data.status[i]); + } + + renderStatus(); + } + + if (data.setDisplay) { + $('#status_list').css({ 'opacity': data.display }); + } + }; + + window.onload = function (e) { + window.addEventListener('message', function (event) { + onData(event.data); + }); + }; + +})(); diff --git a/[esx_addons]/esx_status/html/ui.html b/[esx_addons]/esx_status/html/ui.html new file mode 100644 index 00000000..300c6ec2 --- /dev/null +++ b/[esx_addons]/esx_status/html/ui.html @@ -0,0 +1,16 @@ + + + + + + + + + +
+ + + + + + \ No newline at end of file diff --git a/[esx_addons]/esx_status/server/classes/status.lua b/[esx_addons]/esx_status/server/classes/status.lua new file mode 100644 index 00000000..0ec74da9 --- /dev/null +++ b/[esx_addons]/esx_status/server/classes/status.lua @@ -0,0 +1,56 @@ +function CreateStatus(xPlayer, name, default, color, visible, tickCallback, clientAction) + + local self = {} + + self.val = default + self.xPlayer = xPlayer + self.name = name + self.default = default + self.color = color + self.visible = visible + self.tickCallback = tickCallback + self.clientAction = clientAction + + function self._set(k, v) + self[k] = v + end + + function self._get(k) + return self[k] + end + + function self.onTick() + self.tickCallback(self) + end + + function self.set(val) + self.val = val + end + + function self.add(val) + if self.val + val > Config.StatusMax then + self.val = Config.StatusMax + else + self.val = self.val + val + end + end + + function self.remove(val) + if self.val - val < 0 then + self.val = 0 + else + self.val = self.val - val + end + end + + function self.getPercent() + return (self.val / Config.StatusMax) * 100 + end + + function self.updateClient() + TriggerEvent('esx_status:updateClient', self.xPlayer.source) + end + + return self + +end diff --git a/[esx_addons]/esx_status/server/main.lua b/[esx_addons]/esx_status/server/main.lua new file mode 100644 index 00000000..0b8f582d --- /dev/null +++ b/[esx_addons]/esx_status/server/main.lua @@ -0,0 +1,67 @@ +local function setPlayerStatus(xPlayer, data) + data = data and json.decode(data) or {} + + xPlayer.set('status', data) + ESX.Players[xPlayer.source] = data + TriggerClientEvent('esx_status:load', xPlayer.source, data) +end + +AddEventHandler('onResourceStart', function(resourceName) + if (GetCurrentResourceName() ~= resourceName) then + return + end + + for _, xPlayer in pairs(ESX.Players) do + MySQL.scalar('SELECT status FROM users WHERE identifier = ?', { xPlayer.identifier }, function(result) + setPlayerStatus(xPlayer, result) + end) + end +end) + +AddEventHandler('esx:playerLoaded', function(playerId, xPlayer) + MySQL.scalar('SELECT status FROM users WHERE identifier = ?', { xPlayer.identifier }, function(result) + setPlayerStatus(xPlayer, result) + end) +end) + +AddEventHandler('esx:playerDropped', function(playerId, reason) + local xPlayer = ESX.GetPlayerFromId(playerId) + local status = ESX.Players[xPlayer.source] + + MySQL.update('UPDATE users SET status = ? WHERE identifier = ?', { json.encode(status), xPlayer.identifier }) + ESX.Players[xPlayer.source] = nil +end) + +AddEventHandler('esx_status:getStatus', function(playerId, statusName, cb) + local status = ESX.Players[playerId] + for i = 1, #status do + if status[i].name == statusName then + return cb(status[i]) + end + end +end) + +RegisterServerEvent('esx_status:update') +AddEventHandler('esx_status:update', function(status) + local xPlayer = ESX.GetPlayerFromId(source) + if xPlayer then + xPlayer.set('status', status) -- save to xPlayer for compatibility + ESX.Players[xPlayer.source] = status -- save locally for performance + end +end) + +CreateThread(function() + while true do + Wait(10 * 60 * 1000) + local parameters = {} + for _, xPlayer in pairs(ESX.GetExtendedPlayers()) do + local status = ESX.Players[xPlayer.source] + if status and next(status) then + parameters[#parameters+1] = {json.encode(status), xPlayer.identifier} + end + end + if #parameters > 0 then + MySQL.prepare('UPDATE users SET status = ? WHERE identifier = ?', parameters) + end + end +end) diff --git a/[esx_addons]/esx_taxijob/.editorconfig b/[esx_addons]/esx_taxijob/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_taxijob/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_taxijob/LICENSE b/[esx_addons]/esx_taxijob/LICENSE new file mode 100644 index 00000000..fc21cd6d --- /dev/null +++ b/[esx_addons]/esx_taxijob/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_taxijob + Copyright (C) 2015-2023 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 . + +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_taxijob Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_taxijob/README.md b/[esx_addons]/esx_taxijob/README.md new file mode 100644 index 00000000..5dd6555f --- /dev/null +++ b/[esx_addons]/esx_taxijob/README.md @@ -0,0 +1,15 @@ +

[ESX] Taxi Job

Discord - Website - Documentation + +This Resource allows you to drive a fancy Taxi to pickup players , charge them per mile or do Life-Like NPC missions to earn money! + +# Legal + +esx_taxijob: Taxi Service - Anyone Need a Taxi?! + +Copyright (C) 2015-2023 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/. diff --git a/[esx_addons]/esx_taxijob/client/main.lua b/[esx_addons]/esx_taxijob/client/main.lua new file mode 100644 index 00000000..fb0c5c2a --- /dev/null +++ b/[esx_addons]/esx_taxijob/client/main.lua @@ -0,0 +1,700 @@ +local HasAlreadyEnteredMarker, OnJob, IsNearCustomer, CustomerIsEnteringVehicle, CustomerEnteredVehicle, + CurrentActionData = false, false, false, false, false, {} +local CurrentCustomer, CurrentCustomerBlip, DestinationBlip, targetCoords, LastZone, CurrentAction, CurrentActionMsg + +RegisterNetEvent('esx:playerLoaded') +AddEventHandler('esx:playerLoaded', function(xPlayer) + ESX.PlayerData = xPlayer + ESX.PlayerLoaded = true +end) + +RegisterNetEvent('esx:onPlayerLogout') +AddEventHandler('esx:onPlayerLogout', function() + ESX.PlayerLoaded = false + ESX.PlayerData = {} +end) + +RegisterNetEvent('esx:setJob') +AddEventHandler('esx:setJob', function(job) + ESX.PlayerData.job = job +end) + +function DrawSub(msg, time) + ClearPrints() + BeginTextCommandPrint('STRING') + AddTextComponentSubstringPlayerName(msg) + EndTextCommandPrint(time, 1) +end + +function ShowLoadingPromt(msg, time, type) + CreateThread(function() + Wait(0) + + BeginTextCommandBusyspinnerOn('STRING') + AddTextComponentSubstringPlayerName(msg) + EndTextCommandBusyspinnerOn(type) + Wait(time) + + BusyspinnerOff() + end) +end + +function GetRandomWalkingNPC() + local search = {} + local peds = GetGamePool("CPed") + + for i = 1, #peds, 1 do + if IsPedHuman(peds[i]) and IsPedWalking(peds[i]) and not IsPedAPlayer(peds[i]) then + search[#search+1] = peds[i] + end + end + + if #search > 0 then + return search[math.random(#search)] + end +end + +function ClearCurrentMission() + if DoesBlipExist(CurrentCustomerBlip) then + RemoveBlip(CurrentCustomerBlip) + end + + if DoesBlipExist(DestinationBlip) then + RemoveBlip(DestinationBlip) + end + + CurrentCustomer = nil + CurrentCustomerBlip = nil + DestinationBlip = nil + IsNearCustomer = false + CustomerIsEnteringVehicle = false + CustomerEnteredVehicle = false + targetCoords = nil +end + +function StartTaxiJob() + ShowLoadingPromt(TranslateCap('taking_service'), 5000, 3) + ClearCurrentMission() + + OnJob = true +end + +function StopTaxiJob() + local playerPed = PlayerPedId() + + if IsPedInAnyVehicle(playerPed, false) and CurrentCustomer ~= nil then + local vehicle = GetVehiclePedIsIn(playerPed, false) + TaskLeaveVehicle(CurrentCustomer, vehicle, 0) + + if CustomerEnteredVehicle then + TaskGoStraightToCoord(CurrentCustomer, targetCoords.x, targetCoords.y, targetCoords.z, 1.0, -1, 0.0, 0.0) + end + end + + ClearCurrentMission() + OnJob = false + DrawSub(TranslateCap('mission_complete'), 5000) +end + +function OpenCloakroom() + local elements = { + {unselectable = true, icon = "fas fa-shirt", title = TranslateCap('cloakroom_menu')}, + {icon = "fas fa-shirt", title = TranslateCap('wear_citizen'), value = "wear_citizen"}, + {icon = "fas fa-shirt", title = TranslateCap('wear_work'), value = "wear_work"}, + } + + ESX.OpenContext("right", elements, function(menu,element) + if element.value == "wear_citizen" then + ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin) + TriggerEvent('skinchanger:loadSkin', skin) + end) + elseif element.value == "wear_work" then + ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin, jobSkin) + if skin.sex == 0 then + TriggerEvent('skinchanger:loadClothes', skin, jobSkin.skin_male) + else + TriggerEvent('skinchanger:loadClothes', skin, jobSkin.skin_female) + end + end) + end + end, function(menu) + CurrentAction = 'cloakroom' + CurrentActionMsg = TranslateCap('cloakroom_prompt') + CurrentActionData = {} + end) +end + +function OpenVehicleSpawnerMenu() + local elements = { + {unselectable = true, icon = "fas fa-car", title = TranslateCap('spawn_veh')} + } + + if Config.EnableSocietyOwnedVehicles then + ESX.TriggerServerCallback('esx_society:getVehiclesInGarage', function(vehicles) + + for i = 1, #vehicles, 1 do + elements[#elements+1] = { + icon = "fas fa-car", + title = GetDisplayNameFromVehicleModel(vehicles[i].model) .. ' [' .. vehicles[i].plate .. ']', + value = vehicles[i] + } + end + + ESX.OpenContext("right", elements, function(menu,element) + if not ESX.Game.IsSpawnPointClear(Config.Zones.VehicleSpawnPoint.Pos, 5.0) then + ESX.ShowNotification(TranslateCap('spawnpoint_blocked')) + return + end + + local vehicleProps = element.value + ESX.TriggerServerCallback("esx_taxijob:SpawnVehicle", function() + return + end, vehicleProps.model, vehicleProps) + TriggerServerEvent('esx_society:removeVehicleFromGarage', 'taxi', vehicleProps) + end, function(menu) + CurrentAction = 'vehicle_spawner' + CurrentActionMsg = TranslateCap('spawner_prompt') + CurrentActionData = {} + end) + end, 'taxi') + else -- not society vehicles + ESX.OpenContext("right", Config.AuthorizedVehicles, function(menu,element) + if not ESX.Game.IsSpawnPointClear(Config.Zones.VehicleSpawnPoint.Pos, 5.0) then + ESX.ShowNotification(TranslateCap('spawnpoint_blocked')) + return + end + ESX.TriggerServerCallback("esx_taxijob:SpawnVehicle", function() + ESX.ShowNotification(TranslateCap('vehicle_spawned'), "success") + end, "taxi", {plate = "TAXI JOB"}) + end, function(menu) + CurrentAction = 'vehicle_spawner' + CurrentActionMsg = TranslateCap('spawner_prompt') + CurrentActionData = {} + end) + end +end + +function DeleteJobVehicle() + local playerPed = PlayerPedId() + + if Config.EnableSocietyOwnedVehicles then + local vehicleProps = ESX.Game.GetVehicleProperties(CurrentActionData.vehicle) + TriggerServerEvent('esx_society:putVehicleInGarage', 'taxi', vehicleProps) + ESX.Game.DeleteVehicle(CurrentActionData.vehicle) + else + if IsInAuthorizedVehicle() then + ESX.Game.DeleteVehicle(CurrentActionData.vehicle) + + if Config.MaxInService ~= -1 then + TriggerServerEvent('esx_service:disableService', 'taxi') + end + else + ESX.ShowNotification(TranslateCap('only_taxi')) + end + end +end + +function OpenTaxiActionsMenu() + local elements = { + {unselectable = true, icon = "fas fa-taxi", title = TranslateCap('taxi')}, + {icon = "fas fa-box",title = TranslateCap('deposit_stock'),value = 'put_stock'}, + {icon = "fas fa-box", title = TranslateCap('take_stock'), value = 'get_stock'} + } + + if Config.EnablePlayerManagement and ESX.PlayerData.job ~= nil and ESX.PlayerData.job.grade_name == 'boss' then + elements[#elements+1] = { + icon = "fas fa-wallet", + title = TranslateCap('boss_actions'), + value = "boss_actions" + } + end + + ESX.OpenContext("right", elements, function(menu,element) + if Config.OxInventory and (element.value == 'put_stock' or element.value == 'get_stock') then + exports.ox_inventory:openInventory('stash', 'society_taxi') + return ESX.CloseContext() + elseif element.value == 'put_stock' then + OpenPutStocksMenu() + elseif element.value == 'get_stock' then + OpenGetStocksMenu() + elseif element.value == 'boss_actions' then + TriggerEvent('esx_society:openBossMenu', 'taxi', function(data, menu) + menu.close() + end) + end + end, function(menu) + CurrentAction = 'taxi_actions_menu' + CurrentActionMsg = TranslateCap('press_to_open') + CurrentActionData = {} + end) +end + +function OpenMobileTaxiActionsMenu() + local elements = { + {unselectable = true, icon = "fas fa-taxi", title = TranslateCap('taxi')}, + {icon = "fas fa-scroll", title = TranslateCap('billing'), value = "billing"}, + {icon = "fas fa-taxi", title = TranslateCap('start_job'), value = "start_job"}, + } + + ESX.OpenContext("right", elements, function(menu,element) + if element.value == "billing" then + local elements2 = { + {unselectable = true, icon = "fas fa-taxi", title = element.title}, + {title = "Amount", input = true, inputType = "number", inputMin = 1, inputMax = 250000, inputPlaceholder = "Amount to bill.."}, + {icon = "fas fa-check-double", title = "Confirm", value = "confirm"} + } + + ESX.OpenContext("right", elements2, function(menu2,element2) + local amount = tonumber(menu2.eles[2].inputValue) + if amount == nil then + ESX.ShowNotification(TranslateCap('amount_invalid')) + else + ESX.CloseContext() + local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer() + if closestPlayer == -1 or closestDistance > 3.0 then + ESX.ShowNotification(TranslateCap('no_players_near')) + else + TriggerServerEvent('esx_billing:sendBill', GetPlayerServerId(closestPlayer), 'society_taxi', + 'Taxi', amount) + ESX.ShowNotification(TranslateCap('billing_sent')) + end + end + end) + elseif element.value == "start_job" then + if OnJob then + ESX.CloseContext() + StopTaxiJob() + else + if ESX.PlayerData.job ~= nil and ESX.PlayerData.job.name == 'taxi' then + local playerPed = PlayerPedId() + local vehicle = GetVehiclePedIsIn(playerPed, false) + + if IsPedInAnyVehicle(playerPed, false) and GetPedInVehicleSeat(vehicle, -1) == playerPed then + if tonumber(ESX.PlayerData.job.grade) >= 3 then + ESX.CloseContext() + StartTaxiJob() + else + if IsInAuthorizedVehicle() then + ESX.CloseContext() + StartTaxiJob() + else + ESX.ShowNotification(TranslateCap('must_in_taxi')) + end + end + else + if tonumber(ESX.PlayerData.job.grade) >= 3 then + ESX.ShowNotification(TranslateCap('must_in_vehicle')) + else + ESX.ShowNotification(TranslateCap('must_in_taxi')) + end + end + end + end + end + end) +end + +function IsInAuthorizedVehicle() + local playerPed = PlayerPedId() + local vehModel = GetEntityModel(GetVehiclePedIsIn(playerPed, false)) + + for i = 1, #Config.AuthorizedVehicles, 1 do + if vehModel == joaat(Config.AuthorizedVehicles[i].model) then + return true + end + end + + return false +end + +function OpenGetStocksMenu() + ESX.TriggerServerCallback('esx_taxijob:getStockItems', function(items) + local elements = { + {unselectable = true, icon = "fas fa-box", title = TranslateCap('taxi_stock')} + } + + for i = 1, #items, 1 do + elements[#elements+1] = { + icon = "fas fa-box", + title = 'x' .. items[i].count .. ' ' .. items[i].label, + value = items[i].name + } + end + + ESX.OpenContext("right", elements, function(menu,element) + local itemName = element.value + local elements2 = { + {unselectable = true, icon = "fas fa-box", title = element.title}, + {title = "Amount", input = true, inputType = "number", inputMin = 1, inputMax = 100, inputPlaceholder = "Amount to withdraw.."}, + {icon = "fas fa-check-double", title = "Confirm", value = "confirm"} + } + + ESX.OpenContext("right", elements2, function(menu2,element2) + local count = tonumber(menu2.eles[2].inputValue) + + if count == nil then + ESX.ShowNotification(TranslateCap('quantity_invalid')) + else + ESX.CloseContext() + TriggerServerEvent('esx_taxijob:getStockItem', itemName, count) + + Wait(1000) + OpenGetStocksMenu() + end + end) + end) + end, function(menu) + CurrentAction = 'taxi_actions_menu' + CurrentActionMsg = TranslateCap('press_to_open') + CurrentActionData = {} + end) +end + +function OpenPutStocksMenu() + ESX.TriggerServerCallback('esx_taxijob:getPlayerInventory', function(inventory) + local elements = { + {unselectable = true, icon = "fas fa-box", title = TranslateCap('inventory')} + } + + for i = 1, #inventory.items, 1 do + local item = inventory.items[i] + if item.count > 0 then + elements[#elements+1] = { + icon = "fas fa-box", + title = item.label .. ' x' .. item.count, + type = 'item_standard', + value = item.name + } + end + end + + ESX.OpenContext("right", elements, function(menu,element) + local itemName = element.value + + local elements2 = { + {unselectable = true, icon = "fas fa-box", title = element.title}, + {title = "Amount", input = true, inputType = "number", inputMin = 1, inputMax = 100, inputPlaceholder = "Amount to deposit.."}, + {icon = "fas fa-check-double", title = "Confirm", value = "confirm"} + } + + ESX.OpenContext("right", elements2, function(menu2,element2) + local count = tonumber(menu2.eles[2].inputValue) + + if count == nil then + ESX.ShowNotification(TranslateCap('quantity_invalid')) + else + ESX.CloseContext() + -- todo: refresh on callback + TriggerServerEvent('esx_taxijob:putStockItems', itemName, count) + Wait(1000) + OpenPutStocksMenu() + end + end) + end) + end, function(menu) + CurrentAction = 'taxi_actions_menu' + CurrentActionMsg = TranslateCap('press_to_open') + CurrentActionData = {} + end) +end + +AddEventHandler('esx_taxijob:hasEnteredMarker', function(zone) + if zone == 'VehicleSpawner' then + CurrentAction = 'vehicle_spawner' + CurrentActionMsg = TranslateCap('spawner_prompt') + CurrentActionData = {} + elseif zone == 'VehicleDeleter' then + local playerPed = PlayerPedId() + local vehicle = GetVehiclePedIsIn(playerPed, false) + + if IsPedInAnyVehicle(playerPed, false) and GetPedInVehicleSeat(vehicle, -1) == playerPed then + CurrentAction = 'delete_vehicle' + CurrentActionMsg = TranslateCap('store_veh') + CurrentActionData = { + vehicle = vehicle + } + end + elseif zone == 'TaxiActions' then + CurrentAction = 'taxi_actions_menu' + CurrentActionMsg = TranslateCap('press_to_open') + CurrentActionData = {} + + elseif zone == 'Cloakroom' then + CurrentAction = 'cloakroom' + CurrentActionMsg = TranslateCap('cloakroom_prompt') + CurrentActionData = {} + end +end) + +AddEventHandler('esx_taxijob:hasExitedMarker', function(zone) + ESX.CloseContext() + CurrentAction = nil +end) + +-- Create Blips +CreateThread(function() + local blip = AddBlipForCoord(Config.Zones.TaxiActions.Pos.x, Config.Zones.TaxiActions.Pos.y, + Config.Zones.TaxiActions.Pos.z) + + SetBlipSprite(blip, 198) + SetBlipDisplay(blip, 4) + SetBlipScale(blip, 1.0) + SetBlipColour(blip, 5) + SetBlipAsShortRange(blip, true) + + BeginTextCommandSetBlipName('STRING') + AddTextComponentSubstringPlayerName(TranslateCap('blip_taxi')) + EndTextCommandSetBlipName(blip) +end) + +-- Enter / Exit marker events, and draw markers +CreateThread(function() + while true do + local sleep = 1500 + if ESX.PlayerData.job and ESX.PlayerData.job.name == 'taxi' then + + local coords = GetEntityCoords(PlayerPedId()) + local isInMarker, currentZone = false + + for k, v in pairs(Config.Zones) do + local zonePos = vector3(v.Pos.x, v.Pos.y, v.Pos.z) + local distance = #(coords - zonePos) + + if v.Type ~= -1 and distance < Config.DrawDistance then + sleep = 0 + DrawMarker(v.Type, v.Pos.x, v.Pos.y, v.Pos.z, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, v.Size.x, v.Size.y, + v.Size.z, v.Color.r, v.Color.g, v.Color.b, 100, false, false, 2, v.Rotate, nil, nil, false) + end + + if distance < v.Size.x then + isInMarker, currentZone = true, k + end + end + + if (isInMarker and not HasAlreadyEnteredMarker) or (isInMarker and LastZone ~= currentZone) then + HasAlreadyEnteredMarker, LastZone = true, currentZone + TriggerEvent('esx_taxijob:hasEnteredMarker', currentZone) + end + + if not isInMarker and HasAlreadyEnteredMarker then + HasAlreadyEnteredMarker = false + TriggerEvent('esx_taxijob:hasExitedMarker', LastZone) + end + end + Wait(sleep) + end +end) + +-- Taxi Job +CreateThread(function() + while true do + local Sleep = 1500 + + if OnJob then + Sleep = 0 + local playerPed = PlayerPedId() + if CurrentCustomer == nil then + DrawSub(TranslateCap('drive_search_pass'), 5000) + + if IsPedInAnyVehicle(playerPed, false) and OnJob then + Wait(5000) + CurrentCustomer = GetRandomWalkingNPC() + + if CurrentCustomer ~= nil then + CurrentCustomerBlip = AddBlipForEntity(CurrentCustomer) + + SetBlipAsFriendly(CurrentCustomerBlip, true) + SetBlipColour(CurrentCustomerBlip, 2) + SetBlipCategory(CurrentCustomerBlip, 3) + SetBlipRoute(CurrentCustomerBlip, true) + + SetEntityAsMissionEntity(CurrentCustomer, true, false) + ClearPedTasksImmediately(CurrentCustomer) + SetBlockingOfNonTemporaryEvents(CurrentCustomer, true) + + local standTime = GetRandomIntInRange(60000, 180000) + TaskStandStill(CurrentCustomer, standTime) + + ESX.ShowNotification(TranslateCap('customer_found')) + end + end + else + if IsPedFatallyInjured(CurrentCustomer) then + ESX.ShowNotification(TranslateCap('client_unconcious')) + + if DoesBlipExist(CurrentCustomerBlip) then + RemoveBlip(CurrentCustomerBlip) + end + + if DoesBlipExist(DestinationBlip) then + RemoveBlip(DestinationBlip) + end + + SetEntityAsMissionEntity(CurrentCustomer, false, true) + + CurrentCustomer, CurrentCustomerBlip, DestinationBlip, IsNearCustomer, CustomerIsEnteringVehicle, CustomerEnteredVehicle, targetCoords = + nil, nil, nil, false, false, false, nil + end + + if IsPedInAnyVehicle(playerPed, false) then + local vehicle = GetVehiclePedIsIn(playerPed, false) + local playerCoords = GetEntityCoords(playerPed) + local customerCoords = GetEntityCoords(CurrentCustomer) + local customerDistance = #(playerCoords - customerCoords) + + if IsPedSittingInVehicle(CurrentCustomer, vehicle) then + if CustomerEnteredVehicle then + local targetDistance = #(playerCoords - targetCoords) + + if targetDistance <= 10.0 then + TaskLeaveVehicle(CurrentCustomer, vehicle, 0) + + ESX.ShowNotification(TranslateCap('arrive_dest')) + + TaskGoStraightToCoord(CurrentCustomer, targetCoords.x, targetCoords.y, targetCoords.z, + 1.0, -1, 0.0, 0.0) + SetEntityAsMissionEntity(CurrentCustomer, false, true) + TriggerServerEvent('esx_taxijob:success') + RemoveBlip(DestinationBlip) + + local function scope(customer) + ESX.SetTimeout(60000, function() + DeletePed(customer) + end) + end + + scope(CurrentCustomer) + + CurrentCustomer, CurrentCustomerBlip, DestinationBlip, IsNearCustomer, CustomerIsEnteringVehicle, CustomerEnteredVehicle, targetCoords = + nil, nil, nil, false, false, false, nil + end + + if targetCoords then + DrawMarker(36, targetCoords.x, targetCoords.y, targetCoords.z + 1.1, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 1.0, 1.0, 1.0, 234, 223, 72, 155, false, false, 2, true, nil, nil, false) + end + else + RemoveBlip(CurrentCustomerBlip) + CurrentCustomerBlip = nil + targetCoords = Config.JobLocations[GetRandomIntInRange(1, #Config.JobLocations)] + local distance = #(playerCoords - targetCoords) + while distance < Config.MinimumDistance do + Wait(0) + + targetCoords = Config.JobLocations[GetRandomIntInRange(1, #Config.JobLocations)] + distance = #(playerCoords - targetCoords) + end + + local street = table.pack(GetStreetNameAtCoord(targetCoords.x, targetCoords.y, + targetCoords.z)) + local msg = nil + + if street[2] ~= 0 and street[2] ~= nil then + msg = string.format(TranslateCap('take_me_to_near', GetStreetNameFromHashKey(street[1]), + GetStreetNameFromHashKey(street[2]))) + else + msg = string.format(TranslateCap('take_me_to', GetStreetNameFromHashKey(street[1]))) + end + + ESX.ShowNotification(msg) + + DestinationBlip = AddBlipForCoord(targetCoords.x, targetCoords.y, targetCoords.z) + + BeginTextCommandSetBlipName('STRING') + AddTextComponentSubstringPlayerName('Destination') + EndTextCommandSetBlipName(DestinationBlip) + SetBlipRoute(DestinationBlip, true) + + CustomerEnteredVehicle = true + end + else + DrawMarker(36, customerCoords.x, customerCoords.y, customerCoords.z + 1.1, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 1.0, 1.0, 1.0, 234, 223, 72, 155, false, false, 2, true, nil, nil, false) + + if not CustomerEnteredVehicle then + if customerDistance <= 40.0 then + + if not IsNearCustomer then + ESX.ShowNotification(TranslateCap('close_to_client')) + IsNearCustomer = true + end + + end + + if customerDistance <= 20.0 then + if not CustomerIsEnteringVehicle then + ClearPedTasksImmediately(CurrentCustomer) + + local maxSeats, freeSeat = GetVehicleMaxNumberOfPassengers(vehicle) + + for i = maxSeats - 1, 0, -1 do + if IsVehicleSeatFree(vehicle, i) then + freeSeat = i + break + end + end + + if freeSeat then + TaskEnterVehicle(CurrentCustomer, vehicle, -1, freeSeat, 2.0, 0) + CustomerIsEnteringVehicle = true + end + end + end + end + end + else + DrawSub(TranslateCap('return_to_veh'), 5000) + end + end + end + Wait(Sleep) + end +end) + +CreateThread(function() + while OnJob do + Wait(10000) + if ESX.PlayerData.job ~= nil and ESX.PlayerData.job.grade < 3 then + if not IsInAuthorizedVehicle() then + ClearCurrentMission() + OnJob = false + ESX.ShowNotification(TranslateCap('not_in_taxi')) + end + end + end +end) + +-- Key Controls +CreateThread(function() + while true do + local sleep = 1500 + if CurrentAction and not ESX.PlayerData.dead then + sleep = 0 + ESX.ShowHelpNotification(CurrentActionMsg) + + if IsControlJustReleased(0, 38) and ESX.PlayerData.job and ESX.PlayerData.job.name == 'taxi' then + if CurrentAction == 'taxi_actions_menu' then + OpenTaxiActionsMenu() + elseif CurrentAction == 'cloakroom' then + OpenCloakroom() + elseif CurrentAction == 'vehicle_spawner' then + OpenVehicleSpawnerMenu() + elseif CurrentAction == 'delete_vehicle' then + DeleteJobVehicle() + end + + CurrentAction = nil + end + end + Wait(sleep) + end +end) + +RegisterCommand('taximenu', function() + if not ESX.PlayerData.dead and Config.EnablePlayerManagement and ESX.PlayerData.job and ESX.PlayerData.job.name == + 'taxi' then + OpenMobileTaxiActionsMenu() + end +end, false) + +RegisterKeyMapping('taximenu', 'Open Taxi Menu', 'keyboard', 'f6') diff --git a/[esx_addons]/esx_taxijob/config.lua b/[esx_addons]/esx_taxijob/config.lua new file mode 100644 index 00000000..0e2b8af6 --- /dev/null +++ b/[esx_addons]/esx_taxijob/config.lua @@ -0,0 +1,151 @@ +Config = {} + +Config.DrawDistance = 10.0 -- How close do you need to be for the markers to be drawn (in GTA units). + +Config.NPCJobEarnings = {min = 300, max = 600} +Config.MinimumDistance = 3000 -- Minimum NPC job destination distance from the pickup in GTA units, a higher number prevents nearby destionations. + +Config.MaxInService = -1 -- How much people can be in service at once? +Config.EnablePlayerManagement = true -- Enable society managing. +Config.EnableSocietyOwnedVehicles = false + +Config.Locale = GetConvar('esx:locale', 'en') + +Config.OxInventory = ESX.GetConfig().OxInventory + +Config.AuthorizedVehicles = { + {model = 'taxi', label = 'Taxi'} +} + +Config.Zones = { + + VehicleSpawner = { + Pos = {x = 915.039, y = -162.187, z = 74.5}, + Size = {x = 1.0, y = 1.0, z = 1.0}, + Color = {r = 204, g = 204, b = 0}, + Type = 36, Rotate = true + }, + + VehicleSpawnPoint = { + Pos = {x = 911.108, y = -177.867, z = 74.283}, + Size = {x = 1.5, y = 1.5, z = 1.0}, + Type = -1, Rotate = false, + Heading = 225.0 + }, + + VehicleDeleter = { + Pos = {x = 908.317, y = -183.070, z = 73.201}, + Size = {x = 3.0, y = 3.0, z = 0.25}, + Color = {r = 255, g = 0, b = 0}, + Type = 1, Rotate = false + }, + + TaxiActions = { + Pos = {x = 903.32, y = -170.55, z = 74.0}, + Size = {x = 1.0, y = 1.0, z = 1.0}, + Color = {r = 204, g = 204, b = 0}, + Type = 20, Rotate = true + }, + + Cloakroom = { + Pos = {x = 894.88, y = -180.23, z = 74.5}, + Size = {x = 1.0, y = 1.0, z = 1.0}, + Color = {r = 204, g = 204, b = 0}, + Type = 21, Rotate = true + } +} + +Config.JobLocations = { + vector3(293.5, -590.2, 42.7), + vector3(253.4, -375.9, 44.1), + vector3(120.8, -300.4, 45.1), + vector3(-38.4, -381.6, 38.3), + vector3(-107.4, -614.4, 35.7), + vector3(-252.3, -856.5, 30.6), + vector3(-236.1, -988.4, 28.8), + vector3(-277.0, -1061.2, 25.7), + vector3(-576.5, -999.0, 21.8), + vector3(-602.8, -952.6, 21.6), + vector3(-790.7, -961.9, 14.9), + vector3(-912.6, -864.8, 15.0), + vector3(-1069.8, -792.5, 18.8), + vector3(-1306.9, -854.1, 15.1), + vector3(-1468.5, -681.4, 26.2), + vector3(-1380.9, -452.7, 34.1), + vector3(-1326.3, -394.8, 36.1), + vector3(-1383.7, -270.0, 42.5), + vector3(-1679.6, -457.3, 39.4), + vector3(-1812.5, -416.9, 43.7), + vector3(-2043.6, -268.3, 23.0), + vector3(-2186.4, -421.6, 12.7), + vector3(-1862.1, -586.5, 11.2), + vector3(-1859.5, -617.6, 10.9), + vector3(-1635.0, -988.3, 12.6), + vector3(-1284.0, -1154.2, 5.3), + vector3(-1126.5, -1338.1, 4.6), + vector3(-867.9, -1159.7, 5.0), + vector3(-847.5, -1141.4, 6.3), + vector3(-722.6, -1144.6, 10.2), + vector3(-575.5, -318.4, 34.5), + vector3(-592.3, -224.9, 36.1), + vector3(-559.6, -162.9, 37.8), + vector3(-535.0, -65.7, 40.6), + vector3(-758.2, -36.7, 37.3), + vector3(-1375.9, 21.0, 53.2), + vector3(-1320.3, -128.0, 48.1), + vector3(-1285.7, 294.3, 64.5), + vector3(-1245.7, 386.5, 75.1), + vector3(-760.4, 285.0, 85.1), + vector3(-626.8, 254.1, 81.1), + vector3(-563.6, 268.0, 82.5), + vector3(-486.8, 272.0, 82.8), + vector3(88.3, 250.9, 108.2), + vector3(234.1, 344.7, 105.0), + vector3(435.0, 96.7, 99.2), + vector3(482.6, -142.5, 58.2), + vector3(762.7, -786.5, 25.9), + vector3(809.1, -1290.8, 25.8), + vector3(490.8, -1751.4, 28.1), + vector3(432.4, -1856.1, 27.0), + vector3(164.3, -1734.5, 28.9), + vector3(-57.7, -1501.4, 31.1), + vector3(52.2, -1566.7, 29.0), + vector3(310.2, -1376.8, 31.4), + vector3(182.0, -1332.8, 28.9), + vector3(-74.6, -1100.6, 25.7), + vector3(-887.0, -2187.5, 8.1), + vector3(-749.6, -2296.6, 12.5), + vector3(-1064.8, -2560.7, 19.7), + vector3(-1033.4, -2730.2, 19.7), + vector3(-1018.7, -2732.0, 13.3), + vector3(797.4, -174.4, 72.7), + vector3(508.2, -117.9, 60.8), + vector3(159.5, -27.6, 67.4), + vector3(-36.4, -106.9, 57.0), + vector3(-355.8, -270.4, 33.0), + vector3(-831.2, -76.9, 37.3), + vector3(-1038.7, -214.6, 37.0), + vector3(1918.4, 3691.4, 32.3), + vector3(1820.2, 3697.1, 33.5), + vector3(1619.3, 3827.2, 34.5), + vector3(1418.6, 3602.2, 34.5), + vector3(1944.9, 3856.3, 31.7), + vector3(2285.3, 3839.4, 34.0), + vector3(2760.9, 3387.8, 55.7), + vector3(1952.8, 2627.7, 45.4), + vector3(1051.4, 474.8, 93.7), + vector3(866.4, 17.6, 78.7), + vector3(319.0, 167.4, 103.3), + vector3(88.8, 254.1, 108.2), + vector3(-44.9, 70.4, 72.4), + vector3(-115.5, 84.3, 70.8), + vector3(-384.8, 226.9, 83.5), + vector3(-578.7, 139.1, 61.3), + vector3(-651.3, -584.9, 34.1), + vector3(-571.8, -1195.6, 17.9), + vector3(-1513.3, -670.0, 28.4), + vector3(-1297.5, -654.9, 26.1), + vector3(-1645.5, 144.6, 61.7), + vector3(-1160.6, 744.4, 154.6), + vector3(-798.1, 831.7, 204.4) +} diff --git a/[esx_addons]/esx_taxijob/esx_taxijob.sql b/[esx_addons]/esx_taxijob/esx_taxijob.sql new file mode 100644 index 00000000..0774bc9d --- /dev/null +++ b/[esx_addons]/esx_taxijob/esx_taxijob.sql @@ -0,0 +1,25 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_taxi', 'Taxi', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_taxi', 'Taxi', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_taxi', 'Taxi', 1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('taxi', 'Taxi') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('taxi',0,'recrue','Recrue',12,'{"hair_2":0,"hair_color_2":0,"torso_1":32,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":0,"age_2":0,"glasses_2":0,"ears_2":0,"arms":27,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',1,'novice','Novice',24,'{"hair_2":0,"hair_color_2":0,"torso_1":32,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":0,"age_2":0,"glasses_2":0,"ears_2":0,"arms":27,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',2,'experimente','Experimente',36,'{"hair_2":0,"hair_color_2":0,"torso_1":26,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":57,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":11,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',3,'uber','Uber',48,'{"hair_2":0,"hair_color_2":0,"torso_1":26,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":57,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":11,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',4,'boss','Patron',0,'{"hair_2":0,"hair_color_2":0,"torso_1":29,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":1,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":4,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}') +; diff --git a/[esx_addons]/esx_taxijob/fxmanifest.lua b/[esx_addons]/esx_taxijob/fxmanifest.lua new file mode 100644 index 00000000..bc2408b8 --- /dev/null +++ b/[esx_addons]/esx_taxijob/fxmanifest.lua @@ -0,0 +1,28 @@ +fx_version 'adamant' + +game 'gta5' + +description 'ESX Taxi Job' +lua54 'yes' +version '1.9.0' + +shared_script '@es_extended/imports.lua' + +client_scripts { + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'client/main.lua' +} + +server_scripts { + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'server/main.lua' +} + +dependencies { + 'es_extended', + 'esx_society' +} diff --git a/[esx_addons]/esx_taxijob/locales/br.lua b/[esx_addons]/esx_taxijob/locales/br.lua new file mode 100644 index 00000000..7a2a5fd4 --- /dev/null +++ b/[esx_addons]/esx_taxijob/locales/br.lua @@ -0,0 +1,51 @@ +Locales['br'] = { + -- cloakroom + ['cloakroom_menu'] = 'guarda-roupa', + ['cloakroom_prompt'] = 'pressione [E] para abrir o cloakroom.', + ['wear_citizen'] = 'roupa de cidadão', + ['wear_work'] = 'roupa de taxista', + + -- garage + ['spawner_prompt'] = 'pressione [E] para abrir a garage.', + ['store_veh'] = 'pressione [E] para guardar o veículo', + ['spawn_veh'] = 'pegar veículo', + ['spawnpoint_blocked'] = 'existe um veículo bloqueando o ponto de spawn!', + ['only_taxi'] = 'você só pode guardar taxis.', + + ['taking_service'] = 'pegando serviço: Taxi/Uber', + ['full_service'] = 'serviço completo: ', + ['amount_invalid'] = 'valor inválido', + ['press_to_open'] = 'pressione [E] para acessar o menu', + ['billing'] = 'faturamento', + ['billing_sent'] = 'a fatura foi enviada!', + ['invoice_amount'] = 'valor da fatura', + ['no_players_near'] = 'nenhum jogador nas proximidades', + ['start_job'] = 'iniciar / parar missão', + ['drive_search_pass'] = 'dirigindo em busca de passageiros', + ['customer_found'] = 'você encontrou um passageiro, dirija até o destino', + ['client_unconcious'] = 'seu passageiro está ~r~insconsciente. Procure por outro.', + ['arrive_dest'] = 'você chegou ao seu destino', + ['take_me_to_near'] = 'Leve me para %s, perto %s', + ['take_me_to'] = 'Leve me para %s', + ['close_to_client'] = 'você está perto do passageiro, aproximisse dele', + ['return_to_veh'] = 'volte para o seu veículo para continuar a missão', + ['must_in_taxi'] = 'você deve estar em um táxi para começar a missão', + ['must_in_vehicle'] = 'você deve estar em um veículo para começar a missão', + ['not_in_taxi'] = 'You left the taxi while on mission!', + ['have_earned'] = 'você ganhou $%s', + ['comp_earned'] = '- sua empresa ganhou $%s\n- Você ganhou $%s', + ['deposit_stock'] = 'depositar estoque', + ['take_stock'] = 'retirar estoque', + ['boss_actions'] = 'ações de chefe', + ['mission_complete'] = 'missão completa', + ['quantity'] = 'quantidade', + ['quantity_invalid'] = 'é uma quantidade inválida!', + ['inventory'] = 'inventário', + ['taxi_client'] = 'cliente do taxi', + ['have_withdrawn'] = 'você retirou x%s %s', + ['have_deposited'] = 'você depositou x%s %s', + ['player_cannot_hold'] = 'você não tem espaço suficiente em seu inventário!', + ['blip_taxi'] = 'taxi', + ['taxi'] = 'taxi', + ['taxi_stock'] = 'taxi Stock' +} diff --git a/[esx_addons]/esx_taxijob/locales/de.lua b/[esx_addons]/esx_taxijob/locales/de.lua new file mode 100644 index 00000000..4510c1c6 --- /dev/null +++ b/[esx_addons]/esx_taxijob/locales/de.lua @@ -0,0 +1,51 @@ +Locales['de'] = { + -- cloakroom + ['cloakroom_menu'] = 'Garderobe', + ['cloakroom_prompt'] = 'Drücke [E] um die Garderobe zu öffnen.', + ['wear_citizen'] = 'Bürger Kleidung', + ['wear_work'] = 'Taxi Kleidung', + + -- garage + ['spawner_prompt'] = 'Drücke [E] um die Garage zu öffnen.', + ['store_veh'] = 'Drücke [E] um das Fahrzeug zu parken', + ['spawn_veh'] = 'Fahrzeug spawnen', + ['spawnpoint_blocked'] = 'Ein Fahrzeug blockiert den Spawnpoint!', + ['only_taxi'] = 'Du kannst nur Taxis parken.', + + ['taking_service'] = 'Service annehmen: Taxi/Uber', + ['full_service'] = 'Voller Service: ', + ['amount_invalid'] = 'Betrag ungültig', + ['press_to_open'] = 'Drücke [E] um das Menü zu öffnen', + ['billing'] = 'Rechnung', + ['billing_sent'] = 'Die Rechnung wurde gesendet!', + ['invoice_amount'] = 'Rechnugsbetrag', + ['no_players_near'] = 'Kein Spieler in der Nähe', + ['start_job'] = 'Start/Stopp NPC Aufträge', + ['drive_search_pass'] = 'Auf der Suche nach Passagieren', + ['customer_found'] = 'du hast einen Passagier gefunden , Fahre in zum Ziel', + ['client_unconcious'] = 'dein Passagier ist bewusstlos. Suche nach einem anderen.', + ['arrive_dest'] = 'du bist an deinem Ziel angekommen', + ['take_me_to_near'] = 'Bring mich nach %s, in der Nähe von %s', + ['take_me_to'] = 'Bring mich nach %s', + ['close_to_client'] = 'Du bist nahe an dem Passagier, du musst noch näher ran', + ['return_to_veh'] = 'Bitte kehre zu deinem Fahezeug zurück umd die Mission fortzuführen', + ['must_in_taxi'] = 'Du musst in einem Taxis sein umd die Mission starten zu können', + ['must_in_vehicle'] = 'Du musst in einem Fahrzeug sein um die Mission starten zu können', + ['not_in_taxi'] = 'Du hast das Taxi während der Mission verlassen', + ['have_earned'] = 'Du hast verdient $%s', + ['comp_earned'] = '- Die Firma verdient $\n- Verdient $%s', + ['deposit_stock'] = 'deposit Stock', + ['take_stock'] = 'Bestand nehmen', + ['boss_actions'] = 'Boss aktionen', + ['mission_complete'] = 'Mission abgeschlossen', + ['quantity'] = 'menge', + ['quantity_invalid'] = 'Das ist eine ungültige Menge!', + ['inventory'] = 'inventory', + ['taxi_client'] = 'Taxi Kunde', + ['have_withdrawn'] = 'Du hast entnommen x%s %s', + ['have_deposited'] = 'Du hast eingelagert x%s %s', + ['player_cannot_hold'] = 'Du hast nicht genug Platz im Inventar', + ['blip_taxi'] = 'taxi', + ['taxi'] = 'taxi', + ['taxi_stock'] = 'taxi lagerbestand' +} diff --git a/[esx_addons]/esx_taxijob/locales/en.lua b/[esx_addons]/esx_taxijob/locales/en.lua new file mode 100644 index 00000000..6982f30b --- /dev/null +++ b/[esx_addons]/esx_taxijob/locales/en.lua @@ -0,0 +1,52 @@ +Locales['en'] = { + -- cloakroom + ['cloakroom_menu'] = 'cloakroom', + ['cloakroom_prompt'] = 'press [E] to access the Cloakroom.', + ['wear_citizen'] = 'citizen wear', + ['wear_work'] = 'taxi wear', + + -- garage + ['spawner_prompt'] = 'press [E] to access the Garage.', + ["vehicle_spawned"] = "Successfully Spawned A ~b~Taxi!", + ['store_veh'] = 'press [E] to store the vehicle', + ['spawn_veh'] = 'spawn vehicle', + ['spawnpoint_blocked'] = 'there is a vehicle blocking the spawnpoint!', + ['only_taxi'] = 'you can only store taxis.', + + ['taking_service'] = 'taking service: Taxi/Uber', + ['full_service'] = 'full service: ', + ['amount_invalid'] = 'amount invalid', + ['press_to_open'] = 'press [E] to access the menu', + ['billing'] = 'billing', + ['billing_sent'] = 'the bill has been registered!', + ['invoice_amount'] = 'invoice amount', + ['no_players_near'] = 'no players nearby', + ['start_job'] = 'start / stop driving NPC jobs', + ['drive_search_pass'] = 'driving in search of passengers', + ['customer_found'] = 'you have found a customer, get closer to them', + ['client_unconcious'] = 'your client is ~r~unconscious, look for another one', + ['arrive_dest'] = 'you have arrived at your destination', + ['take_me_to_near'] = 'Take me to %s, near %s', + ['take_me_to'] = 'Take me to %s', + ['close_to_client'] = 'you are too far from the client, get close to them', + ['return_to_veh'] = 'please return to your vehicle to continue the mission', + ['must_in_taxi'] = 'you must be in a taxi to start the mission', + ['must_in_vehicle'] = 'you must be in a vehicle to begin the mission', + ['not_in_taxi'] = 'You left the taxi while on mission!', + ['have_earned'] = 'you have earned $%s', + ['comp_earned'] = '- your company has earned $%s\n- you have earned $%s', + ['deposit_stock'] = 'deposit Stock', + ['take_stock'] = 'take Stock', + ['boss_actions'] = 'boss Actions', + ['mission_complete'] = 'mission Completed', + ['quantity'] = 'quantity', + ['quantity_invalid'] = 'that is an invalid quantity!', + ['inventory'] = 'inventory', + ['taxi_client'] = 'taxi Client', + ['have_withdrawn'] = 'you have withdrawn x%s %s', + ['have_deposited'] = 'you have deposited x%s %s', + ['player_cannot_hold'] = 'you do ~r~not have enough free space in your inventory!', + ['blip_taxi'] = 'downtown Cab Co.', + ['taxi'] = 'taxi', + ['taxi_stock'] = 'taxi Stock' +} diff --git a/[esx_addons]/esx_taxijob/locales/es.lua b/[esx_addons]/esx_taxijob/locales/es.lua new file mode 100644 index 00000000..ff24663c --- /dev/null +++ b/[esx_addons]/esx_taxijob/locales/es.lua @@ -0,0 +1,53 @@ +-- Traducción by: https://github.com/ItsManueh + +Locales['es'] = { + -- cloakroom + ['cloakroom_menu'] = 'Guardarropa', + ['cloakroom_prompt'] = 'Presiona [E] para acceder al Guardarropa.', + ['wear_citizen'] = 'Ropa ciudadana', + ['wear_work'] = 'Ropa de taxista', + + -- garage + ['spawner_prompt'] = 'Presiona [E] para acceder al Garaje.', + ['store_veh'] = 'Presiona [E] para almacenar el vehículo', + ['spawn_veh'] = 'Vehículo de generación', + ['spawnpoint_blocked'] = '¡Hay un vehículo bloqueando el punto de generación!', + ['only_taxi'] = 'Solo puede almacenar taxis.', + + ['taking_service'] = 'Tomando servicio: Taxi / Uber', + ['full_service'] = 'Servicio completo: ', + ['amount_invalid'] = 'Cantidad inválida', + ['press_to_open'] = 'Presiona [E] para acceder al menú', + ['billing'] = 'Facturación', + ['billing_sent'] = '¡La factura ha sido registrada!', + ['invoice_amount'] = 'Factura inválida', + ['no_players_near'] = 'No hay jugadores cerca', + ['start_job'] = 'Iniciar / Detener la conducción de trabajos NPC', + ['drive_search_pass'] = 'Conduciendo en busca de pasajeros', + ['customer_found'] = 'Has encontrado un cliente, acércate a ellos', + ['client_unconcious'] = 'Tu cliente es ~r~inconsciente, busca otro', + ['arrive_dest'] = 'Has llegado al destino correctamente', + ['take_me_to_near'] = 'Llévame a %s, cerca %s', + ['take_me_to'] = 'Llévame a %s', + ['close_to_client'] = 'Estás demasiado lejos del cliente, acércate a él', + ['return_to_veh'] = 'Por favor regrese a su vehículo para continuar la misión', + ['must_in_taxi'] = 'Debes estar en un taxi para comenzar la misión', + ['must_in_vehicle'] = 'Debes estar en un vehículo para comenzar la misión', + ['not_in_taxi'] = '¡Dejaste el taxi mientras estabas en misión!', + ['have_earned'] = 'Usted ha ganado $%s', + ['comp_earned'] = '- Tu empresa se ha ganado $%s\n- usted ha ganado $%s', + ['deposit_stock'] = 'Depositar stock', + ['take_stock'] = 'Coger Stock', + ['boss_actions'] = 'Acciones del jefe', + ['mission_complete'] = 'Misión completada', + ['quantity'] = 'Cantidad', + ['quantity_invalid'] = '¡Esa es una cantidad inválida!', + ['inventory'] = 'Inventario', + ['taxi_client'] = 'Cliente taxi', + ['have_withdrawn'] = 'Has retirado x%s %s', + ['have_deposited'] = 'Has depositado x%s %s', + ['player_cannot_hold'] = '!Tu ~r~no tienes suficiente espacio libre en tu inventario!', + ['blip_taxi'] = 'Downtown Cab Co.', + ['taxi'] = 'Taxi', + ['taxi_stock'] = 'Taxi Stock' +} diff --git a/[esx_addons]/esx_taxijob/locales/fi.lua b/[esx_addons]/esx_taxijob/locales/fi.lua new file mode 100644 index 00000000..01c21ba6 --- /dev/null +++ b/[esx_addons]/esx_taxijob/locales/fi.lua @@ -0,0 +1,51 @@ +Locales['fi'] = { + -- cloakroom + ['cloakroom_menu'] = 'cloakroom', + ['cloakroom_prompt'] = 'press [E] to open the cloakroom.', + ['wear_citizen'] = 'citizen wear', + ['wear_work'] = 'taxi wear', + + -- garage + ['spawner_prompt'] = 'press [E] to open the garage.', + ['store_veh'] = 'paina [E] laittaaksesi auto talliin', + ['spawn_veh'] = 'spawnaa ajoneuvo', + ['spawnpoint_blocked'] = 'there is a vehicle blocking the spawnpoint!', + ['only_taxi'] = 'Voit vain tallettaa taxeja', + + ['taking_service'] = 'Aloitetaan työ: Taxi/Uber', + ['full_service'] = 'täysi palvelu: ', + ['amount_invalid'] = 'virheellinen summa', + ['press_to_open'] = 'paina [E] avataksesi valikko', + ['billing'] = 'Laskutus', + ['billing_sent'] = 'the bill has been registered!', + ['invoice_amount'] = 'laskun määrä', + ['no_players_near'] = 'ei pelaajia lähellä', + ['start_job'] = 'start / stop driving NPC jobs', + ['drive_search_pass'] = 'Ajele ympäriinsä etsi uusia asiakkaita', + ['customer_found'] = 'Sinä löysit asiakkaan, aja lähemmäksi', + ['client_unconcious'] = 'Sinun asiakkaasi on ~r~tajuton. Etsi uusi.', + ['arrive_dest'] = 'Sinä saavuit kohteeseen', + ['take_me_to_near'] = 'Vie minut %s, lähellä %s', + ['take_me_to'] = 'Vie minut %s', + ['close_to_client'] = 'Olet asiakkaan lähellä, mene lähemmäksi', + ['return_to_veh'] = 'Mene takaisin ajoneuvoon, jatkaaksesi töitä', + ['must_in_taxi'] = 'Sinun pitää olla taxissa että voit alottaa työn', + ['must_in_vehicle'] = 'Sinun pitää olla ajoneuvossa että voit alottaa työn', + ['not_in_taxi'] = 'You left the taxi while on mission!', + ['have_earned'] = 'Sinä tienasit €%s', + ['comp_earned'] = '- Yrityksesi tienasi €%s\n- Sinä tienasit €%s', + ['deposit_stock'] = 'Talleta varastoon', + ['take_stock'] = 'ota varastosta', + ['boss_actions'] = 'pomon toiminnot', + ['mission_complete'] = 'tehtävä suoritettu', + ['quantity'] = 'määrä', + ['quantity_invalid'] = 'virheellinen Määrä', + ['inventory'] = 'reppu', + ['taxi_client'] = 'taxi Asiakas', + ['have_withdrawn'] = 'sinä nostit x%s %s', + ['have_deposited'] = 'sinä talletit x%s %s', + ['player_cannot_hold'] = 'sinulla ~r~ei ole enempää vapaata tilaa repussasi!', + ['blip_taxi'] = 'taxi', + ['taxi'] = 'taxi', + ['taxi_stock'] = 'taxi Stock' +} diff --git a/[esx_addons]/esx_taxijob/locales/fr.lua b/[esx_addons]/esx_taxijob/locales/fr.lua new file mode 100644 index 00000000..f331195e --- /dev/null +++ b/[esx_addons]/esx_taxijob/locales/fr.lua @@ -0,0 +1,51 @@ +Locales['fr'] = { + -- cloakroom + ['cloakroom_menu'] = 'vestiaire', + ['cloakroom_prompt'] = 'appuyez sur [E] pour ouvrir le cloakroom.', + ['wear_citizen'] = 'tenue civile', + ['wear_work'] = 'tenue de travail', + + -- garage + ['spawner_prompt'] = 'appuyez sur [E] pour ouvrir le garage.', + ['store_veh'] = 'appuyez sur [E] pour ranger le véhicule', + ['spawn_veh'] = 'sortir véhicule', + ['spawnpoint_blocked'] = 'un véhicule bloque la sortie!!', + ['only_taxi'] = 'vous ne pouvez ranger que les taxi', + + ['taking_service'] = 'prise de service : Taxi/Uber', + ['full_service'] = 'service complet : ', + ['amount_invalid'] = 'montant invalide', + ['press_to_open'] = 'appuyez sur [E] pour accéder au menu', + ['billing'] = 'facuration', + ['billing_sent'] = 'la facture a bien été enregistrée!', + ['invoice_amount'] = 'montant de la facture', + ['no_players_near'] = 'aucun joueur à proximité', + ['start_job'] = 'activer / désactiver les courses PNJ', + ['drive_search_pass'] = 'conduisez à la recherche de passagers', + ['customer_found'] = 'vous avez trouvé un client, conduisez jusqu\'à ce dernier', + ['client_unconcious'] = 'votre client est ~r~inconscient. Cherchez-en un autre.', + ['arrive_dest'] = 'vous êtes arrivé à destination', + ['take_me_to_near'] = 'Emmenez-moi à %s, près de %s', + ['take_me_to'] = 'Emmenez-moi à %s', + ['close_to_client'] = 'vous êtes à proximité du client, approchez-vous de lui', + ['return_to_veh'] = 'veuillez remonter dans votre véhicule pour continuer la mission', + ['must_in_taxi'] = 'vous devez être dans un taxi pour commencer la mission', + ['must_in_vehicle'] = 'vous devez être dans un véhicule pour commencer la mission', + ['not_in_taxi'] = 'Vous avez quitté le taxi pendant une mission!', + ['have_earned'] = 'vous avez gagné $%s', + ['comp_earned'] = '- Votre société a gagné $%s\n- Vous avez gagné $%s', + ['deposit_stock'] = 'Déposer Stock', + ['take_stock'] = 'Prendre Stock', + ['boss_actions'] = 'action Patron', + ['mission_complete'] = 'Mission terminée', + ['quantity'] = 'Quantité', + ['quantity_invalid'] = 'Quantité invalide', + ['inventory'] = 'Inventaire', + ['taxi_client'] = 'client Taxi', + ['have_withdrawn'] = 'vous avez pris x%s %s', + ['have_deposited'] = 'vous avez déposé x%s %s', + ['player_cannot_hold'] = 'vous n\'avez pas assez de place dans votre inventaire!', + ['blip_taxi'] = 'taxi', + ['taxi'] = 'taxi', + ['taxi_stock'] = 'taxi Stock' +} diff --git a/[esx_addons]/esx_taxijob/locales/hu.lua b/[esx_addons]/esx_taxijob/locales/hu.lua new file mode 100644 index 00000000..1efd6a19 --- /dev/null +++ b/[esx_addons]/esx_taxijob/locales/hu.lua @@ -0,0 +1,50 @@ +Locales['hu'] = { + -- cloakroom + ['cloakroom_menu'] = 'öltözö', + ['cloakroom_prompt'] = 'nyomd meg a [E] gombot a megnyitáshoz.', + ['wear_citizen'] = 'civil ruha', + ['wear_work'] = 'taxis munkaruha', + + -- garage + ['spawner_prompt'] = 'nyomd meg a [E] gombot a garázshoz.', + ['store_veh'] = 'nyomd meg a [E] gombot az autó tárolásához', + ['spawn_veh'] = 'autó lehívás', + ['spawnpoint_blocked'] = 'egy autó blokkolja a lehívási helyet!', + ['only_taxi'] = 'Csak taxikat tárolhatsz.', + + ['taking_service'] = 'szolgálat vállalás: Taxi/Uber', + ['full_service'] = 'teljes szolgálat: ', + ['amount_invalid'] = 'érvénytelen összeg', + ['press_to_open'] = 'nyomj [E] gombot a menühöz', + ['billing'] = 'számlázás', + ['billing_sent'] = 'a számlát regisztrálták!', + ['invoice_amount'] = 'számla összeg', + ['no_players_near'] = 'nincs a közeledben játékos', + ['start_job'] = 'indítás / leállítás NPC munkák F6', + ['drive_search_pass'] = 'vezess és keress utasokat', + ['customer_found'] = 'találtál egy fuvart, menj közelebb hozzá', + ['client_unconcious'] = 'a kliensed ~r~tudatlan, nézz egy másik után', + ['arrive_dest'] = 'megérkeztél a cél állomáshoz.', + ['take_me_to_near'] = 'Vigyél engem %s, közel %s', + ['take_me_to'] = 'Vigyél engem %s', + ['close_to_client'] = 'túl messze vagy a kliensedtöl, menj közelebb hozzá', + ['return_to_veh'] = 'ülj vissza a kocsiba hogy folytatni tudd a munkát', + ['must_in_taxi'] = 'egy taxi autóba kell lenned a küldetés indításához', + ['must_in_vehicle'] = 'jármüben kell lenned a küldetés megkezdéséhez', + ['have_earned'] = 'kerestél: $%s', + ['comp_earned'] = '- a vállalkozása keresett: $%s\n- te kerestél: $%s', + ['deposit_stock'] = 'készlet betétele', + ['take_stock'] = 'készlet kivétel', + ['boss_actions'] = 'főnök müveletek', + ['mission_complete'] = 'sikeres küldetés!', + ['quantity'] = 'Mennyiség', + ['quantity_invalid'] = 'érvénytelen összeg!', + ['inventory'] = 'leltár', + ['taxi_client'] = 'taxi ügyfél', + ['have_withdrawn'] = 'kivettél x%s %s', + ['have_deposited'] = 'betettél x%s %s', + ['player_cannot_hold'] = '~r~nincs elég üres helyed a leltárban!', + ['blip_taxi'] = 'Taxitársaság', + ['taxi'] = 'taxi', + ['taxi_stock'] = 'taxi készlet' +} diff --git a/[esx_addons]/esx_taxijob/locales/it.lua b/[esx_addons]/esx_taxijob/locales/it.lua new file mode 100644 index 00000000..c9a3e7f0 --- /dev/null +++ b/[esx_addons]/esx_taxijob/locales/it.lua @@ -0,0 +1,56 @@ +Locales['it'] = { + -- cloakroom + ['cloakroom_menu'] = 'guardaroba', + ['cloakroom_prompt'] = 'premi [E] per accedere al guardaroba.', + ['wear_citizen'] = 'abbigliamento cittadino', + ['wear_work'] = 'abiti da lavoro', + + -- garage + ['spawner_prompt'] = 'premi [E] per accedere al garage.', + ["vehicle_spawned"] = "generato con successo un ~b~Taxi!", + ['store_veh'] = 'premi [E] per depositare il veicolo', + ['spawn_veh'] = 'genera veicolo', + ['spawnpoint_blocked'] = 'un veicolo blocca lo spawnpoint!', + ['only_taxi'] = 'puoi depositare solo taxi.', + ['empty_garage'] = 'nessun veicolo nel garage!', + + ['taking_service'] = 'prendi servizio: Taxi/Uber', + ['full_service'] = 'servizio completo: ', + ['amount_invalid'] = 'importo non valido', + ['press_to_open'] = 'premi [E] per accedere al menu', + ['billing'] = 'fattura', + ['billing_sent'] = 'la fattura è stata registrata!', + ['invoice_amount'] = 'importo fattura', + ['no_players_near'] = 'nessun giocatore nelle vicinanze', + ['start_job'] = 'inizia / interrompi la guida di lavori NPC', + ['drive_search_pass'] = 'guida alla ricerca di passeggeri', + ['customer_found'] = 'hai trovato un cliente avvicinati a lui', + ['client_unconcious'] = 'il tuo cliente è ~r~incosciente, cercane un altro', + ['arrive_dest'] = 'sei arrivato a destinazione', + ['take_me_to_near'] = 'portami a %s, vicino a %s', + ['take_me_to'] = 'portami a %s', + ['close_to_client'] = 'sei troppo lontano dal cliente, avvicinati a lui', + ['return_to_veh'] = 'torna al tuo veicolo per continuare la missione', + ['must_in_taxi'] = 'devi essere in un taxi per iniziare la missione', + ['must_in_vehicle'] = 'devi essere in un veicolo per iniziare la missione', + ['not_in_taxi'] = 'Hai lasciato il taxi mentre eri in missione!', + ['have_earned'] = 'hai guadagnato $%s', + ['comp_earned'] = '- la tua azienda ha guadagnato $%s \n - hai guadagnato $%s', + ['deposit_stock'] = 'deposito', + ['take_stock' ] = 'prendi', + ['empty_stock'] = 'deposito vuoto!', + ['empty_your_inventory'] = 'Svuota il tuo inventario!' , + ['boss_actions'] = 'Azioni del capo', + ['mission_complete'] = 'missione completata', + ['quantity' ] = 'quantità', + ['quantity_invalid'] = 'questa quantità non è valida!', + ['inventory'] = 'inventario', + ['taxi_client'] = 'cliente taxi', + ['have_withdrawn'] = 'hai prelevato x%s %s', + ['have_deposited'] = 'hai depositato x%s %s', + ['player_cannot_hold'] = '~r~non hai abbastanza spazio libero nel tuo inventario!', + ['blip_taxi'] = 'Downtown Cab Co.', + ['taxi' ] = 'taxi', + ['taxi_stock'] = 'deposito dei taxi', + ['menu_return'] = 'Ritorno' + } \ No newline at end of file diff --git a/[esx_addons]/esx_taxijob/locales/pl.lua b/[esx_addons]/esx_taxijob/locales/pl.lua new file mode 100644 index 00000000..78e3e1ad --- /dev/null +++ b/[esx_addons]/esx_taxijob/locales/pl.lua @@ -0,0 +1,51 @@ +Locales['pl'] = { + -- cloakroom + ['cloakroom_menu'] = 'szatnia', + ['cloakroom_prompt'] = 'naciśnij [E] aby użyć szatni.', + ['wear_citizen'] = 'strój cywilny', + ['wear_work'] = 'strój pracownika taxi', + + -- garage + ['spawner_prompt'] = 'naciśnij [E] aby otworzyć garaż.', + ['store_veh'] = 'naciśnij [E] aby zdać pojazd', + ['spawn_veh'] = 'sprowadź pojazd', + ['spawnpoint_blocked'] = 'jakiś pojazd blokuje wyjazd z garażu!', + ['only_taxi'] = 'możesz przechowywać tylko taksówki.', + + ['taking_service'] = 'przyjmowanie usługi: Taxi/Uber', + ['full_service'] = 'pełny serwis: ', + ['amount_invalid'] = 'wartość nieprawidłowa', + ['press_to_open'] = 'naciśnij [E] aby wejść do menu', + ['billing'] = 'rachunek', + ['billing_sent'] = 'rachunek został wystawiony!', + ['invoice_amount'] = 'wartość należności', + ['no_players_near'] = 'brak graczy w pobliżu', + ['start_job'] = 'rozpocznij / zakończ wykonywanie zadań NPC', + ['drive_search_pass'] = 'jazda w poszukiwaniu pasażerów', + ['customer_found'] = 'Znajdujesz klienta, jedź do niego', + ['client_unconcious'] = 'klient jest ~r~nieprzytomny. Poszukaj innego.', + ['arrive_dest'] = 'Dojeżdżasz do celu', + ['take_me_to_near'] = 'Zabierz mnie do %s, w pobliżu %s', + ['take_me_to'] = 'Weź mnie do %s', + ['close_to_client'] = 'jesteś blisko klienta, podjedź do niego bliżej', + ['return_to_veh'] = 'proszę wróć do swojego pojazdu aby kontynuować misję', + ['must_in_taxi'] = 'musisz być w taksówce aby rozpocząć misję', + ['must_in_vehicle'] = 'musisz być w pojeździe aby rozpocząć misję', + ['not_in_taxi'] = 'You left the taxi while on mission!', + ['have_earned'] = 'zarabiasz $%s', + ['comp_earned'] = '- Twoja firma zarobiła $%s\n- Zarabiasz $%s', + ['deposit_stock'] = 'depozyt', + ['take_stock'] = 'weź depozyt', + ['boss_actions'] = 'akcje szefa', + ['mission_complete'] = 'misja zakończona', + ['quantity'] = 'ilość', + ['quantity_invalid'] = 'nieprawidłowa ilość', + ['inventory'] = 'ekwipunek', + ['taxi_client'] = 'klient taksówki', + ['have_withdrawn'] = 'wyciągasz x%s %s', + ['have_deposited'] = 'deponujesz x%s %s', + ['player_cannot_hold'] = '~r~Nie masz wystarczająco wolnego miejsca w swoim ekwipunku!', + ['blip_taxi'] = 'taxi', + ['taxi'] = 'taxi', + ['taxi_stock'] = 'taxi Stock' +} diff --git a/[esx_addons]/esx_taxijob/locales/si.lua b/[esx_addons]/esx_taxijob/locales/si.lua new file mode 100644 index 00000000..2e8fd057 --- /dev/null +++ b/[esx_addons]/esx_taxijob/locales/si.lua @@ -0,0 +1,50 @@ +Locales['si'] = { + -- garderoba + ['cloakroom_menu'] = 'garderoba', + ['cloakroom_prompt'] = "pritisnite [E] za dostop do Cloakroom.", + ['wear_citizen'] = 'državljanska obleka', + ['wear_work'] = 'oblačila za taksi', + + -- garaža + ['spawner_prompt'] = 'pritisnite [E] za dostop do Garage.', + ['store_veh'] = 'pritisnite [E] za shranjevanje vozila', + ['spawn_veh'] = 'ustvari vozilo', + ['spawnpoint_blocked'] = 'vozilo blokira spawnpoint!', + ['only_taxi'] = 'shranite lahko samo taksi vozila.', + ['taking_service'] = "sprejemam storitev: Taxi/Uber", + ['full_service'] = 'celotna storitev: ', + ['amount_invalid'] = 'znesek ni veljaven', + ['press_to_open'] = 'pritisnite [E] za dostop do menija', + ['billing'] = 'obračun', + ['billing_sent'] = 'račun je bil registriran!', + ['invoice_amount'] = 'znesek računa', + ['no_players_near'] = 'v bližini ni igralcev', + ['start_job'] = 'začni / ustavi vožnjo NPC-jev', + ['drive_search_pass'] = 'vožnja v iskanju potnikov', + ['customer_found'] = 'našli ste stranko, približajte se ji', + ['customer_unconcious'] = 'vaša stranka je ~r~nezavedna, poiščite drugo', + ['arrive_dest'] = 'prispeli ste na cilj', + ['take_me_to_near'] = 'Take me to %s, near %s', + ['take_me_to'] = 'Peljite me do %s', + ['close_to_client'] = 'ste predaleč od stranke, približajte se ji', + ['return_to_veh'] = 'vrnite se v svoje vozilo in nadaljujte misijo', + ['must_in_taxi'] = "za začetek misije morate biti v taxi", + ['must_in_vehicle'] = 'za začetek misije morate biti v vozilu', + ['not_in_taxi'] = 'med opravljanjem naloge ste zapustili taksi!', + ['have_earned'] = 'zaslužil si $%s', + ['comp_earned'] = '- vaše podjetje je zaslužilo $%s\n- zaslužili ste $%s', + ['deposit_stock'] = 'depozit zaloge', + ['take_stock'] = 'vzemi zaloge', + ['boss_actions'] = 'dejanja šefa', + ['mission_complete'] = 'misija končana', + ['quantity'] = 'količina', + ['quantity_invalid'] = 'to je neveljavna količina!', + ['inventory'] = 'inventar', + ['taxi_client'] = 'taxi Client', + ['have_withdrawn'] = 'umaknili ste x%s %s', + ['have_deposited'] = 'ste deponirali x%s %s', + ['player_cannot_hold'] = 'v svojem inventarju nimaš dovolj prostora!', + ['blip_taxi'] = 'podjetje downtown Cab Co.', + ['taxi'] = 'taxi', + ['taxi_stock'] = 'taxi Stock' +} diff --git a/[esx_addons]/esx_taxijob/locales/sv.lua b/[esx_addons]/esx_taxijob/locales/sv.lua new file mode 100644 index 00000000..012fa56c --- /dev/null +++ b/[esx_addons]/esx_taxijob/locales/sv.lua @@ -0,0 +1,51 @@ +Locales['sv'] = { + -- cloakroom + ['cloakroom_menu'] = 'omklädningsrum', + ['cloakroom_prompt'] = 'tryck [E] för att öppna omklädningsrummet.', + ['wear_citizen'] = 'civila kläder', + ['wear_work'] = 'taxikläder', + + -- garage + ['spawner_prompt'] = 'tryck [E] för att öppna garaget.', + ['store_veh'] = 'tryck [E] för att spara fordonet.', + ['spawn_veh'] = 'plocka ut taxi', + ['spawnpoint_blocked'] = 'det är ett fordon som blockerar spawnpointen!', + ['only_taxi'] = 'du kan endast lagra taxi fordon här..', + + ['taking_service'] = 'du deltog tjänst: Taxi/Uber', + ['full_service'] = 'du kan inte delta tjänst: ', + ['amount_invalid'] = 'ogiltig mängd!', + ['press_to_open'] = 'tryck [E] för att öppna menyn.', + ['billing'] = 'skapa räkning', + ['billing_sent'] = 'räkningen har registrerats!', + ['invoice_amount'] = 'faktureringsbelopp', + ['no_players_near'] = 'det finns ingen spelare i närheten!', + ['start_job'] = 'starta / sluta köra NPC', + ['drive_search_pass'] = 'Åk runt för att hitta kunder', + ['customer_found'] = 'du har hittat en kund!', + ['client_unconcious'] = 'din kund är ~r~medvetslös. Hitta en ny.', + ['arrive_dest'] = 'du har anlänt till din destination', + ['take_me_to_near'] = 'Ta mig till %s, vid %s', + ['take_me_to'] = 'Ta mig till %s', + ['close_to_client'] = 'åk närmare din kund!', + ['return_to_veh'] = 'vänligen återvänd till ditt fordon och återuppta körningen.', + ['must_in_taxi'] = 'du måste vara i en taxi för att starta uppdraget.', + ['must_in_vehicle'] = 'du måste vara i ett fordon för att starta uppdraget.', + ['not_in_taxi'] = 'You left the taxi while on mission!', + ['have_earned'] = 'du har tjärnat %s SEK', + ['comp_earned'] = '- ditt företag har tjärnat %s SEK\n- du har tjärnat %s SEK', + ['deposit_stock'] = 'lagra objekt', + ['take_stock'] = 'ta ut objekt', + ['boss_actions'] = 'chefmeny', + ['mission_complete'] = 'uppdraget har slutförts!', + ['quantity'] = 'mängd', + ['quantity_invalid'] = 'det är en ogiltig mängd', + ['inventory'] = 'inventory', + ['taxi_client'] = 'taxi klient', + ['have_withdrawn'] = 'du har tagit ut x%s %s', + ['have_deposited'] = 'du har lagrat x%s %s', + ['player_cannot_hold'] = 'du har ~r~inte tillräckligt med utrymme för att hålla det!', + ['blip_taxi'] = 'taxifirman', + ['taxi'] = 'taxi', + ['taxi_stock'] = 'taxi Stock' +} diff --git a/[esx_addons]/esx_taxijob/localization/br_esx_taxijob.sql b/[esx_addons]/esx_taxijob/localization/br_esx_taxijob.sql new file mode 100644 index 00000000..f4a4171e --- /dev/null +++ b/[esx_addons]/esx_taxijob/localization/br_esx_taxijob.sql @@ -0,0 +1,25 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_taxi', 'Taxi', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_taxi', 'Taxi', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_taxi', 'Taxi', 1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('taxi', 'Taxi') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('taxi',0,'recrue','Recrutar',12,'{"hair_2":0,"hair_color_2":0,"torso_1":32,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":0,"age_2":0,"glasses_2":0,"ears_2":0,"arms":27,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',1,'novice','Taxista',24,'{"hair_2":0,"hair_color_2":0,"torso_1":32,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":0,"age_2":0,"glasses_2":0,"ears_2":0,"arms":27,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',2,'experimente','Taxista Experiente',36,'{"hair_2":0,"hair_color_2":0,"torso_1":26,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":57,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":11,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',3,'uber','Uber',48,'{"hair_2":0,"hair_color_2":0,"torso_1":26,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":57,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":11,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',4,'boss','Taxista Chefe',0,'{"hair_2":0,"hair_color_2":0,"torso_1":29,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":1,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":4,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}') +; diff --git a/[esx_addons]/esx_taxijob/localization/de_esx_taxijob.sql b/[esx_addons]/esx_taxijob/localization/de_esx_taxijob.sql new file mode 100644 index 00000000..70867d1c --- /dev/null +++ b/[esx_addons]/esx_taxijob/localization/de_esx_taxijob.sql @@ -0,0 +1,25 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_taxi', 'Taxi', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_taxi', 'Taxi', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_taxi', 'Taxi', 1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('taxi', 'Taxi') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('taxi',0,'recrue','Rekrut',12,'{"hair_2":0,"hair_color_2":0,"torso_1":32,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":0,"age_2":0,"glasses_2":0,"ears_2":0,"arms":27,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',1,'novice','Anfänger',24,'{"hair_2":0,"hair_color_2":0,"torso_1":32,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":0,"age_2":0,"glasses_2":0,"ears_2":0,"arms":27,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',2,'experimente','Experte',36,'{"hair_2":0,"hair_color_2":0,"torso_1":26,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":57,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":11,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',3,'uber','Schichtführer',48,'{"hair_2":0,"hair_color_2":0,"torso_1":26,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":57,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":11,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',4,'boss','Chef',0,'{"hair_2":0,"hair_color_2":0,"torso_1":29,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":1,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":4,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}') +; diff --git a/[esx_addons]/esx_taxijob/localization/en_esx_taxijob.sql b/[esx_addons]/esx_taxijob/localization/en_esx_taxijob.sql new file mode 100644 index 00000000..fb17fa4a --- /dev/null +++ b/[esx_addons]/esx_taxijob/localization/en_esx_taxijob.sql @@ -0,0 +1,25 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_taxi', 'Taxi', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_taxi', 'Taxi', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_taxi', 'Taxi', 1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('taxi', 'Taxi') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('taxi',0,'recrue','Recruit',12,'{"hair_2":0,"hair_color_2":0,"torso_1":32,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":0,"age_2":0,"glasses_2":0,"ears_2":0,"arms":27,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',1,'novice','Cabby',24,'{"hair_2":0,"hair_color_2":0,"torso_1":32,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":0,"age_2":0,"glasses_2":0,"ears_2":0,"arms":27,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',2,'experimente','Experienced',36,'{"hair_2":0,"hair_color_2":0,"torso_1":26,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":57,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":11,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',3,'uber','Uber Cabby',48,'{"hair_2":0,"hair_color_2":0,"torso_1":26,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":57,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":11,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',4,'boss','Lead Cabby',0,'{"hair_2":0,"hair_color_2":0,"torso_1":29,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":1,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":4,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}') +; diff --git a/[esx_addons]/esx_taxijob/localization/fi_esx_taxijob.sql b/[esx_addons]/esx_taxijob/localization/fi_esx_taxijob.sql new file mode 100644 index 00000000..b39ef4f2 --- /dev/null +++ b/[esx_addons]/esx_taxijob/localization/fi_esx_taxijob.sql @@ -0,0 +1,25 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_taxi', 'Taxi', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_taxi', 'Taxi', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_taxi', 'Taxi', 1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('taxi', 'Taxi') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('taxi',0,'recrue','Harjottelija',12,'{"hair_2":0,"hair_color_2":0,"torso_1":32,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":0,"age_2":0,"glasses_2":0,"ears_2":0,"arms":27,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',1,'novice','Alottelija',24,'{"hair_2":0,"hair_color_2":0,"torso_1":32,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":0,"age_2":0,"glasses_2":0,"ears_2":0,"arms":27,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',2,'experimente','Kokenut',36,'{"hair_2":0,"hair_color_2":0,"torso_1":26,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":57,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":11,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',3,'uber','Uber',48,'{"hair_2":0,"hair_color_2":0,"torso_1":26,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":57,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":11,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',4,'boss','Pomo',0,'{"hair_2":0,"hair_color_2":0,"torso_1":29,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":1,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":4,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}') +; diff --git a/[esx_addons]/esx_taxijob/localization/hu_esx_taxijob.sql b/[esx_addons]/esx_taxijob/localization/hu_esx_taxijob.sql new file mode 100644 index 00000000..2b515c5b --- /dev/null +++ b/[esx_addons]/esx_taxijob/localization/hu_esx_taxijob.sql @@ -0,0 +1,25 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_taxi', 'Taxi', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_taxi', 'Taxi', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_taxi', 'Taxi', 1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('taxi', 'Taxi') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('taxi',0,'recrue','Újonc',12,'{"hair_2":0,"hair_color_2":0,"torso_1":32,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":0,"age_2":0,"glasses_2":0,"ears_2":0,"arms":27,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',1,'novice','Taxisofőr',24,'{"hair_2":0,"hair_color_2":0,"torso_1":32,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":0,"age_2":0,"glasses_2":0,"ears_2":0,"arms":27,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',2,'experimente','Tapasztalt',36,'{"hair_2":0,"hair_color_2":0,"torso_1":26,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":57,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":11,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',3,'uber','Uber Sofőr',48,'{"hair_2":0,"hair_color_2":0,"torso_1":26,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":57,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":11,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',4,'boss','Vezető Sofőr',0,'{"hair_2":0,"hair_color_2":0,"torso_1":29,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":1,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":4,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}') +; diff --git a/[esx_addons]/esx_taxijob/localization/pl_esx_taxijob.sql b/[esx_addons]/esx_taxijob/localization/pl_esx_taxijob.sql new file mode 100644 index 00000000..866cf026 --- /dev/null +++ b/[esx_addons]/esx_taxijob/localization/pl_esx_taxijob.sql @@ -0,0 +1,25 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_taxi', 'Taxi', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_taxi', 'Taxi', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_taxi', 'Taxi', 1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('taxi', 'Taxi') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('taxi',0,'recrue','Tymczasowy',12,'{"hair_2":0,"hair_color_2":0,"torso_1":32,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":0,"age_2":0,"glasses_2":0,"ears_2":0,"arms":27,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',1,'novice','Nowy',24,'{"hair_2":0,"hair_color_2":0,"torso_1":32,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":0,"age_2":0,"glasses_2":0,"ears_2":0,"arms":27,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',2,'experimente','Etatowy',36,'{"hair_2":0,"hair_color_2":0,"torso_1":26,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":57,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":11,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',3,'uber','Uber',48,'{"hair_2":0,"hair_color_2":0,"torso_1":26,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":57,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":11,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',4,'boss','Właściciel',0,'{"hair_2":0,"hair_color_2":0,"torso_1":29,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":1,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":4,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}') +; diff --git a/[esx_addons]/esx_taxijob/localization/si_esx_taxijob.sql b/[esx_addons]/esx_taxijob/localization/si_esx_taxijob.sql new file mode 100644 index 00000000..276bdd75 --- /dev/null +++ b/[esx_addons]/esx_taxijob/localization/si_esx_taxijob.sql @@ -0,0 +1,25 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_taxi', 'Taxi', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_taxi', 'Taxi', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_taxi', 'Taxi', 1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('taxi', 'Taxi') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('taxi',0,'recrue','Rekrut',12,'{"hair_2":0,"hair_color_2":0,"torso_1":32,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":0,"age_2":0,"glasses_2":0,"ears_2":0,"arms":27,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',1,'novice','Voznik',24,'{"hair_2":0,"hair_color_2":0,"torso_1":32,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":0,"age_2":0,"glasses_2":0,"ears_2":0,"arms":27,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',2,'experimente','Izkušen',36,'{"hair_2":0,"hair_color_2":0,"torso_1":26,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":57,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":11,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',3,'uber','Manager',48,'{"hair_2":0,"hair_color_2":0,"torso_1":26,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":57,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":11,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',4,'boss','Direktor',0,'{"hair_2":0,"hair_color_2":0,"torso_1":29,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":1,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":4,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}') +; diff --git a/[esx_addons]/esx_taxijob/localization/sv_esx_taxijob.sql b/[esx_addons]/esx_taxijob/localization/sv_esx_taxijob.sql new file mode 100644 index 00000000..ece7ee5a --- /dev/null +++ b/[esx_addons]/esx_taxijob/localization/sv_esx_taxijob.sql @@ -0,0 +1,25 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_taxi', 'Taxi', 1) +; + +INSERT INTO `datastore` (name, label, shared) VALUES + ('society_taxi', 'Taxi', 1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_taxi', 'Taxi', 1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('taxi', 'Taxi') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('taxi',0,'recrue','Nyrekryterad',12,'{"hair_2":0,"hair_color_2":0,"torso_1":32,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":0,"age_2":0,"glasses_2":0,"ears_2":0,"arms":27,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',1,'novice','Skicklig förare',24,'{"hair_2":0,"hair_color_2":0,"torso_1":32,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":0,"age_2":0,"glasses_2":0,"ears_2":0,"arms":27,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',2,'experimente','Erfaren förare',36,'{"hair_2":0,"hair_color_2":0,"torso_1":26,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":57,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":11,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',3,'uber','Professionell förare',48,'{"hair_2":0,"hair_color_2":0,"torso_1":26,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":57,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":11,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}'), + ('taxi',4,'boss','Företagsägare',0,'{"hair_2":0,"hair_color_2":0,"torso_1":29,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":31,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":4,"age_2":0,"glasses_2":0,"ears_2":0,"arms":1,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":0,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":0,"bproof_1":0,"mask_1":0,"decals_1":0,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":4,"eyebrows_1":0,"face":0,"shoes_1":10,"pants_1":24}', '{"hair_2":0,"hair_color_2":0,"torso_1":57,"bags_1":0,"helmet_2":0,"chain_2":0,"eyebrows_3":0,"makeup_3":0,"makeup_2":0,"tshirt_1":38,"makeup_1":0,"bags_2":0,"makeup_4":0,"eyebrows_4":0,"chain_1":0,"lipstick_4":0,"bproof_2":0,"hair_color_1":0,"decals_2":0,"pants_2":1,"age_2":0,"glasses_2":0,"ears_2":0,"arms":21,"lipstick_1":0,"ears_1":-1,"mask_2":0,"sex":1,"lipstick_3":0,"helmet_1":-1,"shoes_2":0,"beard_2":0,"beard_1":0,"lipstick_2":0,"beard_4":0,"glasses_1":5,"bproof_1":0,"mask_1":0,"decals_1":1,"hair_1":0,"eyebrows_2":0,"beard_3":0,"age_1":0,"tshirt_2":0,"skin":0,"torso_2":0,"eyebrows_1":0,"face":0,"shoes_1":49,"pants_1":11}') +; diff --git a/[esx_addons]/esx_taxijob/server/main.lua b/[esx_addons]/esx_taxijob/server/main.lua new file mode 100644 index 00000000..fcfea05d --- /dev/null +++ b/[esx_addons]/esx_taxijob/server/main.lua @@ -0,0 +1,123 @@ +local lastPlayerSuccess = {} + +if Config.MaxInService ~= -1 then + TriggerEvent('esx_service:activateService', 'taxi', Config.MaxInService) +end + +RegisterNetEvent('esx_taxijob:success') +AddEventHandler('esx_taxijob:success', function() + local xPlayer = ESX.GetPlayerFromId(source) + local timeNow = os.clock() + + if xPlayer.job.name == 'taxi' then + if not lastPlayerSuccess[source] or timeNow - lastPlayerSuccess[source] > 5 then + lastPlayerSuccess[source] = timeNow + + math.randomseed(os.time()) + local total = math.random(Config.NPCJobEarnings.min, Config.NPCJobEarnings.max) + + if xPlayer.job.grade >= 3 then + total = total * 2 + end + + TriggerEvent('esx_addonaccount:getSharedAccount', 'society_taxi', function(account) + if account then + local playerMoney = ESX.Math.Round(total / 100 * 30) + local societyMoney = ESX.Math.Round(total / 100 * 70) + + xPlayer.addMoney(playerMoney, "Taxi Fair") + account.addMoney(societyMoney) + + xPlayer.showNotification(TranslateCap('comp_earned', societyMoney, playerMoney)) + else + xPlayer.addMoney(total, "Taxi Fair") + xPlayer.showNotification(TranslateCap('have_earned', total)) + end + end) + end + else + print(('[^3WARNING^7] Player ^5%s^7 attempted to ^5esx_taxijob:success^7 (cheating)'):format(source)) + end +end) + +ESX.RegisterServerCallback("esx_taxijob:SpawnVehicle", function(source, cb, model , props) + local xPlayer = ESX.GetPlayerFromId(source) + + if xPlayer.job.name ~= "taxi" then + print(('[^3WARNING^7] Player ^5%s^7 attempted to Exploit Vehicle Spawing!!'):format(source)) + return + end + local SpawnPoint = vector3(Config.Zones.VehicleSpawnPoint.Pos.x, Config.Zones.VehicleSpawnPoint.Pos.y, Config.Zones.VehicleSpawnPoint.Pos.z) + ESX.OneSync.SpawnVehicle(joaat(model), SpawnPoint, Config.Zones.VehicleSpawnPoint.Heading, props, function(vehicle) + local vehicle = NetworkGetEntityFromNetworkId(vehicle) + while GetVehicleNumberPlateText(vehicle) ~= props.plate do + Wait(0) + end + TaskWarpPedIntoVehicle(GetPlayerPed(source), vehicle, -1) + end) + cb() +end) + +RegisterNetEvent('esx_taxijob:getStockItem') +AddEventHandler('esx_taxijob:getStockItem', function(itemName, count) + local xPlayer = ESX.GetPlayerFromId(source) + + if xPlayer.job.name == 'taxi' then + TriggerEvent('esx_addoninventory:getSharedInventory', 'society_taxi', function(inventory) + local item = inventory.getItem(itemName) + + -- is there enough in the society? + if count > 0 and item.count >= count then + -- can the player carry the said amount of x item? + if xPlayer.canCarryItem(itemName, count) then + inventory.removeItem(itemName, count) + xPlayer.addInventoryItem(itemName, count) + xPlayer.showNotification(TranslateCap('have_withdrawn', count, item.label)) + else + xPlayer.showNotification(TranslateCap('player_cannot_hold')) + end + else + xPlayer.showNotification(TranslateCap('quantity_invalid')) + end + end) + else + print(('[^3WARNING^7] Player ^5%s^7 attempted ^5esx_taxijob:getStockItem^7 (cheating)'):format(source)) + end +end) + +ESX.RegisterServerCallback('esx_taxijob:getStockItems', function(source, cb) + TriggerEvent('esx_addoninventory:getSharedInventory', 'society_taxi', function(inventory) + cb(inventory.items) + end) +end) + +RegisterNetEvent('esx_taxijob:putStockItems') +AddEventHandler('esx_taxijob:putStockItems', function(itemName, count) + local xPlayer = ESX.GetPlayerFromId(source) + local sourceItem = xPlayer.getInventoryItem(itemName) + + if xPlayer.job.name == 'taxi' then + TriggerEvent('esx_addoninventory:getSharedInventory', 'society_taxi', function(inventory) + local item = inventory.getItem(itemName) + + if sourceItem.count >= count and count > 0 then + xPlayer.removeInventoryItem(itemName, count) + inventory.addItem(itemName, count) + xPlayer.showNotification(TranslateCap('have_deposited', count, item.label)) + else + xPlayer.showNotification(TranslateCap('quantity_invalid')) + end + end) + else + print(('[^3WARNING^7] Player ^5%s^7 attempted ^5esx_taxijob:putStockItems^7 (cheating)'):format(source)) + end +end) + +ESX.RegisterServerCallback('esx_taxijob:getPlayerInventory', function(source, cb) + local xPlayer = ESX.GetPlayerFromId(source) + local items = xPlayer.inventory + + cb({ + items = items + }) +end) diff --git a/[esx_addons]/esx_vehicleshop/.editorconfig b/[esx_addons]/esx_vehicleshop/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_vehicleshop/LICENSE b/[esx_addons]/esx_vehicleshop/LICENSE new file mode 100644 index 00000000..6e19af18 --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_vehicleshop + Copyright (C) 2015-2023 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 . + +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_vehicleshop Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_vehicleshop/README.md b/[esx_addons]/esx_vehicleshop/README.md new file mode 100644 index 00000000..6a29ca24 --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/README.md @@ -0,0 +1,59 @@ +# esx_vehicleshop + +ESX Vehicle Shop adds an vehicle shop to the game, where employeed players can sell vehicles to other players. You can also disable the job part so any player can buy vehicles with a menu based interaction. + +## Requirements + +* Auto mode (everyone can buy vehicles from the dealer) + * No need to download other resources + +* Player management (the car dealer job): billing, boss actions and more! + * [esx_society](https://github.com/ESX-Org/esx_society) + * [esx_billing](https://github.com/ESX-Org/esx_billing) + * [esx_addonaccount](https://github.com/ESX-Org/esx_addonaccount) + * [esx_addoninventory](https://github.com/ESX-Org/esx_addoninventory) + * [cron](https://github.com/ESX-Org/cron) + +## Download & Installation + +### Using [fvm](https://github.com/qlaffont/fvm-installer) + +``` +fvm install --save --folder=esx esx-org/esx_vehicleshop +``` + +### Using Git + +``` +cd resources +git clone https://github.com/ESX-Org/esx_vehicleshop [esx]/esx_vehicleshop +``` + +### Manually + +- Download https://github.com/ESX-Org/esx_vehicleshop/archive/master.zip +- Put it in the `[esx]` directory + +### Installation + +- Import `esx_vehicleshop.sql` in your database +- Add this in your `server.cfg`: + +``` +start esx_vehicleshop +``` +- If you want player management you have to set `Config.EnablePlayerManagement` to `true` in `config.lua` + +## Legal + +### License + +esx_vehicleshop - vehicle shop for ESX + +Copyright (C) 2015-2023 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/. diff --git a/[esx_addons]/esx_vehicleshop/client/main.lua b/[esx_addons]/esx_vehicleshop/client/main.lua new file mode 100644 index 00000000..e6065b83 --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/client/main.lua @@ -0,0 +1,834 @@ +local HasAlreadyEnteredMarker, IsInShopMenu = false, false +local CurrentAction, CurrentActionMsg, LastZone, currentDisplayVehicle, CurrentVehicleData +local CurrentActionData, Vehicles, Categories = {}, {}, {} +local VehiclesByModel = {} +local vehiclesByCategory = {} + +function getVehicleFromModel(model) + return VehiclesByModel[model] +end + +function PlayerManagement() + if not Config.EnablePlayerManagement then + return + end + + if ESX.PlayerData.job.name ~= 'cardealer' then + Config.Zones.ShopEntering.Type = -1 + Config.Zones.BossActions.Type = -1 + Config.Zones.ResellVehicle.Type = -1 + return + end + Config.Zones.ShopEntering.Type = 1 + + if ESX.PlayerData.job.grade_name == 'boss' then + Config.Zones.BossActions.Type = 1 + end +end + +RegisterNetEvent('esx:playerLoaded') +AddEventHandler('esx:playerLoaded', function(xPlayer) + ESX.PlayerData = xPlayer + + PlayerManagement() + TriggerServerEvent("esx_vehicleshop:getVehiclesAndCategories") +end) + +RegisterNetEvent('esx_vehicleshop:updateVehiclesAndCategories', function(vehicles, categories, vehiclesByModel) + Vehicles = vehicles + Categories = categories + + VehiclesByModel = vehiclesByModel + + table.sort(Vehicles, function(a, b) + return a.name < b.name + end) + + for _, vehicle in ipairs(Vehicles) do + if IsModelInCdimage(joaat(vehicle.model)) then + local category = vehicle.category + + if not vehiclesByCategory[category] then + vehiclesByCategory[category] = {} + end + + table.insert(vehiclesByCategory[category], vehicle) + else + print(('[^3WARNING^7] Ignoring vehicle ^5%s^7 due to invalid Model'):format(vehicle.model)) + end + end +end) + +RegisterNetEvent('esx:setJob', PlayerManagement) + +function DeleteDisplayVehicleInsideShop() + local attempt = 0 + + if currentDisplayVehicle and DoesEntityExist(currentDisplayVehicle) then + while DoesEntityExist(currentDisplayVehicle) and not NetworkHasControlOfEntity(currentDisplayVehicle) and attempt < 100 do + Wait(100) + NetworkRequestControlOfEntity(currentDisplayVehicle) + attempt = attempt + 1 + end + + if DoesEntityExist(currentDisplayVehicle) and NetworkHasControlOfEntity(currentDisplayVehicle) then + ESX.Game.DeleteVehicle(currentDisplayVehicle) + end + end +end + +function ReturnVehicleProvider() + ESX.TriggerServerCallback('esx_vehicleshop:getCommercialVehicles', function(vehicles) + local elements = {} + + for k, v in ipairs(vehicles) do + local returnPrice = ESX.Math.Round(v.price * 0.75) + local vehicleLabel = getVehicleFromModel(v.vehicle).label + + table.insert(elements, { + label = ('%s [%s]'):format(vehicleLabel, TranslateCap('generic_shopitem', ESX.Math.GroupDigits(returnPrice))), + value = v.vehicle + }) + end + + ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'return_provider_menu', { + title = TranslateCap('return_provider_menu'), + align = 'top-left', + elements = elements + }, function(data, menu) + TriggerServerEvent('esx_vehicleshop:returnProvider', data.current.value) + + Wait(300) + menu.close() + ReturnVehicleProvider() + end, function(data, menu) + menu.close() + end) + end) +end + +function StartShopRestriction() + CreateThread(function() + while IsInShopMenu do + Wait(0) + + DisableControlAction(0, 75, true) -- Disable exit vehicle + DisableControlAction(27, 75, true) -- Disable exit vehicle + end + end) +end + +function OpenShopMenu() + if #Vehicles == 0 then + print('[^3ERROR^7] Vehicleshop has ^50^7 vehicles, please add some!') + return + end + + IsInShopMenu = true + + StartShopRestriction() + ESX.UI.Menu.CloseAll() + + local playerPed = PlayerPedId() + + FreezeEntityPosition(playerPed, true) + SetEntityVisible(playerPed, false) + SetEntityCoords(playerPed, Config.Zones.ShopInside.Pos) + + local elements = {} + local firstVehicleData = nil + + for i=1, #Categories, 1 do + local category = Categories[i] + local categoryVehicles = vehiclesByCategory[category.name] + local options = {} + + for j=1, #categoryVehicles, 1 do + local vehicle = categoryVehicles[j] + + if i == 1 and j == 1 then + firstVehicleData = vehicle + end + + table.insert(options, ('%s %s'):format(vehicle.name, TranslateCap('generic_shopitem', ESX.Math.GroupDigits(vehicle.price)))) + end + + table.sort(options) + + table.insert(elements, { + name = category.name, + label = category.label, + value = 0, + type = 'slider', + max = #Categories[i], + options = options + }) + end + + ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'vehicle_shop', { + title = TranslateCap('car_dealer'), + align = 'top-left', + elements = elements + }, function(data, menu) + local vehicleData = vehiclesByCategory[data.current.name][data.current.value + 1] + + ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'shop_confirm', { + title = TranslateCap('buy_vehicle_shop', vehicleData.name, ESX.Math.GroupDigits(vehicleData.price)), + align = 'top-left', + elements = { + {label = TranslateCap('no'), value = 'no'}, + {label = TranslateCap('yes'), value = 'yes'} + }}, function(data2, menu2) + if data2.current.value == 'yes' then + if Config.EnablePlayerManagement then + ESX.TriggerServerCallback('esx_vehicleshop:buyCarDealerVehicle', function(success) + if success then + IsInShopMenu = false + DeleteDisplayVehicleInsideShop() + + CurrentAction = 'shop_menu' + CurrentActionMsg = TranslateCap('shop_menu') + CurrentActionData = {} + + local playerPed = PlayerPedId() + FreezeEntityPosition(playerPed, false) + SetEntityVisible(playerPed, true) + SetEntityCoords(playerPed, Config.Zones.ShopEntering.Pos) + + menu2.close() + menu.close() + ESX.ShowNotification(TranslateCap('vehicle_purchased')) + else + ESX.ShowNotification(TranslateCap('broke_company')) + end + end, vehicleData.model) + else + local generatedPlate = GeneratePlate() + + ESX.TriggerServerCallback('esx_vehicleshop:buyVehicle', function(success) + if success then + IsInShopMenu = false + menu2.close() + menu.close() + DeleteDisplayVehicleInsideShop() + FreezeEntityPosition(playerPed, false) + SetEntityVisible(playerPed, true) + else + ESX.ShowNotification(TranslateCap('not_enough_money')) + end + end, vehicleData.model, generatedPlate) + end + else + menu2.close() + end + end, function(data2, menu2) + menu2.close() + end) + end, function(data, menu) + menu.close() + DeleteDisplayVehicleInsideShop() + local playerPed = PlayerPedId() + + CurrentAction = 'shop_menu' + CurrentActionMsg = TranslateCap('shop_menu') + CurrentActionData = {} + + FreezeEntityPosition(playerPed, false) + SetEntityVisible(playerPed, true) + SetEntityCoords(playerPed, Config.Zones.ShopEntering.Pos) + + IsInShopMenu = false + end, function(data, menu) + local vehicleData = vehiclesByCategory[data.current.name][data.current.value + 1] + local playerPed = PlayerPedId() + + DeleteDisplayVehicleInsideShop() + WaitForVehicleToLoad(vehicleData.model) + + ESX.Game.SpawnLocalVehicle(vehicleData.model, Config.Zones.ShopInside.Pos, Config.Zones.ShopInside.Heading, function(vehicle) + currentDisplayVehicle = vehicle + TaskWarpPedIntoVehicle(playerPed, vehicle, -1) + FreezeEntityPosition(vehicle, true) + SetModelAsNoLongerNeeded(vehicleData.model) + end) + end) + + DeleteDisplayVehicleInsideShop() + WaitForVehicleToLoad(firstVehicleData.model) + + ESX.Game.SpawnLocalVehicle(firstVehicleData.model, Config.Zones.ShopInside.Pos, Config.Zones.ShopInside.Heading, function(vehicle) + currentDisplayVehicle = vehicle + TaskWarpPedIntoVehicle(playerPed, vehicle, -1) + FreezeEntityPosition(vehicle, true) + SetModelAsNoLongerNeeded(firstVehicleData.model) + end) +end + +function WaitForVehicleToLoad(modelHash) + modelHash = (type(modelHash) == 'number' and modelHash or joaat(modelHash)) + + if not HasModelLoaded(modelHash) then + RequestModel(modelHash) + + BeginTextCommandBusyspinnerOn('STRING') + AddTextComponentSubstringPlayerName(TranslateCap('shop_awaiting_model')) + EndTextCommandBusyspinnerOn(4) + + while not HasModelLoaded(modelHash) do + Wait(0) + DisableAllControlActions(0) + end + + BusyspinnerOff() + end +end + +function OpenResellerMenu() + ESX.UI.Menu.CloseAll() + + ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'reseller', { + title = TranslateCap('car_dealer'), + align = 'top-left', + elements = { + {label = TranslateCap('buy_vehicle'), value = 'buy_vehicle'}, + {label = TranslateCap('pop_vehicle'), value = 'pop_vehicle'}, + {label = TranslateCap('depop_vehicle'), value = 'depop_vehicle'}, + {label = TranslateCap('return_provider'), value = 'return_provider'}, + {label = TranslateCap('create_bill'), value = 'create_bill'}, + {label = TranslateCap('get_rented_vehicles'), value = 'get_rented_vehicles'}, + {label = TranslateCap('set_vehicle_owner_sell'), value = 'set_vehicle_owner_sell'}, + {label = TranslateCap('set_vehicle_owner_rent'), value = 'set_vehicle_owner_rent'}, + {label = TranslateCap('deposit_stock'), value = 'put_stock'}, + {label = TranslateCap('take_stock'), value = 'get_stock'} + }}, function(data, menu) + local action = data.current.value + + if Config.OxInventory and (action == 'put_stock' or action == 'get_stock') then + exports.ox_inventory:openInventory('stash', 'society_cardealer') + elseif action == 'buy_vehicle' then + OpenShopMenu() + elseif action == 'put_stock' then + OpenPutStocksMenu() + elseif action == 'get_stock' then + OpenGetStocksMenu() + elseif action == 'pop_vehicle' then + OpenPopVehicleMenu() + elseif action == 'depop_vehicle' then + if currentDisplayVehicle then + DeleteDisplayVehicleInsideShop() + else + ESX.ShowNotification(TranslateCap('no_current_vehicle')) + end + elseif action == 'return_provider' then + ReturnVehicleProvider() + elseif action == 'create_bill' then + local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer() + + if closestPlayer ~= -1 and closestDistance < 3 then + ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'set_vehicle_owner_sell_amount', { + title = TranslateCap('invoice_amount') + }, function(data2, menu2) + local amount = tonumber(data2.value) + + if amount == nil then + ESX.ShowNotification(TranslateCap('invalid_amount')) + else + menu2.close() + local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer() + + if closestPlayer == -1 or closestDistance > 3.0 then + ESX.ShowNotification(TranslateCap('no_players')) + else + TriggerServerEvent('esx_billing:sendBill', GetPlayerServerId(closestPlayer), 'society_cardealer', TranslateCap('car_dealer'), tonumber(data2.value)) + end + end + end, function(data2, menu2) + menu2.close() + end) + else + ESX.ShowNotification(TranslateCap('no_players')) + end + elseif action == 'get_rented_vehicles' then + OpenRentedVehiclesMenu() + elseif action == 'set_vehicle_owner_sell' then + if currentDisplayVehicle then + local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer() + + if closestPlayer ~= -1 and closestDistance < 3 then + local newPlate = GeneratePlate() + local vehicleProps = ESX.Game.GetVehicleProperties(currentDisplayVehicle) + vehicleProps.plate = newPlate + SetVehicleNumberPlateText(currentDisplayVehicle, newPlate) + TriggerServerEvent('esx_vehicleshop:setVehicleOwnedPlayerId', GetPlayerServerId(closestPlayer), vehicleProps, CurrentVehicleData.model, CurrentVehicleData.name) + currentDisplayVehicle = nil + else + ESX.ShowNotification(TranslateCap('no_players')) + end + else + ESX.ShowNotification(TranslateCap('no_current_vehicle')) + end + elseif action == 'set_vehicle_owner_rent' then + if currentDisplayVehicle then + local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer() + + if closestPlayer ~= -1 and closestDistance < 3 then + ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'set_vehicle_owner_rent_amount', { + title = TranslateCap('rental_amount') + }, function(data2, menu2) + local amount = tonumber(data2.value) + + if not amount then + ESX.ShowNotification(TranslateCap('invalid_amount')) + else + menu2.close() + local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer() + + if closestPlayer ~= -1 and closestDistance < 3 then + local newPlate = 'RENT' .. string.upper(ESX.GetRandomString(4)) + local model = CurrentVehicleData.model + SetVehicleNumberPlateText(currentDisplayVehicle, newPlate) + TriggerServerEvent('esx_vehicleshop:rentVehicle', model, newPlate, amount, GetPlayerServerId(closestPlayer)) + currentDisplayVehicle = nil + else + ESX.ShowNotification(TranslateCap('no_players')) + end + end + end, function(data2, menu2) + menu2.close() + end) + else + ESX.ShowNotification(TranslateCap('no_players')) + end + else + ESX.ShowNotification(TranslateCap('no_current_vehicle')) + end + end + end, function(data, menu) + menu.close() + + CurrentAction = 'reseller_menu' + CurrentActionMsg = TranslateCap('shop_menu') + CurrentActionData = {} + end) +end + +function OpenPopVehicleMenu() + ESX.TriggerServerCallback('esx_vehicleshop:getCommercialVehicles', function(vehicles) + local elements = {} + + for k,v in ipairs(vehicles) do + local vehicleLabel = getVehicleFromModel(v.vehicle).label + + table.insert(elements, { + label = ('%s [%s]'):format(vehicleLabel, TranslateCap('generic_shopitem', ESX.Math.GroupDigits(v.price))), + value = v.vehicle + }) + end + + ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'commercial_vehicles', { + title = TranslateCap('vehicle_dealer'), + align = 'top-left', + elements = elements + }, function(data, menu) + local model = data.current.value + DeleteDisplayVehicleInsideShop() + + ESX.Game.SpawnVehicle(model, Config.Zones.ShopInside.Pos, Config.Zones.ShopInside.Heading, function(vehicle) + currentDisplayVehicle = vehicle + + for i=1, #Vehicles, 1 do + if model == Vehicles[i].model then + CurrentVehicleData = Vehicles[i] + break + end + end + end) + end, function(data, menu) + menu.close() + end) + end) +end + +function OpenRentedVehiclesMenu() + ESX.TriggerServerCallback('esx_vehicleshop:getRentedVehicles', function(vehicles) + local elements = {} + + for k,v in ipairs(vehicles) do + local vehicleLabel = getVehicleFromModel(v.name).label + + table.insert(elements, { + label = ('%s: %s - %s'):format(v.playerName, vehicleLabel, v.plate), + value = v.name + }) + end + + ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'rented_vehicles', { + title = TranslateCap('rent_vehicle'), + align = 'top-left', + elements = elements + }, nil, function(data, menu) + menu.close() + end) + end) +end + +function OpenBossActionsMenu() + ESX.UI.Menu.CloseAll() + + ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'reseller',{ + title = TranslateCap('dealer_boss'), + align = 'top-left', + elements = { + {label = TranslateCap('boss_actions'), value = 'boss_actions'}, + {label = TranslateCap('boss_sold'), value = 'sold_vehicles'} + }}, function(data, menu) + if data.current.value == 'boss_actions' then + TriggerEvent('esx_society:openBossMenu', 'cardealer', function(data2, menu2) + menu2.close() + end) + elseif data.current.value == 'sold_vehicles' then + + ESX.TriggerServerCallback('esx_vehicleshop:getSoldVehicles', function(customers) + local elements = { + head = { TranslateCap('customer_client'), TranslateCap('customer_model'), TranslateCap('customer_plate'), TranslateCap('customer_soldby'), TranslateCap('customer_date') }, + rows = {} + } + + for i=1, #customers, 1 do + table.insert(elements.rows, { + data = customers[i], + cols = { + customers[i].client, + customers[i].model, + customers[i].plate, + customers[i].soldby, + customers[i].date + } + }) + end + + ESX.UI.Menu.Open('list', GetCurrentResourceName(), 'sold_vehicles', elements, function(data2, menu2) + + end, function(data2, menu2) + menu2.close() + end) + end) + end + + end, function(data, menu) + menu.close() + + CurrentAction = 'boss_actions_menu' + CurrentActionMsg = TranslateCap('shop_menu') + CurrentActionData = {} + end) +end + +function OpenGetStocksMenu() + ESX.TriggerServerCallback('esx_vehicleshop:getStockItems', function(items) + local elements = {} + + for i=1, #items, 1 do + if items[i].count > 0 then + table.insert(elements, { + label = 'x' .. items[i].count .. ' ' .. items[i].label, + value = items[i].name + }) + end + end + + ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'stocks_menu', { + title = TranslateCap('dealership_stock'), + align = 'top-left', + elements = elements + }, function(data, menu) + local itemName = data.current.value + + ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'stocks_menu_get_item_count', { + title = TranslateCap('amount') + }, function(data2, menu2) + local count = tonumber(data2.value) + + if count == nil then + ESX.ShowNotification(TranslateCap('quantity_invalid')) + else + TriggerServerEvent('esx_vehicleshop:getStockItem', itemName, count) + menu2.close() + menu.close() + OpenGetStocksMenu() + end + end, function(data2, menu2) + menu2.close() + end) + end, function(data, menu) + menu.close() + end) + end) +end + +function OpenPutStocksMenu() + ESX.TriggerServerCallback('esx_vehicleshop:getPlayerInventory', function(inventory) + local elements = {} + + for i=1, #inventory.items, 1 do + local item = inventory.items[i] + + if item.count > 0 then + table.insert(elements, { + label = item.label .. ' x' .. item.count, + type = 'item_standard', + value = item.name + }) + end + end + + ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'stocks_menu', { + title = TranslateCap('inventory'), + align = 'top-left', + elements = elements + }, function(data, menu) + local itemName = data.current.value + + ESX.UI.Menu.Open('dialog', GetCurrentResourceName(), 'stocks_menu_put_item_count', { + title = TranslateCap('amount') + }, function(data2, menu2) + local count = tonumber(data2.value) + + if count == nil then + ESX.ShowNotification(TranslateCap('quantity_invalid')) + else + TriggerServerEvent('esx_vehicleshop:putStockItems', itemName, count) + menu2.close() + menu.close() + OpenPutStocksMenu() + end + end, function(data2, menu2) + menu2.close() + end) + end, function(data, menu) + menu.close() + end) + end) +end + +function hasEnteredMarker(zone) + if zone == 'ShopEntering' then + if not Config.EnablePlayerManagement then + CurrentAction = 'shop_menu' + CurrentActionMsg = TranslateCap('shop_menu') + CurrentActionData = {} + end + if ESX.PlayerData.job ~= nil and ESX.PlayerData.job.name == 'cardealer' then + CurrentAction = 'reseller_menu' + CurrentActionMsg = TranslateCap('shop_menu') + CurrentActionData = {} + end + elseif zone == 'GiveBackVehicle' and Config.EnablePlayerManagement then + local playerPed = PlayerPedId() + + if IsPedInAnyVehicle(playerPed, false) then + local vehicle = GetVehiclePedIsIn(playerPed, false) + + CurrentAction = 'give_back_vehicle' + CurrentActionMsg = TranslateCap('vehicle_menu') + CurrentActionData = {vehicle = vehicle} + end + elseif zone == 'ResellVehicle' then + local playerPed = PlayerPedId() + + if IsPedSittingInAnyVehicle(playerPed) then + local vehicle = GetVehiclePedIsIn(playerPed, false) + local vehicleData, model, resellPrice, plate + + if GetPedInVehicleSeat(vehicle, -1) == playerPed then + for i=1, #Vehicles, 1 do + if joaat(Vehicles[i].model) == GetEntityModel(vehicle) then + vehicleData = Vehicles[i] + break + end + end + + if vehicleData then + resellPrice = ESX.Math.Round(vehicleData.price / 100 * Config.ResellPercentage) + model = GetEntityModel(vehicle) + plate = ESX.Math.Trim(GetVehicleNumberPlateText(vehicle)) + + CurrentAction = 'resell_vehicle' + CurrentActionMsg = TranslateCap('sell_menu', vehicleData.name, ESX.Math.GroupDigits(resellPrice)) + + CurrentActionData = { + vehicle = vehicle, + label = vehicleData.name, + price = resellPrice, + model = model, + plate = plate + } + else + ESX.ShowNotification(TranslateCap('invalid_vehicle')) + end + end + end + + elseif zone == 'BossActions' and Config.EnablePlayerManagement and ESX.PlayerData.job ~= nil and ESX.PlayerData.job.name == 'cardealer' and ESX.PlayerData.job.grade_name == 'boss' then + CurrentAction = 'boss_actions_menu' + CurrentActionMsg = TranslateCap('shop_menu') + CurrentActionData = {} + end +end + +function hasExitedMarker(zone) + if not IsInShopMenu then + ESX.UI.Menu.CloseAll() + end + ESX.HideUI() + CurrentAction = nil +end + +AddEventHandler('onResourceStop', function(resource) + if resource == GetCurrentResourceName() then + if IsInShopMenu then + ESX.UI.Menu.CloseAll() + + local playerPed = PlayerPedId() + + FreezeEntityPosition(playerPed, false) + SetEntityVisible(playerPed, true) + SetEntityCoords(playerPed, Config.Zones.ShopEntering.Pos) + end + + DeleteDisplayVehicleInsideShop() + end +end) + +if Config.EnablePlayerManagement then + RegisterNetEvent('esx_phone:loaded') + AddEventHandler('esx_phone:loaded', function(phoneNumber, contacts) + local specialContact = { + name = TranslateCap('dealership'), + number = 'cardealer', + base64Icon = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAMAAABrrFhUAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMAUExURQAAADMzMzszM0M0M0w0M1Q1M101M2U2M242M3Y3M383Moc4MpA4Mpg5MqE5Mqk6MrI6Mro7Mrw8Mr89M71DML5EO8I+NMU/NcBMLshANctBNs5CN8RULMddKsheKs9YLtBCONZEOdlFOtxGO99HPNhMNsplKM1nKM1uJtRhLddiLt5kMNJwJ9B2JNR/IeNIPeVJPehKPuRQOuhSO+lZOOlhNuloM+p3Lep/KupwMMFORsVYUcplXc1waNJ7delUSepgVexrYe12bdeHH9iIH9qQHd2YG+udH+OEJeuGJ+uOJeuVIuChGeSpF+aqGOykHOysGeeyFeuzFuyzFuq6E+27FO+Cee3CEdaGgdqTjvCNhfKYkvOkngAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJezdycAAAEAdFJOU////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////wBT9wclAAAACXBIWXMAAA7DAAAOwwHHb6hkAAAAGHRFWHRTb2Z0d2FyZQBwYWludC5uZXQgNC4xLjb9TgnoAAAQGElEQVR4Xt2d+WMUtxXHbS6bEGMPMcQQ04aEUnqYo9xJWvC6kAKmQLM2rdn//9+g0uir2Tl0PElPszP7+cnH7Fj6rPTeG2lmvfKld2azk8lk/36L/cnkZDbDIT3Sp4DZ8QS9dTI57tNDTwJOOu+4j/0TvDQz+QXMSG+7mUn+sZBZQELnNROcKhMZBXx+gS4k8+IzTpmBXAJOnqPxTDzPFRKyCODuvSKPgwwC2EZ+lxf4E4xwCzhBU7PBPQx4BWR88+fwDgNGAbMsM9/Ec8bygE3A5966L3nOlhiZBGSf+l2YggGLgBna1DMsE4FBQH9zvw1HLEgX0Evkt5GeEVIFMFztpJF6rZQm4DNasVDSEkKSgIVN/ibP0ZwoEgQsfPTPSZgH8QIG8vYr4gdBrIABvf2K2EEQKWBQb78ichBECRhE8O8SlQ5iBAQvcffFPhoYQoSAAQ5/TcQ0CBYw0OGvCZ4GoQIGF/3bhGaDQAELvfKhERgIwgQMePrPCQsEQQLwFwYPmksiQMCC1n1iCFgooQtYwLJfPPQFQ7KAUfU/wABVwMj6TzdAFDDY6tcOMR3SBIyw/1QDJAGj7D/RAEXA6Oa/hhIHCAJG23+SAb+AEfefYsArYET1nwlvTegVgBONFnTDik8ATjNi0BEbHgGjuP5147k6dgsYaQHQxF0OOAUMfv2LhnOVzCVg4OufdFwrpS4BePkSgA6ZcAhYggCocQRCu4ClCIAaeyC0CliaAKCwhgGrALxwaUC3OtgELFEAUNjCgEXAklQAdSzVgEUAXrRUoGstzAKWbgJIzJPAKGAJJ4DEOAmMAvCCpQPda2ASsJQTQGKaBAYBS1YC1TGUQwYBOHgpQRdrdAUsaQRUdONgVwAOXVLQyTkdASO4CyiFzhMWbQEj3wbw094oaAtY2hSoaafCloClHwCdIdASgIOWGnQVNAWMeiOUSnPDtCkAh3Dz2MBD/G4BoLOKhgD2AfDo6Zv3v32y89v7929eP3n8AIf3RKMgbghgTQEPn/56hH56OXr/+ll/FhqJoC6AMwU8+RV9o/Ph6SO8ODf1RFAXwDcAnrjGvYMPT3sZB/UhUBeAXyfz+AP6E8HR2z6iIzosqQngugp4g77E8jr/KKhdEdQE4JeJPHiPfhCZHn7EVxVHz3CufKDLgrkAnhz4QA//6as7t653ead+uye/3i4qrt8+qHt4m3sQzIuhuQD8Kg3d///8FT1rc6h+fx3f1tk9mKpfCv79h7s4YybQaW4Buv//uoROdXAIKIrtvUrBdPcazpkHdLomgCUEquR/9Gd0yIBTgFBwoH4vDVy9h7PmoAqDlQD8IomnZdOPfo/emPAIENFAx4Lp7pWcBtDtSgBHCHykWm6b/iVeAcU24qQwcOkmzpwBHQa1AI4qUCXAf6IjZvwCiuKlOubTx+1LP+DU/OhqUAvAj1N4glajG2YoAioD74riBk7ODzoOARwzQNX/t9EJCyQBlYGXRZEtGWAOQADDDMAAQBds0AQUOg7cKopcyQBzAALwwxRIA4AqYBu5YLpTFFcy1USq50oAw36oGgBTdMAKUUCxq477dCi+zpQM1MKQEsBQBakUcKCab4cqoNhTB37aE19fyhIKVS2kBOBHCTxUzd1VrbdDFqCPnJZZJYuBsutcAtQigC8EhgjYwXXBq/K7HMmg7HopgGFHXIVAkbY80AUUd9ShOPZb/mRQ7pWXAvCDBFAFi6zlIUBAgUwgyiFJhmTAKEBdBn1yV4GSEAHX1bE6tfInAy2AYTlc5QC8Vy5CBBSv1ME6srAnA7k8LgUwhADVUhWvnAQJ2FEHz6srZgMyCEgB+DaBx6qhd9BOB0EC9DWBSoUS5mTAJuC1aqivDhaECdCpcG6Wd5GETQCWwgndChOgU+F8CBRXOEOhEsBwKYxdUH4B250hwJoMxCWxEJD+cBDq4E9oootAAYYhwBkK90sB+CYBxMAcAgxDoCi+x99Nh0kAYmAOAcYhwJcMmARgO1Reu/sIFmAcAmzJQApgqwPzCKiGAL4FTMlgJgQc4+sEsCGWR4AeAq0i49KP+ONJHAsBbIUwpRKOEKCHQGetgSMZTIQAfJmCaiGlEo4RoBdIO9fa3+HPp8AiQGfBTAKK2+o13QF2LT0UjkKAXhnZwbdz0pPBOATsqRft4dsa36Qmgy8rDFkQy0H5BGBdwLTekpoMZhwCdCHoXxGMFGCfA4K0ZDBbYbgW1AIovYoTgIUR83pDUjI4WWEoA/ILsOaBkpRkMBmHAOwU2vZdEpLBZIXho0LyCyjUq6yXm/GLJPsr+ILOQzzxMEffGJ5RAF5W3l9p4nd/UU15dP/+3bDhECjg4VvHMwAZBehbRrwcvf1bWG0QJuCZ8xGIjAJwQUTh6I9BGyhBArADaMO7Ny6IFKB3yUjshmTGIAGexyAwH53Ub5YOAHmQhkgW9LwQIkDdBTMCRMFEzgshAt7i/IOnvE2BGAhCBGDpb/iotTlagRgigPwU3KLBGjrplooAAaMJAdVVE+VW4wAB4U8CLozqosG/h0QXoDcAR0FVZ3hvtKUL0Os+o2B+4ewrjOkCIh8GXRDzxSNPYUwW4CmDh0b9nl1nYUwWMJoqSNHYSnTdZEleEBlNEQAa64f2wnifuiQ2oiJA0VpDtwUC8prgiIoA0LrithTGE+Ky+KiKAEX7xm1zYXxC3BgZVREA2tsoxk0k6s7QuIoARXenzlAYz2ibo/Qi4PDwUD/xlYF34vS4YcSPYRehWxgTd4dJHwrx7o6OOzu3XpKbSWX68rYe09f3aI4NO2mdW4uIAvxFwPSgNeVuYfmTh8NWZ3buEAyb7llqF8Y0Ac9wRjsHjdv4FHoBNJ2PhkXkbcJKuXGZulkYCwGEQsBXBHy0LIgHrOa7sNx3sOsVbH6EqV4Yy5uk/LfJPcD5bLwyvP2KXYZQMLXvIXj3i8wNqxXG8jY5fx70FAENz5sbG1v4UuJ/l3xM66Nrq3l2rwHDTTUlVSCQN0r6g4D7c5Gq/m9dOHd6teTM+tf4WfXIQyzz/n+9dgZnX6vO7jNg20+vbjYm3SvsLgJ0qN1cU80Dp8/jrUqcBRj/W+dP4cQlp9Y31c/1c1U2rHftoDAmCXAWAViB3lpH0+acxvuEW7ziQPxrdl9y6rz6jb6L0oL97l1VGJcCfCsCziJAKb6Isd9kTQ2ChIJAXdNuncUJG5xRZ/dsmxrvq1KIQKAemPBcDzqLAGX4QucNUqg26offIignwEXL2U9dlL/1hAFzJlRcvacemfHMAWcRULbwa7SoizJAvruhTanX1n9twO23+aBFiyuUp8acRYCnhaurZ+UB0UNA6t1C7DdxuvTrjoOGC4I5FAHOIqA8u6OFq6tlrIosBsokdg4nMnJOHnELh5uxZkIJBDiLYX0LmBE5vs6jMRZkvopMBHJpewOnsVBmGneilUdY+AUCnLWgazVUzoAtxwSQrIlj9AeCBCJngDG9zDkt++GcA/ZEWBT/gwDnHHDFAJmlPQNADYG4Yki80B5fwQVxkPOay3IlVSL77hXg2hGRIcDzFq2urouDokoBWQQ4I4BERgFXKeDMApUAZxB4YF8PFGPUM0cFcpR6ClYzYvBu4RwORCJwCXAlARkClABPIrReDAkB3hlQzoGohQEhwDsDVBjECwz4kiBJgMgElkEgBBir1CaiiVECXpH0yjyLF7SZvnQUwoKy60qA94OUHvwJN+w1EPPLWQQoRBN38IIgxIVw8wrTSBkEjFiWqSp+KruuBBA+SusGXtYCzXCB67YYCOOrrDWj+G/ZdSXANwckN40flIpmuBiqANVzCKB8nN7dK3hlHTTDxUAFXFY9hwDSFum9a3htDVoMiMVbBiQI+IfqOQRQ5oCgGwhoWSAWYhaIAh3XAogfKfljOxAQmqjWLaIg1AGyFo4BM6ASQH16rh0I/E0sr1ciIVSCenU0FMyASgBxDnQDgediUF0ORuMNMWdwYDDo9lwA/UMlm4HAW6skzICiuICTWImdAaoKElQCyEOgFQg20RIb8Xm6xDPATqml4XDQ6TgBzUDgGQIbOCwSzxD4CocFg07XBYQ8RFwPBO4lIbkakIQzz0ZHAB0C6wJChkAjELiWBLB7kcCmw++p2BQwHwB1AWGfrVsLBPZhir2LJC7iXAaip1cVAhsCwoZAPRDYDHD0377vFJ0B6gOgISDwA8ZrgcDcxjPRI7SJeeclwa6uAiV1AcEfJjEPBJuGWJVwEdRiy3BRdC4husjlcE1dQPhnzNcDQWt5eI3p7VdstASfTcmu9QHQFBD+Gev1iuDieuXg7Fes3Zdsrldl8Znq9og41FIQaAgIDIOS5qXB1oaEJfSZKM+eWFkJ0FlFU0BIMaSxLBYOl3kRJGkKiBgChjWCYdOIAB0BwYlAYlwsHCz1FCBoCYj7ZyOmxcKh0hoAHQFRQ2BMgaA1ADoCYv/bxlgCQe0qQNEREBUHBTfHEQjQyTldAcTHyDrcu4q/MWTKHfEGXQGxQ+D+/e/xVwYMuljDICD+nw79MPRA0CiCFQYBcamwZOCBoJ0CJSYB8ZNg4IEA3WtgFBAbByUDDgTdCCgwCkiYBAMOBKYJYBOQMAmGGwjQtRYWASmTYKCBwDgBrAKSJsEgA4F5AtgFJE2CIQYCdKuDVUDi/2AcWiAwlEAKq4DU/70yrEDwMzrVxS4gMQwMKhDYAoDAISAxDAwpEKBDJlwCkv8V61ACgTUACFwC0qoByTACgaUCUDgFMPwTqgEEAnsAlLgFJAfCAQQCRwCUeAQkB8LFBwJ0xIZPAIOBxQYCdMOKV0DkRkGDBQaC9jZAB6+AqA3TNgsLBM2NUBN+ASwGbn6DFvWLv/8UASwG7n2LNvUJof8kAQzlgOA7tKo/nAWQhiSAx8CNngOBuwDS0ATwGOg3END6TxXAEgd6DQSU+S+hCuAx0F8goPafLoDJQE+BgNz/AAEsNWFPgcBb/80JEMBxXSDoIRCguSSCBDBcHUsyBwLP9W+LMAE86TBvICCmP02ggPRVspKMgYBU/tUIFZC+UlqSLRC41j+NBAsYdCAIm/4lEQKGGwgCp39JjACmacAeCIKHvyRKANM04A0EEcNfEimAKRswBoK/o2GhxApgGgRcgSDy7RfEC+AZBDyBIDT510gQwDMIGAJB/NsvSBLAkw5SA0FU8K9IE8AzD5ICQcLoL0kVEP2ERR3zZzRR6Dz/EEy6gC+z9FBwL24D9XLAwocNBgEsa0URj11xdJ9JAMeCYfBjV/RlPydMAkRCSJ0IQYGA592XsAlIjwX0QMDXfVYBgsSMQAsE6ZG/Dq+A1GBACARMU7+CW4AgZRh4AgHvm1+SQYAYBvHRwBEILnO/+SVZBAjiHZgDQZ7eC3IJEHyOnAvdQPBT2vWOk4wCJFHXSs1AkHq14yGzAMEsXEIVCH5hTPgW8gsoOQlcSr9W/Jxr0rfoSUDJ7Jg0GCbHM7ygD/oUAGazk8mkMyL2J5OTWZ89L/ny5f+yiDXCPYKoAQAAAABJRU5ErkJggg==', + } + + TriggerEvent('esx_phone:addSpecialContact', specialContact.name, specialContact.number, specialContact.base64Icon) + end) +end + +-- Create Blips +if Config.Blip.show then + CreateThread(function() + local blip = AddBlipForCoord(Config.Zones.ShopEntering.Pos) + + SetBlipSprite (blip, Config.Blip.Sprite) + SetBlipDisplay(blip, Config.Blip.Display) + SetBlipScale (blip, Config.Blip.Scale) + SetBlipAsShortRange(blip, true) + + BeginTextCommandSetBlipName('STRING') + AddTextComponentSubstringPlayerName(TranslateCap('car_dealer')) + EndTextCommandSetBlipName(blip) + end) +end + +-- Enter / Exit marker events & Draw Markers +CreateThread(function() + while true do + Wait(0) + local playerCoords = GetEntityCoords(PlayerPedId()) + local isInMarker, letSleep, currentZone = false, true + + for k,v in pairs(Config.Zones) do + local distance = #(playerCoords - v.Pos) + + if distance < Config.DrawDistance then + letSleep = false + + if v.Type ~= -1 then + DrawMarker(v.Type, v.Pos, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, v.Size.x, v.Size.y, v.Size.z, Config.MarkerColor.r, Config.MarkerColor.g, Config.MarkerColor.b, 100, false, true, 2, false, nil, nil, false) + end + + if distance < v.Size.x then + isInMarker, currentZone = true, k + end + end + end + + if (isInMarker and not HasAlreadyEnteredMarker) or (isInMarker and LastZone ~= currentZone) then + HasAlreadyEnteredMarker, LastZone = true, currentZone + LastZone = currentZone + hasEnteredMarker(currentZone) + end + + if not isInMarker and HasAlreadyEnteredMarker then + HasAlreadyEnteredMarker = false + hasExitedMarker(LastZone) + end + + if letSleep then + Wait(500) + end + end +end) + +-- Key controls +CreateThread(function() + while true do + Wait(0) + + if CurrentAction then + ESX.TextUI(CurrentActionMsg) + + if IsControlJustReleased(0, 38) then + if CurrentAction == 'shop_menu' then + if Config.LicenseEnable then + ESX.TriggerServerCallback('esx_license:checkLicense', function(hasDriversLicense) + if hasDriversLicense then + OpenShopMenu() + else + ESX.ShowNotification(TranslateCap('license_missing')) + end + end, GetPlayerServerId(PlayerId()), 'drive') + else + OpenShopMenu() + end + elseif CurrentAction == 'reseller_menu' then + OpenResellerMenu() + elseif CurrentAction == 'give_back_vehicle' then + ESX.TriggerServerCallback('esx_vehicleshop:giveBackVehicle', function(isRentedVehicle) + if isRentedVehicle then + ESX.Game.DeleteVehicle(CurrentActionData.vehicle) + ESX.ShowNotification(TranslateCap('delivered')) + else + ESX.ShowNotification(TranslateCap('not_rental')) + end + end, ESX.Math.Trim(GetVehicleNumberPlateText(CurrentActionData.vehicle))) + elseif CurrentAction == 'resell_vehicle' then + ESX.TriggerServerCallback('esx_vehicleshop:resellVehicle', function(vehicleSold) + if vehicleSold then + ESX.Game.DeleteVehicle(CurrentActionData.vehicle) + ESX.ShowNotification(TranslateCap('vehicle_sold_for', CurrentActionData.label, ESX.Math.GroupDigits(CurrentActionData.price))) + else + ESX.ShowNotification(TranslateCap('not_yours')) + end + end, CurrentActionData.plate, CurrentActionData.model) + elseif CurrentAction == 'boss_actions_menu' then + OpenBossActionsMenu() + end + ESX.HideUI() + CurrentAction = nil + end + else + Wait(500) + end + end +end) + +CreateThread(function() + RequestIpl('shr_int') -- Load walls and floor + + local interiorID = 7170 + PinInteriorInMemory(interiorID) + ActivateInteriorEntitySet(interiorID, 'csr_beforeMission') -- Load large window + RefreshInterior(interiorID) +end) + +if ESX.PlayerLoaded then PlayerManagement() end \ No newline at end of file diff --git a/[esx_addons]/esx_vehicleshop/client/utils.lua b/[esx_addons]/esx_vehicleshop/client/utils.lua new file mode 100644 index 00000000..6d05de30 --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/client/utils.lua @@ -0,0 +1,41 @@ +local NumberCharset = {} +local Charset = {} + +for i = 48, 57 do table.insert(NumberCharset, string.char(i)) end + +for i = 65, 90 do table.insert(Charset, string.char(i)) end +for i = 97, 122 do table.insert(Charset, string.char(i)) end + +function GeneratePlate() + math.randomseed(GetGameTimer()) + + local generatedPlate = string.upper(GetRandomLetter(Config.PlateLetters) .. (Config.PlateUseSpace and ' ' or '') .. GetRandomNumber(Config.PlateNumbers)) + + local isTaken = IsPlateTaken(generatedPlate) + if isTaken then + return GeneratePlate() + end + + return generatedPlate +end + +-- mixing async with sync tasks +function IsPlateTaken(plate) + local p = promise.new() + + ESX.TriggerServerCallback('esx_vehicleshop:isPlateTaken', function(isPlateTaken) + p:resolve(isPlateTaken) + end, plate) + + return Citizen.Await(p) +end + +function GetRandomNumber(length) + Wait(0) + return length > 0 and GetRandomNumber(length - 1) .. NumberCharset[math.random(1, #NumberCharset)] or '' +end + +function GetRandomLetter(length) + Wait(0) + return length > 0 and GetRandomLetter(length - 1) .. Charset[math.random(1, #Charset)] or '' +end diff --git a/[esx_addons]/esx_vehicleshop/config.lua b/[esx_addons]/esx_vehicleshop/config.lua new file mode 100644 index 00000000..db529516 --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/config.lua @@ -0,0 +1,66 @@ +Config = {} +Config.DrawDistance = 10 +Config.MarkerColor = {r = 120, g = 120, b = 240} +Config.EnablePlayerManagement = false -- enables the actual car dealer job. You'll need esx_addonaccount, esx_billing and esx_society +Config.ResellPercentage = 50 + +Config.Locale = GetConvar('esx:locale', 'en') + +Config.LicenseEnable = false -- require people to own drivers license when buying vehicles? Only applies if EnablePlayerManagement is disabled. Requires esx_license + +-- looks like this: 'LLL NNN' +-- The maximum plate length is 8 chars (including spaces & symbols), don't go past it! +Config.PlateLetters = 3 +Config.PlateNumbers = 3 +Config.PlateUseSpace = true + +Config.OxInventory = ESX.GetConfig().OxInventory + +Config.Blip = { + show = true, + Sprite = 326, + Display = 4, + Scale = 0.8 +} + +Config.Zones = { + + ShopEntering = { + Pos = vector3(-33.7, -1102.0, 25.4), + Size = {x = 1.5, y = 1.5, z = 1.0}, + Type = 1 + }, + + ShopInside = { + Pos = vector3(-47.5, -1097.2, 25.4), + Size = {x = 1.5, y = 1.5, z = 1.0}, + Heading = -20.0, + Type = -1 + }, + + ShopOutside = { + Pos = vector3(-28.6, -1085.6, 25.5), + Size = {x = 1.5, y = 1.5, z = 1.0}, + Heading = 330.0, + Type = -1 + }, + + BossActions = { + Pos = vector3(-32.0, -1114.2, 25.4), + Size = {x = 1.5, y = 1.5, z = 1.0}, + Type = -1 + }, + + GiveBackVehicle = { + Pos = vector3(-18.2, -1078.5, 25.6), + Size = {x = 3.0, y = 3.0, z = 1.0}, + Type = (Config.EnablePlayerManagement and 1 or -1) + }, + + ResellVehicle = { + Pos = vector3(-44.6, -1080.7, 25.6), + Size = {x = 3.0, y = 3.0, z = 1.0}, + Type = 1 + } + +} diff --git a/[esx_addons]/esx_vehicleshop/esx_vehicleshop.sql b/[esx_addons]/esx_vehicleshop/esx_vehicleshop.sql new file mode 100644 index 00000000..e18a2d3b --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/esx_vehicleshop.sql @@ -0,0 +1,339 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_cardealer','Concessionnaire',1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_cardealer','Concesionnaire',1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('cardealer','Concessionnaire') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('cardealer',0,'recruit','Recrue',10,'{}','{}'), + ('cardealer',1,'novice','Novice',25,'{}','{}'), + ('cardealer',2,'experienced','Experimente',40,'{}','{}'), + ('cardealer',3,'boss','Patron',0,'{}','{}') +; + +CREATE TABLE `cardealer_vehicles` ( + `id` int NOT NULL AUTO_INCREMENT, + `vehicle` varchar(255) NOT NULL, + `price` int NOT NULL, + + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `vehicle_sold` ( + `client` VARCHAR(50) NOT NULL, + `model` VARCHAR(50) NOT NULL, + `plate` VARCHAR(50) NOT NULL, + `soldby` VARCHAR(50) NOT NULL, + `date` VARCHAR(50) NOT NULL, + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `owned_vehicles` ( + `owner` VARCHAR(60) NOT NULL, + `plate` varchar(12) NOT NULL, + `vehicle` longtext, + `type` VARCHAR(20) NOT NULL DEFAULT 'car', + `job` VARCHAR(20) NULL DEFAULT NULL, + `stored` TINYINT(1) NOT NULL DEFAULT '0', + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `rented_vehicles` ( + `vehicle` varchar(60) NOT NULL, + `plate` varchar(12) NOT NULL, + `player_name` varchar(255) NOT NULL, + `base_price` int NOT NULL, + `rent_price` int NOT NULL, + `owner` VARCHAR(60) NOT NULL, + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `vehicle_categories` ( + `name` varchar(60) NOT NULL, + `label` varchar(60) NOT NULL, + + PRIMARY KEY (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `vehicle_categories` (name, label) VALUES + ('compacts','Compacts'), + ('coupes','Coupés'), + ('sedans','Sedans'), + ('sports','Sports'), + ('sportsclassics','Sports Classics'), + ('super','Super'), + ('muscle','Muscle'), + ('offroad','Off Road'), + ('suvs','SUVs'), + ('vans','Vans'), + ('motorcycles','Motos') +; + +CREATE TABLE `vehicles` ( + `name` varchar(60) NOT NULL, + `model` varchar(60) NOT NULL, + `price` int NOT NULL, + `category` varchar(60) DEFAULT NULL, + + PRIMARY KEY (`model`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `vehicles` (name, model, price, category) VALUES + ('Blade','blade',15000,'muscle'), + ('Buccaneer','buccaneer',18000,'muscle'), + ('Buccaneer Rider','buccaneer2',24000,'muscle'), + ('Chino','chino',15000,'muscle'), + ('Chino Luxe','chino2',19000,'muscle'), + ('Coquette BlackFin','coquette3',55000,'muscle'), + ('Dominator','dominator',35000,'muscle'), + ('Dukes','dukes',28000,'muscle'), + ('Gauntlet','gauntlet',30000,'muscle'), + ('Hotknife','hotknife',125000,'muscle'), + ('Faction','faction',20000,'muscle'), + ('Faction Rider','faction2',30000,'muscle'), + ('Faction XL','faction3',40000,'muscle'), + ('Nightshade','nightshade',65000,'muscle'), + ('Phoenix','phoenix',12500,'muscle'), + ('Picador','picador',18000,'muscle'), + ('Sabre Turbo','sabregt',20000,'muscle'), + ('Sabre GT','sabregt2',25000,'muscle'), + ('Slam Van','slamvan3',11500,'muscle'), + ('Tampa','tampa',16000,'muscle'), + ('Virgo','virgo',14000,'muscle'), + ('Vigero','vigero',12500,'muscle'), + ('Voodoo','voodoo',7200,'muscle'), + ('Blista','blista',8000,'compacts'), + ('Brioso R/A','brioso',18000,'compacts'), + ('Issi','issi2',10000,'compacts'), + ('Panto','panto',10000,'compacts'), + ('Prairie','prairie',12000,'compacts'), + ('Bison','bison',45000,'vans'), + ('Bobcat XL','bobcatxl',32000,'vans'), + ('Burrito','burrito3',19000,'vans'), + ('Burrito','gburrito2',29000,'vans'), + ('Camper','camper',42000,'vans'), + ('Gang Burrito','gburrito',45000,'vans'), + ('Journey','journey',6500,'vans'), + ('Minivan','minivan',13000,'vans'), + ('Moonbeam','moonbeam',18000,'vans'), + ('Moonbeam Rider','moonbeam2',35000,'vans'), + ('Paradise','paradise',19000,'vans'), + ('Rumpo','rumpo',15000,'vans'), + ('Rumpo Trail','rumpo3',19500,'vans'), + ('Surfer','surfer',12000,'vans'), + ('Youga','youga',10800,'vans'), + ('Youga Luxuary','youga2',14500,'vans'), + ('Asea','asea',5500,'sedans'), + ('Cognoscenti','cognoscenti',55000,'sedans'), + ('Emperor','emperor',8500,'sedans'), + ('Fugitive','fugitive',12000,'sedans'), + ('Glendale','glendale',6500,'sedans'), + ('Intruder','intruder',7500,'sedans'), + ('Premier','premier',8000,'sedans'), + ('Primo Custom','primo2',14000,'sedans'), + ('Regina','regina',5000,'sedans'), + ('Schafter','schafter2',25000,'sedans'), + ('Stretch','stretch',90000,'sedans'), + ('Super Diamond','superd',130000,'sedans'), + ('Tailgater','tailgater',30000,'sedans'), + ('Warrener','warrener',4000,'sedans'), + ('Washington','washington',9000,'sedans'), + ('Baller','baller2',40000,'suvs'), + ('Baller Sport','baller3',60000,'suvs'), + ('Cavalcade','cavalcade2',55000,'suvs'), + ('Contender','contender',70000,'suvs'), + ('Dubsta','dubsta',45000,'suvs'), + ('Dubsta Luxuary','dubsta2',60000,'suvs'), + ('Fhantom','fq2',17000,'suvs'), + ('Grabger','granger',50000,'suvs'), + ('Gresley','gresley',47500,'suvs'), + ('Huntley S','huntley',40000,'suvs'), + ('Landstalker','landstalker',35000,'suvs'), + ('Mesa','mesa',16000,'suvs'), + ('Mesa Trail','mesa3',40000,'suvs'), + ('Patriot','patriot',55000,'suvs'), + ('Radius','radi',29000,'suvs'), + ('Rocoto','rocoto',45000,'suvs'), + ('Seminole','seminole',25000,'suvs'), + ('XLS','xls',32000,'suvs'), + ('Btype','btype',62000,'sportsclassics'), + ('Btype Luxe','btype3',85000,'sportsclassics'), + ('Btype Hotroad','btype2',155000,'sportsclassics'), + ('Casco','casco',30000,'sportsclassics'), + ('Coquette Classic','coquette2',40000,'sportsclassics'), + ('Manana','manana',12800,'sportsclassics'), + ('Monroe','monroe',55000,'sportsclassics'), + ('Pigalle','pigalle',20000,'sportsclassics'), + ('Stinger','stinger',80000,'sportsclassics'), + ('Stinger GT','stingergt',75000,'sportsclassics'), + ('Stirling GT','feltzer3',65000,'sportsclassics'), + ('Z-Type','ztype',220000,'sportsclassics'), + ('Bifta','bifta',12000,'offroad'), + ('Bf Injection','bfinjection',16000,'offroad'), + ('Blazer','blazer',6500,'offroad'), + ('Blazer Sport','blazer4',8500,'offroad'), + ('Brawler','brawler',45000,'offroad'), + ('Bubsta 6x6','dubsta3',120000,'offroad'), + ('Dune Buggy','dune',8000,'offroad'), + ('Guardian','guardian',45000,'offroad'), + ('Rebel','rebel2',35000,'offroad'), + ('Sandking','sandking',55000,'offroad'), + ('The Liberator','monster',210000,'offroad'), + ('Trophy Truck','trophytruck',60000,'offroad'), + ('Trophy Truck Limited','trophytruck2',80000,'offroad'), + ('Cognoscenti Cabrio','cogcabrio',55000,'coupes'), + ('Exemplar','exemplar',32000,'coupes'), + ('F620','f620',40000,'coupes'), + ('Felon','felon',42000,'coupes'), + ('Felon GT','felon2',55000,'coupes'), + ('Jackal','jackal',38000,'coupes'), + ('Oracle XS','oracle2',35000,'coupes'), + ('Sentinel','sentinel',32000,'coupes'), + ('Sentinel XS','sentinel2',40000,'coupes'), + ('Windsor','windsor',95000,'coupes'), + ('Windsor Drop','windsor2',125000,'coupes'), + ('Zion','zion',36000,'coupes'), + ('Zion Cabrio','zion2',45000,'coupes'), + ('9F','ninef',65000,'sports'), + ('9F Cabrio','ninef2',80000,'sports'), + ('Alpha','alpha',60000,'sports'), + ('Banshee','banshee',70000,'sports'), + ('Bestia GTS','bestiagts',55000,'sports'), + ('Buffalo','buffalo',12000,'sports'), + ('Buffalo S','buffalo2',20000,'sports'), + ('Carbonizzare','carbonizzare',75000,'sports'), + ('Comet','comet2',65000,'sports'), + ('Coquette','coquette',65000,'sports'), + ('Drift Tampa','tampa2',80000,'sports'), + ('Elegy','elegy2',38500,'sports'), + ('Feltzer','feltzer2',55000,'sports'), + ('Furore GT','furoregt',45000,'sports'), + ('Fusilade','fusilade',40000,'sports'), + ('Jester','jester',65000,'sports'), + ('Jester(Racecar)','jester2',135000,'sports'), + ('Khamelion','khamelion',38000,'sports'), + ('Kuruma','kuruma',30000,'sports'), + ('Lynx','lynx',40000,'sports'), + ('Mamba','mamba',70000,'sports'), + ('Massacro','massacro',65000,'sports'), + ('Massacro(Racecar)','massacro2',130000,'sports'), + ('Omnis','omnis',35000,'sports'), + ('Penumbra','penumbra',28000,'sports'), + ('Rapid GT','rapidgt',35000,'sports'), + ('Rapid GT Convertible','rapidgt2',45000,'sports'), + ('Schafter V12','schafter3',50000,'sports'), + ('Seven 70','seven70',39500,'sports'), + ('Sultan','sultan',15000,'sports'), + ('Surano','surano',50000,'sports'), + ('Tropos','tropos',40000,'sports'), + ('Verlierer','verlierer2',70000,'sports'), + ('Adder','adder',900000,'super'), + ('Banshee 900R','banshee2',255000,'super'), + ('Bullet','bullet',90000,'super'), + ('Cheetah','cheetah',375000,'super'), + ('Entity XF','entityxf',425000,'super'), + ('ETR1','sheava',220000,'super'), + ('FMJ','fmj',185000,'super'), + ('Infernus','infernus',180000,'super'), + ('Osiris','osiris',160000,'super'), + ('Pfister','pfister811',85000,'super'), + ('RE-7B','le7b',325000,'super'), + ('Reaper','reaper',150000,'super'), + ('Sultan RS','sultanrs',65000,'super'), + ('T20','t20',300000,'super'), + ('Turismo R','turismor',350000,'super'), + ('Tyrus','tyrus',600000,'super'), + ('Vacca','vacca',120000,'super'), + ('Voltic','voltic',90000,'super'), + ('X80 Proto','prototipo',2500000,'super'), + ('Zentorno','zentorno',1500000,'super'), + ('Akuma','AKUMA',7500,'motorcycles'), + ('Avarus','avarus',18000,'motorcycles'), + ('Bagger','bagger',13500,'motorcycles'), + ('Bati 801','bati',12000,'motorcycles'), + ('Bati 801RR','bati2',19000,'motorcycles'), + ('BF400','bf400',6500,'motorcycles'), + ('BMX (velo)','bmx',160,'motorcycles'), + ('Carbon RS','carbonrs',18000,'motorcycles'), + ('Chimera','chimera',38000,'motorcycles'), + ('Cliffhanger','cliffhanger',9500,'motorcycles'), + ('Cruiser (velo)','cruiser',510,'motorcycles'), + ('Daemon','daemon',11500,'motorcycles'), + ('Daemon High','daemon2',13500,'motorcycles'), + ('Defiler','defiler',9800,'motorcycles'), + ('Double T','double',28000,'motorcycles'), + ('Enduro','enduro',5500,'motorcycles'), + ('Esskey','esskey',4200,'motorcycles'), + ('Faggio','faggio',1900,'motorcycles'), + ('Vespa','faggio2',2800,'motorcycles'), + ('Fixter (velo)','fixter',225,'motorcycles'), + ('Gargoyle','gargoyle',16500,'motorcycles'), + ('Hakuchou','hakuchou',31000,'motorcycles'), + ('Hakuchou Sport','hakuchou2',55000,'motorcycles'), + ('Hexer','hexer',12000,'motorcycles'), + ('Innovation','innovation',23500,'motorcycles'), + ('Manchez','manchez',5300,'motorcycles'), + ('Nemesis','nemesis',5800,'motorcycles'), + ('Nightblade','nightblade',35000,'motorcycles'), + ('PCJ-600','pcj',6200,'motorcycles'), + ('Ruffian','ruffian',6800,'motorcycles'), + ('Sanchez','sanchez',5300,'motorcycles'), + ('Sanchez Sport','sanchez2',5300,'motorcycles'), + ('Sanctus','sanctus',25000,'motorcycles'), + ('Scorcher (velo)','scorcher',280,'motorcycles'), + ('Sovereign','sovereign',22000,'motorcycles'), + ('Shotaro Concept','shotaro',320000,'motorcycles'), + ('Thrust','thrust',24000,'motorcycles'), + ('Tri bike (velo)','tribike3',520,'motorcycles'), + ('Vader','vader',7200,'motorcycles'), + ('Vortex','vortex',9800,'motorcycles'), + ('Woflsbane','wolfsbane',9000,'motorcycles'), + ('Zombie','zombiea',9500,'motorcycles'), + ('Zombie Luxuary','zombieb',12000,'motorcycles'), + ('blazer5', 'blazer5', 1755600, 'offroad'), + ('Ruiner 2', 'ruiner2', 5745600, 'muscle'), + ('Voltic 2', 'voltic2', 3830400, 'super'), + ('Ardent', 'ardent', 1150000, 'sportsclassics'), + ('Oppressor', 'oppressor', 3524500, 'super'), + ('Visione', 'visione', 2250000, 'super'), + ('Retinue', 'retinue', 615000, 'sportsclassics'), + ('Cyclone', 'cyclone', 1890000, 'super'), + ('Rapid GT3', 'rapidgt3', 885000, 'sportsclassics'), + ('raiden', 'raiden', 1375000, 'sports'), + ('Yosemite', 'yosemite', 485000, 'muscle'), + ('Deluxo', 'deluxo', 4721500, 'sportsclassics'), + ('Pariah', 'pariah', 1420000, 'sports'), + ('Stromberg', 'stromberg', 3185350, 'sports'), + ('SC 1', 'sc1', 1603000, 'super'), + ('riata', 'riata', 380000, 'offroad'), + ('Hermes', 'hermes', 535000, 'muscle'), + ('Savestra', 'savestra', 990000, 'sportsclassics'), + ('Streiter', 'streiter', 500000, 'sports'), + ('Kamacho', 'kamacho', 345000, 'offroad'), + ('GT 500', 'gt500', 785000, 'sportsclassics'), + ('Z190', 'z190', 900000, 'sportsclassics'), + ('Viseris', 'viseris', 875000, 'sportsclassics'), + ('Autarch', 'autarch', 1955000, 'super'), + ('Comet 5', 'comet5', 1145000, 'sports'), + ('Neon', 'neon', 1500000, 'sports'), + ('Revolter', 'revolter', 1610000, 'sports'), + ('Sentinel3', 'sentinel3', 650000, 'sports'), + ('Hustler', 'hustler', 625000, 'muscle') +; diff --git a/[esx_addons]/esx_vehicleshop/fxmanifest.lua b/[esx_addons]/esx_vehicleshop/fxmanifest.lua new file mode 100644 index 00000000..f9f16497 --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/fxmanifest.lua @@ -0,0 +1,35 @@ +fx_version 'adamant' + +game 'gta5' + +lua54 'yes' + +description 'ESX Vehicle Shop' + +version '1.9.0' + +shared_script '@es_extended/imports.lua' + +server_scripts { + '@oxmysql/lib/MySQL.lua', + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'server/main.lua' +} + +client_scripts { + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua', + 'client/utils.lua', + 'client/main.lua' +} + +dependencies { + 'es_extended', + 'esx_society' +} + + +export 'GeneratePlate' diff --git a/[esx_addons]/esx_vehicleshop/locales/br.lua b/[esx_addons]/esx_vehicleshop/locales/br.lua new file mode 100644 index 00000000..c402001e --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/locales/br.lua @@ -0,0 +1,65 @@ +Locales['br'] = { + -- global menus + ['not_enough_in_society'] = 'não há o suficiente desse ~r~that item na sociedade!', + ['player_cannot_hold'] = 'você não tem espaço suficiente em seu inventário!', + ['vehicle_belongs'] = 'um veículo com placa %s agora pertence a you', + ['broke_company'] = 'você não tem dinheiro suficiente na conta da empresa', + ['license_missing'] = 'você não tem carteira de motorista!', + ['buy_vehicle_shop'] = 'comprar %s por $%s?', + ['buy_vehicle'] = 'comprar veículo', + ['car_dealer'] = 'Concessionária de carros', + ['shop_awaiting_model'] = 'o veículo está carregando no momento, aguarde', + ['create_bill'] = 'criar recibo', + ['dealer_boss'] = 'Concessionária de carros - Chefe', + ['delivered'] = 'veículo entregue para o revendedor', + ['depop_vehicle'] = 'volte ao veiculo', + ['return_provider'] = 'devolver veículo ao fornecedor', + ['get_rented_vehicles'] = 'veículos para alugar', + ['no_current_vehicle'] = 'you do not currently have an vehicle displayed', + ['invalid_amount'] = 'Montante inválido', + ['invoice_amount'] = 'valor da fatura', + ['no'] = 'não', + ['yes'] = 'sim', + ['no_players'] = 'sem jogadores nas proximidades', + ['not_enough_money'] = 'você não tem dinheiro suficiente', + ['not_rental'] = 'isso não é um ~r~veículo de aluguel', + ['not_yours'] = 'este veículo não pertence a você', + ['paid_rental'] = 'you have paid $%s for renting an vehicle with plate %s', + ['paid_rental_evicted'] = 'you could not afford to pay $%s for your rented vehicle with plate %s, it has been returned to the dealership', + ['pop_vehicle'] = 'sai do veiculo', + ['rent_vehicle'] = 'Concessionária - Veículos para alugar', + ['return_provider_menu'] = 'revendedor de carros - Devolver veículo ao fornecedor', + ['rental_amount'] = 'montante do aluguel', + ['sell_menu'] = 'Pressione [E] para vender ', + ['set_vehicle_owner_rent'] = 'Atribuir veículo [Alugar]', + ['set_vehicle_owner_sell'] = 'Veículos para [Venda]', + ['shop_menu'] = 'pressione [E] para acessar o menu', + ['generic_shopitem'] = '$%s', + ['vehicle_dealer'] = 'Veículo - Concessionária', + ['vehicle_menu'] = 'Pressione [E] para fazer o seu veículo', + ['vehicle_purchased'] = 'você comprou um veículo', + ['vehicle_set_owned'] = 'Veículo %s foi atribuído a %s', + ['vehicle_set_rented'] = 'Veículo %s foi alugado para %s', + ['vehicle_sold_for'] = 'o %s foi vendido com sucesso para $%s', + ['vehicle_sold_to'] = 'Veículo %s vendido para %s', + ['deposit_stock'] = 'Colocar no estoque', + ['take_stock'] = 'Retirar do estoque', + ['dealership_stock'] = 'estoque da concessionária', + ['amount'] = 'montante', + ['quantity_invalid'] = 'quantidade inválida', + ['inventory'] = 'Inventário', + ['dealership'] = 'Concessionária', + ['dealer_customers'] = 'clientes revendedores', + ['have_withdrawn'] = 'você retirou x%s %s', + ['have_deposited'] = 'você depositou x%s %s', + ['boss_actions'] = 'ações do chefe', + ['invalid_vehicle'] = 'Veículo inválido', + + -- sold vehicles + ['boss_sold'] = 'lista de veículos vendidos', + ['customer_client'] = 'nome do cliente', + ['customer_model'] = 'modelo de carro', + ['customer_plate'] = 'placa do carro', + ['customer_soldby'] = 'vendido por', + ['customer_date'] = 'data', +} diff --git a/[esx_addons]/esx_vehicleshop/locales/cs.lua b/[esx_addons]/esx_vehicleshop/locales/cs.lua new file mode 100644 index 00000000..bc14c3dd --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/locales/cs.lua @@ -0,0 +1,65 @@ +Locales['cs'] = { + -- global menus + ['not_enough_in_society'] = 'neni zde dostatek ~r~tohoto predmetu ve spolecnosti!', + ['player_cannot_hold'] = '~r~nemas dostatek volneho mista ve tvem inventari!', + ['vehicle_belongs'] = 'vozidlo se značkou %s nyní patří tobě', + ['broke_company'] = 'nemáš dostatek peněz na účtě společnosti', + ['license_missing'] = 'nemáš ridicský prukaz!', + ['buy_vehicle_shop'] = 'přeješ si zakoupit %s za $%s?', + ['buy_vehicle'] = 'zakoupit vozidlo', + ['car_dealer'] = 'autosalon', + ['shop_awaiting_model'] = 'vozidlo se právě STAHUJE & NAČÍTÁ, čekej prosím', + ['create_bill'] = 'vytvořit účtenku', + ['dealer_boss'] = 'prodejce aut - Sef', + ['delivered'] = 'vozidlo bylo doruceno dealerovi', + ['depop_vehicle'] = 'vrátit vozidlo do garaze', + ['return_provider'] = 'vratit vozidlo zprostredkovateli', + ['get_rented_vehicles'] = 'vozidla na pujceni', + ['no_current_vehicle'] = 'momentalne nemas zobrazene vozidlo', + ['invalid_amount'] = 'neplatná částka', + ['invoice_amount'] = 'castka na fakture', + ['no'] = 'ne', + ['yes'] = 'ano', + ['no_players'] = 'žádní hráči poblíž tebe', + ['not_enough_money'] = 'nemáš dostatek peněz', + ['not_rental'] = 'tohle není ~r~půjčitelné vozidlo', + ['not_yours'] = 'tohle auto ti nepatří', + ['paid_rental'] = 'you have paid $%s for renting an vehicle with plate %s', + ['paid_rental_evicted'] = 'you could not afford to pay $%s for your rented vehicle with plate %s, it has been returned to the dealership', + ['pop_vehicle'] = 'vlozit vozidlo k prodeji', + ['rent_vehicle'] = 'autosalon - Vozidla k pujceni', + ['return_provider_menu'] = 'autosalon - Vratit vozidlo zprostredkovateli', + ['rental_amount'] = 'cena pujceni', + ['sell_menu'] = 'stiskni [E] pro prodani %s za $%s', + ['set_vehicle_owner_rent'] = 'pujcit vozidlo', + ['set_vehicle_owner_sell'] = 'prodat vozidlo', + ['shop_menu'] = 'stiskni [E] pro přístup do menu', + ['generic_shopitem'] = '$%s', + ['vehicle_dealer'] = 'vozidlo - Prodejce aut', + ['vehicle_menu'] = 'stiskni [E] pro vraceni vozidla zpet', + ['vehicle_purchased'] = 'zakoupil jsi vozidlo', + ['vehicle_set_owned'] = 'vozidlo %s bylo prirazeno %s', + ['vehicle_set_rented'] = 'vozidlo %s bylo pujceno za %s', + ['vehicle_sold_for'] = '%s bylo prodano za $%s', + ['vehicle_sold_to'] = 'vozidlo se znackou %s bylo prodano za %s', + ['deposit_stock'] = 'vlozit do skladu', + ['take_stock'] = 'vybraz ze skladu', + ['dealership_stock'] = 'sklad Autosalonu', + ['amount'] = 'castka', + ['quantity_invalid'] = 'to je neplatne mnozstvi', + ['inventory'] = 'inventar', + ['dealership'] = 'autodealer', + ['dealer_customers'] = 'zakaznici dealera', + ['have_withdrawn'] = 'vybral jsi x%s %s', + ['have_deposited'] = 'vlozil jsi x%s %s', + ['boss_actions'] = 'akce šéfa', + ['invalid_vehicle'] = 'neplatné vozidlo', + + -- sold vehicles + ['boss_sold'] = 'seznam prodaných vozidel', + ['customer_client'] = 'jméno zákazníka', + ['customer_model'] = 'model auta', + ['customer_plate'] = 'značka auta', + ['customer_soldby'] = 'prodáno zaměstnancem', + ['customer_date'] = 'datum', +} diff --git a/[esx_addons]/esx_vehicleshop/locales/en.lua b/[esx_addons]/esx_vehicleshop/locales/en.lua new file mode 100644 index 00000000..3511ec35 --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/locales/en.lua @@ -0,0 +1,65 @@ +Locales['en'] = { + -- global menus + ['not_enough_in_society'] = 'there\'s not enough of ~r~that item in the society!', + ['player_cannot_hold'] = 'you do ~r~not have enough free space in your inventory!', + ['vehicle_belongs'] = 'a vehicle with plate %s now belongs to you', + ['broke_company'] = 'you do not have enough money in the company account', + ['license_missing'] = 'you don\'t have a driver\'s license!', + ['buy_vehicle_shop'] = 'do you want to purchase %s for $%s?', + ['buy_vehicle'] = 'buy vehicle', + ['car_dealer'] = 'car Dealership', + ['shop_awaiting_model'] = 'the vehicle is currently loading, please wait', + ['create_bill'] = 'create bill', + ['dealer_boss'] = 'car Dealer - Boss', + ['delivered'] = 'the vehicle has been delivered to the dealer', + ['depop_vehicle'] = 'return vehicle to garage', + ['return_provider'] = 'return vehicle to provider', + ['get_rented_vehicles'] = 'vehicles for rent', + ['no_current_vehicle'] = 'you do not currently have a vehicle on display', + ['invalid_amount'] = 'invalid amount', + ['invoice_amount'] = 'invoice amount', + ['no'] = 'no', + ['yes'] = 'yes', + ['no_players'] = 'there is no players near you', + ['not_enough_money'] = 'you do not have enough money', + ['not_rental'] = 'this is not a ~r~rental vehicle', + ['not_yours'] = 'this vehicle does not belong to you', + ['paid_rental'] = 'you have paid $%s for renting a vehicle with plate %s', + ['paid_rental_evicted'] = 'you could not afford to pay $%s for your rented vehicle with plate %s, it has been returned to the dealership', + ['pop_vehicle'] = 'put out vehicle for sale', + ['rent_vehicle'] = 'car Dealer - Vehicles for rent', + ['return_provider_menu'] = 'car Dealer - Return vehicle to provider', + ['rental_amount'] = 'rental amount', + ['sell_menu'] = 'press [E] to sell your %s for $%s', + ['set_vehicle_owner_rent'] = 'rent vehicle', + ['set_vehicle_owner_sell'] = 'sell vehicle', + ['shop_menu'] = 'press [E] to access the menu', + ['generic_shopitem'] = '$%s', + ['vehicle_dealer'] = 'vehicle - Car Dealer', + ['vehicle_menu'] = 'press [E] to give back the rented vehicle', + ['vehicle_purchased'] = 'you bought a vehicle', + ['vehicle_set_owned'] = 'vehicle %s has been assigned to %s', + ['vehicle_set_rented'] = 'vehicle %s has been rented to %s', + ['vehicle_sold_for'] = 'the %s has been sold for $%s', + ['vehicle_sold_to'] = 'the vehicle with plate %s has been sold to %s', + ['deposit_stock'] = 'deposit stock', + ['take_stock'] = 'withdraw stock', + ['dealership_stock'] = 'dealership Stock', + ['amount'] = 'amount', + ['quantity_invalid'] = 'that\'s an invalid quantity', + ['inventory'] = 'inventory', + ['dealership'] = 'car Dealer', + ['dealer_customers'] = 'dealer customers', + ['have_withdrawn'] = 'you have withdrawn x%s %s', + ['have_deposited'] = 'you have deposited x%s %s', + ['boss_actions'] = 'boss actions', + ['invalid_vehicle'] = 'Invalid vehicle', + + -- sold vehicles + ['boss_sold'] = 'list of sold vehicles', + ['customer_client'] = 'customer name', + ['customer_model'] = 'car model', + ['customer_plate'] = 'car plate', + ['customer_soldby'] = 'sold by', + ['customer_date'] = 'date', +} diff --git a/[esx_addons]/esx_vehicleshop/locales/es.lua b/[esx_addons]/esx_vehicleshop/locales/es.lua new file mode 100644 index 00000000..29411834 --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/locales/es.lua @@ -0,0 +1,65 @@ +Locales['es'] = { + -- global menus + ['not_enough_in_society'] = 'No hay mas de ese item en la sociedad!', + ['player_cannot_hold'] = '~r~no tienes suficiente espacio en tu inventario!', + ['vehicle_belongs'] = 'un vehiculo con matricula %s ahora es tuyo', + ['broke_company'] = 'No hay dinero en la compañía', + ['license_missing'] = 'no tenes licencia de conducir!', + ['buy_vehicle_shop'] = 'queres comprar %s por $%s?', + ['buy_vehicle'] = 'comprar vehiculo', + ['car_dealer'] = 'Concesionario', + ['shop_awaiting_model'] = 'El vehiculo esta cargando, por favor espera', + ['create_bill'] = 'crear factura', + ['dealer_boss'] = 'Vendedor de autos - Boss', + ['delivered'] = 'el vehiculo fue entregado al vendedor', + ['depop_vehicle'] = 'Devolver el vehiculo al garage', + ['return_provider'] = 'Devolver el vehiculo al vendedor', + ['get_rented_vehicles'] = 'Vehiculos para rentar', + ['no_current_vehicle'] = 'No hay ningun vehiculo disponible', + ['invalid_amount'] = 'Cantidad invalida', + ['invoice_amount'] = 'Precio de factura', + ['no'] = 'no', + ['yes'] = 'si', + ['no_players'] = 'No hay jugadores cerca', + ['not_enough_money'] = 'no tenes suficiente dinero', + ['not_rental'] = 'este no es un ~r~vehiculo rentado', + ['not_yours'] = 'este vehiculo no te pertenece', + ['paid_rental'] = 'pagaste $%s para rentar el vehiculo con matricula %s', + ['paid_rental_evicted'] = 'no pudiste pagar $%s de la renta del vehiculo con matricula %s, Este fue devuelto al vendedor', + ['pop_vehicle'] = 'Poner vehiculo a la venta', + ['rent_vehicle'] = 'Vendedor de autos - Vehiculos para rentar', + ['return_provider_menu'] = 'Vendedor de autos - Devolver a proveedor', + ['rental_amount'] = 'Cantidad de renta', + ['sell_menu'] = 'Presiona [E] para vender tu %s por $%s', + ['set_vehicle_owner_rent'] = 'Alquilar vehiculo', + ['set_vehicle_owner_sell'] = 'Vender vehiculo', + ['shop_menu'] = 'Presiona [E] para entrar al menu', + ['generic_shopitem'] = '$%s', + ['vehicle_dealer'] = 'Vehiculo - Vendedor de autos', + ['vehicle_menu'] = 'Presiona [E] to give back the rented vehicle', + ['vehicle_purchased'] = 'has comprado un vehiculo', + ['vehicle_set_owned'] = 'el vehiculo %s fue asignado a %s', + ['vehicle_set_rented'] = 'el vehiculo %s fue rentado a %s', + ['vehicle_sold_for'] = 'el %s fue vendido por $%s', + ['vehicle_sold_to'] = 'el vehiculo con matricula %s fue vendido por %s', + ['deposit_stock'] = 'Depositar stock', + ['take_stock'] = 'Retirar stock', + ['dealership_stock'] = 'Stock de vendedor', + ['amount'] = 'Cantidad', + ['quantity_invalid'] = 'Cantidad invalida', + ['inventory'] = 'Inventario', + ['dealership'] = 'Vendedor de autos', + ['dealer_customers'] = 'Clientes del vendedor', + ['have_withdrawn'] = 'Has retirado x%s %s', + ['have_deposited'] = 'Has depositado x%s %s', + ['boss_actions'] = 'Acciones de jefe', + ['invalid_vehicle'] = 'Vehiculo invalido', + + -- sold vehicles + ['boss_sold'] = 'Lista de vehiculos vendidos', + ['customer_client'] = 'Comprador', + ['customer_model'] = 'Modelo', + ['customer_plate'] = 'Matricula', + ['customer_soldby'] = 'Vendido por', + ['customer_date'] = 'Fecha', +} diff --git a/[esx_addons]/esx_vehicleshop/locales/et.lua b/[esx_addons]/esx_vehicleshop/locales/et.lua new file mode 100644 index 00000000..815aaa0d --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/locales/et.lua @@ -0,0 +1,65 @@ +Locales['et'] = { + -- global menus + ['not_enough_in_society'] = 'Seda eset pole ~r~piisavalt siin firmas!', + ['player_cannot_hold'] = 'Sul ~r~Pole piisavalt ruumi seljakotis!', + ['vehicle_belongs'] = 'Sõiduk numbrimärgiga %s kuulub nüüd teile', + ['broke_company'] = 'Teil pole piisavalt raha firma arvel', + ['license_missing'] = 'Sul puuduvad juhiload!', + ['buy_vehicle_shop'] = 'Kas sa soovid osta %s $%s eest?', + ['buy_vehicle'] = 'Osta sõiduk', + ['car_dealer'] = 'Autopood', + ['shop_awaiting_model'] = 'Sõidukit laetakse, palun oodake', + ['create_bill'] = 'Tee arve', + ['dealer_boss'] = 'Autopoe müüja - Boss', + ['delivered'] = 'Sõiduk on automüüja käes', + ['depop_vehicle'] = 'Pane sõiduk garaaži', + ['return_provider'] = 'Tagasta sõiduk omanikule', + ['get_rented_vehicles'] = 'Sõiduk rendiks', + ['no_current_vehicle'] = 'Sul pole ühtegi sõidukit näitusel', + ['invalid_amount'] = 'Vale kogus', + ['invoice_amount'] = 'Arve kogus', + ['no'] = 'Ei', + ['yes'] = 'Jah', + ['no_players'] = 'Ühtegi mängijat pole sinu ligiduses', + ['not_enough_money'] = 'Sul pole piisavalt raha', + ['not_rental'] = 'See pole ~r~Renditud sõiduk', + ['not_yours'] = 'See sõiduk ei kuulu sinule', + ['paid_rental'] = 'Sa maksid $%s sõiduki rentimise eest numbrimärgiga: %s', + ['paid_rental_evicted'] = 'Sul pole piisavalt raha, et maksta $%s enda renditud sõiduki eest numbrimärgiga: %s, Sõiduk on tagastatud autopoodi.', + ['pop_vehicle'] = 'Pane sõiduk müüki', + ['rent_vehicle'] = 'Autopood - Sõidukid rentimisel', + ['return_provider_menu'] = 'Autopood - Tagasta sõidub omanikule', + ['rental_amount'] = 'Rendi kogus', + ['sell_menu'] = 'Vajuta [E], et müüa %s $%s eest', + ['set_vehicle_owner_rent'] = 'Rendi sõiduk', + ['set_vehicle_owner_sell'] = 'Müü sõiduk', + ['shop_menu'] = 'Vajuta [E] ,et avada menüü', + ['generic_shopitem'] = '$%s', + ['vehicle_dealer'] = 'Sõiduk - Autopood', + ['vehicle_menu'] = 'Vajuta [E] ,et tagastada renditud auto', + ['vehicle_purchased'] = 'Sa ostsid sõiduki', + ['vehicle_set_owned'] = 'Sõiduk %s on antud isikule: %s', + ['vehicle_set_rented'] = 'Sõiduk %s Renditi isikule: %s', + ['vehicle_sold_for'] = 'Sõiduk %s on maha müüdud $%s eest', + ['vehicle_sold_to'] = 'Sõiduk numbrimärgiga: %s on müüdud %s', + ['deposit_stock'] = 'Sisesta aktsiaid', + ['take_stock'] = 'Võta aktsiad välja', + ['dealership_stock'] = 'Autopoe aktsiad', + ['amount'] = 'Kogus', + ['quantity_invalid'] = 'Vale kogus', + ['inventory'] = 'Seljakott', + ['dealership'] = 'Autopoe müüja', + ['dealer_customers'] = 'edasimüüjate kliendid', + ['have_withdrawn'] = 'Sa panid firma arvele x%s %s', + ['have_deposited'] = 'Sa võtsid firma arvelt x%s %s', + ['boss_actions'] = 'Bossi menüü', + ['invalid_vehicle'] = 'Vale sõiduk', + + -- sold vehicles + ['boss_sold'] = 'Müüdud sõidukite list', + ['customer_client'] = 'Sõiduki Omanik', + ['customer_model'] = 'Sõiduki mudel', + ['customer_plate'] = 'Sõiduki numbrimärk', + ['customer_soldby'] = 'Müüja', + ['customer_date'] = 'Kuupäev', +} diff --git a/[esx_addons]/esx_vehicleshop/locales/fi.lua b/[esx_addons]/esx_vehicleshop/locales/fi.lua new file mode 100644 index 00000000..ba47a682 --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/locales/fi.lua @@ -0,0 +1,65 @@ +Locales['fi'] = { + -- global menus + ['not_enough_in_society'] = 'firman varastossa ei ole enempää ~r~tuota esinettä!', + ['player_cannot_hold'] = 'sinulla ~r~ei ole tarpeeksi vapaata tilaa repussasi!', + ['vehicle_belongs'] = 'ajoneuvo kilvellä %s on nyt sinun omistuksessasi', + ['broke_company'] = 'sinulla ei ole tarpeeksi rahaa yrityksen tilillä', + ['license_missing'] = 'you don\'t have a driver\'s license!', + ['buy_vehicle_shop'] = 'haluatko ostaa ajoneuvon %s hintaan $%s?', + ['buy_vehicle'] = 'osta ajoneuvo', + ['car_dealer'] = 'autokauppa', + ['shop_awaiting_model'] = 'the vehicle is currently loading, please wait', + ['create_bill'] = 'tee lasku', + ['dealer_boss'] = 'autokauppa - Pomo', + ['delivered'] = 'ajoneuvo on kuljetettu myyjälle', + ['depop_vehicle'] = 'palauta ajoneuvo', + ['return_provider'] = 'return vehicle to provider', + ['get_rented_vehicles'] = 'vuokrattavat ajoneuvot', + ['no_current_vehicle'] = 'you do not currently have an vehicle displayed', + ['invalid_amount'] = 'virheellinen summa', + ['invoice_amount'] = 'laskun summa', + ['no'] = 'ei', + ['yes'] = 'kyllä', + ['no_players'] = 'ei pelaajia lähettyvillä', + ['not_enough_money'] = 'sinulla ei ole tarpeeksi rahaa', + ['not_rental'] = 'tämä ei ole ~r~vuokra ajoneuvo', + ['not_yours'] = 'tämä ajoneuvo ei kuulu sinulle', + ['paid_rental'] = 'you have paid $%s for renting an vehicle with plate %s', + ['paid_rental_evicted'] = 'you could not afford to pay $%s for your rented vehicle with plate %s, it has been returned to the dealership', + ['pop_vehicle'] = 'ota ajoneuvo ulos näkyville myyntiä varten', + ['rent_vehicle'] = 'autokauppa - Vuokrattavat ajokit', + ['return_provider_menu'] = 'car Dealer - Return vehicle to provider', + ['rental_amount'] = 'vuokran summa', + ['sell_menu'] = 'paina [E] myydäksesi %s hintaan: $%s', + ['set_vehicle_owner_rent'] = 'määritä ajoneuvon [Vuokra]', + ['set_vehicle_owner_sell'] = 'myy ajoneuvo', + ['shop_menu'] = 'paina [E] avataksesi menu', + ['generic_shopitem'] = '$%s', + ['vehicle_dealer'] = 'ajonevuo - Autokauppa', + ['vehicle_menu'] = 'paina [E] tehdäksesi tästä sinun ajoneuvo', + ['vehicle_purchased'] = 'sinä ostit ajoneuvon', + ['vehicle_set_owned'] = 'ajoneuvo %s on nyt määritetty henkilölle %s', + ['vehicle_set_rented'] = 'ajoneuvo %s on nyt vuokrattu henkilölle %s', + ['vehicle_sold_for'] = 'the %s has been sold for $%s', + ['vehicle_sold_to'] = 'ajoneuvo %s myyty henkilölle %s', + ['deposit_stock'] = 'talleta firman varastoon', + ['take_stock'] = 'nosta firman varastosta', + ['dealership_stock'] = 'autokaupan varasto', + ['amount'] = 'määrä', + ['quantity_invalid'] = 'virheellinen määrä', + ['inventory'] = 'reppu', + ['dealership'] = 'autokauppa', + ['dealer_customers'] = 'autokaupan asiakas', + ['have_withdrawn'] = 'sinä otit x%s %s', + ['have_deposited'] = 'sinä talletit x%s %s', + ['boss_actions'] = 'Pomo toiminnot', + ['invalid_vehicle'] = 'di-wastong sasakyan', + + -- sold vehicles + ['boss_sold'] = 'list of sold vehicles', + ['customer_client'] = 'customer name', + ['customer_model'] = 'car model', + ['customer_plate'] = 'car plate', + ['customer_soldby'] = 'sold by', + ['customer_date'] = 'date', +} diff --git a/[esx_addons]/esx_vehicleshop/locales/fr.lua b/[esx_addons]/esx_vehicleshop/locales/fr.lua new file mode 100644 index 00000000..3837c4de --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/locales/fr.lua @@ -0,0 +1,65 @@ +Locales['fr'] = { + -- global menus + ['not_enough_in_society'] = 'il n\'y à plus assez ~r~de cet objet dans la societé!', + ['player_cannot_hold'] = 'vous n\'avez ~r~pas assez d\'espace dans votre inventaire!', + ['vehicle_belongs'] = 'le véhicule avec la plaque %s est désormais à vous', + ['broke_company'] = 'vous n\avez pas assez d\'argent sur le compte de la societé', + ['license_missing'] = 'vous n\'avez pas de permis de conduire !', + ['buy_vehicle_shop'] = 'acheter %s pour $%s?', + ['buy_vehicle'] = 'acheter véhicule', + ['car_dealer'] = 'concessionnaire', + ['shop_awaiting_model'] = 'le véhicule est en train de charger, veuillez patienter...', + ['create_bill'] = 'créer facture', + ['dealer_boss'] = 'concessionnaire - Patron', + ['delivered'] = 'véhicule rendu au concessionnaire', + ['depop_vehicle'] = 'rentrer véhicule', + ['return_provider'] = 'rendre le véhicule', + ['get_rented_vehicles'] = 'véhicules en location', + ['no_current_vehicle'] = 'vous n\'avez aucun véhicule d\'affiché pour le moment', + ['invalid_amount'] = 'montant invalide', + ['invoice_amount'] = 'montant de la facture', + ['no'] = 'non', + ['yes'] = 'oui', + ['no_players'] = 'aucun joueur à proximité', + ['not_enough_money'] = 'vous n\'avez pas assez d\'argent', + ['not_rental'] = 'ce n\'est pas un ~r~véhicule de location', + ['not_yours'] = 'ce véhicule ne vous appartient pas', + ['paid_rental'] = 'vous avez payé $%s pour louer une voiture avec la plaque %s', + ['paid_rental_evicted'] = 'vous ne pouviez pas vous permettre de payer $%s pour votre véhicule loué avec la plaque %s, il a été retourné au concessionnaire', + ['pop_vehicle'] = 'sortir véhicule', + ['rent_vehicle'] = 'concessionnaire - Véhicules en location', + ['return_provider_menu'] = 'concessionnaire - Retour de véhicule', + ['rental_amount'] = 'montant de la location', + ['sell_menu'] = 'appuyez sur [E] pour vendre %s au prix de $%s', + ['set_vehicle_owner_rent'] = 'attribuer véhicule [Location]', + ['set_vehicle_owner_sell'] = 'attribuer véhicule [Vente]', + ['shop_menu'] = 'appuyez sur [E] pour accéder au menu', + ['generic_shopitem'] = '$%s', + ['vehicle_dealer'] = 'concessionnaire - Véhicules', + ['vehicle_menu'] = 'appuez sur [E] pour rendre votre véhicule', + ['vehicle_purchased'] = 'vous avez acheté un véhicule', + ['vehicle_set_owned'] = 'le véhicule %s a été attribué à %s', + ['vehicle_set_rented'] = 'le véhicule %s a été loué à %s', + ['vehicle_sold_for'] = 'le %s a été vendu pour $%s', + ['vehicle_sold_to'] = 'véhicule %s vendu à %s', + ['deposit_stock'] = 'déposer Stock', + ['take_stock'] = 'prendre Stock', + ['dealership_stock'] = 'concession Stock', + ['amount'] = 'quantité', + ['quantity_invalid'] = 'quantité invalide', + ['inventory'] = 'inventaire', + ['dealership'] = 'concession', + ['dealer_customers'] = 'client concession', + ['have_withdrawn'] = 'vous avez retiré x%s %s', + ['have_deposited'] = 'vous avez deposé x%s %s', + ['boss_actions'] = 'actions du chef', + ['invalid_vehicle'] = 'Véhicule invalide', + + -- sold vehicles + ['boss_sold'] = 'liste des véhicule vendu', + ['customer_client'] = 'nom du client', + ['customer_model'] = 'modèle de voiture', + ['customer_plate'] = 'plaque d\'immatriculation', + ['customer_soldby'] = 'vendu par', + ['customer_date'] = 'date', +} diff --git a/[esx_addons]/esx_vehicleshop/locales/hu.lua b/[esx_addons]/esx_vehicleshop/locales/hu.lua new file mode 100644 index 00000000..bd681b3a --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/locales/hu.lua @@ -0,0 +1,66 @@ +Locales['hu'] = { + -- global menus + ['not_enough_in_society'] = 'nincs elég ~r~tárgyad a vállalkozásban!', + ['player_cannot_hold'] = '~r~nincs elég helyed a leltárban!', + ['vehicle_belongs'] = '%s rendszámú jármű már a tulajdonodban van.', + ['broke_company'] = 'nincs elég pénz a vállalati számlán', + ['license_missing'] = 'nincs jogosítványod tedd le!', + ['purchase_type'] = 'a vásárlás típusa', + ['society_type'] = 'vállalkozás', + ['staff_type'] = 'személyes használat', + ['buy_vehicle_shop'] = 'meg szeretnéd vásárolni %s ennyiért: %s $-ért?', + ['buy_vehicle'] = 'vásárlás', + ['car_dealer'] = 'Autókereskedés', + ['shop_awaiting_model'] = 'az autó töltése folyamantban kérlek várj', + ['create_bill'] = 'számla létrehozása', + ['dealer_boss'] = 'Autó kereskedö - Fönök', + ['delivered'] = 'az autó leszállítva a kereskedőnek', + ['depop_vehicle'] = 'jármü visszaküldés', + ['return_provider'] = 'jármü visszaküldése a szollgáltatónak', + ['get_rented_vehicles'] = 'jármüvek bérlése', + ['invalid_amount'] = 'érvénytelen összeg', + ['invoice_amount'] = 'számla összeg', + ['no'] = 'Nem', + ['yes'] = 'Igen', + ['no_players'] = 'nincs játékos a közeledben', + ['not_enough_money'] = 'nincs elég pénzed', + ['not_rental'] = 'ez nem ~r~bérelhetö autó', + ['not_yours'] = 'ez az autó nem tartozik hozzád', + ['paid_rental'] = 'fizettél a kölcsönzönek: %s $', + ['pop_vehicle'] = 'tedd a jármüvet eladásra', + ['rent_vehicle'] = 'Autókereskedö - Jármüvek bérlése', + ['return_provider_menu'] = 'Autókereskedö - Jámrü vissza adás a szollgáltatónak', + ['rental_amount'] = 'bérlési költség', + ['sell_menu'] = 'nyomj [E] gombot hogy eladd a %s ennyiért %s $', + ['set_vehicle_owner_rent'] = 'jármü kijelölése [Location]', + ['set_vehicle_owner_sell'] = 'jármü eladása', + ['set_vehicle_owner_sell_society'] = 'jármü kijelölése [Sale] [Society]', + ['shop_menu'] = 'nyomj [E] gombot a vásárláshoz', + ['generic_shopitem'] = '%s $', + ['vehicle_dealer'] = 'jármü - Autókereskedö', + ['vehicle_menu'] = 'nyomj [E] gombot hogy vissza add a bérelt jármüvet', + ['vehicle_purchased'] = 'vásároltál egy jármüvet', + ['vehicle_set_owned'] = 'jármü %s megvéve ennyiért: %s', + ['vehicle_set_rented'] = 'jármü %s kibérelve ennyiért: %s', + ['vehicle_sold_for'] = 'A %s jármü eladva ennyiért %s $', + ['vehicle_sold_to'] = 'a jármü rendszámmal %s eladva neki: %s', + ['deposit_stock'] = 'beteszek a készletbe', + ['take_stock'] = 'kiveszek a készletböl', + ['dealership_stock'] = 'kereskedés készlet', + ['amount'] = 'összeg', + ['quantity_invalid'] = 'ez érvénytelen mennyiség', + ['inventory'] = 'leltár', + ['dealership'] = 'Autókereskedő', + ['dealer_customers'] = 'kereskedő ügyfelek', + ['have_withdrawn'] = 'kivettél x%s %s', + ['have_deposited'] = 'betettél x%s %s', + ['boss_actions'] = 'fönök müveletek', + + -- sold vehicles + ['boss_sold'] = 'Az eladott járművek listája', + ['customer_client'] = 'Ügyfél neve', + ['customer_model'] = 'Autómodell', + ['customer_plate'] = 'Rendszám', + ['customer_soldby'] = 'Álltal értékesített', + ['customer_date'] = 'Dátum', +} diff --git a/[esx_addons]/esx_vehicleshop/locales/it.lua b/[esx_addons]/esx_vehicleshop/locales/it.lua new file mode 100644 index 00000000..5a449da9 --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/locales/it.lua @@ -0,0 +1,65 @@ +Locales['it'] = { + -- global menus + ['not_enough_in_society'] = 'la società non n\'è ha abbastanza!', + ['player_cannot_hold'] = '~r~non hai abbastanza spazio nel tuo inventario!', + ['vehicle_belongs'] = 'un veicolo targato %s ora è tuo', + ['broke_company'] = 'Non ci sono soldi in azienda', + ['license_missing'] = 'Non hai la licenza!', + ['buy_vehicle_shop'] = 'vuoi comprare %s per $%s?', + ['buy_vehicle'] = 'acquistare veicolo', + ['car_dealer'] = 'Concessionario', + ['shop_awaiting_model'] = 'Il veicolo è in carica, attendere', + ['create_bill'] = 'crea fattura', + ['dealer_boss'] = 'Venditore di auto - Capo', + ['delivered'] = 'il veicolo è stato consegnato al venditore', + ['depop_vehicle'] = 'Riporta il veicolo in garage', + ['return_provider'] = 'Restituire il veicolo al venditore', + ['get_rented_vehicles'] = 'Veicoli a noleggio', + ['no_current_vehicle'] = 'Non cè nessun veicolo disponibile', + ['invalid_amount'] = 'importo non valido', + ['invoice_amount'] = 'Prezzo fattura', + ['no'] = 'no', + ['yes'] = 'sí', + ['no_players'] = 'Non ci sono giocatori nelle vicinanze', + ['not_enough_money'] = 'non hai abbastanza soldi', + ['not_rental'] = 'questo non è un veicolo ~noleggiato', + ['not_yours'] = 'questo veicolo non ti appartiene', + ['paid_rental'] = 'hai pagato $%s per noleggiare il veicolo con targa %s', + ['paid_rental_evicted'] = 'non hai potuto pagare $%s dell affitto del veicolo con targa %s, è stato restituito al venditore', + ['pop_vehicle'] = 'Mettere in vendita il veicolo', + ['rent_vehicle'] = 'Concessionaria auto - Veicoli a noleggio', + ['return_provider_menu'] = 'Concessionaria auto - Restituzione al venditore', + ['rental_amount'] = 'Importo dell affitto', + ['sell_menu'] = 'Premi [E] per vendere le tue %s a $%s', + ['set_vehicle_owner_rent'] = 'Noleggia un veicolo', + ['set_vehicle_owner_sell'] = 'vendere veicolo', + ['shop_menu'] = 'Premere [E] per accedere al menu', + ['generic_shopitem'] = '$%s', + ['vehicle_dealer'] = 'Veicolo - Concessionario auto', + ['vehicle_menu'] = 'Premi [E] per restituire il veicolo noleggiato', + ['vehicle_purchased'] = 'hai acquistato un veicolo', + ['vehicle_set_owned'] = 'il veicolo %s è stato assegnato a %s', + ['vehicle_set_rented'] = 'il veicolo %s è stato noleggiato a %s', + ['vehicle_sold_for'] = 'il %s è stato venduto per $%s', + ['vehicle_sold_to'] = 'il veicolo targato %s è stato venduto da %s', + ['deposit_stock'] = 'deposito aziendale', + ['take_stock'] = 'ritiro deposito aziendale', + ['dealership_stock'] = 'Azione del venditore', + ['amount'] = 'Quantità', + ['quantity_invalid'] = 'Importo non valido', + ['inventory'] = 'Inventario', + ['dealership'] = 'Venditore di auto', + ['dealer_customers'] = 'Clienti del venditore', + ['have_withdrawn'] = 'Hai ritirato x%s %s', + ['have_deposited'] = 'Hai depositato x%s %s', + ['boss_actions'] = 'Azioni del capo', + ['invalid_vehicle'] = 'Veicolo non valido', + + -- sold vehicles + ['boss_sold'] = 'Elenco dei veicoli venduti', + ['customer_client'] = 'Acquirente', + ['customer_model'] = 'Modello', + ['customer_plate'] = 'targa', + ['customer_soldby'] = 'Venduto da', + ['customer_date'] = 'Data', +} diff --git a/[esx_addons]/esx_vehicleshop/locales/nl.lua b/[esx_addons]/esx_vehicleshop/locales/nl.lua new file mode 100644 index 00000000..80517db5 --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/locales/nl.lua @@ -0,0 +1,65 @@ +Locales['nl'] = { + -- global menus + ['not_enough_in_society'] = 'er zijn niet genoeg van ~r~deze spullen in de stad!', + ['player_cannot_hold'] = 'je hebt ~r~niet~s~ genoeg plaats in je inventaris!', + ['vehicle_belongs'] = 'een voertuig met kenteken %s is nu van jou', + ['broke_company'] = 'je bedrijf heeft niet genoeg geld in de bank', + ['license_missing'] = 'je hebt geen rijbewijs!', + ['buy_vehicle_shop'] = 'Wil je %s kopen voor €%s?', + ['buy_vehicle'] = 'koop voertuig', + ['car_dealer'] = 'Voertuig verkoop', + ['shop_awaiting_model'] = 'het voertuig is aan het laden, even geduld', + ['create_bill'] = 'creeër rekening', + ['dealer_boss'] = 'Voertuig verkoop - Baas', + ['delivered'] = 'het voertuig is afgeleverd', + ['depop_vehicle'] = 'parkeer voertuig in de garage?', + ['return_provider'] = 'stuur voertuig terug naar de eigenaar?', + ['get_rented_vehicles'] = 'voertuigen te huur', + ['no_current_vehicle'] = 'je hebt momenteel geen voertuig uitstaan', + ['invalid_amount'] = 'ongeldig bedrag', + ['invoice_amount'] = 'rekening bedrag', + ['no'] = 'nee', + ['yes'] = 'ja', + ['no_players'] = 'er zijn geen spelers in de buurt', + ['not_enough_money'] = 'je hebt niet genoeg geld', + ['not_rental'] = 'dit is geen ~r~huur voertuig', + ['not_yours'] = 'dit voertuig is niet van jou', + ['paid_rental'] = 'je hebt €%s betaald voor het huren van een voertuig met kenteken %s', + ['paid_rental_evicted'] = 'je hebt niet genoeg om €%s te betalen voor je gehuurde voertuig met kenteken %s, hij is teruggebracht.', + ['pop_vehicle'] = 'zet voertuig uit voor verkoop', + ['rent_vehicle'] = 'Auto verkoop - Voertuigen te huur', + ['return_provider_menu'] = 'Auto verkoop - Breng voertuig terug', + ['rental_amount'] = 'huur bedrag', + ['sell_menu'] = 'klik op [E] om %s te verkopen voor $%s', + ['set_vehicle_owner_rent'] = 'verhuur voertuig', + ['set_vehicle_owner_sell'] = 'verkoop vuurtuig', + ['shop_menu'] = 'klik op [E] om het menu te gebruiken', + ['generic_shopitem'] = '€%s', + ['vehicle_dealer'] = 'voertuig - Auto verkoop', + ['vehicle_menu'] = 'klik op [E] om je gehuurde voertuig terug te brengen', + ['vehicle_purchased'] = 'je hebt een voertuig gekocht', + ['vehicle_set_owned'] = 'voertuig %s is toegewezen aan %s', + ['vehicle_set_rented'] = 'voertuig %s is gehuurd door %s', + ['vehicle_sold_for'] = 'de %s is verkocht voor €%s', + ['vehicle_sold_to'] = 'het voertuig met kenteken %s is verkocht aan %s', + ['deposit_stock'] = 'sla voorraad op', + ['take_stock'] = 'pak voorraad', + ['dealership_stock'] = 'verkoop voorraad', + ['amount'] = 'bedrag', + ['quantity_invalid'] = 'ongeldig bedrag', + ['inventory'] = 'inventaris', + ['dealership'] = 'Auto verkoop', + ['dealer_customers'] = 'Klanten', + ['have_withdrawn'] = 'je hebt x%s %s gepakt', + ['have_deposited'] = 'je hebt x%s %s opgeslagen', + ['boss_actions'] = 'baas acties', + ['invalid_vehicle'] = 'Onjuist voertuig', + + -- sold vehicles + ['boss_sold'] = 'lijst van verkochten voertuigen', + ['customer_client'] = 'klanten naam', + ['customer_model'] = 'voertuig model', + ['customer_plate'] = 'kenteken voertuig', + ['customer_soldby'] = 'verkocht door', + ['customer_date'] = 'datum', +} diff --git a/[esx_addons]/esx_vehicleshop/locales/pl.lua b/[esx_addons]/esx_vehicleshop/locales/pl.lua new file mode 100644 index 00000000..f6144bdf --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/locales/pl.lua @@ -0,0 +1,65 @@ +Locales['pl'] = { + -- global menus + ['not_enough_in_society'] = 'brak tego ~r~przedmiotu w firmie!', + ['player_cannot_hold'] = '~r~Nie masz wystarczająco wolnego miejsca w ekwipunku!', + ['vehicle_belongs'] = 'pojazd z rejestracją %s teraz należy do ciebie', + ['broke_company'] = 'twoja firma nie ma wystarczająco pieniedzy', + ['license_missing'] = 'you don\'t have a driver\'s license!', + ['buy_vehicle_shop'] = 'czy chcesz kupić %s za $%s?', + ['buy_vehicle'] = 'kup pojazd', + ['car_dealer'] = 'sprzedawca Aut', + ['shop_awaiting_model'] = 'the vehicle is currently loading, please wait', + ['create_bill'] = 'stwórz fakture', + ['dealer_boss'] = 'salon samochodowy - Szef', + ['delivered'] = 'pojazd został dostarczony do salonu', + ['depop_vehicle'] = 'oddaj pojazd', + ['return_provider'] = 'return vehicle to provider', + ['get_rented_vehicles'] = 'pojazdy do wynajęcia', + ['no_current_vehicle'] = 'you do not currently have an vehicle displayed', + ['invalid_amount'] = 'nieprawidłowa ilość', + ['invoice_amount'] = 'suma faktury', + ['no'] = 'nie', + ['yes'] = 'tak', + ['no_players'] = 'brak graczy w pobliżu', + ['not_enough_money'] = 'nie masz wystarczająco pieniędzy', + ['not_rental'] = 'to nie jest ~r~wypożyczone auto', + ['not_yours'] = 'ten pojazd nie należy do ciebie', + ['paid_rental'] = 'you have paid $%s for renting an vehicle with plate %s', + ['paid_rental_evicted'] = 'you could not afford to pay $%s for your rented vehicle with plate %s, it has been returned to the dealership', + ['pop_vehicle'] = 'wyciągnij auto do sprzedaży', + ['rent_vehicle'] = 'salon samochodowy - Pojazdy do wynajęcia', + ['return_provider_menu'] = 'car Dealer - Return vehicle to provider', + ['rental_amount'] = 'suma wynajęcia', + ['sell_menu'] = 'wcisnij [E] aby sprzedać %s za $%s', + ['set_vehicle_owner_rent'] = 'zarejestruj pojazd [Wynajem]', + ['set_vehicle_owner_sell'] = 'zarejestruj pojazd [Kupno]', + ['shop_menu'] = 'wcisnij [E] aby wejść do menu', + ['generic_shopitem'] = '$%s', + ['vehicle_dealer'] = 'pojazdy - Sprzedawca aut', + ['vehicle_menu'] = 'wcisnij [E] aby wyjąć pojazd', + ['vehicle_purchased'] = 'kupujesz pojazd', + ['vehicle_set_owned'] = 'pojazd %s został zarejestrowany na %s', + ['vehicle_set_rented'] = 'pojazd %s został wynajęty przez %s', + ['vehicle_sold_for'] = 'the %s has been sold for $%s', + ['vehicle_sold_to'] = 'pojazd %s został sprzedany do %s', + ['deposit_stock'] = 'deponuj przedmioty', + ['take_stock'] = 'wyciągnij przedmioty', + ['dealership_stock'] = 'zaopatrzenie salonu', + ['amount'] = 'suma', + ['quantity_invalid'] = 'nieprawidłowa ilość', + ['inventory'] = 'ekwipunek', + ['dealership'] = 'sprzedawca Aut', + ['dealer_customers'] = 'klienci salonu', + ['have_withdrawn'] = 'wyciągasz x%s %s', + ['have_deposited'] = 'deponujesz x%s %s', + ['boss_actions'] = 'akcje szefa', + ['invalid_vehicle'] = 'nieprawidłowy pojazd', + + -- sold vehicles + ['boss_sold'] = 'list of sold vehicles', + ['customer_client'] = 'customer name', + ['customer_model'] = 'car model', + ['customer_plate'] = 'car plate', + ['customer_soldby'] = 'sold by', + ['customer_date'] = 'date', +} diff --git a/[esx_addons]/esx_vehicleshop/locales/si.lua b/[esx_addons]/esx_vehicleshop/locales/si.lua new file mode 100644 index 00000000..d7dcf76b --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/locales/si.lua @@ -0,0 +1,65 @@ +Locales['si'] = { + -- globalni meniji + ['not_enough_in_society'] = 'v družbi ni dovolj tega predmeta!', + ['player_cannot_hold'] = 'v svojem inventarju nimaš dovolj prostega prostora!', + ['vehicle_belongs'] = 'vozilo s tablico %s zdaj pripada you', + ['broke_company'] = 'na računu podjetja nimate dovolj denarja', + ['license_missing'] = 'nimaš vozniškega dovoljenja!', + ['buy_vehicle_shop'] = 'želite kupiti %s za $%s?', + ['buy_vehicle'] = 'kupi vozilo', + ['car_dealer'] = 'prodajalna avtomobilov', + ['shop_awaiting_model'] = 'vozilo se trenutno nalaga, počakajte', + ['create_bill'] = 'ustvari račun', + ['dealer_boss'] = 'prodajalec avtomobilov - šef', + ['delivered'] = 'vozilo je bilo dostavljeno prodajalcu', + ['depop_vehicle'] = 'vrni vozilo v servis', + ['return_provider'] = 'vrni vozilo ponudniku', + ['get_rented_vehicles'] = 'vozila za najem', + ['no_current_vehicle'] = 'trenutno nimate razstavljenega vozila', + ['invalid_amount'] = 'neveljaven znesek', + ['invoice_amount'] = 'znesek na računu', + ['no'] = 'ne', + ["yes"] = "yes", + ['no_players'] = 'v vaši bližini ni igralcev', + ['not_enough_money'] = 'nimate dovolj denarja', + ['not_rental'] = 'to ni vozilo za izposojo', + ['not_yours'] = 'to vozilo vam ne pripada', + ['paid_rental'] = 'za najem vozila s tablico %s ste plačali $%s', + ['paid_rental_evicted'] = 'niste mogli plačati $%s za najeto vozilo s tablico %s, zato je bilo vrnjeno prodajalni', + ['pop_vehicle'] = 'daj vozilo v prodajo', + ['rent_vehicle'] = 'prodajalec avtomobilov - vozila za najem', + ['return_provider_menu'] = 'car Dealer - Return vehicle to the provider', + ['rent_amount'] = 'znesek najema', + ['sell_menu'] = 'pritisnite [E], da prodate svoje %s za $%s', + ['set_vehicle_owner_rent'] = 'najem vozila', + ['set_vehicle_owner_sell'] = 'prodati vozilo', + ['shop_menu'] = 'pritisnite [E] za dostop do menija', + ['generic_shopitem'] = '$%s', + ['vehicle_dealer'] = 'vozilo - prodajalec avtomobilov', + ['vehicle_menu'] = 'pritisnite [E], da vrnete najeto vozilo', + ['vehicle_purchased'] = 'kupili ste vozilo', + ['vehicle_set_owned'] = 'vozilo %s je bilo dodeljeno %s', + ['vehicle_set_rented'] = 'vozilo %s je bilo izposojeno %s', + ['vehicle_sold_for'] = 'vozilo %s je bilo sold za $%s', + ['vehicle_sold_to'] = 'vozilo s tablico %s je bilo prodano %s', + ['deposit_stock'] = 'zaloga za depozit', + ['take_stock'] = 'umakni zalogo', + ['dealership_stock'] = 'zaloga trgovca', + ['amount'] = 'znesek', + ['quantity_invalid'] = 'to je neveljavna količina', + ['inventory'] = 'zaloga', + ['dealership'] = 'prodajalec avtomobilov', + ['dealer_customers'] = 'stranke trgovca', + ['have_withdrawn'] = 'umaknili ste x%s %s', + ['have_deposited'] = 'ste deponirali x%s %s', + ['boss_actions'] = 'dejanja šefa', + ['invalid_vehicle'] = 'Neveljavno vozilo', + + -- prodana vozila + ['boss_sold'] = 'seznam prodanih vozil', + ['customer_client'] = 'ime stranke', + ['customer_model'] = 'model vozila', + ['customer_plate'] = 'registrska številka vozila', + ['customer_soldby'] = 'prodano do', + ['customer_date'] = 'datum', +} diff --git a/[esx_addons]/esx_vehicleshop/locales/sv.lua b/[esx_addons]/esx_vehicleshop/locales/sv.lua new file mode 100644 index 00000000..1c27861d --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/locales/sv.lua @@ -0,0 +1,65 @@ +Locales['sv'] = { + -- global menus + ['not_enough_in_society'] = 'det finns inte tillräckligt många av ~r~det föremålet i förrådet!', + ['player_cannot_hold'] = 'du har ~r~inte tillräckligt mycketplats på dig!', + ['vehicle_belongs'] = 'fordonet med reg numret %s tillhör nu dig', + ['broke_company'] = 'det finns inte tillräckligt mycket pengar i företagskontot', + ['license_missing'] = 'du är inte behörig att köpa bilar, B-körkort krävs!', + ['buy_vehicle_shop'] = 'vill du köpa in %s för %s SEK?', + ['buy_vehicle'] = 'Köp in fordon', + ['car_dealer'] = 'bilförsäljare', + ['shop_awaiting_model'] = 'fordon laddas in, vänligen vänta', + ['create_bill'] = 'ge faktura', + ['dealer_boss'] = 'chefmeny', + ['delivered'] = 'fordonet har lämnats tillbaka till bilförsäljaren', + ['depop_vehicle'] = 'ställ tillbaka fordonet', + ['return_provider'] = 'sälj tillbaka fordon till leverantör', + ['get_rented_vehicles'] = 'uthyrda fordon', + ['no_current_vehicle'] = 'du har inget fordon ute till salu', + ['invalid_amount'] = 'ogiltigt belopp', + ['invoice_amount'] = 'belopp att betala', + ['no'] = 'nej', + ['yes'] = 'ja', + ['no_players'] = 'det finns ingen i närheten', + ['not_enough_money'] = 'du har inte tillräckligt mycket pengar', + ['not_rental'] = 'detta är inte ett ~r~uthyrt fordon', + ['not_yours'] = 'det här fordonet tillhör inte dig', + ['paid_rental'] = 'du har betalat %s SEK för att hyra ett fordon med reg nummer %s', + ['paid_rental_evicted'] = 'du hade ej råd att betala %s SEK för ditt hyrda fordon med reg nummer %s, den har tagits av bilförsäljaren', + ['pop_vehicle'] = 'ställ ut fordon till salu', + ['rent_vehicle'] = 'bilförsäljare - fordon för uthyrning', + ['return_provider_menu'] = 'bilförsäljare - sälj tillbaka fordon till leverantör', + ['rental_amount'] = 'uthyrningsbelopp', + ['sell_menu'] = 'tryck [E] för att sälja %s för %s SEK', + ['set_vehicle_owner_rent'] = 'hyr ut fordon', + ['set_vehicle_owner_sell'] = 'sälj fordon', + ['shop_menu'] = 'tryck [E] för öppna bilförsäljarsmenyn.', + ['generic_shopitem'] = '%s SEK', + ['vehicle_dealer'] = 'bilförsäljare - fordon för visning', + ['vehicle_menu'] = 'tryck på [E] för att ~o~lämna tillbaka fordonet till bilförsäljaren.', + ['vehicle_purchased'] = 'du köpte fordonet', + ['vehicle_set_owned'] = 'fordonet %s har tilldelats till %s', + ['vehicle_set_rented'] = 'fordonet %s har hyrts ut till %s', + ['vehicle_sold_for'] = '%s har sålts för %s SEK', + ['vehicle_sold_to'] = '%s har sålts till %s', + ['deposit_stock'] = 'lägg in i förråd', + ['take_stock'] = 'ta ut ur förråd', + ['dealership_stock'] = 'bilförsäljares förråd', + ['amount'] = 'mängd', + ['quantity_invalid'] = 'ogiltig mängd', + ['inventory'] = 'förråd', + ['dealership'] = 'bilförsäljare', + ['dealer_customers'] = 'kund', + ['have_withdrawn'] = 'du har tagit ut x%s %s', + ['have_deposited'] = 'du har lagt in x%s %s', + ['boss_actions'] = 'chef handlingar', + ['invalid_vehicle'] = 'ogiltigt fordon', + + -- sold vehicles + ['boss_sold'] = 'lista av sålda fordon', + ['customer_client'] = 'kund', + ['customer_model'] = 'bil modell', + ['customer_plate'] = 'registreringsnummer', + ['customer_soldby'] = 'såld av', + ['customer_date'] = 'datum', +} diff --git a/[esx_addons]/esx_vehicleshop/localization/br_esx_vehicleshop.sql b/[esx_addons]/esx_vehicleshop/localization/br_esx_vehicleshop.sql new file mode 100644 index 00000000..66aa5903 --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/localization/br_esx_vehicleshop.sql @@ -0,0 +1,339 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_cardealer','Vendedor de carros',1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_cardealer','Vendedor de carros',1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('cardealer','Vendedor de carros') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('cardealer',0,'recrutar','Recrutar',10,'{}','{}'), + ('cardealer',1,'novato','Novato',25,'{}','{}'), + ('cardealer',2,'experiente','Experiente',40,'{}','{}'), + ('cardealer',3,'chefe','Chefe',0,'{}','{}') +; + +CREATE TABLE `cardealer_vehicles` ( + `id` int NOT NULL AUTO_INCREMENT, + `vehicle` varchar(255) NOT NULL, + `price` int NOT NULL, + + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `vehicle_sold` ( + `client` VARCHAR(50) NOT NULL, + `model` VARCHAR(50) NOT NULL, + `plate` VARCHAR(50) NOT NULL, + `soldby` VARCHAR(50) NOT NULL, + `date` VARCHAR(50) NOT NULL, + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `owned_vehicles` ( + `owner` VARCHAR(60) NOT NULL, + `plate` varchar(12) NOT NULL, + `vehicle` longtext, + `type` VARCHAR(20) NOT NULL DEFAULT 'car', + `job` VARCHAR(20) NULL DEFAULT NULL, + `stored` TINYINT(1) NOT NULL DEFAULT '0', + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `rented_vehicles` ( + `vehicle` varchar(60) NOT NULL, + `plate` varchar(12) NOT NULL, + `player_name` varchar(255) NOT NULL, + `base_price` int NOT NULL, + `rent_price` int NOT NULL, + `owner` VARCHAR(60) NOT NULL, + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `vehicle_categories` ( + `name` varchar(60) NOT NULL, + `label` varchar(60) NOT NULL, + + PRIMARY KEY (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `vehicle_categories` (name, label) VALUES + ('compacts','Compactos'), + ('coupes','Cupês'), + ('sedans','Sedans'), + ('sports','Esportes'), + ('sportsclassics','Clássicos Esportivos'), + ('super','Super'), + ('muscle','Músculo'), + ('offroad','Fora da estrada'), + ('suvs','SUVs'), + ('vans','Vans'), + ('motorcycles','Motos') +; + +CREATE TABLE `vehicles` ( + `name` varchar(60) NOT NULL, + `model` varchar(60) NOT NULL, + `price` int NOT NULL, + `category` varchar(60) DEFAULT NULL, + + PRIMARY KEY (`model`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `vehicles` (name, model, price, category) VALUES + ('Blade','blade',15000,'muscle'), + ('Buccaneer','buccaneer',18000,'muscle'), + ('Buccaneer Rider','buccaneer2',24000,'muscle'), + ('Chino','chino',15000,'muscle'), + ('Chino Luxe','chino2',19000,'muscle'), + ('Coquette BlackFin','coquette3',55000,'muscle'), + ('Dominator','dominator',35000,'muscle'), + ('Dukes','dukes',28000,'muscle'), + ('Gauntlet','gauntlet',30000,'muscle'), + ('Hotknife','hotknife',125000,'muscle'), + ('Faction','faction',20000,'muscle'), + ('Faction Rider','faction2',30000,'muscle'), + ('Faction XL','faction3',40000,'muscle'), + ('Nightshade','nightshade',65000,'muscle'), + ('Phoenix','phoenix',12500,'muscle'), + ('Picador','picador',18000,'muscle'), + ('Sabre Turbo','sabregt',20000,'muscle'), + ('Sabre GT','sabregt2',25000,'muscle'), + ('Slam Van','slamvan3',11500,'muscle'), + ('Tampa','tampa',16000,'muscle'), + ('Virgo','virgo',14000,'muscle'), + ('Vigero','vigero',12500,'muscle'), + ('Voodoo','voodoo',7200,'muscle'), + ('Blista','blista',8000,'compacts'), + ('Brioso R/A','brioso',18000,'compacts'), + ('Issi','issi2',10000,'compacts'), + ('Panto','panto',10000,'compacts'), + ('Prairie','prairie',12000,'compacts'), + ('Bison','bison',45000,'vans'), + ('Bobcat XL','bobcatxl',32000,'vans'), + ('Burrito','burrito3',19000,'vans'), + ('Burrito','gburrito2',29000,'vans'), + ('Camper','camper',42000,'vans'), + ('Gang Burrito','gburrito',45000,'vans'), + ('Journey','journey',6500,'vans'), + ('Minivan','minivan',13000,'vans'), + ('Moonbeam','moonbeam',18000,'vans'), + ('Moonbeam Rider','moonbeam2',35000,'vans'), + ('Paradise','paradise',19000,'vans'), + ('Rumpo','rumpo',15000,'vans'), + ('Rumpo Trail','rumpo3',19500,'vans'), + ('Surfer','surfer',12000,'vans'), + ('Youga','youga',10800,'vans'), + ('Youga Luxuary','youga2',14500,'vans'), + ('Asea','asea',5500,'sedans'), + ('Cognoscenti','cognoscenti',55000,'sedans'), + ('Emperor','emperor',8500,'sedans'), + ('Fugitive','fugitive',12000,'sedans'), + ('Glendale','glendale',6500,'sedans'), + ('Intruder','intruder',7500,'sedans'), + ('Premier','premier',8000,'sedans'), + ('Primo Custom','primo2',14000,'sedans'), + ('Regina','regina',5000,'sedans'), + ('Schafter','schafter2',25000,'sedans'), + ('Stretch','stretch',90000,'sedans'), + ('Super Diamond','superd',130000,'sedans'), + ('Tailgater','tailgater',30000,'sedans'), + ('Warrener','warrener',4000,'sedans'), + ('Washington','washington',9000,'sedans'), + ('Baller','baller2',40000,'suvs'), + ('Baller Sport','baller3',60000,'suvs'), + ('Cavalcade','cavalcade2',55000,'suvs'), + ('Contender','contender',70000,'suvs'), + ('Dubsta','dubsta',45000,'suvs'), + ('Dubsta Luxuary','dubsta2',60000,'suvs'), + ('Fhantom','fq2',17000,'suvs'), + ('Grabger','granger',50000,'suvs'), + ('Gresley','gresley',47500,'suvs'), + ('Huntley S','huntley',40000,'suvs'), + ('Landstalker','landstalker',35000,'suvs'), + ('Mesa','mesa',16000,'suvs'), + ('Mesa Trail','mesa3',40000,'suvs'), + ('Patriot','patriot',55000,'suvs'), + ('Radius','radi',29000,'suvs'), + ('Rocoto','rocoto',45000,'suvs'), + ('Seminole','seminole',25000,'suvs'), + ('XLS','xls',32000,'suvs'), + ('Btype','btype',62000,'sportsclassics'), + ('Btype Luxe','btype3',85000,'sportsclassics'), + ('Btype Hotroad','btype2',155000,'sportsclassics'), + ('Casco','casco',30000,'sportsclassics'), + ('Coquette Classic','coquette2',40000,'sportsclassics'), + ('Manana','manana',12800,'sportsclassics'), + ('Monroe','monroe',55000,'sportsclassics'), + ('Pigalle','pigalle',20000,'sportsclassics'), + ('Stinger','stinger',80000,'sportsclassics'), + ('Stinger GT','stingergt',75000,'sportsclassics'), + ('Stirling GT','feltzer3',65000,'sportsclassics'), + ('Z-Type','ztype',220000,'sportsclassics'), + ('Bifta','bifta',12000,'offroad'), + ('Bf Injection','bfinjection',16000,'offroad'), + ('Blazer','blazer',6500,'offroad'), + ('Blazer Sport','blazer4',8500,'offroad'), + ('Brawler','brawler',45000,'offroad'), + ('Bubsta 6x6','dubsta3',120000,'offroad'), + ('Dune Buggy','dune',8000,'offroad'), + ('Guardian','guardian',45000,'offroad'), + ('Rebel','rebel2',35000,'offroad'), + ('Sandking','sandking',55000,'offroad'), + ('The Liberator','monster',210000,'offroad'), + ('Trophy Truck','trophytruck',60000,'offroad'), + ('Trophy Truck Limited','trophytruck2',80000,'offroad'), + ('Cognoscenti Cabrio','cogcabrio',55000,'coupes'), + ('Exemplar','exemplar',32000,'coupes'), + ('F620','f620',40000,'coupes'), + ('Felon','felon',42000,'coupes'), + ('Felon GT','felon2',55000,'coupes'), + ('Jackal','jackal',38000,'coupes'), + ('Oracle XS','oracle2',35000,'coupes'), + ('Sentinel','sentinel',32000,'coupes'), + ('Sentinel XS','sentinel2',40000,'coupes'), + ('Windsor','windsor',95000,'coupes'), + ('Windsor Drop','windsor2',125000,'coupes'), + ('Zion','zion',36000,'coupes'), + ('Zion Cabrio','zion2',45000,'coupes'), + ('9F','ninef',65000,'sports'), + ('9F Cabrio','ninef2',80000,'sports'), + ('Alpha','alpha',60000,'sports'), + ('Banshee','banshee',70000,'sports'), + ('Bestia GTS','bestiagts',55000,'sports'), + ('Buffalo','buffalo',12000,'sports'), + ('Buffalo S','buffalo2',20000,'sports'), + ('Carbonizzare','carbonizzare',75000,'sports'), + ('Comet','comet2',65000,'sports'), + ('Coquette','coquette',65000,'sports'), + ('Drift Tampa','tampa2',80000,'sports'), + ('Elegy','elegy2',38500,'sports'), + ('Feltzer','feltzer2',55000,'sports'), + ('Furore GT','furoregt',45000,'sports'), + ('Fusilade','fusilade',40000,'sports'), + ('Jester','jester',65000,'sports'), + ('Jester(Racecar)','jester2',135000,'sports'), + ('Khamelion','khamelion',38000,'sports'), + ('Kuruma','kuruma',30000,'sports'), + ('Lynx','lynx',40000,'sports'), + ('Mamba','mamba',70000,'sports'), + ('Massacro','massacro',65000,'sports'), + ('Massacro(Racecar)','massacro2',130000,'sports'), + ('Omnis','omnis',35000,'sports'), + ('Penumbra','penumbra',28000,'sports'), + ('Rapid GT','rapidgt',35000,'sports'), + ('Rapid GT Convertible','rapidgt2',45000,'sports'), + ('Schafter V12','schafter3',50000,'sports'), + ('Seven 70','seven70',39500,'sports'), + ('Sultan','sultan',15000,'sports'), + ('Surano','surano',50000,'sports'), + ('Tropos','tropos',40000,'sports'), + ('Verlierer','verlierer2',70000,'sports'), + ('Adder','adder',900000,'super'), + ('Banshee 900R','banshee2',255000,'super'), + ('Bullet','bullet',90000,'super'), + ('Cheetah','cheetah',375000,'super'), + ('Entity XF','entityxf',425000,'super'), + ('ETR1','sheava',220000,'super'), + ('FMJ','fmj',185000,'super'), + ('Infernus','infernus',180000,'super'), + ('Osiris','osiris',160000,'super'), + ('Pfister','pfister811',85000,'super'), + ('RE-7B','le7b',325000,'super'), + ('Reaper','reaper',150000,'super'), + ('Sultan RS','sultanrs',65000,'super'), + ('T20','t20',300000,'super'), + ('Turismo R','turismor',350000,'super'), + ('Tyrus','tyrus',600000,'super'), + ('Vacca','vacca',120000,'super'), + ('Voltic','voltic',90000,'super'), + ('X80 Proto','prototipo',2500000,'super'), + ('Zentorno','zentorno',1500000,'super'), + ('Akuma','AKUMA',7500,'motorcycles'), + ('Avarus','avarus',18000,'motorcycles'), + ('Bagger','bagger',13500,'motorcycles'), + ('Bati 801','bati',12000,'motorcycles'), + ('Bati 801RR','bati2',19000,'motorcycles'), + ('BF400','bf400',6500,'motorcycles'), + ('BMX (velo)','bmx',160,'motorcycles'), + ('Carbon RS','carbonrs',18000,'motorcycles'), + ('Chimera','chimera',38000,'motorcycles'), + ('Cliffhanger','cliffhanger',9500,'motorcycles'), + ('Cruiser (velo)','cruiser',510,'motorcycles'), + ('Daemon','daemon',11500,'motorcycles'), + ('Daemon High','daemon2',13500,'motorcycles'), + ('Defiler','defiler',9800,'motorcycles'), + ('Double T','double',28000,'motorcycles'), + ('Enduro','enduro',5500,'motorcycles'), + ('Esskey','esskey',4200,'motorcycles'), + ('Faggio','faggio',1900,'motorcycles'), + ('Vespa','faggio2',2800,'motorcycles'), + ('Fixter (velo)','fixter',225,'motorcycles'), + ('Gargoyle','gargoyle',16500,'motorcycles'), + ('Hakuchou','hakuchou',31000,'motorcycles'), + ('Hakuchou Sport','hakuchou2',55000,'motorcycles'), + ('Hexer','hexer',12000,'motorcycles'), + ('Innovation','innovation',23500,'motorcycles'), + ('Manchez','manchez',5300,'motorcycles'), + ('Nemesis','nemesis',5800,'motorcycles'), + ('Nightblade','nightblade',35000,'motorcycles'), + ('PCJ-600','pcj',6200,'motorcycles'), + ('Ruffian','ruffian',6800,'motorcycles'), + ('Sanchez','sanchez',5300,'motorcycles'), + ('Sanchez Sport','sanchez2',5300,'motorcycles'), + ('Sanctus','sanctus',25000,'motorcycles'), + ('Scorcher (velo)','scorcher',280,'motorcycles'), + ('Sovereign','sovereign',22000,'motorcycles'), + ('Shotaro Concept','shotaro',320000,'motorcycles'), + ('Thrust','thrust',24000,'motorcycles'), + ('Tri bike (velo)','tribike3',520,'motorcycles'), + ('Vader','vader',7200,'motorcycles'), + ('Vortex','vortex',9800,'motorcycles'), + ('Woflsbane','wolfsbane',9000,'motorcycles'), + ('Zombie','zombiea',9500,'motorcycles'), + ('Zombie Luxuary','zombieb',12000,'motorcycles'), + ('blazer5', 'blazer5', 1755600, 'offroad'), + ('Ruiner 2', 'ruiner2', 5745600, 'muscle'), + ('Voltic 2', 'voltic2', 3830400, 'super'), + ('Ardent', 'ardent', 1150000, 'sportsclassics'), + ('Oppressor', 'oppressor', 3524500, 'super'), + ('Visione', 'visione', 2250000, 'super'), + ('Retinue', 'retinue', 615000, 'sportsclassics'), + ('Cyclone', 'cyclone', 1890000, 'super'), + ('Rapid GT3', 'rapidgt3', 885000, 'sportsclassics'), + ('raiden', 'raiden', 1375000, 'sports'), + ('Yosemite', 'yosemite', 485000, 'muscle'), + ('Deluxo', 'deluxo', 4721500, 'sportsclassics'), + ('Pariah', 'pariah', 1420000, 'sports'), + ('Stromberg', 'stromberg', 3185350, 'sports'), + ('SC 1', 'sc1', 1603000, 'super'), + ('riata', 'riata', 380000, 'offroad'), + ('Hermes', 'hermes', 535000, 'muscle'), + ('Savestra', 'savestra', 990000, 'sportsclassics'), + ('Streiter', 'streiter', 500000, 'sports'), + ('Kamacho', 'kamacho', 345000, 'offroad'), + ('GT 500', 'gt500', 785000, 'sportsclassics'), + ('Z190', 'z190', 900000, 'sportsclassics'), + ('Viseris', 'viseris', 875000, 'sportsclassics'), + ('Autarch', 'autarch', 1955000, 'super'), + ('Comet 5', 'comet5', 1145000, 'sports'), + ('Neon', 'neon', 1500000, 'sports'), + ('Revolter', 'revolter', 1610000, 'sports'), + ('Sentinel3', 'sentinel3', 650000, 'sports'), + ('Hustler', 'hustler', 625000, 'muscle') +; diff --git a/[esx_addons]/esx_vehicleshop/localization/de_esx_vehicleshop.sql b/[esx_addons]/esx_vehicleshop/localization/de_esx_vehicleshop.sql new file mode 100644 index 00000000..7ae06cde --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/localization/de_esx_vehicleshop.sql @@ -0,0 +1,339 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_cardealer','Händler',1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_cardealer','Händler',1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('cardealer','Händler') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('cardealer',0,'recruit','Neuling',10,'{}','{}'), + ('cardealer',1,'novice','Verkäufer',25,'{}','{}'), + ('cardealer',2,'experienced','Verkaufsleiter',40,'{}','{}'), + ('cardealer',3,'boss','Boss',0,'{}','{}') +; + +CREATE TABLE `cardealer_vehicles` ( + `id` int NOT NULL AUTO_INCREMENT, + `vehicle` varchar(255) NOT NULL, + `price` int NOT NULL, + + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `vehicle_sold` ( + `client` VARCHAR(50) NOT NULL, + `model` VARCHAR(50) NOT NULL, + `plate` VARCHAR(50) NOT NULL, + `soldby` VARCHAR(50) NOT NULL, + `date` VARCHAR(50) NOT NULL, + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `owned_vehicles` ( + `owner` VARCHAR(60) NOT NULL, + `plate` varchar(12) NOT NULL, + `vehicle` longtext, + `type` VARCHAR(20) NOT NULL DEFAULT 'car', + `job` VARCHAR(20) NULL DEFAULT NULL, + `stored` TINYINT(1) NOT NULL DEFAULT '0', + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `rented_vehicles` ( + `vehicle` varchar(60) NOT NULL, + `plate` varchar(12) NOT NULL, + `player_name` varchar(255) NOT NULL, + `base_price` int NOT NULL, + `rent_price` int NOT NULL, + `owner` VARCHAR(60) NOT NULL, + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `vehicle_categories` ( + `name` varchar(60) NOT NULL, + `label` varchar(60) NOT NULL, + + PRIMARY KEY (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `vehicle_categories` (name, label) VALUES + ('compacts','Compacts'), + ('coupes','Coupés'), + ('sedans','Sedans'), + ('sports','Sports'), + ('sportsclassics','Sports Classics'), + ('super','Super'), + ('muscle','Muscle'), + ('offroad','Off Road'), + ('suvs','SUVs'), + ('vans','Vans'), + ('motorcycles','Motos') +; + +CREATE TABLE `vehicles` ( + `name` varchar(60) NOT NULL, + `model` varchar(60) NOT NULL, + `price` int NOT NULL, + `category` varchar(60) DEFAULT NULL, + + PRIMARY KEY (`model`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `vehicles` (name, model, price, category) VALUES + ('Blade','blade',15000,'muscle'), + ('Buccaneer','buccaneer',18000,'muscle'), + ('Buccaneer Rider','buccaneer2',24000,'muscle'), + ('Chino','chino',15000,'muscle'), + ('Chino Luxe','chino2',19000,'muscle'), + ('Coquette BlackFin','coquette3',55000,'muscle'), + ('Dominator','dominator',35000,'muscle'), + ('Dukes','dukes',28000,'muscle'), + ('Gauntlet','gauntlet',30000,'muscle'), + ('Hotknife','hotknife',125000,'muscle'), + ('Faction','faction',20000,'muscle'), + ('Faction Rider','faction2',30000,'muscle'), + ('Faction XL','faction3',40000,'muscle'), + ('Nightshade','nightshade',65000,'muscle'), + ('Phoenix','phoenix',12500,'muscle'), + ('Picador','picador',18000,'muscle'), + ('Sabre Turbo','sabregt',20000,'muscle'), + ('Sabre GT','sabregt2',25000,'muscle'), + ('Slam Van','slamvan3',11500,'muscle'), + ('Tampa','tampa',16000,'muscle'), + ('Virgo','virgo',14000,'muscle'), + ('Vigero','vigero',12500,'muscle'), + ('Voodoo','voodoo',7200,'muscle'), + ('Blista','blista',8000,'compacts'), + ('Brioso R/A','brioso',18000,'compacts'), + ('Issi','issi2',10000,'compacts'), + ('Panto','panto',10000,'compacts'), + ('Prairie','prairie',12000,'compacts'), + ('Bison','bison',45000,'vans'), + ('Bobcat XL','bobcatxl',32000,'vans'), + ('Burrito','burrito3',19000,'vans'), + ('Burrito','gburrito2',29000,'vans'), + ('Camper','camper',42000,'vans'), + ('Gang Burrito','gburrito',45000,'vans'), + ('Journey','journey',6500,'vans'), + ('Minivan','minivan',13000,'vans'), + ('Moonbeam','moonbeam',18000,'vans'), + ('Moonbeam Rider','moonbeam2',35000,'vans'), + ('Paradise','paradise',19000,'vans'), + ('Rumpo','rumpo',15000,'vans'), + ('Rumpo Trail','rumpo3',19500,'vans'), + ('Surfer','surfer',12000,'vans'), + ('Youga','youga',10800,'vans'), + ('Youga Luxuary','youga2',14500,'vans'), + ('Asea','asea',5500,'sedans'), + ('Cognoscenti','cognoscenti',55000,'sedans'), + ('Emperor','emperor',8500,'sedans'), + ('Fugitive','fugitive',12000,'sedans'), + ('Glendale','glendale',6500,'sedans'), + ('Intruder','intruder',7500,'sedans'), + ('Premier','premier',8000,'sedans'), + ('Primo Custom','primo2',14000,'sedans'), + ('Regina','regina',5000,'sedans'), + ('Schafter','schafter2',25000,'sedans'), + ('Stretch','stretch',90000,'sedans'), + ('Super Diamond','superd',130000,'sedans'), + ('Tailgater','tailgater',30000,'sedans'), + ('Warrener','warrener',4000,'sedans'), + ('Washington','washington',9000,'sedans'), + ('Baller','baller2',40000,'suvs'), + ('Baller Sport','baller3',60000,'suvs'), + ('Cavalcade','cavalcade2',55000,'suvs'), + ('Contender','contender',70000,'suvs'), + ('Dubsta','dubsta',45000,'suvs'), + ('Dubsta Luxuary','dubsta2',60000,'suvs'), + ('Fhantom','fq2',17000,'suvs'), + ('Grabger','granger',50000,'suvs'), + ('Gresley','gresley',47500,'suvs'), + ('Huntley S','huntley',40000,'suvs'), + ('Landstalker','landstalker',35000,'suvs'), + ('Mesa','mesa',16000,'suvs'), + ('Mesa Trail','mesa3',40000,'suvs'), + ('Patriot','patriot',55000,'suvs'), + ('Radius','radi',29000,'suvs'), + ('Rocoto','rocoto',45000,'suvs'), + ('Seminole','seminole',25000,'suvs'), + ('XLS','xls',32000,'suvs'), + ('Btype','btype',62000,'sportsclassics'), + ('Btype Luxe','btype3',85000,'sportsclassics'), + ('Btype Hotroad','btype2',155000,'sportsclassics'), + ('Casco','casco',30000,'sportsclassics'), + ('Coquette Classic','coquette2',40000,'sportsclassics'), + ('Manana','manana',12800,'sportsclassics'), + ('Monroe','monroe',55000,'sportsclassics'), + ('Pigalle','pigalle',20000,'sportsclassics'), + ('Stinger','stinger',80000,'sportsclassics'), + ('Stinger GT','stingergt',75000,'sportsclassics'), + ('Stirling GT','feltzer3',65000,'sportsclassics'), + ('Z-Type','ztype',220000,'sportsclassics'), + ('Bifta','bifta',12000,'offroad'), + ('Bf Injection','bfinjection',16000,'offroad'), + ('Blazer','blazer',6500,'offroad'), + ('Blazer Sport','blazer4',8500,'offroad'), + ('Brawler','brawler',45000,'offroad'), + ('Bubsta 6x6','dubsta3',120000,'offroad'), + ('Dune Buggy','dune',8000,'offroad'), + ('Guardian','guardian',45000,'offroad'), + ('Rebel','rebel2',35000,'offroad'), + ('Sandking','sandking',55000,'offroad'), + ('The Liberator','monster',210000,'offroad'), + ('Trophy Truck','trophytruck',60000,'offroad'), + ('Trophy Truck Limited','trophytruck2',80000,'offroad'), + ('Cognoscenti Cabrio','cogcabrio',55000,'coupes'), + ('Exemplar','exemplar',32000,'coupes'), + ('F620','f620',40000,'coupes'), + ('Felon','felon',42000,'coupes'), + ('Felon GT','felon2',55000,'coupes'), + ('Jackal','jackal',38000,'coupes'), + ('Oracle XS','oracle2',35000,'coupes'), + ('Sentinel','sentinel',32000,'coupes'), + ('Sentinel XS','sentinel2',40000,'coupes'), + ('Windsor','windsor',95000,'coupes'), + ('Windsor Drop','windsor2',125000,'coupes'), + ('Zion','zion',36000,'coupes'), + ('Zion Cabrio','zion2',45000,'coupes'), + ('9F','ninef',65000,'sports'), + ('9F Cabrio','ninef2',80000,'sports'), + ('Alpha','alpha',60000,'sports'), + ('Banshee','banshee',70000,'sports'), + ('Bestia GTS','bestiagts',55000,'sports'), + ('Buffalo','buffalo',12000,'sports'), + ('Buffalo S','buffalo2',20000,'sports'), + ('Carbonizzare','carbonizzare',75000,'sports'), + ('Comet','comet2',65000,'sports'), + ('Coquette','coquette',65000,'sports'), + ('Drift Tampa','tampa2',80000,'sports'), + ('Elegy','elegy2',38500,'sports'), + ('Feltzer','feltzer2',55000,'sports'), + ('Furore GT','furoregt',45000,'sports'), + ('Fusilade','fusilade',40000,'sports'), + ('Jester','jester',65000,'sports'), + ('Jester(Racecar)','jester2',135000,'sports'), + ('Khamelion','khamelion',38000,'sports'), + ('Kuruma','kuruma',30000,'sports'), + ('Lynx','lynx',40000,'sports'), + ('Mamba','mamba',70000,'sports'), + ('Massacro','massacro',65000,'sports'), + ('Massacro(Racecar)','massacro2',130000,'sports'), + ('Omnis','omnis',35000,'sports'), + ('Penumbra','penumbra',28000,'sports'), + ('Rapid GT','rapidgt',35000,'sports'), + ('Rapid GT Convertible','rapidgt2',45000,'sports'), + ('Schafter V12','schafter3',50000,'sports'), + ('Seven 70','seven70',39500,'sports'), + ('Sultan','sultan',15000,'sports'), + ('Surano','surano',50000,'sports'), + ('Tropos','tropos',40000,'sports'), + ('Verlierer','verlierer2',70000,'sports'), + ('Adder','adder',900000,'super'), + ('Banshee 900R','banshee2',255000,'super'), + ('Bullet','bullet',90000,'super'), + ('Cheetah','cheetah',375000,'super'), + ('Entity XF','entityxf',425000,'super'), + ('ETR1','sheava',220000,'super'), + ('FMJ','fmj',185000,'super'), + ('Infernus','infernus',180000,'super'), + ('Osiris','osiris',160000,'super'), + ('Pfister','pfister811',85000,'super'), + ('RE-7B','le7b',325000,'super'), + ('Reaper','reaper',150000,'super'), + ('Sultan RS','sultanrs',65000,'super'), + ('T20','t20',300000,'super'), + ('Turismo R','turismor',350000,'super'), + ('Tyrus','tyrus',600000,'super'), + ('Vacca','vacca',120000,'super'), + ('Voltic','voltic',90000,'super'), + ('X80 Proto','prototipo',2500000,'super'), + ('Zentorno','zentorno',1500000,'super'), + ('Akuma','AKUMA',7500,'motorcycles'), + ('Avarus','avarus',18000,'motorcycles'), + ('Bagger','bagger',13500,'motorcycles'), + ('Bati 801','bati',12000,'motorcycles'), + ('Bati 801RR','bati2',19000,'motorcycles'), + ('BF400','bf400',6500,'motorcycles'), + ('BMX (velo)','bmx',160,'motorcycles'), + ('Carbon RS','carbonrs',18000,'motorcycles'), + ('Chimera','chimera',38000,'motorcycles'), + ('Cliffhanger','cliffhanger',9500,'motorcycles'), + ('Cruiser (velo)','cruiser',510,'motorcycles'), + ('Daemon','daemon',11500,'motorcycles'), + ('Daemon High','daemon2',13500,'motorcycles'), + ('Defiler','defiler',9800,'motorcycles'), + ('Double T','double',28000,'motorcycles'), + ('Enduro','enduro',5500,'motorcycles'), + ('Esskey','esskey',4200,'motorcycles'), + ('Faggio','faggio',1900,'motorcycles'), + ('Vespa','faggio2',2800,'motorcycles'), + ('Fixter (velo)','fixter',225,'motorcycles'), + ('Gargoyle','gargoyle',16500,'motorcycles'), + ('Hakuchou','hakuchou',31000,'motorcycles'), + ('Hakuchou Sport','hakuchou2',55000,'motorcycles'), + ('Hexer','hexer',12000,'motorcycles'), + ('Innovation','innovation',23500,'motorcycles'), + ('Manchez','manchez',5300,'motorcycles'), + ('Nemesis','nemesis',5800,'motorcycles'), + ('Nightblade','nightblade',35000,'motorcycles'), + ('PCJ-600','pcj',6200,'motorcycles'), + ('Ruffian','ruffian',6800,'motorcycles'), + ('Sanchez','sanchez',5300,'motorcycles'), + ('Sanchez Sport','sanchez2',5300,'motorcycles'), + ('Sanctus','sanctus',25000,'motorcycles'), + ('Scorcher (velo)','scorcher',280,'motorcycles'), + ('Sovereign','sovereign',22000,'motorcycles'), + ('Shotaro Concept','shotaro',320000,'motorcycles'), + ('Thrust','thrust',24000,'motorcycles'), + ('Tri bike (velo)','tribike3',520,'motorcycles'), + ('Vader','vader',7200,'motorcycles'), + ('Vortex','vortex',9800,'motorcycles'), + ('Woflsbane','wolfsbane',9000,'motorcycles'), + ('Zombie','zombiea',9500,'motorcycles'), + ('Zombie Luxuary','zombieb',12000,'motorcycles'), + ('blazer5', 'blazer5', 1755600, 'offroad'), + ('Ruiner 2', 'ruiner2', 5745600, 'muscle'), + ('Voltic 2', 'voltic2', 3830400, 'super'), + ('Ardent', 'ardent', 1150000, 'sportsclassics'), + ('Oppressor', 'oppressor', 3524500, 'super'), + ('Visione', 'visione', 2250000, 'super'), + ('Retinue', 'retinue', 615000, 'sportsclassics'), + ('Cyclone', 'cyclone', 1890000, 'super'), + ('Rapid GT3', 'rapidgt3', 885000, 'sportsclassics'), + ('raiden', 'raiden', 1375000, 'sports'), + ('Yosemite', 'yosemite', 485000, 'muscle'), + ('Deluxo', 'deluxo', 4721500, 'sportsclassics'), + ('Pariah', 'pariah', 1420000, 'sports'), + ('Stromberg', 'stromberg', 3185350, 'sports'), + ('SC 1', 'sc1', 1603000, 'super'), + ('riata', 'riata', 380000, 'offroad'), + ('Hermes', 'hermes', 535000, 'muscle'), + ('Savestra', 'savestra', 990000, 'sportsclassics'), + ('Streiter', 'streiter', 500000, 'sports'), + ('Kamacho', 'kamacho', 345000, 'offroad'), + ('GT 500', 'gt500', 785000, 'sportsclassics'), + ('Z190', 'z190', 900000, 'sportsclassics'), + ('Viseris', 'viseris', 875000, 'sportsclassics'), + ('Autarch', 'autarch', 1955000, 'super'), + ('Comet 5', 'comet5', 1145000, 'sports'), + ('Neon', 'neon', 1500000, 'sports'), + ('Revolter', 'revolter', 1610000, 'sports'), + ('Sentinel3', 'sentinel3', 650000, 'sports'), + ('Hustler', 'hustler', 625000, 'muscle') +; diff --git a/[esx_addons]/esx_vehicleshop/localization/en_esx_vehicleshop.sql b/[esx_addons]/esx_vehicleshop/localization/en_esx_vehicleshop.sql new file mode 100644 index 00000000..f9a714ca --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/localization/en_esx_vehicleshop.sql @@ -0,0 +1,339 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_cardealer','Cardealer',1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_cardealer','Cardealer',1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('cardealer','Cardealer') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('cardealer',0,'recruit','Recruit',10,'{}','{}'), + ('cardealer',1,'novice','Novice',25,'{}','{}'), + ('cardealer',2,'experienced','Experienced',40,'{}','{}'), + ('cardealer',3,'boss','Boss',0,'{}','{}') +; + +CREATE TABLE `cardealer_vehicles` ( + `id` int NOT NULL AUTO_INCREMENT, + `vehicle` varchar(255) NOT NULL, + `price` int NOT NULL, + + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `vehicle_sold` ( + `client` VARCHAR(50) NOT NULL, + `model` VARCHAR(50) NOT NULL, + `plate` VARCHAR(50) NOT NULL, + `soldby` VARCHAR(50) NOT NULL, + `date` VARCHAR(50) NOT NULL, + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `owned_vehicles` ( + `owner` VARCHAR(60) NOT NULL, + `plate` varchar(12) NOT NULL, + `vehicle` longtext, + `type` VARCHAR(20) NOT NULL DEFAULT 'car', + `job` VARCHAR(20) NULL DEFAULT NULL, + `stored` TINYINT(1) NOT NULL DEFAULT '0', + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `rented_vehicles` ( + `vehicle` varchar(60) NOT NULL, + `plate` varchar(12) NOT NULL, + `player_name` varchar(255) NOT NULL, + `base_price` int NOT NULL, + `rent_price` int NOT NULL, + `owner` VARCHAR(60) NOT NULL, + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `vehicle_categories` ( + `name` varchar(60) NOT NULL, + `label` varchar(60) NOT NULL, + + PRIMARY KEY (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `vehicle_categories` (name, label) VALUES + ('compacts','Compacts'), + ('coupes','Coupes'), + ('sedans','Sedans'), + ('sports','Sports'), + ('sportsclassics','Sports Classics'), + ('super','Super'), + ('muscle','Muscle'), + ('offroad','Off Road'), + ('suvs','SUVs'), + ('vans','Vans'), + ('motorcycles','Motos') +; + +CREATE TABLE `vehicles` ( + `name` varchar(60) NOT NULL, + `model` varchar(60) NOT NULL, + `price` int NOT NULL, + `category` varchar(60) DEFAULT NULL, + + PRIMARY KEY (`model`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `vehicles` (name, model, price, category) VALUES + ('Blade','blade',15000,'muscle'), + ('Buccaneer','buccaneer',18000,'muscle'), + ('Buccaneer Rider','buccaneer2',24000,'muscle'), + ('Chino','chino',15000,'muscle'), + ('Chino Luxe','chino2',19000,'muscle'), + ('Coquette BlackFin','coquette3',55000,'muscle'), + ('Dominator','dominator',35000,'muscle'), + ('Dukes','dukes',28000,'muscle'), + ('Gauntlet','gauntlet',30000,'muscle'), + ('Hotknife','hotknife',125000,'muscle'), + ('Faction','faction',20000,'muscle'), + ('Faction Rider','faction2',30000,'muscle'), + ('Faction XL','faction3',40000,'muscle'), + ('Nightshade','nightshade',65000,'muscle'), + ('Phoenix','phoenix',12500,'muscle'), + ('Picador','picador',18000,'muscle'), + ('Sabre Turbo','sabregt',20000,'muscle'), + ('Sabre GT','sabregt2',25000,'muscle'), + ('Slam Van','slamvan3',11500,'muscle'), + ('Tampa','tampa',16000,'muscle'), + ('Virgo','virgo',14000,'muscle'), + ('Vigero','vigero',12500,'muscle'), + ('Voodoo','voodoo',7200,'muscle'), + ('Blista','blista',8000,'compacts'), + ('Brioso R/A','brioso',18000,'compacts'), + ('Issi','issi2',10000,'compacts'), + ('Panto','panto',10000,'compacts'), + ('Prairie','prairie',12000,'compacts'), + ('Bison','bison',45000,'vans'), + ('Bobcat XL','bobcatxl',32000,'vans'), + ('Burrito','burrito3',19000,'vans'), + ('Burrito','gburrito2',29000,'vans'), + ('Camper','camper',42000,'vans'), + ('Gang Burrito','gburrito',45000,'vans'), + ('Journey','journey',6500,'vans'), + ('Minivan','minivan',13000,'vans'), + ('Moonbeam','moonbeam',18000,'vans'), + ('Moonbeam Rider','moonbeam2',35000,'vans'), + ('Paradise','paradise',19000,'vans'), + ('Rumpo','rumpo',15000,'vans'), + ('Rumpo Trail','rumpo3',19500,'vans'), + ('Surfer','surfer',12000,'vans'), + ('Youga','youga',10800,'vans'), + ('Youga Luxuary','youga2',14500,'vans'), + ('Asea','asea',5500,'sedans'), + ('Cognoscenti','cognoscenti',55000,'sedans'), + ('Emperor','emperor',8500,'sedans'), + ('Fugitive','fugitive',12000,'sedans'), + ('Glendale','glendale',6500,'sedans'), + ('Intruder','intruder',7500,'sedans'), + ('Premier','premier',8000,'sedans'), + ('Primo Custom','primo2',14000,'sedans'), + ('Regina','regina',5000,'sedans'), + ('Schafter','schafter2',25000,'sedans'), + ('Stretch','stretch',90000,'sedans'), + ('Super Diamond','superd',130000,'sedans'), + ('Tailgater','tailgater',30000,'sedans'), + ('Warrener','warrener',4000,'sedans'), + ('Washington','washington',9000,'sedans'), + ('Baller','baller2',40000,'suvs'), + ('Baller Sport','baller3',60000,'suvs'), + ('Cavalcade','cavalcade2',55000,'suvs'), + ('Contender','contender',70000,'suvs'), + ('Dubsta','dubsta',45000,'suvs'), + ('Dubsta Luxuary','dubsta2',60000,'suvs'), + ('Fhantom','fq2',17000,'suvs'), + ('Grabger','granger',50000,'suvs'), + ('Gresley','gresley',47500,'suvs'), + ('Huntley S','huntley',40000,'suvs'), + ('Landstalker','landstalker',35000,'suvs'), + ('Mesa','mesa',16000,'suvs'), + ('Mesa Trail','mesa3',40000,'suvs'), + ('Patriot','patriot',55000,'suvs'), + ('Radius','radi',29000,'suvs'), + ('Rocoto','rocoto',45000,'suvs'), + ('Seminole','seminole',25000,'suvs'), + ('XLS','xls',32000,'suvs'), + ('Btype','btype',62000,'sportsclassics'), + ('Btype Luxe','btype3',85000,'sportsclassics'), + ('Btype Hotroad','btype2',155000,'sportsclassics'), + ('Casco','casco',30000,'sportsclassics'), + ('Coquette Classic','coquette2',40000,'sportsclassics'), + ('Manana','manana',12800,'sportsclassics'), + ('Monroe','monroe',55000,'sportsclassics'), + ('Pigalle','pigalle',20000,'sportsclassics'), + ('Stinger','stinger',80000,'sportsclassics'), + ('Stinger GT','stingergt',75000,'sportsclassics'), + ('Stirling GT','feltzer3',65000,'sportsclassics'), + ('Z-Type','ztype',220000,'sportsclassics'), + ('Bifta','bifta',12000,'offroad'), + ('Bf Injection','bfinjection',16000,'offroad'), + ('Blazer','blazer',6500,'offroad'), + ('Blazer Sport','blazer4',8500,'offroad'), + ('Brawler','brawler',45000,'offroad'), + ('Bubsta 6x6','dubsta3',120000,'offroad'), + ('Dune Buggy','dune',8000,'offroad'), + ('Guardian','guardian',45000,'offroad'), + ('Rebel','rebel2',35000,'offroad'), + ('Sandking','sandking',55000,'offroad'), + ('The Liberator','monster',210000,'offroad'), + ('Trophy Truck','trophytruck',60000,'offroad'), + ('Trophy Truck Limited','trophytruck2',80000,'offroad'), + ('Cognoscenti Cabrio','cogcabrio',55000,'coupes'), + ('Exemplar','exemplar',32000,'coupes'), + ('F620','f620',40000,'coupes'), + ('Felon','felon',42000,'coupes'), + ('Felon GT','felon2',55000,'coupes'), + ('Jackal','jackal',38000,'coupes'), + ('Oracle XS','oracle2',35000,'coupes'), + ('Sentinel','sentinel',32000,'coupes'), + ('Sentinel XS','sentinel2',40000,'coupes'), + ('Windsor','windsor',95000,'coupes'), + ('Windsor Drop','windsor2',125000,'coupes'), + ('Zion','zion',36000,'coupes'), + ('Zion Cabrio','zion2',45000,'coupes'), + ('9F','ninef',65000,'sports'), + ('9F Cabrio','ninef2',80000,'sports'), + ('Alpha','alpha',60000,'sports'), + ('Banshee','banshee',70000,'sports'), + ('Bestia GTS','bestiagts',55000,'sports'), + ('Buffalo','buffalo',12000,'sports'), + ('Buffalo S','buffalo2',20000,'sports'), + ('Carbonizzare','carbonizzare',75000,'sports'), + ('Comet','comet2',65000,'sports'), + ('Coquette','coquette',65000,'sports'), + ('Drift Tampa','tampa2',80000,'sports'), + ('Elegy','elegy2',38500,'sports'), + ('Feltzer','feltzer2',55000,'sports'), + ('Furore GT','furoregt',45000,'sports'), + ('Fusilade','fusilade',40000,'sports'), + ('Jester','jester',65000,'sports'), + ('Jester(Racecar)','jester2',135000,'sports'), + ('Khamelion','khamelion',38000,'sports'), + ('Kuruma','kuruma',30000,'sports'), + ('Lynx','lynx',40000,'sports'), + ('Mamba','mamba',70000,'sports'), + ('Massacro','massacro',65000,'sports'), + ('Massacro(Racecar)','massacro2',130000,'sports'), + ('Omnis','omnis',35000,'sports'), + ('Penumbra','penumbra',28000,'sports'), + ('Rapid GT','rapidgt',35000,'sports'), + ('Rapid GT Convertible','rapidgt2',45000,'sports'), + ('Schafter V12','schafter3',50000,'sports'), + ('Seven 70','seven70',39500,'sports'), + ('Sultan','sultan',15000,'sports'), + ('Surano','surano',50000,'sports'), + ('Tropos','tropos',40000,'sports'), + ('Verlierer','verlierer2',70000,'sports'), + ('Adder','adder',900000,'super'), + ('Banshee 900R','banshee2',255000,'super'), + ('Bullet','bullet',90000,'super'), + ('Cheetah','cheetah',375000,'super'), + ('Entity XF','entityxf',425000,'super'), + ('ETR1','sheava',220000,'super'), + ('FMJ','fmj',185000,'super'), + ('Infernus','infernus',180000,'super'), + ('Osiris','osiris',160000,'super'), + ('Pfister','pfister811',85000,'super'), + ('RE-7B','le7b',325000,'super'), + ('Reaper','reaper',150000,'super'), + ('Sultan RS','sultanrs',65000,'super'), + ('T20','t20',300000,'super'), + ('Turismo R','turismor',350000,'super'), + ('Tyrus','tyrus',600000,'super'), + ('Vacca','vacca',120000,'super'), + ('Voltic','voltic',90000,'super'), + ('X80 Proto','prototipo',2500000,'super'), + ('Zentorno','zentorno',1500000,'super'), + ('Akuma','AKUMA',7500,'motorcycles'), + ('Avarus','avarus',18000,'motorcycles'), + ('Bagger','bagger',13500,'motorcycles'), + ('Bati 801','bati',12000,'motorcycles'), + ('Bati 801RR','bati2',19000,'motorcycles'), + ('BF400','bf400',6500,'motorcycles'), + ('BMX (velo)','bmx',160,'motorcycles'), + ('Carbon RS','carbonrs',18000,'motorcycles'), + ('Chimera','chimera',38000,'motorcycles'), + ('Cliffhanger','cliffhanger',9500,'motorcycles'), + ('Cruiser (velo)','cruiser',510,'motorcycles'), + ('Daemon','daemon',11500,'motorcycles'), + ('Daemon High','daemon2',13500,'motorcycles'), + ('Defiler','defiler',9800,'motorcycles'), + ('Double T','double',28000,'motorcycles'), + ('Enduro','enduro',5500,'motorcycles'), + ('Esskey','esskey',4200,'motorcycles'), + ('Faggio','faggio',1900,'motorcycles'), + ('Vespa','faggio2',2800,'motorcycles'), + ('Fixter (velo)','fixter',225,'motorcycles'), + ('Gargoyle','gargoyle',16500,'motorcycles'), + ('Hakuchou','hakuchou',31000,'motorcycles'), + ('Hakuchou Sport','hakuchou2',55000,'motorcycles'), + ('Hexer','hexer',12000,'motorcycles'), + ('Innovation','innovation',23500,'motorcycles'), + ('Manchez','manchez',5300,'motorcycles'), + ('Nemesis','nemesis',5800,'motorcycles'), + ('Nightblade','nightblade',35000,'motorcycles'), + ('PCJ-600','pcj',6200,'motorcycles'), + ('Ruffian','ruffian',6800,'motorcycles'), + ('Sanchez','sanchez',5300,'motorcycles'), + ('Sanchez Sport','sanchez2',5300,'motorcycles'), + ('Sanctus','sanctus',25000,'motorcycles'), + ('Scorcher (velo)','scorcher',280,'motorcycles'), + ('Sovereign','sovereign',22000,'motorcycles'), + ('Shotaro Concept','shotaro',320000,'motorcycles'), + ('Thrust','thrust',24000,'motorcycles'), + ('Tri bike (velo)','tribike3',520,'motorcycles'), + ('Vader','vader',7200,'motorcycles'), + ('Vortex','vortex',9800,'motorcycles'), + ('Woflsbane','wolfsbane',9000,'motorcycles'), + ('Zombie','zombiea',9500,'motorcycles'), + ('Zombie Luxuary','zombieb',12000,'motorcycles'), + ('blazer5', 'blazer5', 1755600, 'offroad'), + ('Ruiner 2', 'ruiner2', 5745600, 'muscle'), + ('Voltic 2', 'voltic2', 3830400, 'super'), + ('Ardent', 'ardent', 1150000, 'sportsclassics'), + ('Oppressor', 'oppressor', 3524500, 'super'), + ('Visione', 'visione', 2250000, 'super'), + ('Retinue', 'retinue', 615000, 'sportsclassics'), + ('Cyclone', 'cyclone', 1890000, 'super'), + ('Rapid GT3', 'rapidgt3', 885000, 'sportsclassics'), + ('raiden', 'raiden', 1375000, 'sports'), + ('Yosemite', 'yosemite', 485000, 'muscle'), + ('Deluxo', 'deluxo', 4721500, 'sportsclassics'), + ('Pariah', 'pariah', 1420000, 'sports'), + ('Stromberg', 'stromberg', 3185350, 'sports'), + ('SC 1', 'sc1', 1603000, 'super'), + ('riata', 'riata', 380000, 'offroad'), + ('Hermes', 'hermes', 535000, 'muscle'), + ('Savestra', 'savestra', 990000, 'sportsclassics'), + ('Streiter', 'streiter', 500000, 'sports'), + ('Kamacho', 'kamacho', 345000, 'offroad'), + ('GT 500', 'gt500', 785000, 'sportsclassics'), + ('Z190', 'z190', 900000, 'sportsclassics'), + ('Viseris', 'viseris', 875000, 'sportsclassics'), + ('Autarch', 'autarch', 1955000, 'super'), + ('Comet 5', 'comet5', 1145000, 'sports'), + ('Neon', 'neon', 1500000, 'sports'), + ('Revolter', 'revolter', 1610000, 'sports'), + ('Sentinel3', 'sentinel3', 650000, 'sports'), + ('Hustler', 'hustler', 625000, 'muscle') +; diff --git a/[esx_addons]/esx_vehicleshop/localization/es_esx_vehicleshop.sql b/[esx_addons]/esx_vehicleshop/localization/es_esx_vehicleshop.sql new file mode 100644 index 00000000..18e9c7de --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/localization/es_esx_vehicleshop.sql @@ -0,0 +1,339 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_cardealer','Concesionario',1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_cardealer','Concesionario',1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('cardealer','Concesionario') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('cardealer',0,'recruit','Recluta',10,'{}','{}'), + ('cardealer',1,'novice','Novato',25,'{}','{}'), + ('cardealer',2,'experienced','Experimentado',40,'{}','{}'), + ('cardealer',3,'boss','Jefe',0,'{}','{}') +; + +CREATE TABLE `cardealer_vehicles` ( + `id` int NOT NULL AUTO_INCREMENT, + `vehicle` varchar(255) NOT NULL, + `price` int NOT NULL, + + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `vehicle_sold` ( + `client` VARCHAR(50) NOT NULL, + `model` VARCHAR(50) NOT NULL, + `plate` VARCHAR(50) NOT NULL, + `soldby` VARCHAR(50) NOT NULL, + `date` VARCHAR(50) NOT NULL, + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `owned_vehicles` ( + `owner` VARCHAR(60) NOT NULL, + `plate` varchar(12) NOT NULL, + `vehicle` longtext, + `type` VARCHAR(20) NOT NULL DEFAULT 'car', + `job` VARCHAR(20) NULL DEFAULT NULL, + `stored` TINYINT(1) NOT NULL DEFAULT '0', + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `rented_vehicles` ( + `vehicle` varchar(60) NOT NULL, + `plate` varchar(12) NOT NULL, + `player_name` varchar(255) NOT NULL, + `base_price` int NOT NULL, + `rent_price` int NOT NULL, + `owner` VARCHAR(60) NOT NULL, + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `vehicle_categories` ( + `name` varchar(60) NOT NULL, + `label` varchar(60) NOT NULL, + + PRIMARY KEY (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `vehicle_categories` (name, label) VALUES + ('compacts','Compactos'), + ('coupes','Cupés'), + ('sedans','Sedanes'), + ('sports','Deportivos'), + ('sportsclassics','Deportivos clásicos'), + ('super','Super'), + ('muscle','Muscle'), + ('offroad','Todoterreno'), + ('suvs','Monovolúmenes'), + ('vans','Furgonetas'), + ('motorcycles','Motos') +; + +CREATE TABLE `vehicles` ( + `name` varchar(60) NOT NULL, + `model` varchar(60) NOT NULL, + `price` int NOT NULL, + `category` varchar(60) DEFAULT NULL, + + PRIMARY KEY (`model`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `vehicles` (name, model, price, category) VALUES + ('Blade','blade',15000,'muscle'), + ('Buccaneer','buccaneer',18000,'muscle'), + ('Buccaneer Rider','buccaneer2',24000,'muscle'), + ('Chino','chino',15000,'muscle'), + ('Chino Luxe','chino2',19000,'muscle'), + ('Coquette BlackFin','coquette3',55000,'muscle'), + ('Dominator','dominator',35000,'muscle'), + ('Dukes','dukes',28000,'muscle'), + ('Gauntlet','gauntlet',30000,'muscle'), + ('Hotknife','hotknife',125000,'muscle'), + ('Faction','faction',20000,'muscle'), + ('Faction Rider','faction2',30000,'muscle'), + ('Faction XL','faction3',40000,'muscle'), + ('Nightshade','nightshade',65000,'muscle'), + ('Phoenix','phoenix',12500,'muscle'), + ('Picador','picador',18000,'muscle'), + ('Sabre Turbo','sabregt',20000,'muscle'), + ('Sabre GT','sabregt2',25000,'muscle'), + ('Slam Van','slamvan3',11500,'muscle'), + ('Tampa','tampa',16000,'muscle'), + ('Virgo','virgo',14000,'muscle'), + ('Vigero','vigero',12500,'muscle'), + ('Voodoo','voodoo',7200,'muscle'), + ('Blista','blista',8000,'compacts'), + ('Brioso R/A','brioso',18000,'compacts'), + ('Issi','issi2',10000,'compacts'), + ('Panto','panto',10000,'compacts'), + ('Prairie','prairie',12000,'compacts'), + ('Bison','bison',45000,'vans'), + ('Bobcat XL','bobcatxl',32000,'vans'), + ('Burrito','burrito3',19000,'vans'), + ('Burrito','gburrito2',29000,'vans'), + ('Camper','camper',42000,'vans'), + ('Gang Burrito','gburrito',45000,'vans'), + ('Journey','journey',6500,'vans'), + ('Minivan','minivan',13000,'vans'), + ('Moonbeam','moonbeam',18000,'vans'), + ('Moonbeam Rider','moonbeam2',35000,'vans'), + ('Paradise','paradise',19000,'vans'), + ('Rumpo','rumpo',15000,'vans'), + ('Rumpo Trail','rumpo3',19500,'vans'), + ('Surfer','surfer',12000,'vans'), + ('Youga','youga',10800,'vans'), + ('Youga Luxuary','youga2',14500,'vans'), + ('Asea','asea',5500,'sedans'), + ('Cognoscenti','cognoscenti',55000,'sedans'), + ('Emperor','emperor',8500,'sedans'), + ('Fugitive','fugitive',12000,'sedans'), + ('Glendale','glendale',6500,'sedans'), + ('Intruder','intruder',7500,'sedans'), + ('Premier','premier',8000,'sedans'), + ('Primo Custom','primo2',14000,'sedans'), + ('Regina','regina',5000,'sedans'), + ('Schafter','schafter2',25000,'sedans'), + ('Stretch','stretch',90000,'sedans'), + ('Super Diamond','superd',130000,'sedans'), + ('Tailgater','tailgater',30000,'sedans'), + ('Warrener','warrener',4000,'sedans'), + ('Washington','washington',9000,'sedans'), + ('Baller','baller2',40000,'suvs'), + ('Baller Sport','baller3',60000,'suvs'), + ('Cavalcade','cavalcade2',55000,'suvs'), + ('Contender','contender',70000,'suvs'), + ('Dubsta','dubsta',45000,'suvs'), + ('Dubsta Luxuary','dubsta2',60000,'suvs'), + ('Fhantom','fq2',17000,'suvs'), + ('Grabger','granger',50000,'suvs'), + ('Gresley','gresley',47500,'suvs'), + ('Huntley S','huntley',40000,'suvs'), + ('Landstalker','landstalker',35000,'suvs'), + ('Mesa','mesa',16000,'suvs'), + ('Mesa Trail','mesa3',40000,'suvs'), + ('Patriot','patriot',55000,'suvs'), + ('Radius','radi',29000,'suvs'), + ('Rocoto','rocoto',45000,'suvs'), + ('Seminole','seminole',25000,'suvs'), + ('XLS','xls',32000,'suvs'), + ('Btype','btype',62000,'sportsclassics'), + ('Btype Luxe','btype3',85000,'sportsclassics'), + ('Btype Hotroad','btype2',155000,'sportsclassics'), + ('Casco','casco',30000,'sportsclassics'), + ('Coquette Classic','coquette2',40000,'sportsclassics'), + ('Manana','manana',12800,'sportsclassics'), + ('Monroe','monroe',55000,'sportsclassics'), + ('Pigalle','pigalle',20000,'sportsclassics'), + ('Stinger','stinger',80000,'sportsclassics'), + ('Stinger GT','stingergt',75000,'sportsclassics'), + ('Stirling GT','feltzer3',65000,'sportsclassics'), + ('Z-Type','ztype',220000,'sportsclassics'), + ('Bifta','bifta',12000,'offroad'), + ('Bf Injection','bfinjection',16000,'offroad'), + ('Blazer','blazer',6500,'offroad'), + ('Blazer Sport','blazer4',8500,'offroad'), + ('Brawler','brawler',45000,'offroad'), + ('Bubsta 6x6','dubsta3',120000,'offroad'), + ('Dune Buggy','dune',8000,'offroad'), + ('Guardian','guardian',45000,'offroad'), + ('Rebel','rebel2',35000,'offroad'), + ('Sandking','sandking',55000,'offroad'), + ('The Liberator','monster',210000,'offroad'), + ('Trophy Truck','trophytruck',60000,'offroad'), + ('Trophy Truck Limited','trophytruck2',80000,'offroad'), + ('Cognoscenti Cabrio','cogcabrio',55000,'coupes'), + ('Exemplar','exemplar',32000,'coupes'), + ('F620','f620',40000,'coupes'), + ('Felon','felon',42000,'coupes'), + ('Felon GT','felon2',55000,'coupes'), + ('Jackal','jackal',38000,'coupes'), + ('Oracle XS','oracle2',35000,'coupes'), + ('Sentinel','sentinel',32000,'coupes'), + ('Sentinel XS','sentinel2',40000,'coupes'), + ('Windsor','windsor',95000,'coupes'), + ('Windsor Drop','windsor2',125000,'coupes'), + ('Zion','zion',36000,'coupes'), + ('Zion Cabrio','zion2',45000,'coupes'), + ('9F','ninef',65000,'sports'), + ('9F Cabrio','ninef2',80000,'sports'), + ('Alpha','alpha',60000,'sports'), + ('Banshee','banshee',70000,'sports'), + ('Bestia GTS','bestiagts',55000,'sports'), + ('Buffalo','buffalo',12000,'sports'), + ('Buffalo S','buffalo2',20000,'sports'), + ('Carbonizzare','carbonizzare',75000,'sports'), + ('Comet','comet2',65000,'sports'), + ('Coquette','coquette',65000,'sports'), + ('Drift Tampa','tampa2',80000,'sports'), + ('Elegy','elegy2',38500,'sports'), + ('Feltzer','feltzer2',55000,'sports'), + ('Furore GT','furoregt',45000,'sports'), + ('Fusilade','fusilade',40000,'sports'), + ('Jester','jester',65000,'sports'), + ('Jester(Racecar)','jester2',135000,'sports'), + ('Khamelion','khamelion',38000,'sports'), + ('Kuruma','kuruma',30000,'sports'), + ('Lynx','lynx',40000,'sports'), + ('Mamba','mamba',70000,'sports'), + ('Massacro','massacro',65000,'sports'), + ('Massacro(Racecar)','massacro2',130000,'sports'), + ('Omnis','omnis',35000,'sports'), + ('Penumbra','penumbra',28000,'sports'), + ('Rapid GT','rapidgt',35000,'sports'), + ('Rapid GT Convertible','rapidgt2',45000,'sports'), + ('Schafter V12','schafter3',50000,'sports'), + ('Seven 70','seven70',39500,'sports'), + ('Sultan','sultan',15000,'sports'), + ('Surano','surano',50000,'sports'), + ('Tropos','tropos',40000,'sports'), + ('Verlierer','verlierer2',70000,'sports'), + ('Adder','adder',900000,'super'), + ('Banshee 900R','banshee2',255000,'super'), + ('Bullet','bullet',90000,'super'), + ('Cheetah','cheetah',375000,'super'), + ('Entity XF','entityxf',425000,'super'), + ('ETR1','sheava',220000,'super'), + ('FMJ','fmj',185000,'super'), + ('Infernus','infernus',180000,'super'), + ('Osiris','osiris',160000,'super'), + ('Pfister','pfister811',85000,'super'), + ('RE-7B','le7b',325000,'super'), + ('Reaper','reaper',150000,'super'), + ('Sultan RS','sultanrs',65000,'super'), + ('T20','t20',300000,'super'), + ('Turismo R','turismor',350000,'super'), + ('Tyrus','tyrus',600000,'super'), + ('Vacca','vacca',120000,'super'), + ('Voltic','voltic',90000,'super'), + ('X80 Proto','prototipo',2500000,'super'), + ('Zentorno','zentorno',1500000,'super'), + ('Akuma','AKUMA',7500,'motorcycles'), + ('Avarus','avarus',18000,'motorcycles'), + ('Bagger','bagger',13500,'motorcycles'), + ('Bati 801','bati',12000,'motorcycles'), + ('Bati 801RR','bati2',19000,'motorcycles'), + ('BF400','bf400',6500,'motorcycles'), + ('BMX (velo)','bmx',160,'motorcycles'), + ('Carbon RS','carbonrs',18000,'motorcycles'), + ('Chimera','chimera',38000,'motorcycles'), + ('Cliffhanger','cliffhanger',9500,'motorcycles'), + ('Cruiser (velo)','cruiser',510,'motorcycles'), + ('Daemon','daemon',11500,'motorcycles'), + ('Daemon High','daemon2',13500,'motorcycles'), + ('Defiler','defiler',9800,'motorcycles'), + ('Double T','double',28000,'motorcycles'), + ('Enduro','enduro',5500,'motorcycles'), + ('Esskey','esskey',4200,'motorcycles'), + ('Faggio','faggio',1900,'motorcycles'), + ('Vespa','faggio2',2800,'motorcycles'), + ('Fixter (velo)','fixter',225,'motorcycles'), + ('Gargoyle','gargoyle',16500,'motorcycles'), + ('Hakuchou','hakuchou',31000,'motorcycles'), + ('Hakuchou Sport','hakuchou2',55000,'motorcycles'), + ('Hexer','hexer',12000,'motorcycles'), + ('Innovation','innovation',23500,'motorcycles'), + ('Manchez','manchez',5300,'motorcycles'), + ('Nemesis','nemesis',5800,'motorcycles'), + ('Nightblade','nightblade',35000,'motorcycles'), + ('PCJ-600','pcj',6200,'motorcycles'), + ('Ruffian','ruffian',6800,'motorcycles'), + ('Sanchez','sanchez',5300,'motorcycles'), + ('Sanchez Sport','sanchez2',5300,'motorcycles'), + ('Sanctus','sanctus',25000,'motorcycles'), + ('Scorcher (velo)','scorcher',280,'motorcycles'), + ('Sovereign','sovereign',22000,'motorcycles'), + ('Shotaro Concept','shotaro',320000,'motorcycles'), + ('Thrust','thrust',24000,'motorcycles'), + ('Tri bike (velo)','tribike3',520,'motorcycles'), + ('Vader','vader',7200,'motorcycles'), + ('Vortex','vortex',9800,'motorcycles'), + ('Woflsbane','wolfsbane',9000,'motorcycles'), + ('Zombie','zombiea',9500,'motorcycles'), + ('Zombie Luxuary','zombieb',12000,'motorcycles'), + ('blazer5', 'blazer5', 1755600, 'offroad'), + ('Ruiner 2', 'ruiner2', 5745600, 'muscle'), + ('Voltic 2', 'voltic2', 3830400, 'super'), + ('Ardent', 'ardent', 1150000, 'sportsclassics'), + ('Oppressor', 'oppressor', 3524500, 'super'), + ('Visione', 'visione', 2250000, 'super'), + ('Retinue', 'retinue', 615000, 'sportsclassics'), + ('Cyclone', 'cyclone', 1890000, 'super'), + ('Rapid GT3', 'rapidgt3', 885000, 'sportsclassics'), + ('raiden', 'raiden', 1375000, 'sports'), + ('Yosemite', 'yosemite', 485000, 'muscle'), + ('Deluxo', 'deluxo', 4721500, 'sportsclassics'), + ('Pariah', 'pariah', 1420000, 'sports'), + ('Stromberg', 'stromberg', 3185350, 'sports'), + ('SC 1', 'sc1', 1603000, 'super'), + ('riata', 'riata', 380000, 'offroad'), + ('Hermes', 'hermes', 535000, 'muscle'), + ('Savestra', 'savestra', 990000, 'sportsclassics'), + ('Streiter', 'streiter', 500000, 'sports'), + ('Kamacho', 'kamacho', 345000, 'offroad'), + ('GT 500', 'gt500', 785000, 'sportsclassics'), + ('Z190', 'z190', 900000, 'sportsclassics'), + ('Viseris', 'viseris', 875000, 'sportsclassics'), + ('Autarch', 'autarch', 1955000, 'super'), + ('Comet 5', 'comet5', 1145000, 'sports'), + ('Neon', 'neon', 1500000, 'sports'), + ('Revolter', 'revolter', 1610000, 'sports'), + ('Sentinel3', 'sentinel3', 650000, 'sports'), + ('Hustler', 'hustler', 625000, 'muscle') +; diff --git a/[esx_addons]/esx_vehicleshop/localization/fi_esx_vehicleshop.sql b/[esx_addons]/esx_vehicleshop/localization/fi_esx_vehicleshop.sql new file mode 100644 index 00000000..6d6b2c5f --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/localization/fi_esx_vehicleshop.sql @@ -0,0 +1,339 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_cardealer','Autokauppa',1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_cardealer','Autokauppa',1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('cardealer','Autokauppa') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('cardealer',0,'recruit','Harjoittelija',10,'{}','{}'), + ('cardealer',1,'novice','Aloittelija',25,'{}','{}'), + ('cardealer',2,'experienced','Kokenut',40,'{}','{}'), + ('cardealer',3,'boss','Pomo',0,'{}','{}') +; + +CREATE TABLE `cardealer_vehicles` ( + `id` int NOT NULL AUTO_INCREMENT, + `vehicle` varchar(255) NOT NULL, + `price` int NOT NULL, + + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `vehicle_sold` ( + `client` VARCHAR(50) NOT NULL, + `model` VARCHAR(50) NOT NULL, + `plate` VARCHAR(50) NOT NULL, + `soldby` VARCHAR(50) NOT NULL, + `date` VARCHAR(50) NOT NULL, + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `owned_vehicles` ( + `owner` VARCHAR(60) NOT NULL, + `plate` varchar(12) NOT NULL, + `vehicle` longtext, + `type` VARCHAR(20) NOT NULL DEFAULT 'car', + `job` VARCHAR(20) NULL DEFAULT NULL, + `stored` TINYINT(1) NOT NULL DEFAULT '0', + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `rented_vehicles` ( + `vehicle` varchar(60) NOT NULL, + `plate` varchar(12) NOT NULL, + `player_name` varchar(255) NOT NULL, + `base_price` int NOT NULL, + `rent_price` int NOT NULL, + `owner` VARCHAR(60) NOT NULL, + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `vehicle_categories` ( + `name` varchar(60) NOT NULL, + `label` varchar(60) NOT NULL, + + PRIMARY KEY (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `vehicle_categories` (name, label) VALUES + ('compacts','Compacts'), + ('coupes','Coupés'), + ('sedans','Sedans'), + ('sports','Sports'), + ('sportsclassics','Sports Classics'), + ('super','Super'), + ('muscle','Muscle'), + ('offroad','Off Road'), + ('suvs','SUVs'), + ('vans','Vans'), + ('motorcycles','Motos') +; + +CREATE TABLE `vehicles` ( + `name` varchar(60) NOT NULL, + `model` varchar(60) NOT NULL, + `price` int NOT NULL, + `category` varchar(60) DEFAULT NULL, + + PRIMARY KEY (`model`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `vehicles` (name, model, price, category) VALUES + ('Blade','blade',15000,'muscle'), + ('Buccaneer','buccaneer',18000,'muscle'), + ('Buccaneer Rider','buccaneer2',24000,'muscle'), + ('Chino','chino',15000,'muscle'), + ('Chino Luxe','chino2',19000,'muscle'), + ('Coquette BlackFin','coquette3',55000,'muscle'), + ('Dominator','dominator',35000,'muscle'), + ('Dukes','dukes',28000,'muscle'), + ('Gauntlet','gauntlet',30000,'muscle'), + ('Hotknife','hotknife',125000,'muscle'), + ('Faction','faction',20000,'muscle'), + ('Faction Rider','faction2',30000,'muscle'), + ('Faction XL','faction3',40000,'muscle'), + ('Nightshade','nightshade',65000,'muscle'), + ('Phoenix','phoenix',12500,'muscle'), + ('Picador','picador',18000,'muscle'), + ('Sabre Turbo','sabregt',20000,'muscle'), + ('Sabre GT','sabregt2',25000,'muscle'), + ('Slam Van','slamvan3',11500,'muscle'), + ('Tampa','tampa',16000,'muscle'), + ('Virgo','virgo',14000,'muscle'), + ('Vigero','vigero',12500,'muscle'), + ('Voodoo','voodoo',7200,'muscle'), + ('Blista','blista',8000,'compacts'), + ('Brioso R/A','brioso',18000,'compacts'), + ('Issi','issi2',10000,'compacts'), + ('Panto','panto',10000,'compacts'), + ('Prairie','prairie',12000,'compacts'), + ('Bison','bison',45000,'vans'), + ('Bobcat XL','bobcatxl',32000,'vans'), + ('Burrito','burrito3',19000,'vans'), + ('Burrito','gburrito2',29000,'vans'), + ('Camper','camper',42000,'vans'), + ('Gang Burrito','gburrito',45000,'vans'), + ('Journey','journey',6500,'vans'), + ('Minivan','minivan',13000,'vans'), + ('Moonbeam','moonbeam',18000,'vans'), + ('Moonbeam Rider','moonbeam2',35000,'vans'), + ('Paradise','paradise',19000,'vans'), + ('Rumpo','rumpo',15000,'vans'), + ('Rumpo Trail','rumpo3',19500,'vans'), + ('Surfer','surfer',12000,'vans'), + ('Youga','youga',10800,'vans'), + ('Youga Luxuary','youga2',14500,'vans'), + ('Asea','asea',5500,'sedans'), + ('Cognoscenti','cognoscenti',55000,'sedans'), + ('Emperor','emperor',8500,'sedans'), + ('Fugitive','fugitive',12000,'sedans'), + ('Glendale','glendale',6500,'sedans'), + ('Intruder','intruder',7500,'sedans'), + ('Premier','premier',8000,'sedans'), + ('Primo Custom','primo2',14000,'sedans'), + ('Regina','regina',5000,'sedans'), + ('Schafter','schafter2',25000,'sedans'), + ('Stretch','stretch',90000,'sedans'), + ('Super Diamond','superd',130000,'sedans'), + ('Tailgater','tailgater',30000,'sedans'), + ('Warrener','warrener',4000,'sedans'), + ('Washington','washington',9000,'sedans'), + ('Baller','baller2',40000,'suvs'), + ('Baller Sport','baller3',60000,'suvs'), + ('Cavalcade','cavalcade2',55000,'suvs'), + ('Contender','contender',70000,'suvs'), + ('Dubsta','dubsta',45000,'suvs'), + ('Dubsta Luxuary','dubsta2',60000,'suvs'), + ('Fhantom','fq2',17000,'suvs'), + ('Grabger','granger',50000,'suvs'), + ('Gresley','gresley',47500,'suvs'), + ('Huntley S','huntley',40000,'suvs'), + ('Landstalker','landstalker',35000,'suvs'), + ('Mesa','mesa',16000,'suvs'), + ('Mesa Trail','mesa3',40000,'suvs'), + ('Patriot','patriot',55000,'suvs'), + ('Radius','radi',29000,'suvs'), + ('Rocoto','rocoto',45000,'suvs'), + ('Seminole','seminole',25000,'suvs'), + ('XLS','xls',32000,'suvs'), + ('Btype','btype',62000,'sportsclassics'), + ('Btype Luxe','btype3',85000,'sportsclassics'), + ('Btype Hotroad','btype2',155000,'sportsclassics'), + ('Casco','casco',30000,'sportsclassics'), + ('Coquette Classic','coquette2',40000,'sportsclassics'), + ('Manana','manana',12800,'sportsclassics'), + ('Monroe','monroe',55000,'sportsclassics'), + ('Pigalle','pigalle',20000,'sportsclassics'), + ('Stinger','stinger',80000,'sportsclassics'), + ('Stinger GT','stingergt',75000,'sportsclassics'), + ('Stirling GT','feltzer3',65000,'sportsclassics'), + ('Z-Type','ztype',220000,'sportsclassics'), + ('Bifta','bifta',12000,'offroad'), + ('Bf Injection','bfinjection',16000,'offroad'), + ('Blazer','blazer',6500,'offroad'), + ('Blazer Sport','blazer4',8500,'offroad'), + ('Brawler','brawler',45000,'offroad'), + ('Bubsta 6x6','dubsta3',120000,'offroad'), + ('Dune Buggy','dune',8000,'offroad'), + ('Guardian','guardian',45000,'offroad'), + ('Rebel','rebel2',35000,'offroad'), + ('Sandking','sandking',55000,'offroad'), + ('The Liberator','monster',210000,'offroad'), + ('Trophy Truck','trophytruck',60000,'offroad'), + ('Trophy Truck Limited','trophytruck2',80000,'offroad'), + ('Cognoscenti Cabrio','cogcabrio',55000,'coupes'), + ('Exemplar','exemplar',32000,'coupes'), + ('F620','f620',40000,'coupes'), + ('Felon','felon',42000,'coupes'), + ('Felon GT','felon2',55000,'coupes'), + ('Jackal','jackal',38000,'coupes'), + ('Oracle XS','oracle2',35000,'coupes'), + ('Sentinel','sentinel',32000,'coupes'), + ('Sentinel XS','sentinel2',40000,'coupes'), + ('Windsor','windsor',95000,'coupes'), + ('Windsor Drop','windsor2',125000,'coupes'), + ('Zion','zion',36000,'coupes'), + ('Zion Cabrio','zion2',45000,'coupes'), + ('9F','ninef',65000,'sports'), + ('9F Cabrio','ninef2',80000,'sports'), + ('Alpha','alpha',60000,'sports'), + ('Banshee','banshee',70000,'sports'), + ('Bestia GTS','bestiagts',55000,'sports'), + ('Buffalo','buffalo',12000,'sports'), + ('Buffalo S','buffalo2',20000,'sports'), + ('Carbonizzare','carbonizzare',75000,'sports'), + ('Comet','comet2',65000,'sports'), + ('Coquette','coquette',65000,'sports'), + ('Drift Tampa','tampa2',80000,'sports'), + ('Elegy','elegy2',38500,'sports'), + ('Feltzer','feltzer2',55000,'sports'), + ('Furore GT','furoregt',45000,'sports'), + ('Fusilade','fusilade',40000,'sports'), + ('Jester','jester',65000,'sports'), + ('Jester(Racecar)','jester2',135000,'sports'), + ('Khamelion','khamelion',38000,'sports'), + ('Kuruma','kuruma',30000,'sports'), + ('Lynx','lynx',40000,'sports'), + ('Mamba','mamba',70000,'sports'), + ('Massacro','massacro',65000,'sports'), + ('Massacro(Racecar)','massacro2',130000,'sports'), + ('Omnis','omnis',35000,'sports'), + ('Penumbra','penumbra',28000,'sports'), + ('Rapid GT','rapidgt',35000,'sports'), + ('Rapid GT Convertible','rapidgt2',45000,'sports'), + ('Schafter V12','schafter3',50000,'sports'), + ('Seven 70','seven70',39500,'sports'), + ('Sultan','sultan',15000,'sports'), + ('Surano','surano',50000,'sports'), + ('Tropos','tropos',40000,'sports'), + ('Verlierer','verlierer2',70000,'sports'), + ('Adder','adder',900000,'super'), + ('Banshee 900R','banshee2',255000,'super'), + ('Bullet','bullet',90000,'super'), + ('Cheetah','cheetah',375000,'super'), + ('Entity XF','entityxf',425000,'super'), + ('ETR1','sheava',220000,'super'), + ('FMJ','fmj',185000,'super'), + ('Infernus','infernus',180000,'super'), + ('Osiris','osiris',160000,'super'), + ('Pfister','pfister811',85000,'super'), + ('RE-7B','le7b',325000,'super'), + ('Reaper','reaper',150000,'super'), + ('Sultan RS','sultanrs',65000,'super'), + ('T20','t20',300000,'super'), + ('Turismo R','turismor',350000,'super'), + ('Tyrus','tyrus',600000,'super'), + ('Vacca','vacca',120000,'super'), + ('Voltic','voltic',90000,'super'), + ('X80 Proto','prototipo',2500000,'super'), + ('Zentorno','zentorno',1500000,'super'), + ('Akuma','AKUMA',7500,'motorcycles'), + ('Avarus','avarus',18000,'motorcycles'), + ('Bagger','bagger',13500,'motorcycles'), + ('Bati 801','bati',12000,'motorcycles'), + ('Bati 801RR','bati2',19000,'motorcycles'), + ('BF400','bf400',6500,'motorcycles'), + ('BMX (velo)','bmx',160,'motorcycles'), + ('Carbon RS','carbonrs',18000,'motorcycles'), + ('Chimera','chimera',38000,'motorcycles'), + ('Cliffhanger','cliffhanger',9500,'motorcycles'), + ('Cruiser (velo)','cruiser',510,'motorcycles'), + ('Daemon','daemon',11500,'motorcycles'), + ('Daemon High','daemon2',13500,'motorcycles'), + ('Defiler','defiler',9800,'motorcycles'), + ('Double T','double',28000,'motorcycles'), + ('Enduro','enduro',5500,'motorcycles'), + ('Esskey','esskey',4200,'motorcycles'), + ('Faggio','faggio',1900,'motorcycles'), + ('Vespa','faggio2',2800,'motorcycles'), + ('Fixter (velo)','fixter',225,'motorcycles'), + ('Gargoyle','gargoyle',16500,'motorcycles'), + ('Hakuchou','hakuchou',31000,'motorcycles'), + ('Hakuchou Sport','hakuchou2',55000,'motorcycles'), + ('Hexer','hexer',12000,'motorcycles'), + ('Innovation','innovation',23500,'motorcycles'), + ('Manchez','manchez',5300,'motorcycles'), + ('Nemesis','nemesis',5800,'motorcycles'), + ('Nightblade','nightblade',35000,'motorcycles'), + ('PCJ-600','pcj',6200,'motorcycles'), + ('Ruffian','ruffian',6800,'motorcycles'), + ('Sanchez','sanchez',5300,'motorcycles'), + ('Sanchez Sport','sanchez2',5300,'motorcycles'), + ('Sanctus','sanctus',25000,'motorcycles'), + ('Scorcher (velo)','scorcher',280,'motorcycles'), + ('Sovereign','sovereign',22000,'motorcycles'), + ('Shotaro Concept','shotaro',320000,'motorcycles'), + ('Thrust','thrust',24000,'motorcycles'), + ('Tri bike (velo)','tribike3',520,'motorcycles'), + ('Vader','vader',7200,'motorcycles'), + ('Vortex','vortex',9800,'motorcycles'), + ('Woflsbane','wolfsbane',9000,'motorcycles'), + ('Zombie','zombiea',9500,'motorcycles'), + ('Zombie Luxuary','zombieb',12000,'motorcycles'), + ('blazer5', 'blazer5', 1755600, 'offroad'), + ('Ruiner 2', 'ruiner2', 5745600, 'muscle'), + ('Voltic 2', 'voltic2', 3830400, 'super'), + ('Ardent', 'ardent', 1150000, 'sportsclassics'), + ('Oppressor', 'oppressor', 3524500, 'super'), + ('Visione', 'visione', 2250000, 'super'), + ('Retinue', 'retinue', 615000, 'sportsclassics'), + ('Cyclone', 'cyclone', 1890000, 'super'), + ('Rapid GT3', 'rapidgt3', 885000, 'sportsclassics'), + ('raiden', 'raiden', 1375000, 'sports'), + ('Yosemite', 'yosemite', 485000, 'muscle'), + ('Deluxo', 'deluxo', 4721500, 'sportsclassics'), + ('Pariah', 'pariah', 1420000, 'sports'), + ('Stromberg', 'stromberg', 3185350, 'sports'), + ('SC 1', 'sc1', 1603000, 'super'), + ('riata', 'riata', 380000, 'offroad'), + ('Hermes', 'hermes', 535000, 'muscle'), + ('Savestra', 'savestra', 990000, 'sportsclassics'), + ('Streiter', 'streiter', 500000, 'sports'), + ('Kamacho', 'kamacho', 345000, 'offroad'), + ('GT 500', 'gt500', 785000, 'sportsclassics'), + ('Z190', 'z190', 900000, 'sportsclassics'), + ('Viseris', 'viseris', 875000, 'sportsclassics'), + ('Autarch', 'autarch', 1955000, 'super'), + ('Comet 5', 'comet5', 1145000, 'sports'), + ('Neon', 'neon', 1500000, 'sports'), + ('Revolter', 'revolter', 1610000, 'sports'), + ('Sentinel3', 'sentinel3', 650000, 'sports'), + ('Hustler', 'hustler', 625000, 'muscle') +; diff --git a/[esx_addons]/esx_vehicleshop/localization/nl_esx_vehicleshop.sql b/[esx_addons]/esx_vehicleshop/localization/nl_esx_vehicleshop.sql new file mode 100644 index 00000000..c4507a57 --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/localization/nl_esx_vehicleshop.sql @@ -0,0 +1,337 @@ +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_cardealer','AutoVerkoop',1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_cardealer','AutoVerkoop',1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('cardealer','Autoverkoop') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('cardealer',0,'recruit','In opleiding',10,'{}','{}'), + ('cardealer',1,'novice','Verkoper',25,'{}','{}'), + ('cardealer',2,'experienced','Ervaren Verkoper',40,'{}','{}'), + ('cardealer',3,'boss','Baas',0,'{}','{}') +; + +CREATE TABLE `cardealer_vehicles` ( + `id` int NOT NULL AUTO_INCREMENT, + `vehicle` varchar(255) NOT NULL, + `price` int NOT NULL, + + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `vehicle_sold` ( + `client` VARCHAR(50) NOT NULL, + `model` VARCHAR(50) NOT NULL, + `plate` VARCHAR(50) NOT NULL, + `soldby` VARCHAR(50) NOT NULL, + `date` VARCHAR(50) NOT NULL, + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `owned_vehicles` ( + `owner` VARCHAR(60) NOT NULL, + `plate` varchar(12) NOT NULL, + `vehicle` longtext, + `type` VARCHAR(20) NOT NULL DEFAULT 'car', + `job` VARCHAR(20) NULL DEFAULT NULL, + `stored` TINYINT(1) NOT NULL DEFAULT '0', + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `rented_vehicles` ( + `vehicle` varchar(60) NOT NULL, + `plate` varchar(12) NOT NULL, + `player_name` varchar(255) NOT NULL, + `base_price` int NOT NULL, + `rent_price` int NOT NULL, + `owner` VARCHAR(60) NOT NULL, + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `vehicle_categories` ( + `name` varchar(60) NOT NULL, + `label` varchar(60) NOT NULL, + + PRIMARY KEY (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `vehicle_categories` (name, label) VALUES + ('compacts','Compacts'), + ('coupes','Coupes'), + ('sedans','Sedans'), + ('sports','Sports'), + ('sportsclassics','Sports Classics'), + ('super','Super'), + ('muscle','Muscle'), + ('offroad','Off Road'), + ('suvs','SUVs'), + ('vans','Vans'), + ('motorcycles','Motos') +; + +CREATE TABLE `vehicles` ( + `name` varchar(60) NOT NULL, + `model` varchar(60) NOT NULL, + `price` int NOT NULL, + `category` varchar(60) DEFAULT NULL, + + PRIMARY KEY (`model`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `vehicles` (name, model, price, category) VALUES + ('Blade','blade',15000,'muscle'), + ('Buccaneer','buccaneer',18000,'muscle'), + ('Buccaneer Rider','buccaneer2',24000,'muscle'), + ('Chino','chino',15000,'muscle'), + ('Chino Luxe','chino2',19000,'muscle'), + ('Coquette BlackFin','coquette3',55000,'muscle'), + ('Dominator','dominator',35000,'muscle'), + ('Dukes','dukes',28000,'muscle'), + ('Gauntlet','gauntlet',30000,'muscle'), + ('Hotknife','hotknife',125000,'muscle'), + ('Faction','faction',20000,'muscle'), + ('Faction Rider','faction2',30000,'muscle'), + ('Faction XL','faction3',40000,'muscle'), + ('Nightshade','nightshade',65000,'muscle'), + ('Phoenix','phoenix',12500,'muscle'), + ('Picador','picador',18000,'muscle'), + ('Sabre Turbo','sabregt',20000,'muscle'), + ('Sabre GT','sabregt2',25000,'muscle'), + ('Slam Van','slamvan3',11500,'muscle'), + ('Tampa','tampa',16000,'muscle'), + ('Virgo','virgo',14000,'muscle'), + ('Vigero','vigero',12500,'muscle'), + ('Voodoo','voodoo',7200,'muscle'), + ('Blista','blista',8000,'compacts'), + ('Brioso R/A','brioso',18000,'compacts'), + ('Issi','issi2',10000,'compacts'), + ('Panto','panto',10000,'compacts'), + ('Prairie','prairie',12000,'compacts'), + ('Bison','bison',45000,'vans'), + ('Bobcat XL','bobcatxl',32000,'vans'), + ('Burrito','burrito3',19000,'vans'), + ('Burrito','gburrito2',29000,'vans'), + ('Camper','camper',42000,'vans'), + ('Gang Burrito','gburrito',45000,'vans'), + ('Journey','journey',6500,'vans'), + ('Minivan','minivan',13000,'vans'), + ('Moonbeam','moonbeam',18000,'vans'), + ('Moonbeam Rider','moonbeam2',35000,'vans'), + ('Paradise','paradise',19000,'vans'), + ('Rumpo','rumpo',15000,'vans'), + ('Rumpo Trail','rumpo3',19500,'vans'), + ('Surfer','surfer',12000,'vans'), + ('Youga','youga',10800,'vans'), + ('Youga Luxuary','youga2',14500,'vans'), + ('Asea','asea',5500,'sedans'), + ('Cognoscenti','cognoscenti',55000,'sedans'), + ('Emperor','emperor',8500,'sedans'), + ('Fugitive','fugitive',12000,'sedans'), + ('Glendale','glendale',6500,'sedans'), + ('Intruder','intruder',7500,'sedans'), + ('Premier','premier',8000,'sedans'), + ('Primo Custom','primo2',14000,'sedans'), + ('Regina','regina',5000,'sedans'), + ('Schafter','schafter2',25000,'sedans'), + ('Stretch','stretch',90000,'sedans'), + ('Super Diamond','superd',130000,'sedans'), + ('Tailgater','tailgater',30000,'sedans'), + ('Warrener','warrener',4000,'sedans'), + ('Washington','washington',9000,'sedans'), + ('Baller','baller2',40000,'suvs'), + ('Baller Sport','baller3',60000,'suvs'), + ('Cavalcade','cavalcade2',55000,'suvs'), + ('Contender','contender',70000,'suvs'), + ('Dubsta','dubsta',45000,'suvs'), + ('Dubsta Luxuary','dubsta2',60000,'suvs'), + ('Fhantom','fq2',17000,'suvs'), + ('Grabger','granger',50000,'suvs'), + ('Gresley','gresley',47500,'suvs'), + ('Huntley S','huntley',40000,'suvs'), + ('Landstalker','landstalker',35000,'suvs'), + ('Mesa','mesa',16000,'suvs'), + ('Mesa Trail','mesa3',40000,'suvs'), + ('Patriot','patriot',55000,'suvs'), + ('Radius','radi',29000,'suvs'), + ('Rocoto','rocoto',45000,'suvs'), + ('Seminole','seminole',25000,'suvs'), + ('XLS','xls',32000,'suvs'), + ('Btype','btype',62000,'sportsclassics'), + ('Btype Luxe','btype3',85000,'sportsclassics'), + ('Btype Hotroad','btype2',155000,'sportsclassics'), + ('Casco','casco',30000,'sportsclassics'), + ('Coquette Classic','coquette2',40000,'sportsclassics'), + ('Manana','manana',12800,'sportsclassics'), + ('Monroe','monroe',55000,'sportsclassics'), + ('Pigalle','pigalle',20000,'sportsclassics'), + ('Stinger','stinger',80000,'sportsclassics'), + ('Stinger GT','stingergt',75000,'sportsclassics'), + ('Stirling GT','feltzer3',65000,'sportsclassics'), + ('Z-Type','ztype',220000,'sportsclassics'), + ('Bifta','bifta',12000,'offroad'), + ('Bf Injection','bfinjection',16000,'offroad'), + ('Blazer','blazer',6500,'offroad'), + ('Blazer Sport','blazer4',8500,'offroad'), + ('Brawler','brawler',45000,'offroad'), + ('Bubsta 6x6','dubsta3',120000,'offroad'), + ('Dune Buggy','dune',8000,'offroad'), + ('Guardian','guardian',45000,'offroad'), + ('Rebel','rebel2',35000,'offroad'), + ('Sandking','sandking',55000,'offroad'), + ('The Liberator','monster',210000,'offroad'), + ('Trophy Truck','trophytruck',60000,'offroad'), + ('Trophy Truck Limited','trophytruck2',80000,'offroad'), + ('Cognoscenti Cabrio','cogcabrio',55000,'coupes'), + ('Exemplar','exemplar',32000,'coupes'), + ('F620','f620',40000,'coupes'), + ('Felon','felon',42000,'coupes'), + ('Felon GT','felon2',55000,'coupes'), + ('Jackal','jackal',38000,'coupes'), + ('Oracle XS','oracle2',35000,'coupes'), + ('Sentinel','sentinel',32000,'coupes'), + ('Sentinel XS','sentinel2',40000,'coupes'), + ('Windsor','windsor',95000,'coupes'), + ('Windsor Drop','windsor2',125000,'coupes'), + ('Zion','zion',36000,'coupes'), + ('Zion Cabrio','zion2',45000,'coupes'), + ('9F','ninef',65000,'sports'), + ('9F Cabrio','ninef2',80000,'sports'), + ('Alpha','alpha',60000,'sports'), + ('Banshee','banshee',70000,'sports'), + ('Bestia GTS','bestiagts',55000,'sports'), + ('Buffalo','buffalo',12000,'sports'), + ('Buffalo S','buffalo2',20000,'sports'), + ('Carbonizzare','carbonizzare',75000,'sports'), + ('Comet','comet2',65000,'sports'), + ('Coquette','coquette',65000,'sports'), + ('Drift Tampa','tampa2',80000,'sports'), + ('Elegy','elegy2',38500,'sports'), + ('Feltzer','feltzer2',55000,'sports'), + ('Furore GT','furoregt',45000,'sports'), + ('Fusilade','fusilade',40000,'sports'), + ('Jester','jester',65000,'sports'), + ('Jester(Racecar)','jester2',135000,'sports'), + ('Khamelion','khamelion',38000,'sports'), + ('Kuruma','kuruma',30000,'sports'), + ('Lynx','lynx',40000,'sports'), + ('Mamba','mamba',70000,'sports'), + ('Massacro','massacro',65000,'sports'), + ('Massacro(Racecar)','massacro2',130000,'sports'), + ('Omnis','omnis',35000,'sports'), + ('Penumbra','penumbra',28000,'sports'), + ('Rapid GT','rapidgt',35000,'sports'), + ('Rapid GT Convertible','rapidgt2',45000,'sports'), + ('Schafter V12','schafter3',50000,'sports'), + ('Seven 70','seven70',39500,'sports'), + ('Sultan','sultan',15000,'sports'), + ('Surano','surano',50000,'sports'), + ('Tropos','tropos',40000,'sports'), + ('Verlierer','verlierer2',70000,'sports'), + ('Adder','adder',900000,'super'), + ('Banshee 900R','banshee2',255000,'super'), + ('Bullet','bullet',90000,'super'), + ('Cheetah','cheetah',375000,'super'), + ('Entity XF','entityxf',425000,'super'), + ('ETR1','sheava',220000,'super'), + ('FMJ','fmj',185000,'super'), + ('Infernus','infernus',180000,'super'), + ('Osiris','osiris',160000,'super'), + ('Pfister','pfister811',85000,'super'), + ('RE-7B','le7b',325000,'super'), + ('Reaper','reaper',150000,'super'), + ('Sultan RS','sultanrs',65000,'super'), + ('T20','t20',300000,'super'), + ('Turismo R','turismor',350000,'super'), + ('Tyrus','tyrus',600000,'super'), + ('Vacca','vacca',120000,'super'), + ('Voltic','voltic',90000,'super'), + ('X80 Proto','prototipo',2500000,'super'), + ('Zentorno','zentorno',1500000,'super'), + ('Akuma','AKUMA',7500,'motorcycles'), + ('Avarus','avarus',18000,'motorcycles'), + ('Bagger','bagger',13500,'motorcycles'), + ('Bati 801','bati',12000,'motorcycles'), + ('Bati 801RR','bati2',19000,'motorcycles'), + ('BF400','bf400',6500,'motorcycles'), + ('BMX (velo)','bmx',160,'motorcycles'), + ('Carbon RS','carbonrs',18000,'motorcycles'), + ('Chimera','chimera',38000,'motorcycles'), + ('Cliffhanger','cliffhanger',9500,'motorcycles'), + ('Cruiser (velo)','cruiser',510,'motorcycles'), + ('Daemon','daemon',11500,'motorcycles'), + ('Daemon High','daemon2',13500,'motorcycles'), + ('Defiler','defiler',9800,'motorcycles'), + ('Double T','double',28000,'motorcycles'), + ('Enduro','enduro',5500,'motorcycles'), + ('Esskey','esskey',4200,'motorcycles'), + ('Faggio','faggio',1900,'motorcycles'), + ('Vespa','faggio2',2800,'motorcycles'), + ('Fixter (velo)','fixter',225,'motorcycles'), + ('Gargoyle','gargoyle',16500,'motorcycles'), + ('Hakuchou','hakuchou',31000,'motorcycles'), + ('Hakuchou Sport','hakuchou2',55000,'motorcycles'), + ('Hexer','hexer',12000,'motorcycles'), + ('Innovation','innovation',23500,'motorcycles'), + ('Manchez','manchez',5300,'motorcycles'), + ('Nemesis','nemesis',5800,'motorcycles'), + ('Nightblade','nightblade',35000,'motorcycles'), + ('PCJ-600','pcj',6200,'motorcycles'), + ('Ruffian','ruffian',6800,'motorcycles'), + ('Sanchez','sanchez',5300,'motorcycles'), + ('Sanchez Sport','sanchez2',5300,'motorcycles'), + ('Sanctus','sanctus',25000,'motorcycles'), + ('Scorcher (velo)','scorcher',280,'motorcycles'), + ('Sovereign','sovereign',22000,'motorcycles'), + ('Shotaro Concept','shotaro',320000,'motorcycles'), + ('Thrust','thrust',24000,'motorcycles'), + ('Tri bike (velo)','tribike3',520,'motorcycles'), + ('Vader','vader',7200,'motorcycles'), + ('Vortex','vortex',9800,'motorcycles'), + ('Woflsbane','wolfsbane',9000,'motorcycles'), + ('Zombie','zombiea',9500,'motorcycles'), + ('Zombie Luxuary','zombieb',12000,'motorcycles'), + ('blazer5', 'blazer5', 1755600, 'offroad'), + ('Ruiner 2', 'ruiner2', 5745600, 'muscle'), + ('Voltic 2', 'voltic2', 3830400, 'super'), + ('Ardent', 'ardent', 1150000, 'sportsclassics'), + ('Oppressor', 'oppressor', 3524500, 'super'), + ('Visione', 'visione', 2250000, 'super'), + ('Retinue', 'retinue', 615000, 'sportsclassics'), + ('Cyclone', 'cyclone', 1890000, 'super'), + ('Rapid GT3', 'rapidgt3', 885000, 'sportsclassics'), + ('raiden', 'raiden', 1375000, 'sports'), + ('Yosemite', 'yosemite', 485000, 'muscle'), + ('Deluxo', 'deluxo', 4721500, 'sportsclassics'), + ('Pariah', 'pariah', 1420000, 'sports'), + ('Stromberg', 'stromberg', 3185350, 'sports'), + ('SC 1', 'sc1', 1603000, 'super'), + ('riata', 'riata', 380000, 'offroad'), + ('Hermes', 'hermes', 535000, 'muscle'), + ('Savestra', 'savestra', 990000, 'sportsclassics'), + ('Streiter', 'streiter', 500000, 'sports'), + ('Kamacho', 'kamacho', 345000, 'offroad'), + ('GT 500', 'gt500', 785000, 'sportsclassics'), + ('Z190', 'z190', 900000, 'sportsclassics'), + ('Viseris', 'viseris', 875000, 'sportsclassics'), + ('Autarch', 'autarch', 1955000, 'super'), + ('Comet 5', 'comet5', 1145000, 'sports'), + ('Neon', 'neon', 1500000, 'sports'), + ('Revolter', 'revolter', 1610000, 'sports'), + ('Sentinel3', 'sentinel3', 650000, 'sports'), + ('Hustler', 'hustler', 625000, 'muscle') +; diff --git a/[esx_addons]/esx_vehicleshop/localization/pl_esx_vehicleshop.sql b/[esx_addons]/esx_vehicleshop/localization/pl_esx_vehicleshop.sql new file mode 100644 index 00000000..bd874b19 --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/localization/pl_esx_vehicleshop.sql @@ -0,0 +1,340 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_cardealer','Sprzedawca aut',1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_cardealer','Sprzedawca aut',1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('cardealer','Sprzedawca aut') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('cardealer',0,'recruit','Praktykant',10,'{}','{}'), + ('cardealer',1,'novice','Doświadczony',25,'{}','{}'), + ('cardealer',2,'experienced','Kierownik',40,'{}','{}'), + ('cardealer',3,'boss','Szef',0,'{}','{}') +; + +CREATE TABLE `cardealer_vehicles` ( + `id` int NOT NULL AUTO_INCREMENT, + `vehicle` varchar(255) NOT NULL, + `price` int NOT NULL, + + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `vehicle_sold` ( + `client` VARCHAR(50) NOT NULL, + `model` VARCHAR(50) NOT NULL, + `plate` VARCHAR(50) NOT NULL, + `soldby` VARCHAR(50) NOT NULL, + `date` VARCHAR(50) NOT NULL, + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `owned_vehicles` ( + `owner` VARCHAR(60) NOT NULL, + `plate` varchar(12) NOT NULL, + `vehicle` longtext, + `type` VARCHAR(20) NOT NULL DEFAULT 'car', + `job` VARCHAR(20) NULL DEFAULT NULL, + `stored` TINYINT(1) NOT NULL DEFAULT '0', + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `rented_vehicles` ( + `vehicle` varchar(60) NOT NULL, + `plate` varchar(12) NOT NULL, + `player_name` varchar(255) NOT NULL, + `base_price` int NOT NULL, + `rent_price` int NOT NULL, + `owner` VARCHAR(60) NOT NULL, + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `vehicle_categories` ( + `id` int NOT NULL AUTO_INCREMENT, + `name` varchar(60) NOT NULL, + `label` varchar(60) NOT NULL, + + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `vehicle_categories` (name, label) VALUES + ('compacts','Compacts'), + ('coupes','Coupés'), + ('sedans','Sedans'), + ('sports','Sports'), + ('sportsclassics','Sports Classics'), + ('super','Supercars'), + ('muscle','Muscle'), + ('offroad','Off Road'), + ('suvs','SUVs'), + ('vans','Vans'), + ('motorcycles','Motorcycles') +; + +CREATE TABLE `vehicles` ( + `name` varchar(60) NOT NULL, + `model` varchar(60) NOT NULL, + `price` int NOT NULL, + `category` varchar(60) DEFAULT NULL, + + PRIMARY KEY (`model`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `vehicles` (name, model, price, category) VALUES + ('Blade','blade',15000,'muscle'), + ('Buccaneer','buccaneer',18000,'muscle'), + ('Buccaneer Rider','buccaneer2',24000,'muscle'), + ('Chino','chino',15000,'muscle'), + ('Chino Luxe','chino2',19000,'muscle'), + ('Coquette BlackFin','coquette3',55000,'muscle'), + ('Dominator','dominator',35000,'muscle'), + ('Dukes','dukes',28000,'muscle'), + ('Gauntlet','gauntlet',30000,'muscle'), + ('Hotknife','hotknife',125000,'muscle'), + ('Faction','faction',20000,'muscle'), + ('Faction Rider','faction2',30000,'muscle'), + ('Faction XL','faction3',40000,'muscle'), + ('Nightshade','nightshade',65000,'muscle'), + ('Phoenix','phoenix',12500,'muscle'), + ('Picador','picador',18000,'muscle'), + ('Sabre Turbo','sabregt',20000,'muscle'), + ('Sabre GT','sabregt2',25000,'muscle'), + ('Slam Van','slamvan3',11500,'muscle'), + ('Tampa','tampa',16000,'muscle'), + ('Virgo','virgo',14000,'muscle'), + ('Vigero','vigero',12500,'muscle'), + ('Voodoo','voodoo',7200,'muscle'), + ('Blista','blista',8000,'compacts'), + ('Brioso R/A','brioso',18000,'compacts'), + ('Issi','issi2',10000,'compacts'), + ('Panto','panto',10000,'compacts'), + ('Prairie','prairie',12000,'compacts'), + ('Bison','bison',45000,'vans'), + ('Bobcat XL','bobcatxl',32000,'vans'), + ('Burrito','burrito3',19000,'vans'), + ('Burrito','gburrito2',29000,'vans'), + ('Camper','camper',42000,'vans'), + ('Gang Burrito','gburrito',45000,'vans'), + ('Journey','journey',6500,'vans'), + ('Minivan','minivan',13000,'vans'), + ('Moonbeam','moonbeam',18000,'vans'), + ('Moonbeam Rider','moonbeam2',35000,'vans'), + ('Paradise','paradise',19000,'vans'), + ('Rumpo','rumpo',15000,'vans'), + ('Rumpo Trail','rumpo3',19500,'vans'), + ('Surfer','surfer',12000,'vans'), + ('Youga','youga',10800,'vans'), + ('Youga Luxuary','youga2',14500,'vans'), + ('Asea','asea',5500,'sedans'), + ('Cognoscenti','cognoscenti',55000,'sedans'), + ('Emperor','emperor',8500,'sedans'), + ('Fugitive','fugitive',12000,'sedans'), + ('Glendale','glendale',6500,'sedans'), + ('Intruder','intruder',7500,'sedans'), + ('Premier','premier',8000,'sedans'), + ('Primo Custom','primo2',14000,'sedans'), + ('Regina','regina',5000,'sedans'), + ('Schafter','schafter2',25000,'sedans'), + ('Stretch','stretch',90000,'sedans'), + ('Super Diamond','superd',130000,'sedans'), + ('Tailgater','tailgater',30000,'sedans'), + ('Warrener','warrener',4000,'sedans'), + ('Washington','washington',9000,'sedans'), + ('Baller','baller2',40000,'suvs'), + ('Baller Sport','baller3',60000,'suvs'), + ('Cavalcade','cavalcade2',55000,'suvs'), + ('Contender','contender',70000,'suvs'), + ('Dubsta','dubsta',45000,'suvs'), + ('Dubsta Luxuary','dubsta2',60000,'suvs'), + ('Fhantom','fq2',17000,'suvs'), + ('Grabger','granger',50000,'suvs'), + ('Gresley','gresley',47500,'suvs'), + ('Huntley S','huntley',40000,'suvs'), + ('Landstalker','landstalker',35000,'suvs'), + ('Mesa','mesa',16000,'suvs'), + ('Mesa Trail','mesa3',40000,'suvs'), + ('Patriot','patriot',55000,'suvs'), + ('Radius','radi',29000,'suvs'), + ('Rocoto','rocoto',45000,'suvs'), + ('Seminole','seminole',25000,'suvs'), + ('XLS','xls',32000,'suvs'), + ('Btype','btype',62000,'sportsclassics'), + ('Btype Luxe','btype3',85000,'sportsclassics'), + ('Btype Hotroad','btype2',155000,'sportsclassics'), + ('Casco','casco',30000,'sportsclassics'), + ('Coquette Classic','coquette2',40000,'sportsclassics'), + ('Manana','manana',12800,'sportsclassics'), + ('Monroe','monroe',55000,'sportsclassics'), + ('Pigalle','pigalle',20000,'sportsclassics'), + ('Stinger','stinger',80000,'sportsclassics'), + ('Stinger GT','stingergt',75000,'sportsclassics'), + ('Stirling GT','feltzer3',65000,'sportsclassics'), + ('Z-Type','ztype',220000,'sportsclassics'), + ('Bifta','bifta',12000,'offroad'), + ('Bf Injection','bfinjection',16000,'offroad'), + ('Blazer','blazer',6500,'offroad'), + ('Blazer Sport','blazer4',8500,'offroad'), + ('Brawler','brawler',45000,'offroad'), + ('Bubsta 6x6','dubsta3',120000,'offroad'), + ('Dune Buggy','dune',8000,'offroad'), + ('Guardian','guardian',45000,'offroad'), + ('Rebel','rebel2',35000,'offroad'), + ('Sandking','sandking',55000,'offroad'), + ('The Liberator','monster',210000,'offroad'), + ('Trophy Truck','trophytruck',60000,'offroad'), + ('Trophy Truck Limited','trophytruck2',80000,'offroad'), + ('Cognoscenti Cabrio','cogcabrio',55000,'coupes'), + ('Exemplar','exemplar',32000,'coupes'), + ('F620','f620',40000,'coupes'), + ('Felon','felon',42000,'coupes'), + ('Felon GT','felon2',55000,'coupes'), + ('Jackal','jackal',38000,'coupes'), + ('Oracle XS','oracle2',35000,'coupes'), + ('Sentinel','sentinel',32000,'coupes'), + ('Sentinel XS','sentinel2',40000,'coupes'), + ('Windsor','windsor',95000,'coupes'), + ('Windsor Drop','windsor2',125000,'coupes'), + ('Zion','zion',36000,'coupes'), + ('Zion Cabrio','zion2',45000,'coupes'), + ('9F','ninef',65000,'sports'), + ('9F Cabrio','ninef2',80000,'sports'), + ('Alpha','alpha',60000,'sports'), + ('Banshee','banshee',70000,'sports'), + ('Bestia GTS','bestiagts',55000,'sports'), + ('Buffalo','buffalo',12000,'sports'), + ('Buffalo S','buffalo2',20000,'sports'), + ('Carbonizzare','carbonizzare',75000,'sports'), + ('Comet','comet2',65000,'sports'), + ('Coquette','coquette',65000,'sports'), + ('Drift Tampa','tampa2',80000,'sports'), + ('Elegy','elegy2',38500,'sports'), + ('Feltzer','feltzer2',55000,'sports'), + ('Furore GT','furoregt',45000,'sports'), + ('Fusilade','fusilade',40000,'sports'), + ('Jester','jester',65000,'sports'), + ('Jester(Racecar)','jester2',135000,'sports'), + ('Khamelion','khamelion',38000,'sports'), + ('Kuruma','kuruma',30000,'sports'), + ('Lynx','lynx',40000,'sports'), + ('Mamba','mamba',70000,'sports'), + ('Massacro','massacro',65000,'sports'), + ('Massacro(Racecar)','massacro2',130000,'sports'), + ('Omnis','omnis',35000,'sports'), + ('Penumbra','penumbra',28000,'sports'), + ('Rapid GT','rapidgt',35000,'sports'), + ('Rapid GT Convertible','rapidgt2',45000,'sports'), + ('Schafter V12','schafter3',50000,'sports'), + ('Seven 70','seven70',39500,'sports'), + ('Sultan','sultan',15000,'sports'), + ('Surano','surano',50000,'sports'), + ('Tropos','tropos',40000,'sports'), + ('Verlierer','verlierer2',70000,'sports'), + ('Adder','adder',900000,'super'), + ('Banshee 900R','banshee2',255000,'super'), + ('Bullet','bullet',90000,'super'), + ('Cheetah','cheetah',375000,'super'), + ('Entity XF','entityxf',425000,'super'), + ('ETR1','sheava',220000,'super'), + ('FMJ','fmj',185000,'super'), + ('Infernus','infernus',180000,'super'), + ('Osiris','osiris',160000,'super'), + ('Pfister','pfister811',85000,'super'), + ('RE-7B','le7b',325000,'super'), + ('Reaper','reaper',150000,'super'), + ('Sultan RS','sultanrs',65000,'super'), + ('T20','t20',300000,'super'), + ('Turismo R','turismor',350000,'super'), + ('Tyrus','tyrus',600000,'super'), + ('Vacca','vacca',120000,'super'), + ('Voltic','voltic',90000,'super'), + ('X80 Proto','prototipo',2500000,'super'), + ('Zentorno','zentorno',1500000,'super'), + ('Akuma','AKUMA',7500,'motorcycles'), + ('Avarus','avarus',18000,'motorcycles'), + ('Bagger','bagger',13500,'motorcycles'), + ('Bati 801','bati',12000,'motorcycles'), + ('Bati 801RR','bati2',19000,'motorcycles'), + ('BF400','bf400',6500,'motorcycles'), + ('BMX (velo)','bmx',160,'motorcycles'), + ('Carbon RS','carbonrs',18000,'motorcycles'), + ('Chimera','chimera',38000,'motorcycles'), + ('Cliffhanger','cliffhanger',9500,'motorcycles'), + ('Cruiser (velo)','cruiser',510,'motorcycles'), + ('Daemon','daemon',11500,'motorcycles'), + ('Daemon High','daemon2',13500,'motorcycles'), + ('Defiler','defiler',9800,'motorcycles'), + ('Double T','double',28000,'motorcycles'), + ('Enduro','enduro',5500,'motorcycles'), + ('Esskey','esskey',4200,'motorcycles'), + ('Faggio','faggio',1900,'motorcycles'), + ('Vespa','faggio2',2800,'motorcycles'), + ('Fixter (velo)','fixter',225,'motorcycles'), + ('Gargoyle','gargoyle',16500,'motorcycles'), + ('Hakuchou','hakuchou',31000,'motorcycles'), + ('Hakuchou Sport','hakuchou2',55000,'motorcycles'), + ('Hexer','hexer',12000,'motorcycles'), + ('Innovation','innovation',23500,'motorcycles'), + ('Manchez','manchez',5300,'motorcycles'), + ('Nemesis','nemesis',5800,'motorcycles'), + ('Nightblade','nightblade',35000,'motorcycles'), + ('PCJ-600','pcj',6200,'motorcycles'), + ('Ruffian','ruffian',6800,'motorcycles'), + ('Sanchez','sanchez',5300,'motorcycles'), + ('Sanchez Sport','sanchez2',5300,'motorcycles'), + ('Sanctus','sanctus',25000,'motorcycles'), + ('Scorcher (velo)','scorcher',280,'motorcycles'), + ('Sovereign','sovereign',22000,'motorcycles'), + ('Shotaro Concept','shotaro',320000,'motorcycles'), + ('Thrust','thrust',24000,'motorcycles'), + ('Tri bike (velo)','tribike3',520,'motorcycles'), + ('Vader','vader',7200,'motorcycles'), + ('Vortex','vortex',9800,'motorcycles'), + ('Woflsbane','wolfsbane',9000,'motorcycles'), + ('Zombie','zombiea',9500,'motorcycles'), + ('Zombie Luxuary','zombieb',12000,'motorcycles'), + ('blazer5', 'blazer5', 1755600, 'offroad'), + ('Ruiner 2', 'ruiner2', 5745600, 'muscle'), + ('Voltic 2', 'voltic2', 3830400, 'super'), + ('Ardent', 'ardent', 1150000, 'sportsclassics'), + ('Oppressor', 'oppressor', 3524500, 'super'), + ('Visione', 'visione', 2250000, 'super'), + ('Retinue', 'retinue', 615000, 'sportsclassics'), + ('Cyclone', 'cyclone', 1890000, 'super'), + ('Rapid GT3', 'rapidgt3', 885000, 'sportsclassics'), + ('raiden', 'raiden', 1375000, 'sports'), + ('Yosemite', 'yosemite', 485000, 'muscle'), + ('Deluxo', 'deluxo', 4721500, 'sportsclassics'), + ('Pariah', 'pariah', 1420000, 'sports'), + ('Stromberg', 'stromberg', 3185350, 'sports'), + ('SC 1', 'sc1', 1603000, 'super'), + ('riata', 'riata', 380000, 'offroad'), + ('Hermes', 'hermes', 535000, 'muscle'), + ('Savestra', 'savestra', 990000, 'sportsclassics'), + ('Streiter', 'streiter', 500000, 'sports'), + ('Kamacho', 'kamacho', 345000, 'offroad'), + ('GT 500', 'gt500', 785000, 'sportsclassics'), + ('Z190', 'z190', 900000, 'sportsclassics'), + ('Viseris', 'viseris', 875000, 'sportsclassics'), + ('Autarch', 'autarch', 1955000, 'super'), + ('Comet 5', 'comet5', 1145000, 'sports'), + ('Neon', 'neon', 1500000, 'sports'), + ('Revolter', 'revolter', 1610000, 'sports'), + ('Sentinel3', 'sentinel3', 650000, 'sports'), + ('Hustler', 'hustler', 625000, 'muscle') +; diff --git a/[esx_addons]/esx_vehicleshop/localization/si_esx_vehicleshop.sql b/[esx_addons]/esx_vehicleshop/localization/si_esx_vehicleshop.sql new file mode 100644 index 00000000..0e23c79a --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/localization/si_esx_vehicleshop.sql @@ -0,0 +1,339 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_cardealer','Cardealer',1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_cardealer','Cardealer',1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('cardealer','Cardealer') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('cardealer',0,'recruit','Rekrut',10,'{}','{}'), + ('cardealer',1,'novice','Novinec',25,'{}','{}'), + ('cardealer',2,'experienced','Izkušen',40,'{}','{}'), + ('cardealer',3,'boss','Direktor',0,'{}','{}') +; + +CREATE TABLE `cardealer_vehicles` ( + `id` int NOT NULL AUTO_INCREMENT, + `vehicle` varchar(255) NOT NULL, + `price` int NOT NULL, + + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `vehicle_sold` ( + `client` VARCHAR(50) NOT NULL, + `model` VARCHAR(50) NOT NULL, + `plate` VARCHAR(50) NOT NULL, + `soldby` VARCHAR(50) NOT NULL, + `date` VARCHAR(50) NOT NULL, + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `owned_vehicles` ( + `owner` VARCHAR(60) NOT NULL, + `plate` varchar(12) NOT NULL, + `vehicle` longtext, + `type` VARCHAR(20) NOT NULL DEFAULT 'car', + `job` VARCHAR(20) NULL DEFAULT NULL, + `stored` TINYINT(1) NOT NULL DEFAULT '0', + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `rented_vehicles` ( + `vehicle` varchar(60) NOT NULL, + `plate` varchar(12) NOT NULL, + `player_name` varchar(255) NOT NULL, + `base_price` int NOT NULL, + `rent_price` int NOT NULL, + `owner` VARCHAR(60) NOT NULL, + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `vehicle_categories` ( + `name` varchar(60) NOT NULL, + `label` varchar(60) NOT NULL, + + PRIMARY KEY (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `vehicle_categories` (name, label) VALUES + ('compacts','Compacts'), + ('coupes','Coupes'), + ('sedans','Sedans'), + ('sports','Sports'), + ('sportsclassics','Sports Classics'), + ('super','Super'), + ('muscle','Muscle'), + ('offroad','Off Road'), + ('suvs','SUVs'), + ('vans','Vans'), + ('motorcycles','Motos') +; + +CREATE TABLE `vehicles` ( + `name` varchar(60) NOT NULL, + `model` varchar(60) NOT NULL, + `price` int NOT NULL, + `category` varchar(60) DEFAULT NULL, + + PRIMARY KEY (`model`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `vehicles` (name, model, price, category) VALUES + ('Blade','blade',15000,'muscle'), + ('Buccaneer','buccaneer',18000,'muscle'), + ('Buccaneer Rider','buccaneer2',24000,'muscle'), + ('Chino','chino',15000,'muscle'), + ('Chino Luxe','chino2',19000,'muscle'), + ('Coquette BlackFin','coquette3',55000,'muscle'), + ('Dominator','dominator',35000,'muscle'), + ('Dukes','dukes',28000,'muscle'), + ('Gauntlet','gauntlet',30000,'muscle'), + ('Hotknife','hotknife',125000,'muscle'), + ('Faction','faction',20000,'muscle'), + ('Faction Rider','faction2',30000,'muscle'), + ('Faction XL','faction3',40000,'muscle'), + ('Nightshade','nightshade',65000,'muscle'), + ('Phoenix','phoenix',12500,'muscle'), + ('Picador','picador',18000,'muscle'), + ('Sabre Turbo','sabregt',20000,'muscle'), + ('Sabre GT','sabregt2',25000,'muscle'), + ('Slam Van','slamvan3',11500,'muscle'), + ('Tampa','tampa',16000,'muscle'), + ('Virgo','virgo',14000,'muscle'), + ('Vigero','vigero',12500,'muscle'), + ('Voodoo','voodoo',7200,'muscle'), + ('Blista','blista',8000,'compacts'), + ('Brioso R/A','brioso',18000,'compacts'), + ('Issi','issi2',10000,'compacts'), + ('Panto','panto',10000,'compacts'), + ('Prairie','prairie',12000,'compacts'), + ('Bison','bison',45000,'vans'), + ('Bobcat XL','bobcatxl',32000,'vans'), + ('Burrito','burrito3',19000,'vans'), + ('Burrito','gburrito2',29000,'vans'), + ('Camper','camper',42000,'vans'), + ('Gang Burrito','gburrito',45000,'vans'), + ('Journey','journey',6500,'vans'), + ('Minivan','minivan',13000,'vans'), + ('Moonbeam','moonbeam',18000,'vans'), + ('Moonbeam Rider','moonbeam2',35000,'vans'), + ('Paradise','paradise',19000,'vans'), + ('Rumpo','rumpo',15000,'vans'), + ('Rumpo Trail','rumpo3',19500,'vans'), + ('Surfer','surfer',12000,'vans'), + ('Youga','youga',10800,'vans'), + ('Youga Luxuary','youga2',14500,'vans'), + ('Asea','asea',5500,'sedans'), + ('Cognoscenti','cognoscenti',55000,'sedans'), + ('Emperor','emperor',8500,'sedans'), + ('Fugitive','fugitive',12000,'sedans'), + ('Glendale','glendale',6500,'sedans'), + ('Intruder','intruder',7500,'sedans'), + ('Premier','premier',8000,'sedans'), + ('Primo Custom','primo2',14000,'sedans'), + ('Regina','regina',5000,'sedans'), + ('Schafter','schafter2',25000,'sedans'), + ('Stretch','stretch',90000,'sedans'), + ('Super Diamond','superd',130000,'sedans'), + ('Tailgater','tailgater',30000,'sedans'), + ('Warrener','warrener',4000,'sedans'), + ('Washington','washington',9000,'sedans'), + ('Baller','baller2',40000,'suvs'), + ('Baller Sport','baller3',60000,'suvs'), + ('Cavalcade','cavalcade2',55000,'suvs'), + ('Contender','contender',70000,'suvs'), + ('Dubsta','dubsta',45000,'suvs'), + ('Dubsta Luxuary','dubsta2',60000,'suvs'), + ('Fhantom','fq2',17000,'suvs'), + ('Grabger','granger',50000,'suvs'), + ('Gresley','gresley',47500,'suvs'), + ('Huntley S','huntley',40000,'suvs'), + ('Landstalker','landstalker',35000,'suvs'), + ('Mesa','mesa',16000,'suvs'), + ('Mesa Trail','mesa3',40000,'suvs'), + ('Patriot','patriot',55000,'suvs'), + ('Radius','radi',29000,'suvs'), + ('Rocoto','rocoto',45000,'suvs'), + ('Seminole','seminole',25000,'suvs'), + ('XLS','xls',32000,'suvs'), + ('Btype','btype',62000,'sportsclassics'), + ('Btype Luxe','btype3',85000,'sportsclassics'), + ('Btype Hotroad','btype2',155000,'sportsclassics'), + ('Casco','casco',30000,'sportsclassics'), + ('Coquette Classic','coquette2',40000,'sportsclassics'), + ('Manana','manana',12800,'sportsclassics'), + ('Monroe','monroe',55000,'sportsclassics'), + ('Pigalle','pigalle',20000,'sportsclassics'), + ('Stinger','stinger',80000,'sportsclassics'), + ('Stinger GT','stingergt',75000,'sportsclassics'), + ('Stirling GT','feltzer3',65000,'sportsclassics'), + ('Z-Type','ztype',220000,'sportsclassics'), + ('Bifta','bifta',12000,'offroad'), + ('Bf Injection','bfinjection',16000,'offroad'), + ('Blazer','blazer',6500,'offroad'), + ('Blazer Sport','blazer4',8500,'offroad'), + ('Brawler','brawler',45000,'offroad'), + ('Bubsta 6x6','dubsta3',120000,'offroad'), + ('Dune Buggy','dune',8000,'offroad'), + ('Guardian','guardian',45000,'offroad'), + ('Rebel','rebel2',35000,'offroad'), + ('Sandking','sandking',55000,'offroad'), + ('The Liberator','monster',210000,'offroad'), + ('Trophy Truck','trophytruck',60000,'offroad'), + ('Trophy Truck Limited','trophytruck2',80000,'offroad'), + ('Cognoscenti Cabrio','cogcabrio',55000,'coupes'), + ('Exemplar','exemplar',32000,'coupes'), + ('F620','f620',40000,'coupes'), + ('Felon','felon',42000,'coupes'), + ('Felon GT','felon2',55000,'coupes'), + ('Jackal','jackal',38000,'coupes'), + ('Oracle XS','oracle2',35000,'coupes'), + ('Sentinel','sentinel',32000,'coupes'), + ('Sentinel XS','sentinel2',40000,'coupes'), + ('Windsor','windsor',95000,'coupes'), + ('Windsor Drop','windsor2',125000,'coupes'), + ('Zion','zion',36000,'coupes'), + ('Zion Cabrio','zion2',45000,'coupes'), + ('9F','ninef',65000,'sports'), + ('9F Cabrio','ninef2',80000,'sports'), + ('Alpha','alpha',60000,'sports'), + ('Banshee','banshee',70000,'sports'), + ('Bestia GTS','bestiagts',55000,'sports'), + ('Buffalo','buffalo',12000,'sports'), + ('Buffalo S','buffalo2',20000,'sports'), + ('Carbonizzare','carbonizzare',75000,'sports'), + ('Comet','comet2',65000,'sports'), + ('Coquette','coquette',65000,'sports'), + ('Drift Tampa','tampa2',80000,'sports'), + ('Elegy','elegy2',38500,'sports'), + ('Feltzer','feltzer2',55000,'sports'), + ('Furore GT','furoregt',45000,'sports'), + ('Fusilade','fusilade',40000,'sports'), + ('Jester','jester',65000,'sports'), + ('Jester(Racecar)','jester2',135000,'sports'), + ('Khamelion','khamelion',38000,'sports'), + ('Kuruma','kuruma',30000,'sports'), + ('Lynx','lynx',40000,'sports'), + ('Mamba','mamba',70000,'sports'), + ('Massacro','massacro',65000,'sports'), + ('Massacro(Racecar)','massacro2',130000,'sports'), + ('Omnis','omnis',35000,'sports'), + ('Penumbra','penumbra',28000,'sports'), + ('Rapid GT','rapidgt',35000,'sports'), + ('Rapid GT Convertible','rapidgt2',45000,'sports'), + ('Schafter V12','schafter3',50000,'sports'), + ('Seven 70','seven70',39500,'sports'), + ('Sultan','sultan',15000,'sports'), + ('Surano','surano',50000,'sports'), + ('Tropos','tropos',40000,'sports'), + ('Verlierer','verlierer2',70000,'sports'), + ('Adder','adder',900000,'super'), + ('Banshee 900R','banshee2',255000,'super'), + ('Bullet','bullet',90000,'super'), + ('Cheetah','cheetah',375000,'super'), + ('Entity XF','entityxf',425000,'super'), + ('ETR1','sheava',220000,'super'), + ('FMJ','fmj',185000,'super'), + ('Infernus','infernus',180000,'super'), + ('Osiris','osiris',160000,'super'), + ('Pfister','pfister811',85000,'super'), + ('RE-7B','le7b',325000,'super'), + ('Reaper','reaper',150000,'super'), + ('Sultan RS','sultanrs',65000,'super'), + ('T20','t20',300000,'super'), + ('Turismo R','turismor',350000,'super'), + ('Tyrus','tyrus',600000,'super'), + ('Vacca','vacca',120000,'super'), + ('Voltic','voltic',90000,'super'), + ('X80 Proto','prototipo',2500000,'super'), + ('Zentorno','zentorno',1500000,'super'), + ('Akuma','AKUMA',7500,'motorcycles'), + ('Avarus','avarus',18000,'motorcycles'), + ('Bagger','bagger',13500,'motorcycles'), + ('Bati 801','bati',12000,'motorcycles'), + ('Bati 801RR','bati2',19000,'motorcycles'), + ('BF400','bf400',6500,'motorcycles'), + ('BMX (velo)','bmx',160,'motorcycles'), + ('Carbon RS','carbonrs',18000,'motorcycles'), + ('Chimera','chimera',38000,'motorcycles'), + ('Cliffhanger','cliffhanger',9500,'motorcycles'), + ('Cruiser (velo)','cruiser',510,'motorcycles'), + ('Daemon','daemon',11500,'motorcycles'), + ('Daemon High','daemon2',13500,'motorcycles'), + ('Defiler','defiler',9800,'motorcycles'), + ('Double T','double',28000,'motorcycles'), + ('Enduro','enduro',5500,'motorcycles'), + ('Esskey','esskey',4200,'motorcycles'), + ('Faggio','faggio',1900,'motorcycles'), + ('Vespa','faggio2',2800,'motorcycles'), + ('Fixter (velo)','fixter',225,'motorcycles'), + ('Gargoyle','gargoyle',16500,'motorcycles'), + ('Hakuchou','hakuchou',31000,'motorcycles'), + ('Hakuchou Sport','hakuchou2',55000,'motorcycles'), + ('Hexer','hexer',12000,'motorcycles'), + ('Innovation','innovation',23500,'motorcycles'), + ('Manchez','manchez',5300,'motorcycles'), + ('Nemesis','nemesis',5800,'motorcycles'), + ('Nightblade','nightblade',35000,'motorcycles'), + ('PCJ-600','pcj',6200,'motorcycles'), + ('Ruffian','ruffian',6800,'motorcycles'), + ('Sanchez','sanchez',5300,'motorcycles'), + ('Sanchez Sport','sanchez2',5300,'motorcycles'), + ('Sanctus','sanctus',25000,'motorcycles'), + ('Scorcher (velo)','scorcher',280,'motorcycles'), + ('Sovereign','sovereign',22000,'motorcycles'), + ('Shotaro Concept','shotaro',320000,'motorcycles'), + ('Thrust','thrust',24000,'motorcycles'), + ('Tri bike (velo)','tribike3',520,'motorcycles'), + ('Vader','vader',7200,'motorcycles'), + ('Vortex','vortex',9800,'motorcycles'), + ('Woflsbane','wolfsbane',9000,'motorcycles'), + ('Zombie','zombiea',9500,'motorcycles'), + ('Zombie Luxuary','zombieb',12000,'motorcycles'), + ('blazer5', 'blazer5', 1755600, 'offroad'), + ('Ruiner 2', 'ruiner2', 5745600, 'muscle'), + ('Voltic 2', 'voltic2', 3830400, 'super'), + ('Ardent', 'ardent', 1150000, 'sportsclassics'), + ('Oppressor', 'oppressor', 3524500, 'super'), + ('Visione', 'visione', 2250000, 'super'), + ('Retinue', 'retinue', 615000, 'sportsclassics'), + ('Cyclone', 'cyclone', 1890000, 'super'), + ('Rapid GT3', 'rapidgt3', 885000, 'sportsclassics'), + ('raiden', 'raiden', 1375000, 'sports'), + ('Yosemite', 'yosemite', 485000, 'muscle'), + ('Deluxo', 'deluxo', 4721500, 'sportsclassics'), + ('Pariah', 'pariah', 1420000, 'sports'), + ('Stromberg', 'stromberg', 3185350, 'sports'), + ('SC 1', 'sc1', 1603000, 'super'), + ('riata', 'riata', 380000, 'offroad'), + ('Hermes', 'hermes', 535000, 'muscle'), + ('Savestra', 'savestra', 990000, 'sportsclassics'), + ('Streiter', 'streiter', 500000, 'sports'), + ('Kamacho', 'kamacho', 345000, 'offroad'), + ('GT 500', 'gt500', 785000, 'sportsclassics'), + ('Z190', 'z190', 900000, 'sportsclassics'), + ('Viseris', 'viseris', 875000, 'sportsclassics'), + ('Autarch', 'autarch', 1955000, 'super'), + ('Comet 5', 'comet5', 1145000, 'sports'), + ('Neon', 'neon', 1500000, 'sports'), + ('Revolter', 'revolter', 1610000, 'sports'), + ('Sentinel3', 'sentinel3', 650000, 'sports'), + ('Hustler', 'hustler', 625000, 'muscle') +; diff --git a/[esx_addons]/esx_vehicleshop/localization/sv_esx_vehicleshop.sql b/[esx_addons]/esx_vehicleshop/localization/sv_esx_vehicleshop.sql new file mode 100644 index 00000000..4a72792c --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/localization/sv_esx_vehicleshop.sql @@ -0,0 +1,339 @@ + + +INSERT INTO `addon_account` (name, label, shared) VALUES + ('society_cardealer','Bilförsäljare',1) +; + +INSERT INTO `addon_inventory` (name, label, shared) VALUES + ('society_cardealer','Bilförsäljare',1) +; + +INSERT INTO `jobs` (name, label) VALUES + ('cardealer','Bilförsäljare') +; + +INSERT INTO `job_grades` (job_name, grade, name, label, salary, skin_male, skin_female) VALUES + ('cardealer',0,'recruit','Nyanställd',10,'{}','{}'), + ('cardealer',1,'novice','Nybörjare',25,'{}','{}'), + ('cardealer',2,'experienced','Erfaren',40,'{}','{}'), + ('cardealer',3,'boss','Chef',0,'{}','{}') +; + +CREATE TABLE `cardealer_vehicles` ( + `id` int NOT NULL AUTO_INCREMENT, + `vehicle` varchar(255) NOT NULL, + `price` int NOT NULL, + + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `vehicle_sold` ( + `client` VARCHAR(50) NOT NULL, + `model` VARCHAR(50) NOT NULL, + `plate` VARCHAR(50) NOT NULL, + `soldby` VARCHAR(50) NOT NULL, + `date` VARCHAR(50) NOT NULL, + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `owned_vehicles` ( + `owner` VARCHAR(60) NOT NULL, + `plate` varchar(12) NOT NULL, + `vehicle` longtext, + `type` VARCHAR(20) NOT NULL DEFAULT 'car', + `job` VARCHAR(20) NULL DEFAULT NULL, + `stored` TINYINT(1) NOT NULL DEFAULT '0', + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `rented_vehicles` ( + `vehicle` varchar(60) NOT NULL, + `plate` varchar(12) NOT NULL, + `player_name` varchar(255) NOT NULL, + `base_price` int NOT NULL, + `rent_price` int NOT NULL, + `owner` VARCHAR(60) NOT NULL, + + PRIMARY KEY (`plate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +CREATE TABLE `vehicle_categories` ( + `name` varchar(60) NOT NULL, + `label` varchar(60) NOT NULL, + + PRIMARY KEY (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `vehicle_categories` (name, label) VALUES + ('compacts','Småbil'), + ('coupes','Coupés'), + ('sedans','Sedans'), + ('sports','Sportbil'), + ('sportsclassics','Klassik sportbil'), + ('super','Super'), + ('muscle','Muskel'), + ('offroad','Off Road'), + ('suvs','SUVs'), + ('vans','Vans'), + ('motorcycles','Motorcykel') +; + +CREATE TABLE `vehicles` ( + `name` varchar(60) NOT NULL, + `model` varchar(60) NOT NULL, + `price` int NOT NULL, + `category` varchar(60) DEFAULT NULL, + + PRIMARY KEY (`model`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `vehicles` (name, model, price, category) VALUES + ('Blade','blade',15000,'muscle'), + ('Buccaneer','buccaneer',18000,'muscle'), + ('Buccaneer Rider','buccaneer2',24000,'muscle'), + ('Chino','chino',15000,'muscle'), + ('Chino Luxe','chino2',19000,'muscle'), + ('Coquette BlackFin','coquette3',55000,'muscle'), + ('Dominator','dominator',35000,'muscle'), + ('Dukes','dukes',28000,'muscle'), + ('Gauntlet','gauntlet',30000,'muscle'), + ('Hotknife','hotknife',125000,'muscle'), + ('Faction','faction',20000,'muscle'), + ('Faction Rider','faction2',30000,'muscle'), + ('Faction XL','faction3',40000,'muscle'), + ('Nightshade','nightshade',65000,'muscle'), + ('Phoenix','phoenix',12500,'muscle'), + ('Picador','picador',18000,'muscle'), + ('Sabre Turbo','sabregt',20000,'muscle'), + ('Sabre GT','sabregt2',25000,'muscle'), + ('Slam Van','slamvan3',11500,'muscle'), + ('Tampa','tampa',16000,'muscle'), + ('Virgo','virgo',14000,'muscle'), + ('Vigero','vigero',12500,'muscle'), + ('Voodoo','voodoo',7200,'muscle'), + ('Blista','blista',8000,'compacts'), + ('Brioso R/A','brioso',18000,'compacts'), + ('Issi','issi2',10000,'compacts'), + ('Panto','panto',10000,'compacts'), + ('Prairie','prairie',12000,'compacts'), + ('Bison','bison',45000,'vans'), + ('Bobcat XL','bobcatxl',32000,'vans'), + ('Burrito','burrito3',19000,'vans'), + ('Burrito','gburrito2',29000,'vans'), + ('Camper','camper',42000,'vans'), + ('Gang Burrito','gburrito',45000,'vans'), + ('Journey','journey',6500,'vans'), + ('Minivan','minivan',13000,'vans'), + ('Moonbeam','moonbeam',18000,'vans'), + ('Moonbeam Rider','moonbeam2',35000,'vans'), + ('Paradise','paradise',19000,'vans'), + ('Rumpo','rumpo',15000,'vans'), + ('Rumpo Trail','rumpo3',19500,'vans'), + ('Surfer','surfer',12000,'vans'), + ('Youga','youga',10800,'vans'), + ('Youga Luxuary','youga2',14500,'vans'), + ('Asea','asea',5500,'sedans'), + ('Cognoscenti','cognoscenti',55000,'sedans'), + ('Emperor','emperor',8500,'sedans'), + ('Fugitive','fugitive',12000,'sedans'), + ('Glendale','glendale',6500,'sedans'), + ('Intruder','intruder',7500,'sedans'), + ('Premier','premier',8000,'sedans'), + ('Primo Custom','primo2',14000,'sedans'), + ('Regina','regina',5000,'sedans'), + ('Schafter','schafter2',25000,'sedans'), + ('Stretch','stretch',90000,'sedans'), + ('Super Diamond','superd',130000,'sedans'), + ('Tailgater','tailgater',30000,'sedans'), + ('Warrener','warrener',4000,'sedans'), + ('Washington','washington',9000,'sedans'), + ('Baller','baller2',40000,'suvs'), + ('Baller Sport','baller3',60000,'suvs'), + ('Cavalcade','cavalcade2',55000,'suvs'), + ('Contender','contender',70000,'suvs'), + ('Dubsta','dubsta',45000,'suvs'), + ('Dubsta Luxuary','dubsta2',60000,'suvs'), + ('Fhantom','fq2',17000,'suvs'), + ('Grabger','granger',50000,'suvs'), + ('Gresley','gresley',47500,'suvs'), + ('Huntley S','huntley',40000,'suvs'), + ('Landstalker','landstalker',35000,'suvs'), + ('Mesa','mesa',16000,'suvs'), + ('Mesa Trail','mesa3',40000,'suvs'), + ('Patriot','patriot',55000,'suvs'), + ('Radius','radi',29000,'suvs'), + ('Rocoto','rocoto',45000,'suvs'), + ('Seminole','seminole',25000,'suvs'), + ('XLS','xls',32000,'suvs'), + ('Btype','btype',62000,'sportsclassics'), + ('Btype Luxe','btype3',85000,'sportsclassics'), + ('Btype Hotroad','btype2',155000,'sportsclassics'), + ('Casco','casco',30000,'sportsclassics'), + ('Coquette Classic','coquette2',40000,'sportsclassics'), + ('Manana','manana',12800,'sportsclassics'), + ('Monroe','monroe',55000,'sportsclassics'), + ('Pigalle','pigalle',20000,'sportsclassics'), + ('Stinger','stinger',80000,'sportsclassics'), + ('Stinger GT','stingergt',75000,'sportsclassics'), + ('Stirling GT','feltzer3',65000,'sportsclassics'), + ('Z-Type','ztype',220000,'sportsclassics'), + ('Bifta','bifta',12000,'offroad'), + ('Bf Injection','bfinjection',16000,'offroad'), + ('Blazer','blazer',6500,'offroad'), + ('Blazer Sport','blazer4',8500,'offroad'), + ('Brawler','brawler',45000,'offroad'), + ('Bubsta 6x6','dubsta3',120000,'offroad'), + ('Dune Buggy','dune',8000,'offroad'), + ('Guardian','guardian',45000,'offroad'), + ('Rebel','rebel2',35000,'offroad'), + ('Sandking','sandking',55000,'offroad'), + ('The Liberator','monster',210000,'offroad'), + ('Trophy Truck','trophytruck',60000,'offroad'), + ('Trophy Truck Limited','trophytruck2',80000,'offroad'), + ('Cognoscenti Cabrio','cogcabrio',55000,'coupes'), + ('Exemplar','exemplar',32000,'coupes'), + ('F620','f620',40000,'coupes'), + ('Felon','felon',42000,'coupes'), + ('Felon GT','felon2',55000,'coupes'), + ('Jackal','jackal',38000,'coupes'), + ('Oracle XS','oracle2',35000,'coupes'), + ('Sentinel','sentinel',32000,'coupes'), + ('Sentinel XS','sentinel2',40000,'coupes'), + ('Windsor','windsor',95000,'coupes'), + ('Windsor Drop','windsor2',125000,'coupes'), + ('Zion','zion',36000,'coupes'), + ('Zion Cabrio','zion2',45000,'coupes'), + ('9F','ninef',65000,'sports'), + ('9F Cabrio','ninef2',80000,'sports'), + ('Alpha','alpha',60000,'sports'), + ('Banshee','banshee',70000,'sports'), + ('Bestia GTS','bestiagts',55000,'sports'), + ('Buffalo','buffalo',12000,'sports'), + ('Buffalo S','buffalo2',20000,'sports'), + ('Carbonizzare','carbonizzare',75000,'sports'), + ('Comet','comet2',65000,'sports'), + ('Coquette','coquette',65000,'sports'), + ('Drift Tampa','tampa2',80000,'sports'), + ('Elegy','elegy2',38500,'sports'), + ('Feltzer','feltzer2',55000,'sports'), + ('Furore GT','furoregt',45000,'sports'), + ('Fusilade','fusilade',40000,'sports'), + ('Jester','jester',65000,'sports'), + ('Jester(Racecar)','jester2',135000,'sports'), + ('Khamelion','khamelion',38000,'sports'), + ('Kuruma','kuruma',30000,'sports'), + ('Lynx','lynx',40000,'sports'), + ('Mamba','mamba',70000,'sports'), + ('Massacro','massacro',65000,'sports'), + ('Massacro(Racecar)','massacro2',130000,'sports'), + ('Omnis','omnis',35000,'sports'), + ('Penumbra','penumbra',28000,'sports'), + ('Rapid GT','rapidgt',35000,'sports'), + ('Rapid GT Convertible','rapidgt2',45000,'sports'), + ('Schafter V12','schafter3',50000,'sports'), + ('Seven 70','seven70',39500,'sports'), + ('Sultan','sultan',15000,'sports'), + ('Surano','surano',50000,'sports'), + ('Tropos','tropos',40000,'sports'), + ('Verlierer','verlierer2',70000,'sports'), + ('Adder','adder',900000,'super'), + ('Banshee 900R','banshee2',255000,'super'), + ('Bullet','bullet',90000,'super'), + ('Cheetah','cheetah',375000,'super'), + ('Entity XF','entityxf',425000,'super'), + ('ETR1','sheava',220000,'super'), + ('FMJ','fmj',185000,'super'), + ('Infernus','infernus',180000,'super'), + ('Osiris','osiris',160000,'super'), + ('Pfister','pfister811',85000,'super'), + ('RE-7B','le7b',325000,'super'), + ('Reaper','reaper',150000,'super'), + ('Sultan RS','sultanrs',65000,'super'), + ('T20','t20',300000,'super'), + ('Turismo R','turismor',350000,'super'), + ('Tyrus','tyrus',600000,'super'), + ('Vacca','vacca',120000,'super'), + ('Voltic','voltic',90000,'super'), + ('X80 Proto','prototipo',2500000,'super'), + ('Zentorno','zentorno',1500000,'super'), + ('Akuma','AKUMA',7500,'motorcycles'), + ('Avarus','avarus',18000,'motorcycles'), + ('Bagger','bagger',13500,'motorcycles'), + ('Bati 801','bati',12000,'motorcycles'), + ('Bati 801RR','bati2',19000,'motorcycles'), + ('BF400','bf400',6500,'motorcycles'), + ('BMX (velo)','bmx',160,'motorcycles'), + ('Carbon RS','carbonrs',18000,'motorcycles'), + ('Chimera','chimera',38000,'motorcycles'), + ('Cliffhanger','cliffhanger',9500,'motorcycles'), + ('Cruiser (velo)','cruiser',510,'motorcycles'), + ('Daemon','daemon',11500,'motorcycles'), + ('Daemon High','daemon2',13500,'motorcycles'), + ('Defiler','defiler',9800,'motorcycles'), + ('Double T','double',28000,'motorcycles'), + ('Enduro','enduro',5500,'motorcycles'), + ('Esskey','esskey',4200,'motorcycles'), + ('Faggio','faggio',1900,'motorcycles'), + ('Vespa','faggio2',2800,'motorcycles'), + ('Fixter (velo)','fixter',225,'motorcycles'), + ('Gargoyle','gargoyle',16500,'motorcycles'), + ('Hakuchou','hakuchou',31000,'motorcycles'), + ('Hakuchou Sport','hakuchou2',55000,'motorcycles'), + ('Hexer','hexer',12000,'motorcycles'), + ('Innovation','innovation',23500,'motorcycles'), + ('Manchez','manchez',5300,'motorcycles'), + ('Nemesis','nemesis',5800,'motorcycles'), + ('Nightblade','nightblade',35000,'motorcycles'), + ('PCJ-600','pcj',6200,'motorcycles'), + ('Ruffian','ruffian',6800,'motorcycles'), + ('Sanchez','sanchez',5300,'motorcycles'), + ('Sanchez Sport','sanchez2',5300,'motorcycles'), + ('Sanctus','sanctus',25000,'motorcycles'), + ('Scorcher (velo)','scorcher',280,'motorcycles'), + ('Sovereign','sovereign',22000,'motorcycles'), + ('Shotaro Concept','shotaro',320000,'motorcycles'), + ('Thrust','thrust',24000,'motorcycles'), + ('Tri bike (velo)','tribike3',520,'motorcycles'), + ('Vader','vader',7200,'motorcycles'), + ('Vortex','vortex',9800,'motorcycles'), + ('Woflsbane','wolfsbane',9000,'motorcycles'), + ('Zombie','zombiea',9500,'motorcycles'), + ('Zombie Luxuary','zombieb',12000,'motorcycles'), + ('blazer5', 'blazer5', 1755600, 'offroad'), + ('Ruiner 2', 'ruiner2', 5745600, 'muscle'), + ('Voltic 2', 'voltic2', 3830400, 'super'), + ('Ardent', 'ardent', 1150000, 'sportsclassics'), + ('Oppressor', 'oppressor', 3524500, 'super'), + ('Visione', 'visione', 2250000, 'super'), + ('Retinue', 'retinue', 615000, 'sportsclassics'), + ('Cyclone', 'cyclone', 1890000, 'super'), + ('Rapid GT3', 'rapidgt3', 885000, 'sportsclassics'), + ('raiden', 'raiden', 1375000, 'sports'), + ('Yosemite', 'yosemite', 485000, 'muscle'), + ('Deluxo', 'deluxo', 4721500, 'sportsclassics'), + ('Pariah', 'pariah', 1420000, 'sports'), + ('Stromberg', 'stromberg', 3185350, 'sports'), + ('SC 1', 'sc1', 1603000, 'super'), + ('riata', 'riata', 380000, 'offroad'), + ('Hermes', 'hermes', 535000, 'muscle'), + ('Savestra', 'savestra', 990000, 'sportsclassics'), + ('Streiter', 'streiter', 500000, 'sports'), + ('Kamacho', 'kamacho', 345000, 'offroad'), + ('GT 500', 'gt500', 785000, 'sportsclassics'), + ('Z190', 'z190', 900000, 'sportsclassics'), + ('Viseris', 'viseris', 875000, 'sportsclassics'), + ('Autarch', 'autarch', 1955000, 'super'), + ('Comet 5', 'comet5', 1145000, 'sports'), + ('Neon', 'neon', 1500000, 'sports'), + ('Revolter', 'revolter', 1610000, 'sports'), + ('Sentinel3', 'sentinel3', 650000, 'sports'), + ('Hustler', 'hustler', 625000, 'muscle') +; diff --git a/[esx_addons]/esx_vehicleshop/server/main.lua b/[esx_addons]/esx_vehicleshop/server/main.lua new file mode 100644 index 00000000..d4628296 --- /dev/null +++ b/[esx_addons]/esx_vehicleshop/server/main.lua @@ -0,0 +1,447 @@ +local categories, vehicles = {}, {} +local vehiclesByModel = {} + +CreateThread(function() + exports["esx_society"]:registerSociety('cardealer', TranslateCap('car_dealer'), 'society_cardealer', 'society_cardealer', 'society_cardealer', {type = 'private'}) +end) + +CreateThread(function() + local char = Config.PlateLetters + char = char + Config.PlateNumbers + if Config.PlateUseSpace then char = char + 1 end + + if char > 8 then + print(('[^3WARNING^7] Character Limit Exceeded, ^5%s/8^7!'):format(char)) + end +end) + +function RemoveOwnedVehicle(plate) + MySQL.update('DELETE FROM owned_vehicles WHERE plate = ?', {plate}) +end + +AddEventHandler('onResourceStart', function(resourceName) + if resourceName == GetCurrentResourceName() then + SQLVehiclesAndCategories() + end +end) + +function SQLVehiclesAndCategories() + categories = MySQL.query.await('SELECT * FROM vehicle_categories') + vehicles = MySQL.query.await('SELECT vehicles.*, vehicle_categories.label AS categoryLabel FROM vehicles JOIN vehicle_categories ON vehicles.category = vehicle_categories.name') + + for _, vehicle in pairs(vehicles) do + vehiclesByModel[vehicle.model] = vehicle + end + + TriggerClientEvent("esx_vehicleshop:updateVehiclesAndCategories", -1, vehicles, categories, vehiclesByModel) +end + +function getVehicleFromModel(model) + return vehiclesByModel[model] +end + +RegisterNetEvent("esx_vehicleshop:getVehiclesAndCategories", function() + TriggerClientEvent("esx_vehicleshop:updateVehiclesAndCategories", source, vehicles, categories, vehiclesByModel) +end) + +RegisterNetEvent('esx_vehicleshop:setVehicleOwnedPlayerId') +AddEventHandler('esx_vehicleshop:setVehicleOwnedPlayerId', function(playerId, vehicleProps, model, label) + local xPlayer, xTarget = ESX.GetPlayerFromId(source), ESX.GetPlayerFromId(playerId) + + if xPlayer.job.name ~= 'cardealer' or not xTarget then + return + end + + MySQL.scalar('SELECT id FROM cardealer_vehicles WHERE vehicle = ?', {model}, + function(id) + if not id then + return + end + + MySQL.update('DELETE FROM cardealer_vehicles WHERE id = ?', {id}, + function(rowsChanged) + if rowsChanged == 1 then + MySQL.insert('INSERT INTO owned_vehicles (owner, plate, vehicle) VALUES (?, ?, ?)', {xTarget.identifier, vehicleProps.plate, json.encode(vehicleProps)}, + function(id) + xPlayer.showNotification(TranslateCap('vehicle_set_owned', vehicleProps.plate, xTarget.getName())) + xTarget.showNotification(TranslateCap('vehicle_belongs', vehicleProps.plate)) + end) + + MySQL.insert('INSERT INTO vehicle_sold (client, model, plate, soldby, date) VALUES (?, ?, ?, ?, ?)', {xTarget.getName(), label, vehicleProps.plate, xPlayer.getName(), os.date('%Y-%m-%d %H:%M')}) + end + end) + end) +end) + +ESX.RegisterServerCallback('esx_vehicleshop:getSoldVehicles', function(source, cb) + MySQL.query('SELECT client, model, plate, soldby, date FROM vehicle_sold ORDER BY DATE DESC', function(result) + cb(result) + end) +end) + +RegisterNetEvent('esx_vehicleshop:rentVehicle') +AddEventHandler('esx_vehicleshop:rentVehicle', function(vehicle, plate, rentPrice, playerId) + local xPlayer, xTarget = ESX.GetPlayerFromId(source), ESX.GetPlayerFromId(playerId) + + if xPlayer.job.name ~= 'cardealer' or not xTarget then + return + end + + MySQL.single('SELECT id, price FROM cardealer_vehicles WHERE vehicle = ?', {vehicle}, + function(result) + if not result then + return + end + + MySQL.update('DELETE FROM cardealer_vehicles WHERE id = ?', {result.id}, + function(rowsChanged) + if rowsChanged ~= 1 then + return + end + + MySQL.insert('INSERT INTO rented_vehicles (vehicle, plate, player_name, base_price, rent_price, owner) VALUES (?, ?, ?, ?, ?, ?)', {vehicle, plate, xTarget.getName(), result.price, rentPrice, xTarget.identifier}, + function(id) + xPlayer.showNotification(TranslateCap('vehicle_set_rented', plate, xTarget.getName())) + end) + end) + end) +end) + +RegisterNetEvent('esx_vehicleshop:getStockItem') +AddEventHandler('esx_vehicleshop:getStockItem', function(itemName, count) + local source = source + local xPlayer = ESX.GetPlayerFromId(source) + + TriggerEvent('esx_addoninventory:getSharedInventory', 'society_cardealer', function(inventory) + local item = inventory.getItem(itemName) + + -- is there enough in the society? + if count > 0 and item.count >= count then + + -- can the player carry the said amount of x item? + if not xPlayer.canCarryItem(itemName, count) then + return xPlayer.showNotification(TranslateCap('player_cannot_hold')) + end + inventory.removeItem(itemName, count) + xPlayer.addInventoryItem(itemName, count) + xPlayer.showNotification(TranslateCap('have_withdrawn', count, item.label)) + else + xPlayer.showNotification(TranslateCap('not_enough_in_society')) + end + end) +end) + +RegisterNetEvent('esx_vehicleshop:putStockItems') +AddEventHandler('esx_vehicleshop:putStockItems', function(itemName, count) + local source = source + local xPlayer = ESX.GetPlayerFromId(source) + + TriggerEvent('esx_addoninventory:getSharedInventory', 'society_cardealer', function(inventory) + local item = inventory.getItem(itemName) + + if item.count >= 0 then + xPlayer.removeInventoryItem(itemName, count) + inventory.addItem(itemName, count) + xPlayer.showNotification(TranslateCap('have_deposited', count, item.label)) + else + xPlayer.showNotification(TranslateCap('invalid_amount')) + end + end) +end) + +ESX.RegisterServerCallback('esx_vehicleshop:buyVehicle', function(source, cb, model, plate) + local xPlayer = ESX.GetPlayerFromId(source) + local modelPrice = getVehicleFromModel(model).price + + if modelPrice and xPlayer.getMoney() >= modelPrice then + xPlayer.removeMoney(modelPrice, "Vehicle Purchase") + + MySQL.insert('INSERT INTO owned_vehicles (owner, plate, vehicle) VALUES (?, ?, ?)', {xPlayer.identifier, plate, json.encode({model = joaat(model), plate = plate}) + }, function(rowsChanged) + xPlayer.showNotification(TranslateCap('vehicle_belongs', plate)) + ESX.OneSync.SpawnVehicle(joaat(model), Config.Zones.ShopOutside.Pos, Config.Zones.ShopOutside.Heading,{plate = plate}, function(vehicle) + Wait(100) + local vehicle = NetworkGetEntityFromNetworkId(vehicle) + Wait(300) + TaskWarpPedIntoVehicle(GetPlayerPed(source), vehicle, -1) + end) + cb(true) + end) + else + cb(false) + end +end) + +ESX.RegisterServerCallback('esx_vehicleshop:getCommercialVehicles', function(source, cb) + MySQL.query('SELECT price, vehicle FROM cardealer_vehicles ORDER BY vehicle ASC', function(result) + cb(result) + end) +end) + +ESX.RegisterServerCallback('esx_vehicleshop:buyCarDealerVehicle', function(source, cb, model) + local xPlayer = ESX.GetPlayerFromId(source) + + if xPlayer.job.name ~= 'cardealer' then + return cb(false) + end + local modelPrice = getVehicleFromModel(model).price + + if not modelPrice then + return cb(false) + end + TriggerEvent('esx_addonaccount:getSharedAccount', 'society_cardealer', function(account) + if account.money < modelPrice then + return cb(false) + end + + account.removeMoney(modelPrice) + + MySQL.insert('INSERT INTO cardealer_vehicles (vehicle, price) VALUES (?, ?)', {model, modelPrice}, + function(rowsChanged) + cb(true) + end) + end) +end) + +RegisterNetEvent('esx_vehicleshop:returnProvider') +AddEventHandler('esx_vehicleshop:returnProvider', function(vehicleModel) + local xPlayer = ESX.GetPlayerFromId(source) + + if xPlayer.job.name ~= 'cardealer' then + return + end + MySQL.single('SELECT id, price FROM cardealer_vehicles WHERE vehicle = ?', {vehicleModel}, + function(result) + if not result then + return print(('[^3WARNING^7] Player ^5%s^7 Attempted To Sell Invalid Vehicle - ^5%s^7!'):format(source, vehicleModel)) + end + + local id = result.id + + MySQL.update('DELETE FROM cardealer_vehicles WHERE id = ?', {id}, + function(rowsChanged) + if rowsChanged ~= 1 then + return + end + TriggerEvent('esx_addonaccount:getSharedAccount', 'society_cardealer', function(account) + local price = ESX.Math.Round(result.price * 0.75) + local vehicleLabel = getVehicleFromModel(vehicleModel).label + + account.addMoney(price) + xPlayer.showNotification(TranslateCap('vehicle_sold_for', vehicleLabel, ESX.Math.GroupDigits(price))) + end) + end) + end) +end) + +ESX.RegisterServerCallback('esx_vehicleshop:getRentedVehicles', function(source, cb) + MySQL.query('SELECT * FROM rented_vehicles ORDER BY player_name ASC', function(result) + local vehicles = {} + + for i = 1, #result do + local vehicle = result[i] + vehicles[#vehicles + 1] = { + name = vehicle.vehicle, + plate = vehicle.plate, + playerName = vehicle.player_name + } + end + + cb(vehicles) + end) +end) + +ESX.RegisterServerCallback('esx_vehicleshop:giveBackVehicle', function(source, cb, plate) + MySQL.single('SELECT base_price, vehicle FROM rented_vehicles WHERE plate = ?', {plate}, + function(result) + if not result then + return cb(false) + end + + MySQL.update('DELETE FROM rented_vehicles WHERE plate = ?', {plate}, + function() + MySQL.insert('INSERT INTO cardealer_vehicles (vehicle, price) VALUES (?, ?)', {result.vehicle, result.base_price}) + + RemoveOwnedVehicle(plate) + cb(true) + end) + end) +end) + +ESX.RegisterServerCallback('esx_vehicleshop:resellVehicle', function(source, cb, plate, model) + local xPlayer, resellPrice = ESX.GetPlayerFromId(source) + + if xPlayer.job.name == 'cardealer' or not Config.EnablePlayerManagement then + -- calculate the resell price + for i=1, #vehicles, 1 do + if joaat(vehicles[i].model) == model then + resellPrice = ESX.Math.Round(vehicles[i].price / 100 * Config.ResellPercentage) + break + end + end + + if not resellPrice then + print(('[^3WARNING^7] Player ^5%s^7 Attempted To Resell Invalid Vehicle - ^5%s^7!'):format(source, model)) + return cb(false) + end + MySQL.single('SELECT * FROM rented_vehicles WHERE plate = ?', {plate}, + function(result) + if result then -- is it a rented vehicle? + return cb(false) -- it is, don't let the player sell it since he doesn't own it + end + MySQL.single('SELECT * FROM owned_vehicles WHERE owner = ? AND plate = ?', {xPlayer.identifier, plate}, + function(result) + if not result then -- does the owner match? + return + end + local vehicle = json.decode(result.vehicle) + + if vehicle.model ~= model then + print(('[^3WARNING^7] Player ^5%s^7 Attempted To Resell Vehicle With Invalid Model - ^5%s^7!'):format(source, model)) + return cb(false) + end + if vehicle.plate ~= plate then + print(('[^3WARNING^7] Player ^5%s^7 Attempted To Resell Vehicle With Invalid Plate - ^5%s^7!'):format(source, plate)) + return cb(false) + end + + xPlayer.addMoney(resellPrice, "Sold Vehicle") + RemoveOwnedVehicle(plate) + cb(true) + end) + end) + end +end) + +ESX.RegisterServerCallback('esx_vehicleshop:getStockItems', function(source, cb) + TriggerEvent('esx_addoninventory:getSharedInventory', 'society_cardealer', function(inventory) + cb(inventory.items) + end) +end) + +ESX.RegisterServerCallback('esx_vehicleshop:getPlayerInventory', function(source, cb) + local xPlayer = ESX.GetPlayerFromId(source) + local items = xPlayer.inventory + + cb({items = items}) +end) + +ESX.RegisterServerCallback('esx_vehicleshop:isPlateTaken', function(source, cb, plate) + MySQL.scalar('SELECT plate FROM owned_vehicles WHERE plate = ?', {plate}, + function(result) + cb(result ~= nil) + end) +end) + +ESX.RegisterServerCallback('esx_vehicleshop:retrieveJobVehicles', function(source, cb, type) + local xPlayer = ESX.GetPlayerFromId(source) + + MySQL.query('SELECT * FROM owned_vehicles WHERE owner = ? AND type = ? AND job = ?', {xPlayer.identifier, type, xPlayer.job.name}, + function(result) + cb(result) + end) +end) + +RegisterNetEvent('esx_vehicleshop:setJobVehicleState') +AddEventHandler('esx_vehicleshop:setJobVehicleState', function(plate, state) + local xPlayer = ESX.GetPlayerFromId(source) + + MySQL.update('UPDATE owned_vehicles SET `stored` = ? WHERE plate = ? AND job = ?', {state, plate, xPlayer.job.name}, + function(rowsChanged) + if rowsChanged == 0 then + print(('[^3WARNING^7] Player ^5%s^7 Attempted To Exploit the Garage!'):format(source, plate)) + end + end) +end) + +function PayRent() + local timeStart = os.clock() + print('[^2INFO^7] ^5Rent Payments^7 Initiated') + + MySQL.query('SELECT rented_vehicles.owner, rented_vehicles.rent_price, rented_vehicles.plate, users.accounts FROM rented_vehicles LEFT JOIN users ON rented_vehicles.owner = users.identifier', {}, + function(rentals) + local owners = {} + for i = 1, #rentals do + local rental = rentals[i] + if not owners[rental.owner] then + owners[rental.owner] = {rental} + else + owners[rental.owner][#owners[rental.owner] + 1] = rental + end + end + + local total = 0 + local unrentals = {} + local users = {} + for k, v in pairs(owners) do + local sum = 0 + for i = 1, #v do + sum = sum + v[i].rent_price + end + local xPlayer = ESX.GetPlayerFromIdentifier(k) + + if xPlayer then + local bank = xPlayer.getAccount('bank').money + + if bank >= sum and #v > 1 then + total = total + sum + xPlayer.removeAccountMoney('bank', sum, "Vehicle Rental") + xPlayer.showNotification(('You have paid $%s for all of your rentals'):format(ESX.Math.GroupDigits(sum))) + else + for i = 1, #v do + local rental = v[i] + if xPlayer.getAccount('bank').money >= rental.rent_price then + total = total + rental.rent_price + xPlayer.removeAccountMoney('bank', rental.rent_price, "Vehicle Rental") + xPlayer.showNotification(TranslateCap('paid_rental', ESX.Math.GroupDigits(rental.rent_price), rental.plate)) + else + xPlayer.showNotification(TranslateCap('paid_rental_evicted', ESX.Math.GroupDigits(rental.rent_price), rental.plate)) + unrentals[#unrentals + 1] = {rental.owner, rental.plate} + end + end + end + else + local accounts = json.decode(v[1].accounts) + if accounts.bank < sum then + sum = 0 + local limit = false + for i = 1, #v do + local rental = v[i] + if not limit then + sum = sum + rental.rent_price + if sum > accounts.bank then + sum = sum - rental.rent_price + limit = true + end + else + unrentals[#unrentals + 1] = {rental.owner, rental.plate} + end + end + end + if sum > 0 then + total = total + sum + accounts.bank = accounts.bank - sum + users[#users + 1] = {json.encode(accounts), k} + end + end + end + + if total > 0 then + TriggerEvent('esx_addonaccount:getSharedAccount', 'society_cardealer', function(account) + account.addMoney(total) + end) + end + + if next(users) then + MySQL.prepare.await('UPDATE users SET accounts = ? WHERE identifier = ?', users) + end + + if next(unrentals) then + MySQL.prepare.await('DELETE FROM rented_vehicles WHERE owner = ? AND plate = ?', unrentals) + end + + print(('[^2INFO^7] ^5Rent Payments^7 took ^5%s^7 ms to execute'):format(ESX.Math.Round((os.time() - timeStart) / 1000000, 2))) + end) +end + +TriggerEvent('cron:runAt', 22, 00, PayRent) diff --git a/[esx_addons]/esx_weaponshop/.editorconfig b/[esx_addons]/esx_weaponshop/.editorconfig new file mode 100644 index 00000000..9b425256 --- /dev/null +++ b/[esx_addons]/esx_weaponshop/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 4 +indent_style = tab +end_of_line = crlf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true \ No newline at end of file diff --git a/[esx_addons]/esx_weaponshop/LICENSE b/[esx_addons]/esx_weaponshop/LICENSE new file mode 100644 index 00000000..1c4d0127 --- /dev/null +++ b/[esx_addons]/esx_weaponshop/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_weaponshop + Copyright (C) 2015-2023 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 . + +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_weaponshop Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/[esx_addons]/esx_weaponshop/README.md b/[esx_addons]/esx_weaponshop/README.md new file mode 100644 index 00000000..c19b7e43 --- /dev/null +++ b/[esx_addons]/esx_weaponshop/README.md @@ -0,0 +1,15 @@ +

[ESX] Weapon Shops

Discord - Website - Documentation + +Would it be Los-Santos Without some weapons? No! This resource lets Players spend their hard earned drug money on buying the important things in life - revolvers and RPGs! Users can goto their trusty Ammu-Nation to get some Legal fun or get risky and frisky with the illegal black-market dealer 😉 + +# Legal + +esx_weaponshop - America Simulator! + +Copyright (C) 2015-2023 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/. \ No newline at end of file diff --git a/[esx_addons]/esx_weaponshop/client/main.lua b/[esx_addons]/esx_weaponshop/client/main.lua new file mode 100644 index 00000000..da9edf3d --- /dev/null +++ b/[esx_addons]/esx_weaponshop/client/main.lua @@ -0,0 +1,199 @@ +local HasAlreadyEnteredMarker = false +local LastZone = nil +local CurrentAction = nil +local CurrentActionMsg = '' +local CurrentActionData = {} +local ShopOpen = false + +function OpenBuyLicenseMenu(zone) + ShopOpen = true + local Elements = {{ + icon = "fa-regular fa-money-bill-alt", + unselectable = true, + title = TranslateCap("license_shop_title") + }, { + icon = "fa-regular fa-id-card", + title = TranslateCap("buy_license"), + description = "Price: $"..Config.LicensePrice, + value = "buylicense" + }, { + icon = "fa-solid fa-xmark", + title = TranslateCap("menu_cancel"), + value = "cancel" + }} + + ESX.OpenContext(Config.MenuPosition, Elements, function(menu, element) + if element.value == "buylicense" then + ESX.TriggerServerCallback('esx_weaponshop:buyLicense', function(bought) + if bought then + ESX.CloseContext() + end + end) + end + if element.value == "cancel" then + ESX.CloseContext() + end + end) +end + + + +function OpenShopMenu(zone) + ShopOpen = true + local Elements = {{ + icon = "fa-solid fa-bullseye", + unselectable = true, + description = TranslateCap("weapon_shop_menu_description"), + title = TranslateCap("weapon_shop_menu_title") + }} + for i = 1, #Config.Zones[zone].Items, 1 do + local item = Config.Zones[zone].Items[i] + item.label = ESX.GetWeaponLabel(item.name) + Elements[#Elements + 1] = { + icon = "fa-solid fa-gun", + title = item.label, + description = "Price: $".. ESX.Math.GroupDigits(item.price), + price = item.price, + weaponName = item.name, + value = "buy" + } + end + + ESX.OpenContext(Config.MenuPosition, Elements, function(menu, element) + + if element.value == "buy" then + ESX.TriggerServerCallback('esx_weaponshop:buyWeapon', function(bought) + if bought then + DisplayBoughtScaleform(element.weaponName, element.price) + ESX.CloseContext() + else + PlaySoundFrontend(-1, 'ERROR', 'HUD_AMMO_SHOP_SOUNDSET', false) + end + end, element.weaponName, zone) + end + + end, function(menu) + ShopOpen = false + CurrentAction = 'shop_menu' + CurrentActionMsg = TranslateCap('shop_menu_prompt') + CurrentActionData = { + zone = zone + } + end) +end + +function DisplayBoughtScaleform(weaponName, price) + local scaleform = ESX.Scaleform.Utils.RequestScaleformMovie('MP_BIG_MESSAGE_FREEMODE') + local sec = 4 + + BeginScaleformMovieMethod(scaleform, 'SHOW_WEAPON_PURCHASED') + + ScaleformMovieMethodAddParamTextureNameString(TranslateCap('weapon_bought', ESX.Math.GroupDigits(price))) + ScaleformMovieMethodAddParamTextureNameString(ESX.GetWeaponLabel(weaponName)) + ScaleformMovieMethodAddParamInt(joaat(weaponName)) + ScaleformMovieMethodAddParamTextureNameString('') + ScaleformMovieMethodAddParamInt(100) + EndScaleformMovieMethod() + + PlaySoundFrontend(-1, 'WEAPON_PURCHASE', 'HUD_AMMO_SHOP_SOUNDSET', false) + + CreateThread(function() + while sec > 0 do + Wait(0) + sec = sec - 0.01 + + DrawScaleformMovieFullscreen(scaleform, 255, 255, 255, 255) + end + end) +end + +AddEventHandler('onResourceStop', function(resource) + if resource == GetCurrentResourceName() then + if ShopOpen then + ESX.CloseContext() + end + end +end) + +-- Create Blips +CreateThread(function() + for k, v in pairs(Config.Zones) do + local blipSettings = v.Blip + if blipSettings.Enabled then + for i = 1, #v.Locations, 1 do + local blip = AddBlipForCoord(v.Locations[i]) + + SetBlipSprite(blip, blipSettings.Sprite) + SetBlipDisplay(blip, blipSettings.Display) + SetBlipScale(blip, blipSettings.Scale) + SetBlipColour(blip, blipSettings.Colour) + SetBlipAsShortRange(blip, blipSettings.ShortRange) + + BeginTextCommandSetBlipName("STRING") + AddTextComponentSubstringPlayerName(TranslateCap('map_blip')) + EndTextCommandSetBlipName(blip) + end + end + end +end) + +local TextShown = false +local GetEntityCoords = GetEntityCoords +local CreateThread = CreateThread +local Wait = Wait +local IsControlJustReleased = IsControlJustReleased + +-- Display markers +CreateThread(function() + while true do + local Sleep = 1500 + local InShop = false + local CurrentShop = nil + local coords = GetEntityCoords(ESX.PlayerData.ped) + + for k, v in pairs(Config.Zones) do + for i = 1, #v.Locations, 1 do + if (Config.Type ~= -1 and #(coords - v.Locations[i]) < Config.DrawDistance) then + InShop = true + CurrentShop = v.Locations[i] + Sleep = 0 + if #(coords - CurrentShop) < 2.0 then + if not TextShown then + ESX.TextUI(TranslateCap('shop_menu_prompt')) + TextShown = true + end + if IsControlJustReleased(0, 38) then + if Config.LicenseEnable and v.Legal then + ESX.TriggerServerCallback('esx_license:checkLicense', function(hasWeaponLicense) + if hasWeaponLicense then + OpenShopMenu(k) + else + OpenBuyLicenseMenu(k) + end + end, GetPlayerServerId(PlayerId()), 'weapon') + else + OpenShopMenu(k) + end + end + end + end + DrawMarker(Config.Type, v.Locations[i], 0.0, 0.0, 0.0, 0, 0.0, 0.0, Config.Size.x, Config.Size.y, + Config.Size.z, Config.Color.r, Config.Color.g, Config.Color.b, 100, false, true, 2, false, false, + false, false) + end + end + if not CurrentShop and TextShown then + TextShown = false + ESX.HideUI() + end + if not InShop and ShopOpen then + if ShopOpen then + TextShown = false + ESX.HideUI() + ESX.CloseContext() + ShopOpen = false + end + end + Wait(Sleep) + end +end) diff --git a/[esx_addons]/esx_weaponshop/config.lua b/[esx_addons]/esx_weaponshop/config.lua new file mode 100644 index 00000000..929b9f6a --- /dev/null +++ b/[esx_addons]/esx_weaponshop/config.lua @@ -0,0 +1,194 @@ +Config = {} + +Config.DrawDistance = 10.0 +Config.Size = { x = 1.5, y = 1.5, z = 0.5 } +Config.Color = { r = 0, g = 128, b = 255 } +Config.Type = 1 + +Config.Locale = GetConvar('esx:locale', 'en') +Config.MenuPosition = "right" +Config.OxInventory = ESX.GetConfig().OxInventory + +Config.LicenseEnable = false -- only turn this on if you are using esx_license +Config.LicensePrice = 5000 + +Config.Zones = { + + GunShop = { + Legal = true, + Blip = { + Enabled = true, + Sprite = 110, + Color = 81, + Display = 4, + Scale = 0.7, + ShortRange = true + }, + Items = { + { + name = "WEAPON_PISTOL", + price = 500 + }, + { + name = "WEAPON_FLASHLIGHT", + price = 70 + }, + { + name = "WEAPON_MACHETE", + price = 110 + }, + { + name = "WEAPON_NIGHTSTICK", + price = 150 + }, + { + name = "WEAPON_BAT", + price = 50 + }, + { + name = "WEAPON_STUNGUN", + price = 60 + }, + { + name = "WEAPON_MICROSMG", + price = 1700 + }, + { + name = "WEAPON_ASSAULTRIFLE", + price = 11000 + }, + { + name = "WEAPON_STUNGUN", + price = 60 + }, + { + name = "WEAPON_SPECIALCARBINE", + price = 15000 + }, + { + name = "WEAPON_SNIPERRIFLE", + price = 24000 + }, + { + name = "WEAPON_FIREWORK", + price = 21000 + }, + { + name = "WEAPON_GRENADE", + price = 700 + }, + { + name = "WEAPON_BZGAS", + price = 200 + }, + { + name = "WEAPON_FIREEXTINGUISHER", + price = 100 + }, + { + name = "WEAPON_BALL", + price = 30 + }, + { + name = "WEAPON_SMOKEGRENADE", + price = 100 + }, + }, + Locations = { + vector3(-662.1, -935.3, 20.8), + vector3(810.2, -2157.3, 28.6), + vector3(1693.4, 3759.5, 33.7), + vector3(-330.2, 6083.8, 30.4), + vector3(252.3, -50.0, 68.9), + vector3(22.0, -1107.2, 28.8), + vector3(2567.6, 294.3, 107.7), + vector3(-1117.5, 2698.6, 17.5), + vector3(842.4, -1033.4, 27.1) + } + }, + + BlackWeashop = { + Legal = false, + Blip = { + Enabled = false, + Sprite = 110, + Color = 59, + Display = 4, + Scale = 0.7, + ShortRange = true + }, + Items = { + { + name = "WEAPON_PISTOL", + price = 500 + }, + { + name = "WEAPON_FLASHLIGHT", + price = 70 + }, + { + name = "WEAPON_MACHETE", + price = 110 + }, + { + name = "WEAPON_NIGHTSTICK", + price = 150 + }, + { + name = "WEAPON_BAT", + price = 50 + }, + { + name = "WEAPON_STUNGUN", + price = 60 + }, + { + name = "WEAPON_MICROSMG", + price = 1700 + }, + { + name = "WEAPON_ASSAULTRIFLE", + price = 11000 + }, + { + name = "WEAPON_STUNGUN", + price = 60 + }, + { + name = "WEAPON_SPECIALCARBINE", + price = 15000 + }, + { + name = "WEAPON_SNIPERRIFLE", + price = 24000 + }, + { + name = "WEAPON_FIREWORK", + price = 21000 + }, + { + name = "WEAPON_GRENADE", + price = 700 + }, + { + name = "WEAPON_BZGAS", + price = 200 + }, + { + name = "WEAPON_FIREEXTINGUISHER", + price = 100 + }, + { + name = "WEAPON_BALL", + price = 30 + }, + { + name = "WEAPON_SMOKEGRENADE", + price = 100 + }, + }, + Locations = { + vector3(-1306.2, -394.0, 35.6) + } + } +} diff --git a/[esx_addons]/esx_weaponshop/esx_weaponshop.sql b/[esx_addons]/esx_weaponshop/esx_weaponshop.sql new file mode 100644 index 00000000..10916768 --- /dev/null +++ b/[esx_addons]/esx_weaponshop/esx_weaponshop.sql @@ -0,0 +1,3 @@ +INSERT INTO `licenses` (`type`, `label`) VALUES + ('weapon', "Weapon licence") +; diff --git a/[esx_addons]/esx_weaponshop/fxmanifest.lua b/[esx_addons]/esx_weaponshop/fxmanifest.lua new file mode 100644 index 00000000..4aad1432 --- /dev/null +++ b/[esx_addons]/esx_weaponshop/fxmanifest.lua @@ -0,0 +1,24 @@ +fx_version 'adamant' + +game 'gta5' + +description 'ESX Weapon Shop' +lua54 'yes' +version '1.9.0' + +shared_scripts { + '@es_extended/imports.lua', + '@es_extended/locale.lua', + 'locales/*.lua', + 'config.lua' +} + +server_scripts { + 'server/main.lua' +} + +client_scripts { + 'client/main.lua' +} + +dependency 'es_extended' diff --git a/[esx_addons]/esx_weaponshop/locales/br.lua b/[esx_addons]/esx_weaponshop/locales/br.lua new file mode 100644 index 00000000..391e1b6c --- /dev/null +++ b/[esx_addons]/esx_weaponshop/locales/br.lua @@ -0,0 +1,17 @@ +Locales ['br'] = { + ["license_shop_title"] = "License Shop", + ["weapon_shop_menu_title"] = "Weapon Shop", + ["weapon_shop_menu_description"] = "Buy Weapons", + ["menu_cancel"] = "Cancel", + ['buy_license'] = 'comprar licença de porte de arma?', + ['yes'] = '%s', + ['no'] = 'não', + ['weapon_bought'] = 'comprado por %s R$', + ['not_enough_black'] = 'você não tem dinheiro sujo suficiente', + ['not_enough'] = 'você não tem dinheiro suficiente', + ['already_owned'] = 'você já possui esta arma!', + ['shop_menu_title'] = 'comprar', + ['shop_menu_prompt'] = 'pressione [E] para comprar armas.', + ['shop_menu_item'] = 'R$%s', + ['map_blip'] = 'loja de Armas', +} diff --git a/[esx_addons]/esx_weaponshop/locales/cs.lua b/[esx_addons]/esx_weaponshop/locales/cs.lua new file mode 100644 index 00000000..41b9401f --- /dev/null +++ b/[esx_addons]/esx_weaponshop/locales/cs.lua @@ -0,0 +1,17 @@ +Locales ['cs'] = { + ["license_shop_title"] = "License Shop", + ["weapon_shop_menu_title"] = "Weapon Shop", + ["weapon_shop_menu_description"] = "Buy Weapons", + ["menu_cancel"] = "Cancel", + ['buy_license'] = 'zakoupit zbrojni prukaz?', + ['yes'] = '%s', + ['no'] = 'ne', + ['weapon_bought'] = 'zakoupeno za $%s', + ['not_enough_black'] = 'nemas dostatek spinavych penez', + ['not_enough'] = 'nemas dostatek penez', + ['already_owned'] = 'tuhle zbran jiz vlastnis!', + ['shop_menu_title'] = 'ammu-Nation', + ['shop_menu_prompt'] = 'stiskni [E] pro pristup do Ammu-Nationu.', + ['shop_menu_item'] = '$%s', + ['map_blip'] = 'ammu-Nation', +} diff --git a/[esx_addons]/esx_weaponshop/locales/de.lua b/[esx_addons]/esx_weaponshop/locales/de.lua new file mode 100644 index 00000000..bfc1ab89 --- /dev/null +++ b/[esx_addons]/esx_weaponshop/locales/de.lua @@ -0,0 +1,17 @@ +Locales ['de'] = { + ["license_shop_title"] = "License Shop", + ["weapon_shop_menu_title"] = "Weapon Shop", + ["weapon_shop_menu_description"] = "Buy Weapons", + ["menu_cancel"] = "Cancel", + ['buy_license'] = 'Waffenlizenz kaufen?', + ['yes'] = '%s', + ['no'] = 'Nein', + ['weapon_bought'] = 'Gekauft für %s EUR', + ['not_enough_black'] = 'Du hast nicht genug Schwarzgeld', + ['not_enough'] = 'Du hast nicht genug Geld', + ['already_owned'] = 'Du besitzt diese Waffe bereits', + ['shop_menu_title'] = 'Geschäft', + ['shop_menu_prompt'] = 'Drücke [E] um auf das Geschäft zuzugreifen.', + ['shop_menu_item'] = '%s EUR', + ['map_blip'] = 'Waffenladen', +} diff --git a/[esx_addons]/esx_weaponshop/locales/en.lua b/[esx_addons]/esx_weaponshop/locales/en.lua new file mode 100644 index 00000000..7c9b14de --- /dev/null +++ b/[esx_addons]/esx_weaponshop/locales/en.lua @@ -0,0 +1,16 @@ +Locales ['en'] = { + ["license_shop_title"] = "License Shop", + ["weapon_shop_menu_title"] = "Weapon Shop", + ["weapon_shop_menu_description"] = "Buy Weapons", + ["menu_cancel"] = "Cancel", + ['buy_license'] = 'Buy weapon license?', + ['yes'] = '%s', + ['no'] = 'no', + ['weapon_bought'] = 'purchased for $%s', + ['not_enough_black'] = 'you do not have enough dirty money', + ['not_enough'] = 'you do not have enough money', + ['already_owned'] = 'you already own this weapon!', + ['shop_menu_title'] = 'ammu-Nation', + ['shop_menu_prompt'] = 'press [E] to access the Ammu-Nation.', + ['map_blip'] = 'Ammu-Nation', +} diff --git a/[esx_addons]/esx_weaponshop/locales/es.lua b/[esx_addons]/esx_weaponshop/locales/es.lua new file mode 100644 index 00000000..46a6b20d --- /dev/null +++ b/[esx_addons]/esx_weaponshop/locales/es.lua @@ -0,0 +1,17 @@ +Locales ['es'] = { + ["license_shop_title"] = "License Shop", + ["weapon_shop_menu_title"] = "Weapon Shop", + ["weapon_shop_menu_description"] = "Buy Weapons", + ["menu_cancel"] = "Cancel", + ['buy_license'] = '¿comprar la licencia de armas?', + ['yes'] = '%s', + ['no'] = 'no', + ['weapon_bought'] = 'comprada por $%s', + ['not_enough_black'] = 'usted no tiene ~r~suficiente dinero negro', + ['not_enough'] = 'usted no tiene ~r~suficiente dinero', + ['already_owned'] = '¡Ya dispones de esta arma!', + ['shop_menu_title'] = 'tienda', + ['shop_menu_prompt'] = 'presione [E] para acceder a la tienda.', + ['shop_menu_item'] = '$%s', + ['map_blip'] = 'ammu-Nation', +} diff --git a/[esx_addons]/esx_weaponshop/locales/et.lua b/[esx_addons]/esx_weaponshop/locales/et.lua new file mode 100644 index 00000000..1aa3f7cc --- /dev/null +++ b/[esx_addons]/esx_weaponshop/locales/et.lua @@ -0,0 +1,16 @@ +Locales ['et'] = { + ["license_shop_title"] = "Lubade pood", + ["weapon_shop_menu_title"] = "Relvapood", + ["weapon_shop_menu_description"] = "Osta relv", + ["menu_cancel"] = "Katkesta", + ['buy_license'] = 'Osta relvaluba?', + ['yes'] = '%s', + ['no'] = 'Ei', + ['weapon_bought'] = 'Ostetud $%s eest', + ['not_enough_black'] = 'Sul pole piisavalt musta raha', + ['not_enough'] = 'Sul pole piisavalt raha', + ['already_owned'] = 'Sa juba omad seda relva!', + ['shop_menu_title'] = 'Relvapood', + ['shop_menu_prompt'] = 'Vajuta [E] ,et kuvada relvapood.', + ['map_blip'] = 'Relvapood', +} diff --git a/[esx_addons]/esx_weaponshop/locales/fi.lua b/[esx_addons]/esx_weaponshop/locales/fi.lua new file mode 100644 index 00000000..1eec25cb --- /dev/null +++ b/[esx_addons]/esx_weaponshop/locales/fi.lua @@ -0,0 +1,17 @@ +Locales ['fi'] = { + ["license_shop_title"] = "License Shop", + ["weapon_shop_menu_title"] = "Weapon Shop", + ["weapon_shop_menu_description"] = "Buy Weapons", + ["menu_cancel"] = "Cancel", + ['buy_license'] = 'osta lisenssi?', + ['yes'] = '%s', + ['no'] = 'ei', + ['weapon_bought'] = 'purchased for %s EUR', + ['not_enough_black'] = 'ei tarpeeksi likaista rahaa', + ['not_enough'] = 'sinulla ei ole tarpeeksi rahaa', + ['already_owned'] = 'you already own this weapon!', + ['shop_menu_title'] = 'kauppa', + ['shop_menu_prompt'] = 'paina [E] avataksesi kauppa ikkuna.', + ['shop_menu_item'] = '%s EUR', + ['map_blip'] = 'asekauppa', +} diff --git a/[esx_addons]/esx_weaponshop/locales/fr.lua b/[esx_addons]/esx_weaponshop/locales/fr.lua new file mode 100644 index 00000000..05e3ad5d --- /dev/null +++ b/[esx_addons]/esx_weaponshop/locales/fr.lua @@ -0,0 +1,17 @@ +Locales ['fr'] = { + ["license_shop_title"] = "License Shop", + ["weapon_shop_menu_title"] = "Weapon Shop", + ["weapon_shop_menu_description"] = "Buy Weapons", + ["menu_cancel"] = "Cancel", + ['buy_license'] = 'acheter une license?', + ['yes'] = '%s', + ['no'] = 'non', + ['weapon_bought'] = 'acheté pour %s EUR', + ['not_enough_black'] = 'Vous n\'avez ~r~pas assez d\'argent sale', + ['not_enough'] = 'vous n\'avez ~r~pas assez d\'argent', + ['already_owned'] = 'vous possédez déjà cette arme!', + ['shop_menu_title'] = 'magasin', + ['shop_menu_prompt'] = 'appuyez sur [E] pour accéder au magasin.', + ['shop_menu_item'] = '%s EUR', + ['map_blip'] = 'armurerie', +} diff --git a/[esx_addons]/esx_weaponshop/locales/hu.lua b/[esx_addons]/esx_weaponshop/locales/hu.lua new file mode 100644 index 00000000..f7bcd5c8 --- /dev/null +++ b/[esx_addons]/esx_weaponshop/locales/hu.lua @@ -0,0 +1,17 @@ +Locales ['hu'] = { + ["license_shop_title"] = "License Shop", + ["weapon_shop_menu_title"] = "Weapon Shop", + ["weapon_shop_menu_description"] = "Buy Weapons", + ["menu_cancel"] = "Cancel", + ['buy_license'] = 'Veszel fegyver engedélyt?', + ['yes'] = '%s', + ['no'] = 'Igen', + ['weapon_bought'] = 'Megvetted ennyiért: %s$', + ['not_enough_black'] = 'Nincsen elég pénzed', + ['not_enough'] = 'Nincsen elég pénzed', + ['already_owned'] = 'Van már ilyened!', + ['shop_menu_title'] = 'Fegyverbolt', + ['shop_menu_prompt'] = 'Nyomj [E] hogy megnézd a kinálatot', + ['shop_menu_item'] = '%s$', + ['map_blip'] = 'Fegyverbolt', +} diff --git a/[esx_addons]/esx_weaponshop/locales/it.lua b/[esx_addons]/esx_weaponshop/locales/it.lua new file mode 100644 index 00000000..5755db8c --- /dev/null +++ b/[esx_addons]/esx_weaponshop/locales/it.lua @@ -0,0 +1,17 @@ +Locales ['it'] = { + ["license_shop_title"] = "License Shop", + ["weapon_shop_menu_title"] = "Weapon Shop", + ["weapon_shop_menu_description"] = "Buy Weapons", + ["menu_cancel"] = "Cancel", + ['buy_license'] = 'acquistare porto il d\'armi?', + ['yes'] = '%si', + ['no'] = 'no', + ['weapon_bought'] = 'acquistato per $%s', + ['not_enough_black'] = 'non hai ~r~abbastanza soldi sporchi', + ['not_enough'] = 'non hai ~r~abbastanza soldi', + ['already_owned'] = 'Hai già quest arma!', + ['shop_menu_title'] = 'Ammu-Nation', + ['shop_menu_prompt'] = 'premere [E] per accedere al negozio', + ['shop_menu_item'] = '$%s', + ['map_blip'] = 'Ammu-Nation', + } diff --git a/[esx_addons]/esx_weaponshop/locales/nl.lua b/[esx_addons]/esx_weaponshop/locales/nl.lua new file mode 100644 index 00000000..1a1ccb38 --- /dev/null +++ b/[esx_addons]/esx_weaponshop/locales/nl.lua @@ -0,0 +1,17 @@ +Locales ['nl'] = { + ["license_shop_title"] = "License Shop", + ["weapon_shop_menu_title"] = "Weapon Shop", + ["weapon_shop_menu_description"] = "Buy Weapons", + ["menu_cancel"] = "Cancel", + ['buy_license'] = 'Koop een wapen vergunning?', + ['yes'] = '%s', + ['no'] = 'Nee', + ['weapon_bought'] = 'gekocht voor $%s', + ['not_enough_black'] = 'Je hebt niet genoeg zwart geld', + ['not_enough'] = 'je hebt niet genoeg geld', + ['already_owned'] = 'je hebt dit wapen al!', + ['shop_menu_title'] = 'Wapen winkel', + ['shop_menu_prompt'] = 'druk op [E] om de Wapen winkel te bezoeken.', + ['shop_menu_item'] = '$%s', + ['map_blip'] = 'Wapen winkel', +} diff --git a/[esx_addons]/esx_weaponshop/locales/pl.lua b/[esx_addons]/esx_weaponshop/locales/pl.lua new file mode 100644 index 00000000..f0b5171a --- /dev/null +++ b/[esx_addons]/esx_weaponshop/locales/pl.lua @@ -0,0 +1,17 @@ +Locales ['pl'] = { + ["license_shop_title"] = "License Shop", + ["weapon_shop_menu_title"] = "Weapon Shop", + ["weapon_shop_menu_description"] = "Buy Weapons", + ["menu_cancel"] = "Cancel", + ['buy_license'] = 'czy chcesz kupić licencję?', + ['yes'] = '%s', + ['no'] = 'nie', + ['weapon_bought'] = 'purchased for %s PLN', + ['not_enough_black'] = 'nie masz wystarczająco brudnej kasy', + ['not_enough'] = 'nie masz wystarczająco pieniędzy', + ['already_owned'] = 'you already own this weapon!', + ['shop_menu_title'] = 'sklep', + ['shop_menu_prompt'] = 'Wciśnij [E] aby otworzyć sklep.', + ['shop_menu_item'] = '%s PLN', + ['map_blip'] = 'sklep z bronią', +} diff --git a/[esx_addons]/esx_weaponshop/locales/si.lua b/[esx_addons]/esx_weaponshop/locales/si.lua new file mode 100644 index 00000000..a8aa8733 --- /dev/null +++ b/[esx_addons]/esx_weaponshop/locales/si.lua @@ -0,0 +1,17 @@ +Locales ['si'] = { + ["license_shop_title"] = "License Shop", + ["weapon_shop_menu_title"] = "Weapon Shop", + ["weapon_shop_menu_description"] = "Buy Weapons", + ["menu_cancel"] = "Cancel", + ['buy_license'] = 'kupiti dovoljenje za orožje?', + ['yes'] = '%s', + ['no'] = 'ne', + ['weapon_bought'] = 'kupljeno za $%s', + ['not_enough_black'] = 'nimaš dovolj umazanega denarja', + ['not_enough'] = 'nimaš dovolj denarja', + ['already_owned'] = 'to orožje že imaš!', + ['shop_menu_title'] = 'Orozarna', + ['shop_menu_prompt'] = 'pritisnite [E] za dostop do Ammu-Nation.', + ['shop_menu_item'] = '$%s', + ['map_blip'] = 'Orozarna', +} diff --git a/[esx_addons]/esx_weaponshop/locales/sv.lua b/[esx_addons]/esx_weaponshop/locales/sv.lua new file mode 100644 index 00000000..dc5a705d --- /dev/null +++ b/[esx_addons]/esx_weaponshop/locales/sv.lua @@ -0,0 +1,17 @@ +Locales ['sv'] = { + ["license_shop_title"] = "Licens Affär", + ["weapon_shop_menu_title"] = "Vapen Affär", + ["weapon_shop_menu_description"] = "Köp Vapen", + ["menu_cancel"] = "Avbryt", + ['buy_license'] = 'Köpa vapenlicens?', + ['yes'] = '%s', + ['no'] = 'Nej', + ['weapon_bought'] = 'Köpt för %s SEK', + ['not_enough_black'] = 'Du har inte tillräckligt med svarta pengar', + ['not_enough'] = 'Du har inte tillräckligt med pengar', + ['already_owned'] = 'Du äger redan det här vapnet!', + ['shop_menu_title'] = 'Vapenaffär', + ['shop_menu_prompt'] = 'Tryck [E] för att komma åt vapenaffären.', + ['shop_menu_item'] = '%s SEK', + ['map_blip'] = 'Vapenaffär', +} diff --git a/[esx_addons]/esx_weaponshop/localization/en.sql b/[esx_addons]/esx_weaponshop/localization/en.sql new file mode 100644 index 00000000..aef5f845 --- /dev/null +++ b/[esx_addons]/esx_weaponshop/localization/en.sql @@ -0,0 +1,58 @@ + + +CREATE TABLE `weashops` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `zone` varchar(255) NOT NULL, + `item` varchar(255) NOT NULL, + `price` int(11) NOT NULL, + + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `licenses` (`type`, `label`) VALUES + ('weapon', "Weapons license") +; + +INSERT INTO `weashops` (`zone`, `item`, `price`) VALUES + ('GunShop','WEAPON_PISTOL', 300), + ('BlackWeashop','WEAPON_PISTOL', 500), + ('GunShop', 'WEAPON_FLASHLIGHT', 60), + ('BlackWeashop', 'WEAPON_FLASHLIGHT', 70), + ('GunShop', 'WEAPON_MACHETE', 90), + ('BlackWeashop', 'WEAPON_MACHETE', 110), + ('GunShop', 'WEAPON_NIGHTSTICK', 150), + ('BlackWeashop', 'WEAPON_NIGHTSTICK', 150), + ('GunShop', 'WEAPON_BAT', 100), + ('BlackWeashop', 'WEAPON_BAT', 100), + ('GunShop', 'WEAPON_STUNGUN', 50), + ('BlackWeashop', 'WEAPON_STUNGUN', 50), + ('GunShop', 'WEAPON_MICROSMG', 1400), + ('BlackWeashop', 'WEAPON_MICROSMG', 1700), + ('GunShop', 'WEAPON_PUMPSHOTGUN', 3400), + ('BlackWeashop', 'WEAPON_PUMPSHOTGUN', 3500), + ('GunShop', 'WEAPON_ASSAULTRIFLE', 10000), + ('BlackWeashop', 'WEAPON_ASSAULTRIFLE', 11000), + ('GunShop', 'WEAPON_SPECIALCARBINE', 15000), + ('BlackWeashop', 'WEAPON_SPECIALCARBINE', 16500), + ('GunShop', 'WEAPON_SNIPERRIFLE', 22000), + ('BlackWeashop', 'WEAPON_SNIPERRIFLE', 24000), + ('GunShop', 'WEAPON_FIREWORK', 18000), + ('BlackWeashop', 'WEAPON_FIREWORK', 20000), + ('GunShop', 'WEAPON_GRENADE', 500), + ('BlackWeashop', 'WEAPON_GRENADE', 650), + ('GunShop', 'WEAPON_BZGAS', 200), + ('BlackWeashop', 'WEAPON_BZGAS', 350), + ('GunShop', 'WEAPON_FIREEXTINGUISHER', 100), + ('BlackWeashop', 'WEAPON_FIREEXTINGUISHER', 100), + ('GunShop', 'WEAPON_BALL', 50), + ('BlackWeashop', 'WEAPON_BALL', 50), + ('GunShop', 'WEAPON_SMOKEGRENADE', 100), + ('BlackWeashop', 'WEAPON_SMOKEGRENADE', 100), + ('BlackWeashop', 'WEAPON_APPISTOL', 1100), + ('BlackWeashop', 'WEAPON_CARBINERIFLE', 12000), + ('BlackWeashop', 'WEAPON_HEAVYSNIPER', 30000), + ('BlackWeashop', 'WEAPON_MINIGUN', 45000), + ('BlackWeashop', 'WEAPON_RAILGUN', 50000), + ('BlackWeashop', 'WEAPON_STICKYBOMB', 500) +; diff --git a/[esx_addons]/esx_weaponshop/localization/si.sql b/[esx_addons]/esx_weaponshop/localization/si.sql new file mode 100644 index 00000000..61334eb8 --- /dev/null +++ b/[esx_addons]/esx_weaponshop/localization/si.sql @@ -0,0 +1,58 @@ + + +CREATE TABLE `weashops` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `zone` varchar(255) NOT NULL, + `item` varchar(255) NOT NULL, + `price` int(11) NOT NULL, + + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; + + +INSERT INTO `licenses` (`type`, `label`) VALUES + ('weapon', "Licenca za Orozje") +; + +INSERT INTO `weashops` (`zone`, `item`, `price`) VALUES + ('GunShop','WEAPON_PISTOL', 300), + ('BlackWeashop','WEAPON_PISTOL', 500), + ('GunShop', 'WEAPON_FLASHLIGHT', 60), + ('BlackWeashop', 'WEAPON_FLASHLIGHT', 70), + ('GunShop', 'WEAPON_MACHETE', 90), + ('BlackWeashop', 'WEAPON_MACHETE', 110), + ('GunShop', 'WEAPON_NIGHTSTICK', 150), + ('BlackWeashop', 'WEAPON_NIGHTSTICK', 150), + ('GunShop', 'WEAPON_BAT', 100), + ('BlackWeashop', 'WEAPON_BAT', 100), + ('GunShop', 'WEAPON_STUNGUN', 50), + ('BlackWeashop', 'WEAPON_STUNGUN', 50), + ('GunShop', 'WEAPON_MICROSMG', 1400), + ('BlackWeashop', 'WEAPON_MICROSMG', 1700), + ('GunShop', 'WEAPON_PUMPSHOTGUN', 3400), + ('BlackWeashop', 'WEAPON_PUMPSHOTGUN', 3500), + ('GunShop', 'WEAPON_ASSAULTRIFLE', 10000), + ('BlackWeashop', 'WEAPON_ASSAULTRIFLE', 11000), + ('GunShop', 'WEAPON_SPECIALCARBINE', 15000), + ('BlackWeashop', 'WEAPON_SPECIALCARBINE', 16500), + ('GunShop', 'WEAPON_SNIPERRIFLE', 22000), + ('BlackWeashop', 'WEAPON_SNIPERRIFLE', 24000), + ('GunShop', 'WEAPON_FIREWORK', 18000), + ('BlackWeashop', 'WEAPON_FIREWORK', 20000), + ('GunShop', 'WEAPON_GRENADE', 500), + ('BlackWeashop', 'WEAPON_GRENADE', 650), + ('GunShop', 'WEAPON_BZGAS', 200), + ('BlackWeashop', 'WEAPON_BZGAS', 350), + ('GunShop', 'WEAPON_FIREEXTINGUISHER', 100), + ('BlackWeashop', 'WEAPON_FIREEXTINGUISHER', 100), + ('GunShop', 'WEAPON_BALL', 50), + ('BlackWeashop', 'WEAPON_BALL', 50), + ('GunShop', 'WEAPON_SMOKEGRENADE', 100), + ('BlackWeashop', 'WEAPON_SMOKEGRENADE', 100), + ('BlackWeashop', 'WEAPON_APPISTOL', 1100), + ('BlackWeashop', 'WEAPON_CARBINERIFLE', 12000), + ('BlackWeashop', 'WEAPON_HEAVYSNIPER', 30000), + ('BlackWeashop', 'WEAPON_MINIGUN', 45000), + ('BlackWeashop', 'WEAPON_RAILGUN', 50000), + ('BlackWeashop', 'WEAPON_STICKYBOMB', 500) +; diff --git a/[esx_addons]/esx_weaponshop/server/main.lua b/[esx_addons]/esx_weaponshop/server/main.lua new file mode 100644 index 00000000..72399187 --- /dev/null +++ b/[esx_addons]/esx_weaponshop/server/main.lua @@ -0,0 +1,64 @@ + +ESX.RegisterServerCallback('esx_weaponshop:buyLicense', function(source, cb) + local xPlayer = ESX.GetPlayerFromId(source) + + if xPlayer.getMoney() >= Config.LicensePrice then + xPlayer.removeMoney(Config.LicensePrice, "Weapon License") + + TriggerEvent('esx_license:addLicense', source, 'weapon', function() + cb(true) + end) + else + xPlayer.showNotification(TranslateCap('not_enough')) + cb(false) + end +end) + +ESX.RegisterServerCallback('esx_weaponshop:buyWeapon', function(source, cb, weaponName, zone) + local xPlayer = ESX.GetPlayerFromId(source) + local price = GetPrice(weaponName, zone) + + if price <= 0 then + + print(('[^3WARNING^7] Player ^5%s^7 attempted to buy Invalid weapon - %s!'):format(source, weaponName)) + cb(false) + else + if xPlayer.hasWeapon(weaponName) then + xPlayer.showNotification(TranslateCap('already_owned')) + cb(false) + else + if zone == 'BlackWeashop' then + if xPlayer.getAccount('black_money').money >= price then + xPlayer.removeAccountMoney('black_money', price, "Black Weapons Deal") + xPlayer.addWeapon(weaponName, 42) + + cb(true) + else + xPlayer.showNotification(TranslateCap('not_enough_black')) + cb(false) + end + else + if xPlayer.getMoney() >= price then + xPlayer.removeMoney(price, "Weapons Deal") + xPlayer.addWeapon(weaponName, 42) + + cb(true) + else + xPlayer.showNotification(TranslateCap('not_enough')) + cb(false) + end + end + end + end +end) + +function GetPrice(weaponName, zone) + for i=1, #(Config.Zones[zone].Items) do + if Config.Zones[zone].Items[i].name == weaponName then + local weapon = Config.Zones[zone].Items[i] + return weapon.price + end + end + + return -1 +end diff --git a/esx_example/LICENSE b/esx_example/LICENSE new file mode 100644 index 00000000..9f54b358 --- /dev/null +++ b/esx_example/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + 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_example + Copyright (C) 2015-2023 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 . + +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_example Copyright (C) 2015-2023 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 +. + + 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 +. \ No newline at end of file diff --git a/esx_example/README.md b/esx_example/README.md new file mode 100644 index 00000000..c23e9e9c --- /dev/null +++ b/esx_example/README.md @@ -0,0 +1,51 @@ +### ESX Imports +##### Similar to importing the ESX locale functions or MySQL-Async, there is now an import for ESX +- Define `shared_script '@es_extended/imports.lua'` above all other scripts in your fxmanifest +- This will define the ESX object for both the client and server +##### The following event handler will also be created on the client +```lua + AddEventHandler('esx:setPlayerData', function(key, val) + if GetInvokingResource() == 'es_extended' then + ESX.PlayerData[key] = val + if OnPlayerData ~= nil then OnPlayerData(key, val) end + end + end) + ``` +- You will now receive updated ESX.PlayerData values whenever they change + - This does not include inventory or loadout data and it should still be retrieved with `ESX.GetPlayerData()` + - You can add your own functions to the import if you believe they will be useful in your resources + - You can trigger certain events or functions based on the key and value received (example in client.lua) + - The idea of this function is ensuring up-to-date values for `job, accounts, ped, and dead` + - You can set any data this way if you want to share it between resources + - Using `ESX.SetPlayerData('cuffed', true)` will create and set a new value that you can now reference anywhere + - If you are using OneSync you could set certain values to set a state bag (useful for other players to reference) + + +### Replacement for ESX.GetPlayers() +##### Old resources would utilise the ESX.GetPlayers() function in a loop with ESX.GetPlayerFromId() to retrieve xPlayer data +- This can be referred to as an xPlayer loop, and has been the cause for server hitches in resources such as esx_society and esx_status +- It is commonly used in robbery scripts to get the active number of cops, or for determining the number of EMS in other places +##### This method is outdated and should be replaced if you are using ESX Legacy +```lua + local xPlayers = ESX.GetPlayers() + for i=1, #xPlayers, 1 do + local xPlayer = ESX.GetPlayerFromId(xPlayers[i]) + if xPlayer.job.name == 'police' then + TriggerClientEvent('esx:showNotification', xPlayers[i], 'You are a cop!') + end + end +``` +##### This new method retrieves all xPlayer data at once, reducing the number of function references being called +```lua + local xPlayers = ESX.GetExtendedPlayers() -- Returns all xPlayers + for _, xPlayer in pairs(xPlayers) do + if xPlayer.job.name == 'police' then + TriggerClientEvent('esx:showNotification', xPlayer.source, 'You are a cop!') + end + end + + local xPlayers = ESX.GetExtendedPlayers('job', 'police') -- Returns xPlayers with the police job + for _, xPlayer in pairs(xPlayers) do + TriggerClientEvent('esx:showNotification', xPlayer.source, 'You are a cop!') + end +``` diff --git a/esx_example/client/main.lua b/esx_example/client/main.lua new file mode 100644 index 00000000..696a6fa8 --- /dev/null +++ b/esx_example/client/main.lua @@ -0,0 +1,72 @@ +RegisterNetEvent('esx:playerLoaded') -- Store the players data +AddEventHandler('esx:playerLoaded', function(xPlayer, isNew) + print(('Player Loaded. New | %s'):format(isNew)) + ESX.PlayerData = xPlayer + ESX.PlayerLoaded = true +end) + +RegisterNetEvent('esx:playerLogout') -- When a player logs out (multicharacter), reset their data +AddEventHandler('esx:playerLogout', function() + ESX.PlayerLoaded = false + ESX.PlayerData = {} +end) + +-- These two functions can perform the same task +RegisterNetEvent('esx:setJob') +AddEventHandler('esx:setJob', function(job) + print('PlayerData.job was set to '..job) + if ESX.PlayerData.job.name ~= job.name then + print('You are now in a different job') + end + ESX.PlayerData.job = job +end) + +function OnPlayerData(key, val, last) + if type(val) == 'table' then val = json.encode(val) end + print(('PlayerData.%s was set to %s'):format(key, val)) + if key == 'job' then + if last.name ~= val.name then + print('You are now in a different job') + end + elseif key == 'dead' then -- However, this function can be used for other PlayerData + if val == true then + print('You die too easily') + SetTimeout(2000, function() + if ESX.PlayerData.dead then + print('Why are you still dead?') + end + end) + end + end +end +----------------------------------------------- + +RegisterCommand('closestobject', function() + local result = ESX.Game.GetClosestObject(GetEntityCoords(PlayerPedId())) + print(result) +end) + +RegisterCommand('closestped', function() + local result = ESX.Game.GetClosestPed(GetEntityCoords(PlayerPedId())) + print(result) +end) + +RegisterCommand('closestplayer', function() + local result = ESX.Game.GetClosestPlayer(GetEntityCoords(PlayerPedId())) + print(result) +end) + +RegisterCommand('closestvehicle', function() + local result = ESX.Game.GetClosestVehicle(GetEntityCoords(PlayerPedId())) + print(result) +end) + +RegisterCommand('areaplayer', function() + local result = ESX.Game.GetPlayersInArea(GetEntityCoords(PlayerPedId()), 20) + print(json.encode(result)) +end) + +RegisterCommand('areavehicle', function() + local result = ESX.Game.GetVehiclesInArea(GetEntityCoords(PlayerPedId()), 20) + print(json.encode(result)) +end) diff --git a/esx_example/fxmanifest.lua b/esx_example/fxmanifest.lua new file mode 100644 index 00000000..be55f747 --- /dev/null +++ b/esx_example/fxmanifest.lua @@ -0,0 +1,15 @@ +fx_version 'adamant' + +game 'gta5' + +description 'ESX Boilerplate' + +shared_script '@es_extended/imports.lua' + +server_scripts { + 'server/main.lua' +} + +client_scripts { + 'client/main.lua' +} diff --git a/esx_example/server/main.lua b/esx_example/server/main.lua new file mode 100644 index 00000000..cc333502 --- /dev/null +++ b/esx_example/server/main.lua @@ -0,0 +1,43 @@ +CreateThread(function() + Wait(3000) + print('^1Do not run this resource in a live environment, it is solely intended for showcasing ESX functions^0') +end) + +RegisterNetEvent('esx:playerLoaded') -- When a player loads in, we can store some basic information about them locally +AddEventHandler('esx:playerLoaded', function(playerId, xPlayer) + print("Player | ".. playerId .. "spawned in") + ESX.Players[playerId] = xPlayer.job.name +end) + +RegisterNetEvent('esx:setJob') -- The stored data does not sync with the framework unless we tell it to +AddEventHandler('esx:setJob', function(playerId, job) + print("Player | ".. playerId .. " | Changed Job. Job |".. job.label) + ESX.Players[playerId] = job.name +end) + +AddEventHandler('esx:playerDropped', function(playerId, reason) -- Remove any cached data once the player no longer exists + print("Player | ".. playerId .. "Dropped. Reason | ".. reason) + ESX.Players[playerId] = nil +end) + +AddEventHandler('onResourceStart', function(resourceName) -- The resource just restarted so we actually have a fresh copy of ESX.Players from the framework + if (GetCurrentResourceName() == resourceName) then -- Useful if we need to run functions or send events after a restart + local players = {} + for _, xPlayer in pairs(ESX.Players) do + players[xPlayer.source] = xPlayer.job.name + print( ('%s %s is online with player id %s'):format(xPlayer.job.grade_label, xPlayer.name, xPlayer.source) ) + end + ESX.Players = players -- Replace the data as it is a waste of memory + end +end) + +ESX.RegisterCommand('get', 'user', function(xPlayer, args) + print("Player |".. xPlayer.source.. "| Fetching all users.") + local xPlayers = ESX.GetExtendedPlayers(args.key, args.val) -- New hitchless xPlayer loop, with the ability to only return players with specific data + for _, xTarget in pairs(xPlayers) do -- Job and any non-table variable will work, ie. name, group, identifier, source + print("ID - ".. xTarget.source.." | Name - "..xTarget.getName().." | Job - ".. xTarget.job.label) + end +end, true, {help = 'Display all online players with specific player data', validate = false, arguments = { + {name = 'key', help = 'Variable to check (ie. job)', type = 'string'}, + {name = 'val', help = 'Value required (ie. police)', type = 'any'} +}})