mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-08-28 17:01:14 +00:00
Merge branch 'develop' into main
This commit is contained in:
+4
-16
@@ -710,12 +710,13 @@ INSERT INTO `vehicle_categories` (`name`, `label`) VALUES
|
||||
--
|
||||
|
||||
CREATE TABLE `vehicle_sold` (
|
||||
`id` INT(11) NOT NULL,
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`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
|
||||
`date` varchar(50) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
--
|
||||
@@ -847,24 +848,12 @@ ALTER TABLE `user_licenses`
|
||||
ALTER TABLE `vehicle_categories`
|
||||
ADD PRIMARY KEY (`name`);
|
||||
|
||||
--
|
||||
-- Indexes for table `vehicle_sold`
|
||||
--
|
||||
ALTER TABLE `vehicle_sold`
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
--
|
||||
-- Indexes for table `whitelist`
|
||||
--
|
||||
ALTER TABLE `whitelist`
|
||||
ADD PRIMARY KEY (`identifier`);
|
||||
|
||||
--
|
||||
-- Indexes for table `vehicle_sold`
|
||||
--
|
||||
ALTER TABLE `vehicle_sold`
|
||||
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
||||
|
||||
--
|
||||
-- AUTO_INCREMENT for table `addon_account_data`
|
||||
--
|
||||
@@ -1039,5 +1028,4 @@ CREATE TABLE IF NOT EXISTS `banking` (
|
||||
PRIMARY KEY (`ID`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4;
|
||||
|
||||
ALTER TABLE `users` ADD COLUMN `pincode` INT NULL;
|
||||
|
||||
ALTER TABLE `users` ADD COLUMN `pincode` INT NULL;
|
||||
@@ -5,3 +5,8 @@ end)
|
||||
if GetResourceState('ox_inventory') ~= 'missing' then
|
||||
Config.OxInventory = true
|
||||
end
|
||||
|
||||
AddEventHandler("esx:getSharedObject", function()
|
||||
local Invoke = GetInvokingResource()
|
||||
print(("[^1ERROR^7] Resource ^5%s^7 Used the ^5getSharedObject^7 Event, this event ^1no longer exists!^7 Visit https://documentation.esx-framework.org/tutorials/sharedevent for how to fix!"):format(Invoke))
|
||||
end)
|
||||
|
||||
@@ -250,7 +250,9 @@ if not Config.OxInventory then
|
||||
ESX.UI.ShowInventoryItemNotification(true, item, count)
|
||||
end
|
||||
|
||||
ESX.ShowInventory()
|
||||
if Config.EnableDefaultInventory then
|
||||
ESX.ShowInventory()
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('esx:removeInventoryItem')
|
||||
@@ -267,7 +269,9 @@ if not Config.OxInventory then
|
||||
ESX.UI.ShowInventoryItemNotification(false, item, count)
|
||||
end
|
||||
|
||||
ESX.ShowInventory()
|
||||
if Config.EnableDefaultInventory then
|
||||
ESX.ShowInventory()
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('esx:addWeapon')
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
Locales['de'] = {
|
||||
-- Inventory
|
||||
['inventory'] = 'inventar %s / %s',
|
||||
['inventory'] = 'Inventar %s / %s',
|
||||
['use'] = 'benutzen',
|
||||
['give'] = 'geben',
|
||||
['remove'] = 'entfernen',
|
||||
['return'] = 'zurück',
|
||||
['give_to'] = 'geben an',
|
||||
['amount'] = 'betrag',
|
||||
['giveammo'] = 'munition geben',
|
||||
['amountammo'] = 'anzahl der munition',
|
||||
['noammo'] = 'du hast keine munition!',
|
||||
['amount'] = 'Betrag',
|
||||
['giveammo'] = 'Munition geben',
|
||||
['amountammo'] = 'Anzahl der Munition',
|
||||
['noammo'] = 'du hast keine Munition!',
|
||||
['gave_item'] = 'du gibst %sx %s an %s',
|
||||
['received_item'] = 'du empfängst %sx %s von %s',
|
||||
['gave_weapon'] = 'du gibst %s an %s',
|
||||
@@ -26,9 +26,9 @@ Locales['de'] = {
|
||||
['received_account_money'] = 'du empfängst $%s (%s) von %s',
|
||||
['amount_invalid'] = 'ungültiger Betrag',
|
||||
['players_nearby'] = 'keine Spieler in der Nähe',
|
||||
['ex_inv_lim'] = 'aktion nicht möglich, Inventarlimit überschritten für %s',
|
||||
['imp_invalid_quantity'] = 'aktion nicht möglich, ungültige Anzahl',
|
||||
['imp_invalid_amount'] = 'aktion nicht möglich, ungültiger Betrag',
|
||||
['ex_inv_lim'] = 'Aktion nicht möglich, Inventarlimit überschritten für %s',
|
||||
['imp_invalid_quantity'] = 'Aktion nicht möglich, ungültige Anzahl',
|
||||
['imp_invalid_amount'] = 'Aktion nicht möglich, ungültiger Betrag',
|
||||
['threw_standard'] = 'du wirfst %sx %s',
|
||||
['threw_account'] = 'du wirfst $%s %s weg',
|
||||
['threw_weapon'] = 'du wirfst %s weg',
|
||||
@@ -38,71 +38,71 @@ Locales['de'] = {
|
||||
['threw_pickup_prompt'] = 'drücke E um aufzuheben',
|
||||
|
||||
-- Key mapping
|
||||
['keymap_showinventory'] = 'inventar anzeigen',
|
||||
['keymap_showinventory'] = 'Inventar anzeigen',
|
||||
|
||||
-- Salary related
|
||||
['received_salary'] = 'du hast dein Gehalt erhalten: $%s',
|
||||
['received_help'] = 'du hast deine Sozialhilfe erhalten: $%s',
|
||||
['company_nomoney'] = 'die Firma in der du angestellt bist, ist zu arm um dein Gehalt zu zahlen',
|
||||
['company_nomoney'] = 'die Firma in der du angestellt bist, ist zu arm um dir dein Gehalt zu zahlen',
|
||||
['received_paycheck'] = 'erhaltener Gehaltsscheck',
|
||||
['bank'] = 'bank',
|
||||
['account_bank'] = 'bank',
|
||||
['account_black_money'] = 'schwarzgeld',
|
||||
['account_money'] = 'geld',
|
||||
['bank'] = 'Bank',
|
||||
['account_bank'] = 'Bank',
|
||||
['account_black_money'] = 'Schwarzgeld',
|
||||
['account_money'] = 'Geld',
|
||||
|
||||
['act_imp'] = 'Aktion nicht möglich',
|
||||
['in_vehicle'] = 'du kannst keine Items in einem Fahrzeug weitergeben',
|
||||
|
||||
-- Commands
|
||||
['command_car'] = 'fahrzeug spawnen',
|
||||
['command_car_car'] = 'fahrzeug spawn name oder hash',
|
||||
['command_cardel'] = 'fahrzeuge in der nähe löschen',
|
||||
['command_cardel_radius'] = 'optional, jedes fahrzeug innerhalb des angegebenen radius löschen',
|
||||
['command_clear'] = 'chat leeren',
|
||||
['command_clearall'] = 'chat leeren für alle spieler',
|
||||
['command_clearinventory'] = 'spieler inventar leeren',
|
||||
['command_clearloadout'] = 'spieler ausstattung löschen',
|
||||
['command_giveaccountmoney'] = 'gebe guthaben',
|
||||
['command_giveaccountmoney_account'] = 'gültiger account name',
|
||||
['command_giveaccountmoney_amount'] = 'anzahl zum hinzufügen',
|
||||
['command_giveaccountmoney_invalid'] = 'ungültiger account name',
|
||||
['command_giveitem'] = 'gebe ein item zu einem spieler',
|
||||
['command_giveitem_item'] = 'item name',
|
||||
['command_giveitem_count'] = 'item anzahl',
|
||||
['command_giveweapon'] = 'gebe waffe zu einem spieler',
|
||||
['command_giveweapon_weapon'] = 'waffen name',
|
||||
['command_giveweapon_ammo'] = 'munition anzahl',
|
||||
['command_giveweapon_hasalready'] = 'spieler hat bereits diese waffe',
|
||||
['command_giveweaponcomponent'] = 'gebe waffen component',
|
||||
['command_giveweaponcomponent_component'] = 'component name',
|
||||
['command_giveweaponcomponent_invalid'] = 'ungültiges waffen component',
|
||||
['command_giveweaponcomponent_hasalready'] = 'spieler hat bereits dieses waffen komponent',
|
||||
['command_giveweaponcomponent_missingweapon'] = 'spieler hat diese waffe nicht',
|
||||
['command_save'] = 'spieler in die datenbank sichern',
|
||||
['command_saveall'] = 'alle spieler in die datenbank sichern',
|
||||
['command_setaccountmoney'] = 'guthaben für den spieler setzen',
|
||||
['command_setaccountmoney_amount'] = 'guthaben zum setzen',
|
||||
['command_setcoords'] = 'teleportieren zu koordinaten',
|
||||
['command_setcoords_x'] = 'x axis',
|
||||
['command_setcoords_y'] = 'y axis',
|
||||
['command_setcoords_z'] = 'z axis',
|
||||
['command_setjob'] = 'job für einen spieler setzen',
|
||||
['command_setjob_job'] = 'job name',
|
||||
['command_setjob_grade'] = 'job rang',
|
||||
['command_setjob_invalid'] = 'der job, rang oder beides ist ungültig',
|
||||
['command_setgroup'] = 'setze spieler gruppe',
|
||||
['command_setgroup_group'] = 'gruppen name',
|
||||
['commanderror_argumentmismatch'] = 'argumentanzahl stimmt nicht überein (übergeben %s, gesucht %s)',
|
||||
['command_car'] = 'Fahrzeug spawnen',
|
||||
['command_car_car'] = 'Fahrzeug spawnname oder hash',
|
||||
['command_cardel'] = 'Fahrzeuge in der nähe löschen',
|
||||
['command_cardel_radius'] = 'Optional, jedes Fahrzeug innerhalb des angegebenen Radius löschen',
|
||||
['command_clear'] = 'Chat leeren',
|
||||
['command_clearall'] = 'Chat leeren für alle spieler',
|
||||
['command_clearinventory'] = 'Spielerinventar leeren',
|
||||
['command_clearloadout'] = 'Spielerausstattung löschen',
|
||||
['command_giveaccountmoney'] = 'Geld aufs Konto laden',
|
||||
['command_giveaccountmoney_account'] = 'gültiger Kontoname',
|
||||
['command_giveaccountmoney_amount'] = 'Anzahl zum hinzufügen',
|
||||
['command_giveaccountmoney_invalid'] = 'Ungültiger Kontoname',
|
||||
['command_giveitem'] = 'Item an Spieler geben',
|
||||
['command_giveitem_item'] = 'Itemname',
|
||||
['command_giveitem_count'] = 'item Anzahl',
|
||||
['command_giveweapon'] = 'Spieler eine Waffe geben',
|
||||
['command_giveweapon_weapon'] = 'Waffenname',
|
||||
['command_giveweapon_ammo'] = 'Munitionsanzahl',
|
||||
['command_giveweapon_hasalready'] = 'Spieler bereits im Besitz dieser Waffe',
|
||||
['command_giveweaponcomponent'] = 'Spieler Waffenaufsatz geben',
|
||||
['command_giveweaponcomponent_component'] = 'Waffenaufsatz Name',
|
||||
['command_giveweaponcomponent_invalid'] = 'ungültiger Waffenaufsatz',
|
||||
['command_giveweaponcomponent_hasalready'] = 'Spieler hat bereits diesen Waffenaufsatz',
|
||||
['command_giveweaponcomponent_missingweapon'] = 'Der Spieler besitzt diese Waffe nicht',
|
||||
['command_save'] = 'Spieler in der Datenbank sichern',
|
||||
['command_saveall'] = 'Sichern von allen Spielern auf der Datenbank',
|
||||
['command_setaccountmoney'] = 'Kontosumme des Spielers setzen',
|
||||
['command_setaccountmoney_amount'] = 'Summe',
|
||||
['command_setcoords'] = 'Zu den Koordinaten Teleportieren',
|
||||
['command_setcoords_x'] = 'x Position',
|
||||
['command_setcoords_y'] = 'y Position',
|
||||
['command_setcoords_z'] = 'z Position',
|
||||
['command_setjob'] = 'Dem Spieler einen Job setzen',
|
||||
['command_setjob_job'] = 'Name des Jobs',
|
||||
['command_setjob_grade'] = 'Rang des Jobs',
|
||||
['command_setjob_invalid'] = 'Der Rang oder der Job ist nicht gültigt.',
|
||||
['command_setgroup'] = 'Spielergruppe setzen',
|
||||
['command_setgroup_group'] = 'Gruppenname',
|
||||
['commanderror_argumentmismatch'] = 'Die Anzahl der Argumente stimmen nicht überein (übergeben %s, gesucht %s)',
|
||||
['commanderror_argumentmismatch_number'] = 'argument #%s typ stimmt nicht überein (übergeben string, gewünscht zahl)',
|
||||
['commanderror_invaliditem'] = 'falscher item name',
|
||||
['commanderror_invalidweapon'] = 'ungültige waffe',
|
||||
['commanderror_console'] = 'der command kann nicht von der konsole ausgeführt werden',
|
||||
['commanderror_invalidcommand'] = '/%s ist kein verfügbarer command!',
|
||||
['commanderror_invalidplayerid'] = 'kein spieler ist online mit dieser id',
|
||||
['commandgeneric_playerid'] = 'spieler id',
|
||||
['command_giveammo_noweapon_found'] = '%s does not have that weapon',
|
||||
['command_giveammo_weapon'] = 'Weapon name',
|
||||
['command_giveammo_ammo'] = 'Ammo Quantity',
|
||||
['commanderror_invaliditem'] = 'falscher Itemname',
|
||||
['commanderror_invalidweapon'] = 'ungültige Waffe',
|
||||
['commanderror_console'] = 'Der Befehl kann nicht in der Konsole genutzt werden',
|
||||
['commanderror_invalidcommand'] = '/%s ist kein verfügbarer Befehl!',
|
||||
['commanderror_invalidplayerid'] = 'Kein Spieler mit dieser ID scheint online zu sein',
|
||||
['commandgeneric_playerid'] = 'Spieler ID',
|
||||
['command_giveammo_noweapon_found'] = '%s besitzt diese Waffe nicht',
|
||||
['command_giveammo_weapon'] = 'Waffenname',
|
||||
['command_giveammo_ammo'] = 'Munitionsanzahl',
|
||||
|
||||
-- Locale settings
|
||||
['locale_digit_grouping_symbol'] = ' ',
|
||||
@@ -187,34 +187,34 @@ Locales['de'] = {
|
||||
-- Weapon Components
|
||||
['component_clip_default'] = 'standart Griff',
|
||||
['component_clip_extended'] = 'erweiterter Griff',
|
||||
['component_clip_drum'] = 'trommelmagazin',
|
||||
['component_clip_box'] = 'kastenmagazin',
|
||||
['component_flashlight'] = 'taschenlampe',
|
||||
['component_scope'] = 'zielfernrohr',
|
||||
['component_clip_drum'] = 'Trommelmagazin',
|
||||
['component_clip_box'] = 'Kastenmagazin',
|
||||
['component_flashlight'] = 'Taschenlampe',
|
||||
['component_scope'] = 'Zielfernrohr',
|
||||
['component_scope_advanced'] = 'erweitertes Zielfernrohr',
|
||||
['component_suppressor'] = 'schalldämpfer',
|
||||
['component_grip'] = 'griff',
|
||||
['component_luxary_finish'] = 'luxus Waffen Design',
|
||||
['component_suppressor'] = 'Schalldämpfer',
|
||||
['component_grip'] = 'Griff',
|
||||
['component_luxary_finish'] = 'luxus Waffendesign',
|
||||
|
||||
-- Weapon Ammo
|
||||
['ammo_rounds'] = 'kugel(n)',
|
||||
['ammo_shells'] = 'schrotpatrone(n)',
|
||||
['ammo_charge'] = 'ladung',
|
||||
['ammo_petrol'] = 'liter Benzin',
|
||||
['ammo_firework'] = 'feuerwerksrakete(n)',
|
||||
['ammo_rockets'] = 'rakete(n)',
|
||||
['ammo_grenadelauncher'] = 'granate(n)',
|
||||
['ammo_grenade'] = 'granate(n)',
|
||||
['ammo_stickybomb'] = 'bombe(n)',
|
||||
['ammo_pipebomb'] = 'bombe(n)',
|
||||
['ammo_smokebomb'] = 'bombe(n)',
|
||||
['ammo_molotov'] = 'cocktail(s)',
|
||||
['ammo_proxmine'] = 'mine(n)',
|
||||
['ammo_bzgas'] = 'can(n)',
|
||||
['ammo_ball'] = 'ball',
|
||||
['ammo_snowball'] = 'schneebälle',
|
||||
['ammo_flare'] = 'signalfackel(n)',
|
||||
['ammo_flaregun'] = 'signalfackeln(munition)',
|
||||
['ammo_rounds'] = 'Kugel(n)',
|
||||
['ammo_shells'] = 'Schrotpatrone(n)',
|
||||
['ammo_charge'] = 'Ladung',
|
||||
['ammo_petrol'] = 'Benzinkanister',
|
||||
['ammo_firework'] = 'Feuerwerksrakete(n)',
|
||||
['ammo_rockets'] = 'Rakete(n)',
|
||||
['ammo_grenadelauncher'] = 'Granate(n)',
|
||||
['ammo_grenade'] = 'Granate(n)',
|
||||
['ammo_stickybomb'] = 'C4(s)',
|
||||
['ammo_pipebomb'] = 'Rohrbombe(n)',
|
||||
['ammo_smokebomb'] = 'Rauchgranate(n)',
|
||||
['ammo_molotov'] = 'Molotovcocktail(s)',
|
||||
['ammo_proxmine'] = 'Annäherungsmine(n)',
|
||||
['ammo_bzgas'] = 'Bzgas',
|
||||
['ammo_ball'] = 'Ball',
|
||||
['ammo_snowball'] = 'Schneebälle',
|
||||
['ammo_flare'] = 'Signalfackel(n)',
|
||||
['ammo_flaregun'] = 'Signalfackeln(munition)',
|
||||
|
||||
-- Weapon Tints
|
||||
['tint_default'] = 'standard',
|
||||
|
||||
@@ -14,6 +14,10 @@ Core.Pickups = {}
|
||||
Core.PickupId = 0
|
||||
Core.PlayerFunctionOverrides = {}
|
||||
|
||||
AddEventHandler("esx:getSharedObject", function()
|
||||
local Invoke = GetInvokingResource()
|
||||
print(("[^1ERROR^7] Resource ^5%s^7 Used the ^5getSharedObject^7 Event, this event ^1no longer exists!^7 Visit https://documentation.esx-framework.org/tutorials/sharedevent for how to fix!"):format(Invoke))
|
||||
end)
|
||||
|
||||
exports('getSharedObject', function()
|
||||
return ESX
|
||||
|
||||
@@ -99,14 +99,14 @@ if not Config.Multichar then
|
||||
if identifier then
|
||||
if ESX.GetPlayerFromIdentifier(identifier) then
|
||||
deferrals.done(
|
||||
('There was an error loading your character!\nError code: identifier-active\n\nThis error is caused by a player on this server who has the same identifier as you have. Make sure you are not playing on the same account.\n\nYour identifier: %s'):format(
|
||||
('[ESX] There was an error loading your character!\nError code: identifier-active\n\nThis error is caused by a player on this server who has the same identifier as you have. Make sure you are not playing on the same account.\n\nYour identifier: %s'):format(
|
||||
identifier))
|
||||
else
|
||||
deferrals.done()
|
||||
end
|
||||
else
|
||||
deferrals.done(
|
||||
'There was an error loading your character!\nError code: identifier-missing\n\nThe cause of this error is not known, your identifier could not be found. Please come back later or report this problem to the server administration team.')
|
||||
'[ESX] There was an error loading your character!\nError code: identifier-missing\n\nThe cause of this error is not known, your identifier could not be found. Please come back later or report this problem to the server administration team.')
|
||||
end
|
||||
end)
|
||||
end
|
||||
@@ -133,9 +133,9 @@ function loadESXPlayer(identifier, playerId, isNew)
|
||||
end
|
||||
local index = #userData.accounts + 1
|
||||
userData.accounts[index] = {
|
||||
name = account,
|
||||
name = account,
|
||||
money = foundAccounts[account] or Config.StartingAccountMoney[account] or 0,
|
||||
label = data.label,
|
||||
label = data.label,
|
||||
round = data.round,
|
||||
index = index
|
||||
}
|
||||
@@ -299,13 +299,13 @@ function loadESXPlayer(identifier, playerId, isNew)
|
||||
|
||||
xPlayer.triggerEvent('esx:playerLoaded',
|
||||
{
|
||||
accounts = xPlayer.getAccounts(),
|
||||
coords = xPlayer.getCoords(),
|
||||
identifier = xPlayer.getIdentifier(),
|
||||
accounts = xPlayer.getAccounts(),
|
||||
coords = xPlayer.getCoords(),
|
||||
identifier = xPlayer.getIdentifier(),
|
||||
inventory = xPlayer.getInventory(),
|
||||
job = xPlayer.getJob(),
|
||||
loadout = xPlayer.getLoadout(),
|
||||
maxWeight = xPlayer.getMaxWeight(),
|
||||
job = xPlayer.getJob(),
|
||||
loadout = xPlayer.getLoadout(),
|
||||
maxWeight = xPlayer.getMaxWeight(),
|
||||
money = xPlayer.getMoney(),
|
||||
sex = xPlayer.get("sex") or "m",
|
||||
firstName = xPlayer.get("firstName") or "John",
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
const translate = new Object();
|
||||
|
||||
translate.name = "Nombre";
|
||||
translate.job = "Trabajo";
|
||||
translate.bank = "Banco";
|
||||
translate.money = "Dinero";
|
||||
translate.gender = "Género";
|
||||
translate.dob = "Fecha de nacimiento";
|
||||
@@ -29,11 +29,11 @@ AddEventHandler('playerConnecting', function(name, setCallback, deferrals)
|
||||
local identifier = ESX.GetIdentifier(playerId)
|
||||
|
||||
if ESX.Table.SizeOf(AllowList) == 0 then
|
||||
kickReason = TranslateCap('allowlist_empty')
|
||||
kickReason = "[ESX] " .. TranslateCap('allowlist_empty')
|
||||
elseif not identifier then
|
||||
kickReason = TranslateCap('license_missing')
|
||||
kickReason = "[ESX] " .. TranslateCap('license_missing')
|
||||
elseif not AllowList[identifier] then
|
||||
kickReason = TranslateCap('not_allowlist')
|
||||
kickReason = "[ESX] " .. TranslateCap('not_allowlist')
|
||||
end
|
||||
|
||||
if kickReason then
|
||||
|
||||
@@ -29,5 +29,6 @@ client_scripts {
|
||||
dependencies {
|
||||
'es_extended',
|
||||
'esx_skin',
|
||||
'esx_society',
|
||||
'esx_vehicleshop'
|
||||
}
|
||||
|
||||
@@ -5,54 +5,54 @@ Locales['hu'] = {
|
||||
['ems_clothes_ems'] = 'Munkaruha',
|
||||
-- Vehicles
|
||||
['ambulance'] = 'Mentőautó',
|
||||
['helicopter_prompt'] = ' [Információ]:omd meg az [E] gombot a helikopter listához.',
|
||||
['garage_prompt'] = ' [Információ]:omd meg az [E] gombot a kocsi listához.',
|
||||
['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'] = ' [Információ]:keresen tároltad a garázsba!',
|
||||
['garage_has_notstored'] = ' máció]:ncs a közeledben semmi!',
|
||||
['garage_notavailable'] = ' máció]:m tárolhatod a garázsba!',
|
||||
['garage_blocked'] = ' máció]:lami gátolja a kocsi lehívását!',
|
||||
['garage_empty'] = ' máció]:m teheted a garázsba!',
|
||||
['garage_released'] = ' [Információ]:keresen kivetted!',
|
||||
['garage_store_nearby'] = ' máció]:ncs a közeledben semmi!',
|
||||
['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'] = ' [Információ]:keresen igényeltél egy %s enért: ',
|
||||
['vehicleshop_money'] = ' máció]:t most nem tudod megtenni!',
|
||||
['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'] = ' [Információ]:kezdted az újraélesztést!',
|
||||
['revive_complete'] = ' [Információ]:raélesztetted: %s',
|
||||
['revive_complete_award'] = ' [Információ]:raélesztetted: %s jáost.',
|
||||
['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'] = ' [Információ]:kezdted a gyógyítást!',
|
||||
['heal_complete'] = ' [Információ]:ggyógyítottad: %s jáost.',
|
||||
['no_players'] = ' máció]:ncs a közeledben senki!',
|
||||
['player_not_unconscious'] = ' [Információ]:játékos nincs öntudatánál!',
|
||||
['player_not_conscious'] = ' [Információ]:játékos nincs öntudatánál!',
|
||||
['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'] = ' telen mennyiség',
|
||||
['actions_prompt'] = ' [Információ]:omd meg az [E] gombot a panel megnyitásához.',
|
||||
['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'] = ' [Információ]:omd meg az [E] gombot a gyógyszer kivételéhez.',
|
||||
['open_pharmacy'] = 'Nyomd meg az [E] gombot a gyógyszer kivételéhez.',
|
||||
['pharmacy_menu_title'] = 'Kellékek',
|
||||
['pharmacy_take'] = 'Kivétel: <span style="color:red;">%s</span>',
|
||||
['medikit'] = 'Elsősegély készlet',
|
||||
['bandage'] = 'Kötszer',
|
||||
['max_item'] = ' máció]:m fér már el nálad!',
|
||||
['max_item'] = 'Nem fér már el nálad!',
|
||||
-- F6 Menu
|
||||
['ems_menu'] = 'EMS menü',
|
||||
['ems_menu_title'] = 'EMS Menu',
|
||||
@@ -65,20 +65,20 @@ Locales['hu'] = {
|
||||
['alert_ambulance'] = 'EMS értesités',
|
||||
-- Death
|
||||
['respawn_available_in'] = 'Újraéledés: %s',
|
||||
['respawn_bleedout_in'] = 'Elfogsz vérezni %s perc %s másodperclva...\n',
|
||||
['respawn_bleedout_prompt'] = 'Nyomd meg az [E]mbot az újraéledéshez',
|
||||
['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'] = '[Információ]:Ennyit fizettél, hogy újraéledj',
|
||||
['distress_send'] = 'Nyomd meg a gombot a segítségkéréshez',
|
||||
['distress_sent'] = ' [Információ]:y civil értesítette az illetékes szervezetet!',
|
||||
['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ékos',
|
||||
['revive_help'] = 'újraéleszteni egy játékost',
|
||||
-- Item
|
||||
['used_medikit'] = ' [Információ]:használtál 1x segélytáskát.',
|
||||
['used_bandage'] = ' [Információ]:használtál 1x kötszert.',
|
||||
['not_enough_medikit'] = '[Információ]:ncs nálad: Defibrillátor.',
|
||||
['not_enough_bandage'] = '[Információ]:ncs nálad: Kötszer.',
|
||||
['healed'] = ' [Információ]:ggyógyítottak!',
|
||||
['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',
|
||||
|
||||
@@ -4,9 +4,9 @@ if GetResourceState("esx_phone") ~= 'missing' then
|
||||
TriggerEvent('esx_phone:registerNumber', 'ambulance', TranslateCap('alert_ambulance'), true, true)
|
||||
end
|
||||
|
||||
if GetResourceState("esx_society") ~= 'missing' then
|
||||
TriggerEvent('esx_society:registerSociety', 'ambulance', 'Ambulance', 'society_ambulance', 'society_ambulance', 'society_ambulance', {type = 'public'})
|
||||
end
|
||||
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)
|
||||
|
||||
@@ -24,4 +24,7 @@ client_scripts {
|
||||
'client/main.lua'
|
||||
}
|
||||
|
||||
dependency 'es_extended'
|
||||
dependencies {
|
||||
'es_extended',
|
||||
'esx_society'
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
TriggerEvent('esx_phone:registerNumber', 'banker', _('phone_receive'), false, false)
|
||||
TriggerEvent('esx_society:registerSociety', 'banker', TranslateCap('phone_label'), 'society_banker', 'society_banker', 'society_banker', {type = 'public'})
|
||||
CreateThread(function()
|
||||
exports["esx_society"]:registerSociety('banker', TranslateCap('phone_label'), 'society_banker', 'society_banker', 'society_banker', {type = 'public'})
|
||||
end)
|
||||
|
||||
RegisterServerEvent('esx_bankerjob:customerDeposit')
|
||||
AddEventHandler('esx_bankerjob:customerDeposit', function (target, amount)
|
||||
|
||||
@@ -199,7 +199,7 @@ end)
|
||||
local function loadNPC(index, netID)
|
||||
CreateThread(function()
|
||||
while not NetworkDoesEntityExistWithNetworkId(netID) do
|
||||
Wait(1)
|
||||
Wait(200)
|
||||
end
|
||||
local npc = NetworkGetEntityFromNetworkId(netID)
|
||||
|
||||
|
||||
@@ -292,5 +292,102 @@
|
||||
"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": "<i class='fa-solid fa-ban'></i>",
|
||||
"loginButtonText": "<i class='fa-solid fa-right-to-bracket'></i>",
|
||||
"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 you can find here all lang: https://cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/",
|
||||
"tableFullLanguage":"Spanish"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -108,6 +108,7 @@ end)
|
||||
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
|
||||
@@ -119,10 +120,12 @@ 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)
|
||||
end)
|
||||
@@ -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"
|
||||
},
|
||||
]
|
||||
@@ -0,0 +1,118 @@
|
||||
<head>
|
||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet">
|
||||
<link rel="stylesheet" href="styles.css" type="text/css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="full-screen">
|
||||
<div class="question-container">
|
||||
<!-- header -->
|
||||
<div class="header">
|
||||
<h1>Autós Iskola</h1>
|
||||
</div>
|
||||
<!-- home -->
|
||||
<div class="body home">
|
||||
<div class="content">
|
||||
<!-- ICI BREVE PRESENTATION -->
|
||||
<center>
|
||||
<img src="dmv.png" class="logo">
|
||||
<br>
|
||||
<p class="bold-text">Üdvözöljük a Los Santos Autosiskolánál!
|
||||
</center>
|
||||
<br>
|
||||
<center>Los Santos összes polgárának meg kell csinálni a KRESZ vizsgát a forgalmi vizsa elött
|
||||
<br>A válaszoknál ne kapkodjon, használja ki a teljes idöt, gondolkodjon jozan ésszel.
|
||||
<br>
|
||||
<br>
|
||||
</center>
|
||||
KRESZ Vizsga
|
||||
<br> - A KRESZ vizsga 1.000$-ba kerül, ami nem visszatéritendö!
|
||||
<br> - Az autosiskola elfogadja a bankkártyás fizetést is de vigyázz, ne kerülj adosságba!
|
||||
<br> - Ha nem sikerülne a teszt, ne aggodjon, ismét megprobálhatja!
|
||||
<br>
|
||||
<br> Forgalmi Vizsga
|
||||
<br> - A Forgalmi vizsga 1.500$-ba kerül, ami szintén nem visszatéritendö összeg!
|
||||
<br> - A Forgalmi vizsgánál figyelj oda, hogy ne okozz balesetet!
|
||||
</p>
|
||||
</center>
|
||||
</div>
|
||||
<div class="buttonspot">
|
||||
<a href="#" class="button btnQuestion">Kezdés</a>
|
||||
</div>
|
||||
<div style="visibility: hidden;" class="barre-progression">
|
||||
<h2>Folyamat</h2>
|
||||
<progress class="progression" value="0" max="10">
|
||||
</div>
|
||||
</div>
|
||||
<!-- Question-->
|
||||
<div class="body questionnaire-container">
|
||||
<div class="content">
|
||||
<h2 id="questionNumero"></h2>
|
||||
<p id="question"></p>
|
||||
<form class="form" id="question-form">
|
||||
<div>
|
||||
<input class="option-input radio" type="radio" name="question" id="answerA" value="A">
|
||||
<label class="answerA"></label>
|
||||
</div>
|
||||
<div>
|
||||
<input class="option-input radio" type="radio" name="question" id="answerB" value="B">
|
||||
<label class="answerB"></label>
|
||||
</div>
|
||||
<div>
|
||||
<input class="option-input radio" type="radio" name="question" id="answerC" value="C">
|
||||
<label class="answerC"></label>
|
||||
</div>
|
||||
<button type="submit" id="submit" class="submit">Következő kérdés</button>
|
||||
</form>
|
||||
</div>
|
||||
<div class="barre-progression">
|
||||
<h2>Folyamat</h2>
|
||||
<progress class="progression" value="0" max="10">
|
||||
</div>
|
||||
</div>
|
||||
<!-- Results -->
|
||||
<div class="body resultGood">
|
||||
<div class="content">
|
||||
<center>
|
||||
<p class="bold-text">Sikeres KRESZ Vizsga!</p>
|
||||
<br>
|
||||
<br>Gratulálok a sikeres KRESZ vizsgához!
|
||||
<br>
|
||||
<br>Most már elkezdheted a vezetést!
|
||||
</center>
|
||||
</div>
|
||||
<div class="buttonspot">
|
||||
<a href="#" class="button btnClose">Bezár</a>
|
||||
</div>
|
||||
<div style="visibility: hidden;" class="barre-progression">
|
||||
<h2>Progress</h2>
|
||||
<progress class="progression" value="10" max="10">
|
||||
</div>
|
||||
</div>
|
||||
<div class="body resultBad">
|
||||
<div class="content">
|
||||
<center>
|
||||
<p class="bold-text">Sajnos nem sikerült a vizsga!</p>
|
||||
<br>
|
||||
<br>Sajnálattal közlöm, de nem sikerült a KRESZ vizsga, kérlek probáld ujra késöbb...
|
||||
<br>
|
||||
<br>
|
||||
</center>
|
||||
</div>
|
||||
<div class="buttonspot">
|
||||
<a href="#" class="button btnKick">Bezár</a>
|
||||
</div>
|
||||
<div style="visibility: hidden;" class="barre-progression">
|
||||
<h2>Folyamat</h2>
|
||||
<progress class="progression" value="10" max="10">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="nui://game/ui/jquery.js" type="text/javascript"></script>
|
||||
<script src="questions.js" type="text/javascript"></script>
|
||||
<script src="scripts.js" type="text/javascript"></script>
|
||||
<script src="debounce.min.js" type="text/javascript"></script>
|
||||
|
||||
</body>
|
||||
@@ -88,7 +88,7 @@ function OpenMechanicActionsMenu()
|
||||
|
||||
ESX.OpenContext("right", elements2, function(menu2,element2)
|
||||
ESX.CloseContext()
|
||||
local vehicleProps = element.value
|
||||
local vehicleProps = element2.value
|
||||
|
||||
ESX.Game.SpawnVehicle(vehicleProps.model, Config.Zones.VehicleSpawnPoint.Pos, 270.0, function(vehicle)
|
||||
ESX.Game.SetVehicleProperties(vehicle, vehicleProps)
|
||||
|
||||
@@ -19,7 +19,7 @@ Locales['fr'] = {
|
||||
['gas_can'] = 'Bouteille de gaz',
|
||||
['repair_tools'] = 'Outils réparation',
|
||||
['body_work_tools'] = 'Outils carosserie',
|
||||
['blowtorch'] = 'chalumeaux',
|
||||
['blowtorch'] = 'chalumeau',
|
||||
['repair_kit'] = 'kit réparation',
|
||||
['body_kit'] = 'kit carosserie',
|
||||
['craft'] = 'établi',
|
||||
@@ -47,7 +47,7 @@ Locales['fr'] = {
|
||||
['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 Flatbed pour ça',
|
||||
['imp_flatbed'] = '~r~Impossible! Vous devez avoir un Plateau pour ça',
|
||||
['objects'] = 'objets',
|
||||
['roadcone'] = 'plot',
|
||||
['toolbox'] = 'boîte à outils',
|
||||
@@ -63,7 +63,7 @@ Locales['fr'] = {
|
||||
['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 en flatbed pour commencer la mission',
|
||||
['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',
|
||||
|
||||
@@ -5,7 +5,10 @@ if Config.MaxInService ~= -1 then
|
||||
end
|
||||
|
||||
TriggerEvent('esx_phone:registerNumber', 'mechanic', TranslateCap('mechanic_customer'), true, true)
|
||||
TriggerEvent('esx_society:registerSociety', 'mechanic', 'mechanic', 'society_mechanic', 'society_mechanic', 'society_mechanic', {type = 'private'})
|
||||
|
||||
CreateThread(function()
|
||||
exports["esx_society"]:registerSociety('mechanic', 'mechanic', 'society_mechanic', 'society_mechanic', 'society_mechanic', {type = 'private'})
|
||||
end)
|
||||
|
||||
local function Harvest(source)
|
||||
SetTimeout(4000, function()
|
||||
|
||||
@@ -2,12 +2,12 @@ Locales['de'] = {
|
||||
['new_message'] = 'Neue Nachricht',
|
||||
['press_take_call'] = '%s - Drücke [E] um den Anruf anzunehmen',
|
||||
['taken_call'] = '%s hat den Anruf angenommen',
|
||||
['gps_position'] = 'ziel in GPS eingegeben',
|
||||
['message_sent'] = 'nachricht gesendet',
|
||||
['cannot_add_self'] = 'du kannst dich nicht selbst hinzufügen',
|
||||
['number_in_contacts'] = 'diese Nummer ist bereits in deinen Kontakten',
|
||||
['contact_added'] = 'kontakt hinzugefügt',
|
||||
['contact_removed'] = 'the contact has been removed!',
|
||||
['number_not_assigned'] = 'diese Nummer ist nicht vergeben...',
|
||||
['invalid_number'] = 'that\'s not an valid number!',
|
||||
['gps_position'] = 'Ziel im GPS eingegeben',
|
||||
['message_sent'] = 'Nachricht wurde versendet',
|
||||
['cannot_add_self'] = 'Du kannst dich nicht selbst hinzufügen',
|
||||
['number_in_contacts'] = 'Diese Nummer ist bereits in deinen Kontakten',
|
||||
['contact_added'] = 'Kontakt hinzugefügt',
|
||||
['contact_removed'] = 'Dieser Kontakt wurde entfernt!',
|
||||
['number_not_assigned'] = 'Diese Nummer ist nicht vergeben...',
|
||||
['invalid_number'] = 'Dies ist keine gültige Telefonnummer!',
|
||||
}
|
||||
|
||||
@@ -27,5 +27,6 @@ client_scripts {
|
||||
dependencies {
|
||||
'es_extended',
|
||||
'esx_billing',
|
||||
'esx_society',
|
||||
'esx_vehicleshop'
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ Locales['de'] = {
|
||||
['police_wear'] = 'Arbeitskleidung',
|
||||
['gilet_wear'] = 'orangefarbene reflektierende Jacke',
|
||||
['bullet_wear'] = 'kugelsichere Weste',
|
||||
['no_outfit'] = 'Es gibt keine Uniform die dir passt.',
|
||||
['no_outfit'] = 'Es gibt keine, Uniform, die dir passt.',
|
||||
['open_cloackroom'] = 'Drücke [E] um dich umzuziehen',
|
||||
-- Armory
|
||||
['remove_object'] = 'Objekt nehmen',
|
||||
@@ -14,27 +14,27 @@ Locales['de'] = {
|
||||
['put_weapon'] = 'Waffen bringen',
|
||||
['buy_weapons'] = 'Waffen kaufen',
|
||||
['armory'] = 'Waffenkammer',
|
||||
['open_armory'] = 'Drücke [E] um die Waffenkammer zu öffnen',
|
||||
['armory_owned'] = 'eigentum',
|
||||
['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 attatchments',
|
||||
['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 attchment bereits!',
|
||||
['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 Garagen Menü zu öffnen.',
|
||||
['garage_title'] = 'Fahrzeug aktionen',
|
||||
['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_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.',
|
||||
@@ -62,7 +62,7 @@ Locales['de'] = {
|
||||
['service_out'] = 'Du hast den Dienst verlassen.',
|
||||
['service_out_announce'] = 'Operator %s hat seinen Dienst beendet.',
|
||||
-- Action Menu
|
||||
['citizen_interaction'] = 'Zivilistenaktionen',
|
||||
['citizen_interaction'] = 'Zivilinteraktionen',
|
||||
['vehicle_interaction'] = 'Fahrzeuginteraktionen',
|
||||
['object_spawner'] = 'Objekt Spawner',
|
||||
|
||||
@@ -81,16 +81,16 @@ Locales['de'] = {
|
||||
['no_players_nearby'] = 'keine Spieler in der Nähe',
|
||||
['being_searched'] = 'Du wirst von der Polizei durchsucht',
|
||||
-- Vehicle interaction
|
||||
['vehicle_info'] = 'Fahrzeug Info',
|
||||
['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'] = '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'] = 'Fahrzeug Informationen',
|
||||
['search_database_title'] = 'Fahrzeuginformationen - Suche über das amtliche Kennzeichen',
|
||||
['search_database_error_invalid'] = 'die keine gültige Registrierungsnummer ist',
|
||||
-- Traffic interaction
|
||||
@@ -101,51 +101,51 @@ Locales['de'] = {
|
||||
['box'] = 'Box',
|
||||
['cash'] = 'Box mit Geld',
|
||||
-- ID Card Menu
|
||||
['name'] = 'name: %s',
|
||||
['job'] = 'job: %s',
|
||||
['sex'] = 'geschlecht: %s',
|
||||
['dob'] = 'DOB: %s',
|
||||
['height'] = 'größe: %s',
|
||||
['name'] = 'Name: %s',
|
||||
['job'] = 'Job: %s',
|
||||
['sex'] = 'Geschlecht: %s',
|
||||
['dob'] = 'GEB.: %s',
|
||||
['height'] = 'Größe: %s',
|
||||
['bac'] = 'BAC: %s',
|
||||
['unknown'] = 'unknown',
|
||||
['unknown'] = 'unbekannt',
|
||||
['male'] = 'männlich',
|
||||
['female'] = 'weiblich',
|
||||
-- Body Search Menu
|
||||
['guns_label'] = '--- Waffen ---',
|
||||
['inventory_label'] = '--- Inventar ---',
|
||||
['license_label'] = ' --- Lizenzen ---',
|
||||
['confiscate'] = 'konfeszieren %s',
|
||||
['confiscate'] = 'konfiszieren %s',
|
||||
['confiscate_weapon'] = 'konfisziere %s mit %s kugeln',
|
||||
['confiscate_inv'] = 'konfisziere %sx %s',
|
||||
['confiscate_dirty'] = 'Schwarzgeld konfesziert: <span style="color:red;">$%s</span>',
|
||||
['confiscate_dirty'] = 'Schwarzgeld konfisziert: <span style="color:red;">$%s</span>',
|
||||
['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'] = 'Verkehrs vergehen',
|
||||
['minor_offense'] = 'Geringes vergehen',
|
||||
['average_offense'] = 'Normales vergehen',
|
||||
['major_offense'] = 'Hohes vergehen',
|
||||
['fine_total'] = 'strafe: %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',
|
||||
['plate'] = 'Kennzeichen: %s',
|
||||
['owner_unknown'] = 'Besitzer: Unbekannt',
|
||||
['owner'] = 'Besitzer: %s',
|
||||
-- Boss Menu
|
||||
['open_bossmenu'] = 'Drücke [E] um das Menü zu öffnen',
|
||||
['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',
|
||||
['quantity'] = 'Qualität',
|
||||
['inventory'] = 'Inventar',
|
||||
['police_stock'] = 'Polizeibestand',
|
||||
-- Misc
|
||||
['remove_prop'] = 'Drücke [E] um das Objekt zu entfernen',
|
||||
['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.',
|
||||
-- Notifications
|
||||
['alert_police'] = 'Polizei alamieren',
|
||||
['alert_police'] = 'Polizei alarmieren',
|
||||
['phone_police'] = 'Polizei',
|
||||
}
|
||||
|
||||
@@ -5,7 +5,9 @@ if Config.EnableESXService then
|
||||
end
|
||||
|
||||
TriggerEvent('esx_phone:registerNumber', 'police', TranslateCap('alert_police'), true, true)
|
||||
TriggerEvent('esx_society:registerSociety', 'police', 'Police', 'society_police', 'society_police', 'society_police', {type = 'public'})
|
||||
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)
|
||||
|
||||
@@ -42,5 +42,6 @@ client_scripts {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
'es_extended'
|
||||
'es_extended',
|
||||
'esx_society'
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
@@ -147,7 +147,7 @@ CreateThread(function()
|
||||
|
||||
Wait(10)
|
||||
ESX.RefreshJobs()
|
||||
TriggerEvent('esx_society:registerSociety', 'realestateagent', 'realestateagent', 'society_realestateagent', 'society_realestateagent', 'society_realestateagent', {type = 'private'})
|
||||
exports["esx_society"]:registerSociety('realestateagent', 'realestateagent', 'society_realestateagent', 'society_realestateagent', 'society_realestateagent', {type = 'private'})
|
||||
end
|
||||
end)
|
||||
|
||||
@@ -1125,7 +1125,7 @@ end)
|
||||
CreateThread(function()
|
||||
while true do
|
||||
Wait(60000 * Config.SaveInterval)
|
||||
PropertySave(TranslateCap("interval_save"))
|
||||
PropertySave(TranslateCap("interval_saving"))
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
@@ -1,36 +1,7 @@
|
||||
# esx_society
|
||||
<h1 align='center'>[ESX] Society</a></h1><p align='center'><b><a href='https://discord.esx-framework.org/'>Discord</a> - <a href='https://esx-framework.org/'>Website</a> - <a href='https://documentation.esx-framework.org/legacy/installation'>Documentation</a></b></h5>
|
||||
|
||||
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.
|
||||
|
||||
## Requirements
|
||||
- [cron](https://github.com/esx-framework/esx-legacy/tree/main/%5Besx%5D/cron)
|
||||
- [esx_addonaccount](https://github.com/esx-framework/esx-legacy/tree/main/%5Besx_addons%5D/esx_addonaccount)
|
||||
|
||||
## Download & Installation
|
||||
|
||||
### Using [fvm](https://github.com/qlaffont/fvm-installer)
|
||||
```
|
||||
fvm install --save --folder=esx esx-org/esx_society
|
||||
```
|
||||
|
||||
### Using Git
|
||||
```
|
||||
cd resources
|
||||
git clone https://github.com/ESX-Org/esx_society [esx]/esx_society
|
||||
```
|
||||
|
||||
### Manually
|
||||
- Download https://github.com/ESX-Org/esx_society/archive/master.zip
|
||||
- Put it in the `[esx]` directory
|
||||
|
||||
## Installation
|
||||
- Import `esx_society.sql` in your database
|
||||
- Add this in your `server.cfg`:
|
||||
|
||||
```
|
||||
start esx_society
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
||||
|
||||
@@ -9,24 +9,24 @@ function GetSociety(name)
|
||||
end
|
||||
end
|
||||
|
||||
AddEventHandler('onResourceStart', function(resourceName)
|
||||
if resourceName == GetCurrentResourceName() then
|
||||
local result = MySQL.query.await('SELECT * FROM jobs')
|
||||
exports("GetSociety", GetSociety)
|
||||
|
||||
for i = 1, #result, 1 do
|
||||
Jobs[result[i].name] = result[i]
|
||||
Jobs[result[i].name].grades = {}
|
||||
end
|
||||
CreateThread(function()
|
||||
local result = MySQL.query.await('SELECT * FROM jobs')
|
||||
|
||||
local result2 = MySQL.query.await('SELECT * FROM job_grades')
|
||||
for i = 1, #result, 1 do
|
||||
Jobs[result[i].name] = result[i]
|
||||
Jobs[result[i].name].grades = {}
|
||||
end
|
||||
|
||||
for i = 1, #result2, 1 do
|
||||
Jobs[result2[i].job_name].grades[tostring(result2[i].grade)] = result2[i]
|
||||
end
|
||||
local result2 = MySQL.query.await('SELECT * FROM job_grades')
|
||||
|
||||
for i = 1, #result2, 1 do
|
||||
Jobs[result2[i].job_name].grades[tostring(result2[i].grade)] = result2[i]
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler('esx_society:registerSociety', function(name, label, account, datastore, inventory, data)
|
||||
function registerSociety(name, label, account, datastore, inventory, data)
|
||||
local found = false
|
||||
|
||||
local society = {
|
||||
@@ -46,9 +46,13 @@ AddEventHandler('esx_society:registerSociety', function(name, label, account, da
|
||||
end
|
||||
|
||||
if not found then
|
||||
table.insert(RegisteredSocieties, society)
|
||||
RegisteredSocieties[#RegisteredSocieties + 1] = society
|
||||
print(("[^2INFO^7] Registered Society ^5%s^7"):format(label))
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
AddEventHandler('esx_society:registerSociety',registerSociety)
|
||||
exports("registerSociety", registerSociety)
|
||||
|
||||
AddEventHandler('esx_society:getSocieties', function(cb)
|
||||
cb(RegisteredSocieties)
|
||||
|
||||
@@ -22,4 +22,7 @@ server_scripts {
|
||||
'server/main.lua'
|
||||
}
|
||||
|
||||
dependency 'es_extended'
|
||||
dependencies {
|
||||
'es_extended',
|
||||
'esx_society'
|
||||
}
|
||||
|
||||
@@ -5,9 +5,11 @@ if Config.MaxInService ~= -1 then
|
||||
end
|
||||
|
||||
TriggerEvent('esx_phone:registerNumber', 'taxi', TranslateCap('taxi_client'), true, true)
|
||||
TriggerEvent('esx_society:registerSociety', 'taxi', 'Taxi', 'society_taxi', 'society_taxi', 'society_taxi', {
|
||||
type = 'public'
|
||||
})
|
||||
CreateThread(function()
|
||||
exports["esx_society"]:registerSociety('taxi', 'Taxi', 'society_taxi', 'society_taxi', 'society_taxi', {
|
||||
type = 'public'
|
||||
})
|
||||
end)
|
||||
|
||||
RegisterNetEvent('esx_taxijob:success')
|
||||
AddEventHandler('esx_taxijob:success', function()
|
||||
|
||||
@@ -1,42 +1,28 @@
|
||||
local HasAlreadyEnteredMarker, IsInShopMenu = false, false
|
||||
local CurrentAction, CurrentActionMsg, LastZone, currentDisplayVehicle, CurrentVehicleData
|
||||
local CurrentActionData, Vehicles, Categories = {}, {}, {}
|
||||
local VehiclesByModel = {}
|
||||
local vehiclesByCategory = {}
|
||||
|
||||
function getVehicleFromModel(model)
|
||||
for i = 1, #Vehicles do
|
||||
local vehicle = Vehicles[i]
|
||||
if vehicle.model == model then
|
||||
return vehicle
|
||||
end
|
||||
end
|
||||
return VehiclesByModel[model]
|
||||
end
|
||||
|
||||
function getVehicles()
|
||||
ESX.TriggerServerCallback('esx_vehicleshop:getCategories', function(categories)
|
||||
Categories = categories
|
||||
end)
|
||||
|
||||
ESX.TriggerServerCallback('esx_vehicleshop:getVehicles', function(vehicles)
|
||||
Vehicles = vehicles
|
||||
end)
|
||||
end
|
||||
|
||||
AddEventHandler("onResourceStart", getVehicles)
|
||||
|
||||
function PlayerManagement()
|
||||
if Config.EnablePlayerManagement then
|
||||
if ESX.PlayerData.job.name == 'cardealer' then
|
||||
Config.Zones.ShopEntering.Type = 1
|
||||
if not Config.EnablePlayerManagement then
|
||||
return
|
||||
end
|
||||
|
||||
if ESX.PlayerData.job.grade_name == 'boss' then
|
||||
Config.Zones.BossActions.Type = 1
|
||||
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
|
||||
|
||||
else
|
||||
Config.Zones.ShopEntering.Type = -1
|
||||
Config.Zones.BossActions.Type = -1
|
||||
Config.Zones.ResellVehicle.Type = -1
|
||||
end
|
||||
if ESX.PlayerData.job.grade_name == 'boss' then
|
||||
Config.Zones.BossActions.Type = 1
|
||||
end
|
||||
end
|
||||
|
||||
@@ -45,21 +31,35 @@ AddEventHandler('esx:playerLoaded', function(xPlayer)
|
||||
ESX.PlayerData = xPlayer
|
||||
|
||||
PlayerManagement()
|
||||
getVehicles()
|
||||
TriggerServerEvent("esx_vehicleshop:getVehiclesAndCategories")
|
||||
end)
|
||||
|
||||
RegisterNetEvent('esx_vehicleshop:sendCategories')
|
||||
AddEventHandler('esx_vehicleshop:sendCategories', function(categories)
|
||||
Categories = categories
|
||||
end)
|
||||
|
||||
RegisterNetEvent('esx_vehicleshop:sendVehicles')
|
||||
AddEventHandler('esx_vehicleshop:sendVehicles', function(vehicles)
|
||||
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') AddEventHandler('esx:setJob', PlayerManagement)
|
||||
RegisterNetEvent('esx:setJob', PlayerManagement)
|
||||
|
||||
function DeleteDisplayVehicleInsideShop()
|
||||
local attempt = 0
|
||||
@@ -81,7 +81,7 @@ function ReturnVehicleProvider()
|
||||
ESX.TriggerServerCallback('esx_vehicleshop:getCommercialVehicles', function(vehicles)
|
||||
local elements = {}
|
||||
|
||||
for k,v in ipairs(vehicles) do
|
||||
for k, v in ipairs(vehicles) do
|
||||
local returnPrice = ESX.Math.Round(v.price * 0.75)
|
||||
local vehicleLabel = getVehicleFromModel(v.vehicle).label
|
||||
|
||||
@@ -135,28 +135,9 @@ function OpenShopMenu()
|
||||
SetEntityVisible(playerPed, false)
|
||||
SetEntityCoords(playerPed, Config.Zones.ShopInside.Pos)
|
||||
|
||||
local vehiclesByCategory = {}
|
||||
local elements = {}
|
||||
local firstVehicleData = nil
|
||||
|
||||
for i=1, #Categories, 1 do
|
||||
vehiclesByCategory[Categories[i].name] = {}
|
||||
end
|
||||
|
||||
for i=1, #Vehicles, 1 do
|
||||
if IsModelInCdimage(joaat(Vehicles[i].model)) then
|
||||
table.insert(vehiclesByCategory[Vehicles[i].category], Vehicles[i])
|
||||
else
|
||||
print(('[^3WARNING^7] Ignoring vehicle ^5%s^7 due to invalid Model'):format(Vehicles[i].model))
|
||||
end
|
||||
end
|
||||
|
||||
for k,v in pairs(vehiclesByCategory) do
|
||||
table.sort(v, function(a, b)
|
||||
return a.name < b.name
|
||||
end)
|
||||
end
|
||||
|
||||
for i=1, #Categories, 1 do
|
||||
local category = Categories[i]
|
||||
local categoryVehicles = vehiclesByCategory[category.name]
|
||||
@@ -439,7 +420,7 @@ function OpenPopVehicleMenu()
|
||||
local vehicleLabel = getVehicleFromModel(v.vehicle).label
|
||||
|
||||
table.insert(elements, {
|
||||
label = ('%s [MSRP <span style="color:green;">%s</span>]'):format(vehicleLabel, TranslateCap('generic_shopitem', ESX.Math.GroupDigits(v.price))),
|
||||
label = ('%s [<span style="color:green;">%s</span>]'):format(vehicleLabel, TranslateCap('generic_shopitem', ESX.Math.GroupDigits(v.price))),
|
||||
value = v.vehicle
|
||||
})
|
||||
end
|
||||
@@ -630,21 +611,18 @@ function OpenPutStocksMenu()
|
||||
end)
|
||||
end
|
||||
|
||||
AddEventHandler('esx_vehicleshop:hasEnteredMarker', function(zone)
|
||||
function hasEnteredMarker(zone)
|
||||
if zone == 'ShopEntering' then
|
||||
|
||||
if Config.EnablePlayerManagement then
|
||||
if ESX.PlayerData.job ~= nil and ESX.PlayerData.job.name == 'cardealer' then
|
||||
CurrentAction = 'reseller_menu'
|
||||
CurrentActionMsg = TranslateCap('shop_menu')
|
||||
CurrentActionData = {}
|
||||
end
|
||||
else
|
||||
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()
|
||||
|
||||
@@ -696,15 +674,15 @@ AddEventHandler('esx_vehicleshop:hasEnteredMarker', function(zone)
|
||||
CurrentActionMsg = TranslateCap('shop_menu')
|
||||
CurrentActionData = {}
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
AddEventHandler('esx_vehicleshop:hasExitedMarker', function(zone)
|
||||
function hasExitedMarker(zone)
|
||||
if not IsInShopMenu then
|
||||
ESX.UI.Menu.CloseAll()
|
||||
end
|
||||
ESX.HideUI()
|
||||
CurrentAction = nil
|
||||
end)
|
||||
end
|
||||
|
||||
AddEventHandler('onResourceStop', function(resource)
|
||||
if resource == GetCurrentResourceName() then
|
||||
@@ -736,8 +714,8 @@ if Config.EnablePlayerManagement then
|
||||
end
|
||||
|
||||
-- Create Blips
|
||||
CreateThread(function()
|
||||
if Config.Blip.show then
|
||||
if Config.Blip.show then
|
||||
CreateThread(function()
|
||||
local blip = AddBlipForCoord(Config.Zones.ShopEntering.Pos)
|
||||
|
||||
SetBlipSprite (blip, Config.Blip.Sprite)
|
||||
@@ -748,8 +726,8 @@ CreateThread(function()
|
||||
BeginTextCommandSetBlipName('STRING')
|
||||
AddTextComponentSubstringPlayerName(TranslateCap('car_dealer'))
|
||||
EndTextCommandSetBlipName(blip)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
||||
-- Enter / Exit marker events & Draw Markers
|
||||
CreateThread(function()
|
||||
@@ -777,12 +755,12 @@ CreateThread(function()
|
||||
if (isInMarker and not HasAlreadyEnteredMarker) or (isInMarker and LastZone ~= currentZone) then
|
||||
HasAlreadyEnteredMarker, LastZone = true, currentZone
|
||||
LastZone = currentZone
|
||||
TriggerEvent('esx_vehicleshop:hasEnteredMarker', currentZone)
|
||||
hasEnteredMarker(currentZone)
|
||||
end
|
||||
|
||||
if not isInMarker and HasAlreadyEnteredMarker then
|
||||
HasAlreadyEnteredMarker = false
|
||||
TriggerEvent('esx_vehicleshop:hasExitedMarker', LastZone)
|
||||
hasExitedMarker(LastZone)
|
||||
end
|
||||
|
||||
if letSleep then
|
||||
|
||||
@@ -7,27 +7,13 @@ 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()
|
||||
local generatedPlate
|
||||
local doBreak = false
|
||||
math.randomseed(GetGameTimer())
|
||||
|
||||
while true do
|
||||
Wait(0)
|
||||
math.randomseed(GetGameTimer())
|
||||
if Config.PlateUseSpace then
|
||||
generatedPlate = string.upper(GetRandomLetter(Config.PlateLetters) .. ' ' .. GetRandomNumber(Config.PlateNumbers))
|
||||
else
|
||||
generatedPlate = string.upper(GetRandomLetter(Config.PlateLetters) .. GetRandomNumber(Config.PlateNumbers))
|
||||
end
|
||||
local generatedPlate = string.upper(GetRandomLetter(Config.PlateLetters) .. (Config.PlateUseSpace and ' ' or '') .. GetRandomNumber(Config.PlateNumbers))
|
||||
|
||||
ESX.TriggerServerCallback('esx_vehicleshop:isPlateTaken', function(isPlateTaken)
|
||||
if not isPlateTaken then
|
||||
doBreak = true
|
||||
end
|
||||
end, generatedPlate)
|
||||
|
||||
if doBreak then
|
||||
break
|
||||
end
|
||||
local isTaken = IsPlateTaken(generatedPlate)
|
||||
if isTaken then
|
||||
return GeneratePlate()
|
||||
end
|
||||
|
||||
return generatedPlate
|
||||
@@ -35,33 +21,21 @@ end
|
||||
|
||||
-- mixing async with sync tasks
|
||||
function IsPlateTaken(plate)
|
||||
local callback = 'waiting'
|
||||
|
||||
local p = promise.new()
|
||||
|
||||
ESX.TriggerServerCallback('esx_vehicleshop:isPlateTaken', function(isPlateTaken)
|
||||
callback = isPlateTaken
|
||||
p:resolve(isPlateTaken)
|
||||
end, plate)
|
||||
|
||||
while type(callback) == 'string' do
|
||||
Wait(0)
|
||||
end
|
||||
|
||||
return callback
|
||||
return Citizen.Await(p)
|
||||
end
|
||||
|
||||
function GetRandomNumber(length)
|
||||
Wait(0)
|
||||
if length > 0 then
|
||||
return GetRandomNumber(length - 1) .. NumberCharset[math.random(1, #NumberCharset)]
|
||||
else
|
||||
return ''
|
||||
end
|
||||
return length > 0 and GetRandomNumber(length - 1) .. NumberCharset[math.random(1, #NumberCharset)] or ''
|
||||
end
|
||||
|
||||
function GetRandomLetter(length)
|
||||
Wait(0)
|
||||
if length > 0 then
|
||||
return GetRandomLetter(length - 1) .. Charset[math.random(1, #Charset)]
|
||||
else
|
||||
return ''
|
||||
end
|
||||
return length > 0 and GetRandomLetter(length - 1) .. Charset[math.random(1, #Charset)] or ''
|
||||
end
|
||||
|
||||
@@ -26,6 +26,10 @@ client_scripts {
|
||||
'client/main.lua'
|
||||
}
|
||||
|
||||
dependency 'es_extended'
|
||||
dependencies {
|
||||
'es_extended',
|
||||
'esx_society'
|
||||
}
|
||||
|
||||
|
||||
export 'GeneratePlate'
|
||||
|
||||
@@ -2,13 +2,13 @@ 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'] = 'egy jármü engedélyel %s most már hozzád tartozik',
|
||||
['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 NP-ért?',
|
||||
['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',
|
||||
@@ -26,23 +26,23 @@ Locales['hu'] = {
|
||||
['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 NP',
|
||||
['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 NP',
|
||||
['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 NP',
|
||||
['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 NP',
|
||||
['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',
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
local categories, vehicles = {}, {}
|
||||
local vehiclesByModel = {}
|
||||
|
||||
TriggerEvent('esx_phone:registerNumber', 'cardealer', TranslateCap('dealer_customers'), false, false)
|
||||
TriggerEvent('esx_society:registerSociety', 'cardealer', TranslateCap('car_dealer'), 'society_cardealer', 'society_cardealer', 'society_cardealer', {type = 'private'})
|
||||
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
|
||||
@@ -25,62 +28,50 @@ end)
|
||||
|
||||
function SQLVehiclesAndCategories()
|
||||
categories = MySQL.query.await('SELECT * FROM vehicle_categories')
|
||||
vehicles = MySQL.query.await('SELECT * FROM vehicles')
|
||||
vehicles = MySQL.query.await('SELECT vehicles.*, vehicle_categories.label AS categoryLabel FROM vehicles JOIN vehicle_categories ON vehicles.category = vehicle_categories.name')
|
||||
|
||||
GetVehiclesAndCategories(categories, vehicles)
|
||||
end
|
||||
|
||||
function GetVehiclesAndCategories(categories, vehicles)
|
||||
for i = 1, #vehicles do
|
||||
local vehicle = vehicles[i]
|
||||
for j = 1, #categories do
|
||||
local category = categories[j]
|
||||
if category.name == vehicle.category then
|
||||
vehicle.categoryLabel = category.label
|
||||
break
|
||||
end
|
||||
end
|
||||
for _, vehicle in pairs(vehicles) do
|
||||
vehiclesByModel[vehicle.model] = vehicle
|
||||
end
|
||||
|
||||
-- send information after db has loaded, making sure everyone gets vehicle information
|
||||
TriggerClientEvent('esx_vehicleshop:sendCategories', -1, categories)
|
||||
TriggerClientEvent('esx_vehicleshop:sendVehicles', -1, vehicles)
|
||||
TriggerClientEvent("esx_vehicleshop:updateVehiclesAndCategories", -1, vehicles, categories, vehiclesByModel)
|
||||
end
|
||||
|
||||
function getVehicleFromModel(model)
|
||||
for i = 1, #vehicles do
|
||||
local vehicle = vehicles[i]
|
||||
if vehicle.model == model then
|
||||
return vehicle
|
||||
end
|
||||
end
|
||||
|
||||
return
|
||||
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' and xTarget then
|
||||
MySQL.scalar('SELECT id FROM cardealer_vehicles WHERE vehicle = ?', {model},
|
||||
function(id)
|
||||
if id then
|
||||
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)
|
||||
if xPlayer.job.name ~= 'cardealer' or not xTarget then
|
||||
return
|
||||
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
|
||||
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)
|
||||
end)
|
||||
|
||||
ESX.RegisterServerCallback('esx_vehicleshop:getSoldVehicles', function(source, cb)
|
||||
@@ -93,22 +84,28 @@ 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' and xTarget then
|
||||
MySQL.single('SELECT id, price FROM cardealer_vehicles WHERE vehicle = ?', {vehicle},
|
||||
function(result)
|
||||
if result then
|
||||
MySQL.update('DELETE FROM cardealer_vehicles WHERE id = ?', {result.id},
|
||||
function(rowsChanged)
|
||||
if rowsChanged == 1 then
|
||||
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
|
||||
end)
|
||||
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')
|
||||
@@ -123,13 +120,12 @@ AddEventHandler('esx_vehicleshop:getStockItem', function(itemName, count)
|
||||
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'))
|
||||
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
|
||||
@@ -154,14 +150,6 @@ AddEventHandler('esx_vehicleshop:putStockItems', function(itemName, count)
|
||||
end)
|
||||
end)
|
||||
|
||||
ESX.RegisterServerCallback('esx_vehicleshop:getCategories', function(source, cb)
|
||||
cb(categories)
|
||||
end)
|
||||
|
||||
ESX.RegisterServerCallback('esx_vehicleshop:getVehicles', function(source, cb)
|
||||
cb(vehicles)
|
||||
end)
|
||||
|
||||
ESX.RegisterServerCallback('esx_vehicleshop:buyVehicle', function(source, cb, model, plate)
|
||||
local xPlayer = ESX.GetPlayerFromId(source)
|
||||
local modelPrice = getVehicleFromModel(model).price
|
||||
@@ -194,53 +182,57 @@ end)
|
||||
ESX.RegisterServerCallback('esx_vehicleshop:buyCarDealerVehicle', function(source, cb, model)
|
||||
local xPlayer = ESX.GetPlayerFromId(source)
|
||||
|
||||
if xPlayer.job.name == 'cardealer' then
|
||||
local modelPrice = getVehicleFromModel(model).price
|
||||
|
||||
if modelPrice then
|
||||
TriggerEvent('esx_addonaccount:getSharedAccount', 'society_cardealer', function(account)
|
||||
if account.money >= modelPrice then
|
||||
account.removeMoney(modelPrice)
|
||||
|
||||
MySQL.insert('INSERT INTO cardealer_vehicles (vehicle, price) VALUES (?, ?)', {model, modelPrice},
|
||||
function(rowsChanged)
|
||||
cb(true)
|
||||
end)
|
||||
else
|
||||
cb(false)
|
||||
end
|
||||
end)
|
||||
end
|
||||
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
|
||||
MySQL.single('SELECT id, price FROM cardealer_vehicles WHERE vehicle = ?', {vehicleModel},
|
||||
function(result)
|
||||
if result then
|
||||
local id = result.id
|
||||
|
||||
MySQL.update('DELETE FROM cardealer_vehicles WHERE id = ?', {id},
|
||||
function(rowsChanged)
|
||||
if rowsChanged == 1 then
|
||||
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)
|
||||
else
|
||||
print(('[^3WARNING^7] Player ^5%s^7 Attempted To Sell Invalid Vehicle - ^5%s^7!'):format(source, vehicleModel))
|
||||
end
|
||||
end)
|
||||
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)
|
||||
@@ -263,20 +255,17 @@ 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 result then
|
||||
local vehicle = result.vehicle
|
||||
local basePrice = result.base_price
|
||||
|
||||
MySQL.update('DELETE FROM rented_vehicles WHERE plate = ?', {plate},
|
||||
function(rowsChanged)
|
||||
MySQL.insert('INSERT INTO cardealer_vehicles (vehicle, price) VALUES (?, ?)', {result.vehicle, result.base_price})
|
||||
|
||||
RemoveOwnedVehicle(plate)
|
||||
cb(true)
|
||||
end)
|
||||
else
|
||||
cb(false)
|
||||
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)
|
||||
|
||||
@@ -294,36 +283,34 @@ ESX.RegisterServerCallback('esx_vehicleshop:resellVehicle', function(source, cb,
|
||||
|
||||
if not resellPrice then
|
||||
print(('[^3WARNING^7] Player ^5%s^7 Attempted To Resell Invalid Vehicle - ^5%s^7!'):format(source, model))
|
||||
cb(false)
|
||||
else
|
||||
MySQL.single('SELECT * FROM rented_vehicles WHERE plate = ?', {plate},
|
||||
function(result)
|
||||
if result then -- is it a rented vehicle?
|
||||
cb(false) -- it is, don't let the player sell it since he doesn't own it
|
||||
else
|
||||
MySQL.single('SELECT * FROM owned_vehicles WHERE owner = ? AND plate = ?', {xPlayer.identifier, plate},
|
||||
function(result)
|
||||
if result then -- does the owner match?
|
||||
local vehicle = json.decode(result.vehicle)
|
||||
|
||||
if vehicle.model == model then
|
||||
if vehicle.plate == plate then
|
||||
xPlayer.addMoney(resellPrice, "Sold Vehicle")
|
||||
RemoveOwnedVehicle(plate)
|
||||
cb(true)
|
||||
else
|
||||
print(('[^3WARNING^7] Player ^5%s^7 Attempted To Resell Vehicle With Invalid Plate - ^5%s^7!'):format(source, plate))
|
||||
cb(false)
|
||||
end
|
||||
else
|
||||
print(('[^3WARNING^7] Player ^5%s^7 Attempted To Resell Vehicle With Invalid Model - ^5%s^7!'):format(source, model))
|
||||
cb(false)
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
end)
|
||||
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)
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
RegisterNetEvent('esx:playerLoaded') -- Store the players data
|
||||
AddEventHandler('esx:playerLoaded', function(xPlayer, isNew)
|
||||
print("Player Loaded. New | " .. isNew)
|
||||
print(('Player Loaded. New | %s'):format(isNew))
|
||||
ESX.PlayerData = xPlayer
|
||||
ESX.PlayerLoaded = true
|
||||
end)
|
||||
@@ -23,7 +23,7 @@ end)
|
||||
|
||||
function OnPlayerData(key, val, last)
|
||||
if type(val) == 'table' then val = json.encode(val) end
|
||||
print('PlayerData.'..key..' was set to '..val)
|
||||
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')
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
Locales['it'] = {
|
||||
['male'] = "Maschio",
|
||||
['female'] = "Femmina",
|
||||
['delete_label'] = "Cancella %s %s?",
|
||||
['select_char'] = "Seleziona Personaggio",
|
||||
["select_char_description"] = "Seleziona il personaggio con cui vuoi giocare.",
|
||||
['create_char'] = "Crea un nuovo personaggio",
|
||||
['char_play'] = "Gioca questo personaggio",
|
||||
['char_disabled'] = "Questo personaggio è disabilitato",
|
||||
['char_delete'] = "Cancella questo personaggio",
|
||||
['cancel'] = "Annulla",
|
||||
['confirm'] = "Conferma",
|
||||
['command_setslots'] = "Imposta il numero di slot di personaggi di un giocatore",
|
||||
['command_remslots'] = "Rimuovi il numero di slot di personaggi di un giocatore",
|
||||
['command_enablechar'] = "Abilita un personaggio di un giocatore",
|
||||
['command_disablechar'] = "Disabilita un personaggio di un giocatore",
|
||||
['command_charslot'] = "Numero dello slot del personaggio",
|
||||
['command_identifier'] = "Identifier del giocatore",
|
||||
['command_slots'] = "# di slot",
|
||||
['slotsadd'] = "Hai aggiunto %s slot a %s",
|
||||
['slotsedit'] = "Hai impostato %s slot a %s",
|
||||
['slotsrem'] = "Hai rimosso gli slot a %s",
|
||||
['charenabled'] = "Hai abilitato il %s° personaggio di %s",
|
||||
['chardisabled'] = "Hai disabilitato il %s° personaggio di %s",
|
||||
['charnotfound'] = "Il personaggio %s di %s non esiste",
|
||||
['return_description'] ="Ritorna alla selezione dei personaggi" ,
|
||||
['char_play_description'] ="continua a giocare con questo personaggio",
|
||||
['char_delete_description'] = "elimina il personaggio selezionato",
|
||||
['return'] = "ritorna indietro",
|
||||
}
|
||||
Reference in New Issue
Block a user