mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-31 18:28:52 +00:00
General cleanup, added missing locale strings
This commit is contained in:
@@ -1,19 +1,40 @@
|
||||
# fxserver-esx_clotheshop
|
||||
FXServer ESX ClotheShop
|
||||
# esx_clotheshop
|
||||
|
||||
[REQUIREMENTS]
|
||||
## Requirements
|
||||
- [esx_skin](https://github.com/ESX-Org/esx_clotheshop)
|
||||
|
||||
- esx_skin => https://github.com/FXServer-ESX/fxserver-esx_skin
|
||||
## Download & Installation
|
||||
|
||||
[INSTALLATION]
|
||||
|
||||
1) CD in your resources/[esx] folder
|
||||
2) Clone the repository
|
||||
### Using [fvm](https://github.com/qlaffont/fvm-installer)
|
||||
```
|
||||
git clone https://github.com/FXServer-ESX/fxserver-esx_clotheshop clotheshop
|
||||
fvm install --save --folder=esx esx-org/esx_clotheshop
|
||||
```
|
||||
3) Add this in your server.cfg :
|
||||
|
||||
### Using Git
|
||||
```
|
||||
cd resources
|
||||
git clone https://github.com/ESX-Org/esx_clotheshop [esx]/esx_clotheshop
|
||||
```
|
||||
|
||||
### Manually
|
||||
- Download https://github.com/ESX-Org/esx_clotheshop/archive/master.zip
|
||||
- Put it in the `[esx]` directory
|
||||
|
||||
## Installation
|
||||
- Add this in your `server.cfg`:
|
||||
|
||||
```
|
||||
start esx_clotheshop
|
||||
```
|
||||
|
||||
# Legal
|
||||
### License
|
||||
esx_clotheshop - clothing store
|
||||
|
||||
Copyright (C) 2015-2018 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/.
|
||||
+26
-22
@@ -2,32 +2,36 @@ resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937'
|
||||
|
||||
description 'ESX ClotheShop'
|
||||
|
||||
version '1.0.0'
|
||||
version '1.1.0'
|
||||
|
||||
server_scripts {
|
||||
'@mysql-async/lib/MySQL.lua',
|
||||
'@es_extended/locale.lua',
|
||||
'locales/br.lua',
|
||||
'locales/de.lua',
|
||||
'locales/en.lua',
|
||||
'locales/fi.lua',
|
||||
'locales/fr.lua',
|
||||
'locales/es.lua',
|
||||
'locales/sv.lua',
|
||||
'config.lua',
|
||||
'server/main.lua'
|
||||
'@mysql-async/lib/MySQL.lua',
|
||||
'@es_extended/locale.lua',
|
||||
'locales/br.lua',
|
||||
'locales/de.lua',
|
||||
'locales/en.lua',
|
||||
'locales/fi.lua',
|
||||
'locales/fr.lua',
|
||||
'locales/es.lua',
|
||||
'locales/sv.lua',
|
||||
'config.lua',
|
||||
'server/main.lua'
|
||||
}
|
||||
|
||||
client_scripts {
|
||||
'@es_extended/locale.lua',
|
||||
'locales/br.lua',
|
||||
'locales/de.lua',
|
||||
'locales/en.lua',
|
||||
'locales/fi.lua',
|
||||
'locales/fr.lua',
|
||||
'locales/es.lua',
|
||||
'locales/sv.lua',
|
||||
'config.lua',
|
||||
'client/main.lua'
|
||||
'@es_extended/locale.lua',
|
||||
'locales/br.lua',
|
||||
'locales/de.lua',
|
||||
'locales/en.lua',
|
||||
'locales/fi.lua',
|
||||
'locales/fr.lua',
|
||||
'locales/es.lua',
|
||||
'locales/sv.lua',
|
||||
'config.lua',
|
||||
'client/main.lua'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
'es_extended',
|
||||
'esx_skin'
|
||||
}
|
||||
+8
-9
@@ -11,8 +11,6 @@ local Keys = {
|
||||
}
|
||||
|
||||
ESX = nil
|
||||
local GUI = {}
|
||||
GUI.Time = 0
|
||||
local HasAlreadyEnteredMarker = false
|
||||
local LastZone = nil
|
||||
local CurrentAction = nil
|
||||
@@ -173,8 +171,8 @@ function OpenShopMenu()
|
||||
'pants_2',
|
||||
'shoes_1',
|
||||
'shoes_2',
|
||||
'chain_1',
|
||||
'chain_2',
|
||||
'chain_1',
|
||||
'chain_2',
|
||||
'helmet_1',
|
||||
'helmet_2',
|
||||
'glasses_1',
|
||||
@@ -228,7 +226,7 @@ end)
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
|
||||
Wait(0)
|
||||
Citizen.Wait(1)
|
||||
|
||||
local coords = GetEntityCoords(GetPlayerPed(-1))
|
||||
|
||||
@@ -245,7 +243,7 @@ end)
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
|
||||
Wait(0)
|
||||
Citizen.Wait(10)
|
||||
|
||||
local coords = GetEntityCoords(GetPlayerPed(-1))
|
||||
local isInMarker = false
|
||||
@@ -276,7 +274,7 @@ end)
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
|
||||
Citizen.Wait(0)
|
||||
Citizen.Wait(10)
|
||||
|
||||
if CurrentAction ~= nil then
|
||||
|
||||
@@ -284,17 +282,18 @@ Citizen.CreateThread(function()
|
||||
AddTextComponentString(CurrentActionMsg)
|
||||
DisplayHelpTextFromStringLabel(0, 0, 1, -1)
|
||||
|
||||
if IsControlPressed(0, Keys['E']) and (GetGameTimer() - GUI.Time) > 300 then
|
||||
if IsControlJustReleased(0, Keys['E']) then
|
||||
|
||||
if CurrentAction == 'shop_menu' then
|
||||
OpenShopMenu()
|
||||
end
|
||||
|
||||
CurrentAction = nil
|
||||
GUI.Time = GetGameTimer()
|
||||
|
||||
end
|
||||
|
||||
else
|
||||
Citizen.Wait(500)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
+19
-21
@@ -11,29 +11,27 @@ Config.MarkerType = 1
|
||||
Config.Zones = {}
|
||||
|
||||
Config.Shops = {
|
||||
{x=72.254, y=-1399.102, z=28.376},
|
||||
{x=-703.776, y=-152.258, z=36.415},
|
||||
{x=-167.863, y=-298.969, z=38.733},
|
||||
{x=428.694, y=-800.106, z=28.491},
|
||||
{x=-829.413, y=-1073.710, z=10.328},
|
||||
{x=-1447.797, y=-242.461, z=48.820},
|
||||
{x=11.632, y=6514.224, z=30.877},
|
||||
{x=123.646, y=-219.440, z=53.557},
|
||||
{x=1696.291, y=4829.312, z=41.063},
|
||||
{x=618.093, y=2759.629, z=41.088},
|
||||
{x=1190.550, y=2713.441, z=37.222},
|
||||
{x=-1193.429, y=-772.262, z=16.324},
|
||||
{x=-3172.496, y=1048.133, z=19.863},
|
||||
{x=-1108.441, y=2708.923, z=18.107},
|
||||
{x=72.254, y=-1399.102, z=28.376},
|
||||
{x=-703.776, y=-152.258, z=36.415},
|
||||
{x=-167.863, y=-298.969, z=38.733},
|
||||
{x=428.694, y=-800.106, z=28.491},
|
||||
{x=-829.413, y=-1073.710, z=10.328},
|
||||
{x=-1447.797, y=-242.461, z=48.820},
|
||||
{x=11.632, y=6514.224, z=30.877},
|
||||
{x=123.646, y=-219.440, z=53.557},
|
||||
{x=1696.291, y=4829.312, z=41.063},
|
||||
{x=618.093, y=2759.629, z=41.088},
|
||||
{x=1190.550, y=2713.441, z=37.222},
|
||||
{x=-1193.429, y=-772.262, z=16.324},
|
||||
{x=-3172.496, y=1048.133, z=19.863},
|
||||
{x=-1108.441, y=2708.923, z=18.107}
|
||||
}
|
||||
|
||||
for i=1, #Config.Shops, 1 do
|
||||
|
||||
Config.Zones['Shop_' .. i] = {
|
||||
Pos = Config.Shops[i],
|
||||
Size = Config.MarkerSize,
|
||||
Color = Config.MarkerColor,
|
||||
Type = Config.MarkerType
|
||||
}
|
||||
|
||||
Pos = Config.Shops[i],
|
||||
Size = Config.MarkerSize,
|
||||
Color = Config.MarkerColor,
|
||||
Type = Config.MarkerType
|
||||
}
|
||||
end
|
||||
|
||||
+5
-7
@@ -1,14 +1,12 @@
|
||||
Locales['br'] = {
|
||||
|
||||
['valid_this_purchase'] = 'validar esta compra?',
|
||||
['yes'] = 'sim',
|
||||
['no'] = 'não',
|
||||
['save_in_dressing'] = 'você quer salvar essa roupa?',
|
||||
['name_outfit'] = 'nome da roupa?',
|
||||
['saved_outfit'] = 'roupa salva',
|
||||
['not_enough_money'] = 'você não tem dinheiro suficiente',
|
||||
['press_menu'] = 'pressione ~INPUT_CONTEXT~ para acessar o menu',
|
||||
['clothes'] = 'roupas',
|
||||
['you_paid'] = 'você pagou $',
|
||||
|
||||
}
|
||||
['you_paid'] = 'você pagou ~g~$%s~s~',
|
||||
['save_in_dressing'] = 'você quer salvar essa roupa?',
|
||||
['name_outfit'] = 'nome da roupa?',
|
||||
['saved_outfit'] = 'roupa salva',
|
||||
}
|
||||
+8
-8
@@ -1,12 +1,12 @@
|
||||
Locales['de'] = {
|
||||
|
||||
['valid_this_purchase'] = 'Einkauf bestätigen?',
|
||||
['valid_this_purchase'] = 'einkauf bestätigen?',
|
||||
['yes'] = 'ja',
|
||||
['no'] = 'nein',
|
||||
['name_outfit'] = 'Name des Outfits?',
|
||||
['not_enough_money'] = 'du hast nicht genug Geld',
|
||||
['press_menu'] = 'Drücke ~INPUT_CONTEXT~ um das Menü zu öffnen',
|
||||
['clothes'] = 'Kleidung',
|
||||
['you_paid'] = 'du bezahlst $',
|
||||
|
||||
}
|
||||
['press_menu'] = 'drücke ~INPUT_CONTEXT~ um das Menü zu öffnen',
|
||||
['clothes'] = 'kleidung',
|
||||
['you_paid'] = 'du bezahlst ~g~$%s~s~',
|
||||
['save_in_dressing'] = 'do you want to save the outfit in your property?',
|
||||
['name_outfit'] = 'name des outfits?',
|
||||
['saved_outfit'] = 'the outfit has been saved!',
|
||||
}
|
||||
+5
-6
@@ -1,13 +1,12 @@
|
||||
Locales['en'] = {
|
||||
|
||||
['valid_this_purchase'] = 'validate this purchase?',
|
||||
['yes'] = 'yes',
|
||||
['no'] = 'no',
|
||||
['name_outfit'] = 'name of the outfit?',
|
||||
['not_enough_money'] = 'you do not have enough money',
|
||||
['press_menu'] = 'press ~INPUT_CONTEXT~ to access the menu',
|
||||
['clothes'] = 'clothes',
|
||||
['you_paid'] = 'you paid $',
|
||||
['save_in_dressing'] = 'Do you want to give a name to your outfit ?',
|
||||
|
||||
}
|
||||
['you_paid'] = 'you paid ~g~$%s~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!',
|
||||
}
|
||||
+4
-4
@@ -1,12 +1,12 @@
|
||||
Locales['es'] = {
|
||||
|
||||
['valid_this_purchase'] = '¿Validar esta compra?',
|
||||
['yes'] = 'Si',
|
||||
['no'] = 'No',
|
||||
['name_outfit'] = 'Nombre del traje ?',
|
||||
['not_enough_money'] = 'No tienes suficiente dinero',
|
||||
['press_menu'] = 'Presiona ~INPUT_CONTEXT~ para acceder al menú',
|
||||
['clothes'] = 'Ropa',
|
||||
['you_paid'] = 'Has pagado €',
|
||||
['you_paid'] = 'Has pagado ~g~€%s~s~',
|
||||
['save_in_dressing'] = '¿Quieres darle un nombre a tu vestuario?',
|
||||
}
|
||||
['name_outfit'] = 'nombre del traje?',
|
||||
['saved_outfit'] = 'the outfit has been saved!',
|
||||
}
|
||||
+5
-6
@@ -1,13 +1,12 @@
|
||||
Locales['fi'] = {
|
||||
|
||||
['valid_this_purchase'] = 'varmista tämä ostos?',
|
||||
['yes'] = 'kyllä',
|
||||
['no'] = 'ei',
|
||||
['name_outfit'] = 'asun nimi?',
|
||||
['not_enough_money'] = 'sinulla ei ole tarpeeksi rahaa',
|
||||
['press_menu'] = 'paina ~INPUT_CONTEXT~ avataksesi menu',
|
||||
['clothes'] = 'Vaatekauppa',
|
||||
['you_paid'] = 'sinä maksoit $',
|
||||
['clothes'] = 'vaatekauppa',
|
||||
['you_paid'] = 'sinä maksoit ~g~$%s~s~',
|
||||
['save_in_dressing'] = 'haluatko antaa nimen asulle ?',
|
||||
|
||||
}
|
||||
['name_outfit'] = 'asun nimi?',
|
||||
['saved_outfit'] = 'the outfit has been saved!',
|
||||
}
|
||||
+5
-6
@@ -1,13 +1,12 @@
|
||||
Locales['fr'] = {
|
||||
|
||||
['valid_this_purchase'] = 'valider cet achat ?',
|
||||
['yes'] = 'oui',
|
||||
['no'] = 'non',
|
||||
['name_outfit'] = 'nom de la tenue ?',
|
||||
['not_enough_money'] = 'vous n\'avez pas assez d\'argent',
|
||||
['press_menu'] = 'appuyez sur ~INPUT_CONTEXT~ pour accéder au menu',
|
||||
['clothes'] = 'vêtements',
|
||||
['you_paid'] = 'vous avez payé $',
|
||||
['save_in_dressing'] = 'voulez-vous donner un nom à votre tenue ?',
|
||||
|
||||
}
|
||||
['you_paid'] = 'vous avez payé ~g~$%s~s~',
|
||||
['save_in_dressing'] = 'voulez-vous donner un nom à votre tenue?',
|
||||
['name_outfit'] = 'nom de la tenue?',
|
||||
['saved_outfit'] = 'the outfit has been saved!',
|
||||
}
|
||||
+8
-9
@@ -1,13 +1,12 @@
|
||||
Locales['sv'] = {
|
||||
|
||||
['valid_this_purchase'] = 'bekräfta detta köp?',
|
||||
['valid_this_purchase'] = 'vill du köpa dessa kläder?',
|
||||
['yes'] = 'ja',
|
||||
['no'] = 'nej',
|
||||
['name_outfit'] = 'namn på outfit?',
|
||||
['not_enough_money'] = 'du har inte tillräckligt med pengar',
|
||||
['press_menu'] = 'tryck på ~INPUT_CONTEXT~ för att komma åt menyn',
|
||||
['not_enough_money'] = 'du har ~r~inte råd~s~ för att köpa detta',
|
||||
['press_menu'] = 'tryck ~INPUT_CONTEXT~ för att komma åt menyn',
|
||||
['clothes'] = 'kläder',
|
||||
['you_paid'] = 'du betalade $',
|
||||
['save_in_dressing'] = 'Vill du namnge din outfit?',
|
||||
|
||||
}
|
||||
['you_paid'] = 'du har betalat ~g~$%s~s~',
|
||||
['save_in_dressing'] = 'vill du spara outfiten i din fastighet?',
|
||||
['name_outfit'] = 'vad ska din outfit heta?',
|
||||
['saved_outfit'] = 'outfit har sparats!',
|
||||
}
|
||||
+7
-21
@@ -4,21 +4,18 @@ TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
|
||||
|
||||
RegisterServerEvent('esx_clotheshop:pay')
|
||||
AddEventHandler('esx_clotheshop:pay', function()
|
||||
|
||||
local _source = source
|
||||
local xPlayer = ESX.GetPlayerFromId(_source)
|
||||
local xPlayer = ESX.GetPlayerFromId(_source)
|
||||
|
||||
xPlayer.removeMoney(Config.Price)
|
||||
|
||||
TriggerClientEvent('esx:showNotification', source, _U('you_paid') .. Config.Price)
|
||||
|
||||
TriggerClientEvent('esx:showNotification', _source, _U('you_paid', Config.Price))
|
||||
end)
|
||||
|
||||
RegisterServerEvent('esx_clotheshop:saveOutfit')
|
||||
AddEventHandler('esx_clotheshop:saveOutfit', function(label, skin)
|
||||
|
||||
local _source = source
|
||||
local xPlayer = ESX.GetPlayerFromId(_source)
|
||||
local xPlayer = ESX.GetPlayerFromId(_source)
|
||||
|
||||
TriggerEvent('esx_datastore:getDataStore', 'property', xPlayer.identifier, function(store)
|
||||
|
||||
local dressing = store.get('dressing')
|
||||
@@ -35,25 +32,15 @@ AddEventHandler('esx_clotheshop:saveOutfit', function(label, skin)
|
||||
store.set('dressing', dressing)
|
||||
|
||||
end)
|
||||
|
||||
end)
|
||||
|
||||
ESX.RegisterServerCallback('esx_clotheshop:checkMoney', function(source, cb)
|
||||
|
||||
local _source = source
|
||||
local xPlayer = ESX.GetPlayerFromId(_source)
|
||||
if xPlayer.get('money') >= Config.Price then
|
||||
cb(true)
|
||||
else
|
||||
cb(false)
|
||||
end
|
||||
|
||||
local xPlayer = ESX.GetPlayerFromId(source)
|
||||
cb(xPlayer.get('money') >= Config.Price)
|
||||
end)
|
||||
|
||||
ESX.RegisterServerCallback('esx_clotheshop:checkPropertyDataStore', function(source, cb)
|
||||
|
||||
local _source = source
|
||||
local xPlayer = ESX.GetPlayerFromId(_source)
|
||||
local xPlayer = ESX.GetPlayerFromId(source)
|
||||
local foundStore = false
|
||||
|
||||
TriggerEvent('esx_datastore:getDataStore', 'property', xPlayer.identifier, function(store)
|
||||
@@ -61,5 +48,4 @@ ESX.RegisterServerCallback('esx_clotheshop:checkPropertyDataStore', function(sou
|
||||
end)
|
||||
|
||||
cb(foundStore)
|
||||
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user