Implemented check for car license, resolves #101

This commit is contained in:
ElPumpo
2018-12-02 14:24:35 +01:00
parent db50acd322
commit 2d4fa6dd73
8 changed files with 47 additions and 19 deletions
+15 -1
View File
@@ -962,7 +962,21 @@ Citizen.CreateThread(function()
if IsControlJustReleased(0, Keys['E']) then
if CurrentAction == 'shop_menu' then
OpenShopMenu()
if Config.LicenseEnable then
ESX.TriggerServerCallback('esx_license:checkLicense', function(hasDriversLicense)
if hasDriversLicense then
OpenShopMenu()
else
ESX.ShowNotification(_U('license_missing'))
end
end, GetPlayerServerId(PlayerId()), 'drive')
else
OpenShopMenu()
end
elseif CurrentAction == 'reseller_menu' then
OpenResellerMenu()
elseif CurrentAction == 'give_back_vehicle' then
+9 -6
View File
@@ -5,8 +5,11 @@ Config.EnablePlayerManagement = false -- enables the actual car dealer job.
Config.EnableOwnedVehicles = true
Config.EnableSocietyOwnedVehicles = false -- use with EnablePlayerManagement disabled, or else it wont have any effects
Config.ResellPercentage = 50
Config.Locale = 'fr'
Config.LicenseEnable = false -- require people to own drivers license when buying vehicles? Only applies if EnablePlayerManagement is disabled. Requires esx_license
-- looks like this: 'LLL NNN'
-- The maximum plate length is 8 chars (including spaces & symbols), don't go past it!
Config.PlateLetters = 3
@@ -18,39 +21,39 @@ Config.Zones = {
ShopEntering = {
Pos = { x = -33.777, y = -1102.021, z = 25.422 },
Size = { x = 1.5, y = 1.5, z = 1.0 },
Type = 1,
Type = 1
},
ShopInside = {
Pos = { x = -47.570, y = -1097.221, z = 25.422 },
Size = { x = 1.5, y = 1.5, z = 1.0 },
Heading = -20.0,
Type = -1,
Type = -1
},
ShopOutside = {
Pos = { x = -28.637, y = -1085.691, z = 25.565 },
Size = { x = 1.5, y = 1.5, z = 1.0 },
Heading = 330.0,
Type = -1,
Type = -1
},
BossActions = {
Pos = { x = -32.065, y = -1114.277, z = 25.422 },
Size = { x = 1.5, y = 1.5, z = 1.0 },
Type = -1,
Type = -1
},
GiveBackVehicle = {
Pos = { x = -18.227, y = -1078.558, z = 25.675 },
Size = { x = 3.0, y = 3.0, z = 1.0 },
Type = (Config.EnablePlayerManagement and 1 or -1),
Type = (Config.EnablePlayerManagement and 1 or -1)
},
ResellVehicle = {
Pos = { x = -44.630, y = -1080.738, z = 25.683 },
Size = { x = 3.0, y = 3.0, z = 1.0 },
Type = 1,
Type = 1
}
}
+9 -3
View File
@@ -1,7 +1,13 @@
Locales['br'] = {
--Global menus
['belongs'] = ' agora pertence a você',
-- global menus
['not_enough_in_society'] = 'there\'s not enough of ~r~that item~s~ in the society!',
['player_cannot_hold'] = 'you do ~r~not~s~ have enough ~y~free space~s~ in your inventory!',
['vehicle_belongs'] = 'an vehicle with plate ~y~%s~s~ now belongs to ~b~you~s~',
['broke_company'] = 'você não tem dinheiro suficiente na conta da empresa',
['license_missing'] = 'you don\'t have a driver\'s license!',
['purchase_type'] = 'type of purchase',
['society_type'] = 'society',
['staff_type'] = 'personal usage',
['buy_vehicle_shop'] = 'comprar %s por $%s?',
['buy_vehicle'] = 'comprar veículo',
['car_dealer'] = 'Concessionária de carros',
@@ -27,9 +33,9 @@ Locales['br'] = {
['sell_menu'] = 'Pressione ~INPUT_CONTEXT~ para vender ',
['set_vehicle_owner_rent'] = 'Atribuir veículo [Alugar]',
['set_vehicle_owner_sell'] = 'Veículos para [Venda]',
['set_vehicle_owner_sell_society'] = 'assign Vehicle [Sale] [Society]',
['shop_menu'] = 'pressione ~INPUT_CONTEXT~ para acessar o menu ~y~%s~s~ pela quantidade de ~g~$%s~s~',
['generic_shopitem'] = '$%s',
['vehicle'] = 'veículo ',
['vehicle_dealer'] = 'Veículo - Concessionária',
['vehicle_menu'] = 'Pressione ~INPUT_CONTEXT~ para fazer o seu veículo',
['vehicle_purchased'] = 'você comprou um veículo',
+2 -1
View File
@@ -1,9 +1,10 @@
Locales['en'] = {
--Global menus
-- global menus
['not_enough_in_society'] = 'there\'s not enough of ~r~that item~s~ in the society!',
['player_cannot_hold'] = 'you do ~r~not~s~ have enough ~y~free space~s~ in your inventory!',
['vehicle_belongs'] = 'an vehicle with plate ~y~%s~s~ now belongs to ~b~you~s~',
['broke_company'] = 'you do not have enough money in the company account',
['license_missing'] = 'you don\'t have a driver\'s license!',
['purchase_type'] = 'type of purchase',
['society_type'] = 'society',
['staff_type'] = 'personal usage',
+2 -1
View File
@@ -1,9 +1,10 @@
Locales['fi'] = {
--Global menus
-- global menus
['not_enough_in_society'] = 'firman varastossa ei ole enempää ~r~tuota esinettä~s~!',
['player_cannot_hold'] = 'sinulla ~r~ei ole~s~ tarpeeksi ~y~vapaata tilaa~s~ repussasi!',
['vehicle_belongs'] = 'ajoneuvo kilvellä ~y~%s~s~ on nyt ~b~sinun~s~ omistuksessasi',
['broke_company'] = 'sinulla ei ole tarpeeksi rahaa yrityksen tilillä',
['license_missing'] = 'you don\'t have a driver\'s license!',
['purchase_type'] = 'osto tyyppi',
['society_type'] = 'firma',
['staff_type'] = 'henkilökunta',
+2 -3
View File
@@ -1,13 +1,13 @@
Locales['fr'] = {
--Global menus
-- global menus
['not_enough_in_society'] = 'il n\'y à plus assez ~r~de cet objet~s~ dans la societé!',
['player_cannot_hold'] = 'vous n\'avez ~r~pas~s~ assez ~y~d\'espace~s~ dans votre inventaire!',
['vehicle_belongs'] = 'le véhicule avec la plaque ~y~%s~s~ est désormais à ~b~vous~s~',
['broke_company'] = 'vous n\avez pas assez d\'argent sur le compte de la societé',
['license_missing'] = 'you don\'t have a driver\'s license!',
['purchase_type'] = 'type d\'achat',
['society_type'] = 'societé',
['staff_type'] = 'personnel',
['broke_company'] = 'vous n\'avez pas assez d\'argent sur votre compte société',
['buy_vehicle_shop'] = 'acheter %s pour $%s?',
['buy_vehicle'] = 'acheter véhicule',
['car_dealer'] = 'concessionnaire',
@@ -36,7 +36,6 @@ Locales['fr'] = {
['set_vehicle_owner_sell_society'] = 'attribuer véhicule [Vente] [Société]',
['shop_menu'] = 'appuyez sur ~INPUT_CONTEXT~ pour accéder au menu',
['generic_shopitem'] = '$%s',
['vehicle'] = 'le véhicule',
['vehicle_dealer'] = 'concessionnaire - Véhicules',
['vehicle_menu'] = 'appuez sur ~INPUT_CONTEXT~ pour rendre votre véhicule',
['vehicle_purchased'] = 'vous avez acheté un véhicule',
+5 -2
View File
@@ -1,9 +1,10 @@
Locales['pl'] = {
-- Menu Salonu
-- global menus
['not_enough_in_society'] = 'brak tego ~r~przedmiotu~s~ w firmie!',
['player_cannot_hold'] = '~r~Nie masz~s~ wystarczająco ~y~wolnego~s~ miejsca w ekwipunku!',
['vehicle_belongs'] = 'pojazd z rejestracją ~y~%s~s~ teraz należy do ~b~ciebie~s~',
['broke_company'] = 'twoja firma nie ma wystarczająco pieniedzy',
['license_missing'] = 'you don\'t have a driver\'s license!',
['purchase_type'] = 'rodzaj zakupu',
['society_type'] = 'firma',
['staff_type'] = 'pracownicy',
@@ -14,6 +15,7 @@ Locales['pl'] = {
['dealer_boss'] = 'salon samochodowy - Szef',
['delivered'] = 'pojazd został ~g~dostarczony~s~ do salonu',
['depop_vehicle'] = 'oddaj pojazd',
['return_provider'] = 'return vehicle to provider',
['get_rented_vehicles'] = 'pojazdy do wynajęcia',
['invalid_amount'] = 'nieprawidłowa ilość',
['invoice_amount'] = 'suma faktury',
@@ -26,6 +28,7 @@ Locales['pl'] = {
['paid_rental'] = '~g~Płacisz~s~ za wynajęcie auta: ~g~$%s~s~',
['pop_vehicle'] = 'wyciągnij auto do sprzedaży',
['rent_vehicle'] = 'salon samochodowy - Pojazdy do wynajęcia',
['return_provider_menu'] = 'car Dealer - Return vehicle to provider',
['rental_amount'] = 'suma wynajęcia',
['sell_menu'] = 'wcisnij ~INPUT_CONTEXT~ aby sprzedać ~y~%s~s~ za ~g~$%s~s~',
['set_vehicle_owner_rent'] = 'zarejestruj pojazd [Wynajem]',
@@ -33,12 +36,12 @@ Locales['pl'] = {
['set_vehicle_owner_sell_society'] = 'zarejestruj pojazd [Firmowe]',
['shop_menu'] = 'wcisnij ~INPUT_CONTEXT~ aby wejść do menu',
['generic_shopitem'] = '$%s',
['the_boss'] = 'szef',
['vehicle_dealer'] = 'pojazdy - Sprzedawca aut',
['vehicle_menu'] = 'wcisnij ~INPUT_CONTEXT~ aby wyjąć pojazd',
['vehicle_purchased'] = 'kupujesz pojazd',
['vehicle_set_owned'] = 'pojazd ~y~%s~s~ został zarejestrowany na ~b~%s~s~',
['vehicle_set_rented'] = 'pojazd ~y~%s~s~ został wynajęty przez ~b~%s~s~',
['vehicle_sold_for'] = 'the ~b~%s~s~ has been ~y~sold~s~ for ~g~$%s~s~',
['vehicle_sold_to'] = 'pojazd ~y~%s~s~ został sprzedany do ~b~%s~s~',
['deposit_stock'] = 'deponuj przedmioty',
['take_stock'] = 'wyciągnij przedmioty',
+3 -2
View File
@@ -1,9 +1,10 @@
Locales['sv'] = {
--Global menus
-- global menus
['not_enough_in_society'] = 'det finns inte tillräckligt många ~r~ det föremålet~s~ i förrådet!',
['player_cannot_hold'] = 'du har ~r~inte~s~ tillräckligt mycket~y~plats~s~ på dig!',
['vehicle_belongs'] = 'fordonet med reg numret ~y~%s~s~ tillhör nu ~b~dig~s~',
['broke_company'] = 'det finns inte tillräckligt mycket pengar i företagskontot',
['license_missing'] = 'du är inte behörig att köpa bilar, B-körkort krävs!',
['purchase_type'] = 'till vem är fordonet?',
['society_type'] = 'företag',
['staff_type'] = 'personlig användning',
@@ -33,7 +34,7 @@ Locales['sv'] = {
['set_vehicle_owner_rent'] = 'hyr ut fordon',
['set_vehicle_owner_sell'] = 'sälj fordon',
['set_vehicle_owner_sell_society'] = 'sälj fordon till företag',
['shop_menu'] = 'tryck ~INPUT_CONTEXT~ för att få fram menyn',
['shop_menu'] = 'tryck ~INPUT_CONTEXT~ för öppna ~y~bilförsäljarsmenyn~s~.',
['generic_shopitem'] = '%s SEK',
['vehicle_dealer'] = 'bilförsäljare - fordon för visning',
['vehicle_menu'] = 'tryck på ~INPUT_CONTEXT~ för att ~o~lämna tillbaka~s~ fordonet till bilförsäljaren.',