Merge pull request #323 from joaopedroo5/patch-1

Nill value when vehicle is missing on vehicle list
This commit is contained in:
ArkSeyonet
2021-02-01 14:01:51 -06:00
committed by GitHub
8 changed files with 23 additions and 12 deletions
+16 -12
View File
@@ -705,20 +705,24 @@ AddEventHandler('esx_vehicleshop:hasEnteredMarker', function(zone)
end
end
resellPrice = ESX.Math.Round(vehicleData.price / 100 * Config.ResellPercentage)
model = GetEntityModel(vehicle)
plate = ESX.Math.Trim(GetVehicleNumberPlateText(vehicle))
if vehicleData then
resellPrice = ESX.Math.Round(vehicleData.price / 100 * Config.ResellPercentage)
model = GetEntityModel(vehicle)
plate = ESX.Math.Trim(GetVehicleNumberPlateText(vehicle))
CurrentAction = 'resell_vehicle'
CurrentActionMsg = _U('sell_menu', vehicleData.name, ESX.Math.GroupDigits(resellPrice))
CurrentAction = 'resell_vehicle'
CurrentActionMsg = _U('sell_menu', vehicleData.name, ESX.Math.GroupDigits(resellPrice))
CurrentActionData = {
vehicle = vehicle,
label = vehicleData.name,
price = resellPrice,
model = model,
plate = plate
}
CurrentActionData = {
vehicle = vehicle,
label = vehicleData.name,
price = resellPrice,
model = model,
plate = plate
}
else
ESX.ShowNotification(_U('invalid_vehicle'))
end
end
end
+1
View File
@@ -53,6 +53,7 @@ Locales['br'] = {
['have_withdrawn'] = 'você retirou ~y~x%s~s~ ~b~%s~s~',
['have_deposited'] = 'você depositou ~y~x%s~s~ ~b~%s~s~',
['boss_actions'] = 'ações do chefe',
['invalid_vehicle'] = 'Veículo inválido',
-- sold vehicles
['boss_sold'] = 'lista de veículos vendidos',
+1
View File
@@ -53,6 +53,7 @@ Locales['cs'] = {
['have_withdrawn'] = 'vybral jsi ~y~x%s~s~ ~b~%s~s~',
['have_deposited'] = 'vlozil jsi ~y~x%s~s~ ~b~%s~s~',
['boss_actions'] = 'akce šéfa',
['invalid_vehicle'] = 'neplatné vozidlo',
-- sold vehicles
['boss_sold'] = 'seznam prodaných vozidel',
+1
View File
@@ -53,6 +53,7 @@ Locales['en'] = {
['have_withdrawn'] = 'you have withdrawn ~y~x%s~s~ ~b~%s~s~',
['have_deposited'] = 'you have deposited ~y~x%s~s~ ~b~%s~s~',
['boss_actions'] = 'boss actions',
['invalid_vehicle'] = 'Invalid vehicle',
-- sold vehicles
['boss_sold'] = 'list of sold vehicles',
+1
View File
@@ -53,6 +53,7 @@ Locales['fi'] = {
['have_withdrawn'] = 'sinä otit ~y~x%s~s~ ~b~%s~s~',
['have_deposited'] = 'sinä talletit ~y~x%s~s~ ~b~%s~s~',
['boss_actions'] = 'Pomo toiminnot',
['invalid_vehicle'] = 'di-wastong sasakyan',
-- sold vehicles
['boss_sold'] = 'list of sold vehicles',
+1
View File
@@ -53,6 +53,7 @@ Locales['fr'] = {
['have_withdrawn'] = 'vous avez retiré ~y~x%s~s~ ~b~%s~s~',
['have_deposited'] = 'vous avez deposé ~y~x%s~s~ ~b~%s~s~',
['boss_actions'] = 'actions du chef',
['invalid_vehicle'] = 'Véhicule invalide',
-- sold vehicles
['boss_sold'] = 'liste des véhicule vendu',
+1
View File
@@ -53,6 +53,7 @@ Locales['pl'] = {
['have_withdrawn'] = 'wyciągasz ~y~x%s~s~ ~b~%s~s~',
['have_deposited'] = 'deponujesz ~y~x%s~s~ ~b~%s~s~',
['boss_actions'] = 'akcje szefa',
['invalid_vehicle'] = 'nieprawidłowy pojazd',
-- sold vehicles
['boss_sold'] = 'list of sold vehicles',
+1
View File
@@ -53,6 +53,7 @@ Locales['sv'] = {
['have_withdrawn'] = 'du har tagit ut ~y~x%s~s~ ~b~%s~s~',
['have_deposited'] = 'du har lagt in ~y~x%s~s~ ~b~%s~s~',
['boss_actions'] = 'chef handlingar',
['invalid_vehicle'] = 'ogiltigt fordon',
-- sold vehicles
['boss_sold'] = 'lista av sålda fordon',