Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added New Plates From Latest DLC + Missing North Yankton #30

Merged
merged 3 commits into from
May 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions client/main.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
local Vehicles, myCar = {}, {}
local lsMenuIsShowed, HintDisplayed, isInLSMarker = false, false, false
local gameBuild = GetGameBuildNumber()

RegisterNetEvent('esx:playerLoaded')
AddEventHandler('esx:playerLoaded', function()
Expand Down Expand Up @@ -288,21 +289,26 @@ function GetAction(data)
}
end
elseif v.modType == 'plateIndex' then -- PLATES
for j = 0, 4, 1 do
local maxJ = 5
if gameBuild >= 3095 then
maxJ = 12
end

for j = 0, maxJ, 1 do
local _label = ''
if j == currentMods.plateIndex then
_label = GetPlatesName(j) .. ' - <span style="color:cornflowerblue;">' .. TranslateCap('installed') ..
'</span>'
_label = GetPlatesName(j) .. ' - <span style="color:cornflowerblue;">' ..
TranslateCap('installed') .. '</span>'
else
price = math.floor(vehiclePrice * v.price / 100)
local price = math.floor(vehiclePrice * v.price / 100)
_label = GetPlatesName(j) .. ' - <span style="color:green;">$' .. price .. ' </span>'
end
elements[#elements + 1] = {
label = _label,
modType = k,
modNum = j
}
end
end
elseif v.modType == 22 then -- NEON
local _label = ''
if currentMods.modXenon then
Expand Down
16 changes: 16 additions & 0 deletions config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,22 @@ function GetPlatesName(index)
return TranslateCap('blue_on_white_2')
elseif (index == 4) then
return TranslateCap('blue_on_white_3')
elseif (index == 5) then
return "North Yankton"
elseif (index == 6) then
return "Ecola"
elseif (index == 7) then
return "Las Venturas"
elseif (index == 8) then
return "Liberty City"
elseif (index == 9) then
return "Car Meet"
elseif (index == 10) then
return "Panic"
elseif (index == 11) then
return "Pounders"
elseif (index == 12) then
return "Sprunk"
Gellipapa marked this conversation as resolved.
Show resolved Hide resolved
end
end

Expand Down