Skip to content
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
3 changes: 2 additions & 1 deletion client/modules/vehicle.lua
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@ function Vehicle.getMod(type, wheelData)
local index = isWheel and 0 or currentMod
local applied = i == index or nil
local customLabel = mod.labels and mod.labels[i]

mods[id] = {
label = customLabel and customLabel.label or (text ~= 'NULL' and label or text),
label = customLabel and customLabel.label or label,
id = i,
selected = applied,
applied = not isWheel and applied,
Expand Down
74 changes: 72 additions & 2 deletions data/decals.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,67 @@ return {
menuId = 'decals',
id = 14,
price = 2000,
cam = { angle = vec2(127.125, 33.0), off = vec3(-3.200000, 3.400000, 2.100000) }
cam = { angle = vec2(127.125, 33.0), off = vec3(-3.200000, 3.400000, 2.100000) },
labels = {
[0] = {label = 'Truck Horn'},
[1] = {label = 'Cop Horn'},
[2] = {label = 'Clown Horn'},
[3] = {label = 'Musical Horn 1'},
[4] = {label = 'Musical Horn 2'},
[5] = {label = 'Musical Horn 3'},
[6] = {label = 'Musical Horn 4'},
[7] = {label = 'Musical Horn 5'},
[8] = {label = 'Sad Trombone'},
[9] = {label = 'Classical Horn 1'},
[10] = {label = 'Classical Horn 2'},
[11] = {label = 'Classical Horn 3'},
[12] = {label = 'Classical Horn 4'},
[13] = {label = 'Classical Horn 5'},
[14] = {label = 'Classical Horn 6'},
[15] = {label = 'Classical Horn 7'},
[16] = {label = 'Scale - Do'},
[17] = {label = 'Scale - Re'},
[18] = {label = 'Scale - Mi'},
[19] = {label = 'Scale - Fa'},
[20] = {label = 'Scale - Sol'},
[21] = {label = 'Scale - La'},
[22] = {label = 'Scale - Ti'},
[23] = {label = 'Scale - Do - High'},
[24] = {label = 'Jazz Horn 1'},
[25] = {label = 'Jazz Horn 2'},
[26] = {label = 'Jazz Horn 3'},
[27] = {label = 'Jazz Horn Loop'},
[28] = {label = 'Star Spangled Banner 1'},
[29] = {label = 'Star Spangled Banner 2'},
[30] = {label = 'Star Spangled Banner 3'},
[31] = {label = 'Star Spangled Banner 4'},
[32] = {label = 'Classical Horn 8 Loop'},
[33] = {label = 'Classical Horn 9 Loop'},
[34] = {label = 'Classical Horn 10 Loop'},
[35] = {label = 'Classical Horn 8'},
[36] = {label = 'Classical Horn 9'},
[37] = {label = 'Classical Horn 10'},
[38] = {label = 'Funeral Loop'},
[39] = {label = 'Funeral'},
[40] = {label = 'Spooky Loop'},
[41] = {label = 'Spooky'},
[42] = {label = 'San Andreas Loop'},
[43] = {label = 'San Andreas'},
[44] = {label = 'Liberty City Loop'},
[45] = {label = 'Liberty City'},
[46] = {label = 'Festive 1 Loop'},
[47] = {label = 'Festive 1'},
[48] = {label = 'Festive 2 Loop'},
[49] = {label = 'Festive 2'},
[50] = {label = 'Festive 3 Loop'},
[51] = {label = 'Festive 3'},
[52] = {label = 'Air Horn Low Loop'},
[53] = {label = 'Air Horn Low'},
[54] = {label = 'Air Horn Medium Loop'},
[55] = {label = 'Air Horn Medium'},
[56] = {label = 'Air Horn High Loop'},
[57] = {label = 'Air Horn High'}
}
},
Nitrous = {
menuId = 'decals',
Expand Down Expand Up @@ -372,6 +432,16 @@ return {
{ label = 'Yankton', id = 5, price = 200 },
}

if GetGameBuildNumber() > 2944 then
mods[#mods + 1] = { label = 'eCola', id = 6, price = 200 }
mods[#mods + 1] = { label = 'Las Venturas', id = 7, price = 200 }
mods[#mods + 1] = { label = 'Liberty City', id = 8, price = 200 }
mods[#mods + 1] = { label = 'LS Car Meet', id = 9, price = 200 }
mods[#mods + 1] = { label = 'Panic', id = 10, price = 200 }
mods[#mods + 1] = { label = 'Pounders', id = 11, price = 200 }
mods[#mods + 1] = { label = 'Sprunk', id = 12, price = 200 }
end

local currentMod = GetVehicleNumberPlateTextIndex(vehicle)
stored.currentMod = currentMod
for _, v in ipairs(mods) do
Expand Down Expand Up @@ -440,4 +510,4 @@ return {
--Hydraulics = {id = 21, price = 2000, cam = {angle = vec2(127.125, 33.0), off = vec3(-3.200000, 3.400000, 2.100000)}},
--Xenon_lights = {id = 22, price = 2000, cam = {angle = vec2(127.125, 33.0), off = vec3(-3.200000, 3.400000, 2.100000)}},

}
}
31 changes: 13 additions & 18 deletions fxmanifest.lua
Original file line number Diff line number Diff line change
@@ -1,41 +1,36 @@
fx_version "cerulean"
fx_version 'cerulean'
use_experimental_fxv2_oal 'yes'
lua54 'yes'
game 'gta5'

author "Byte Labs"
author 'Byte Labs'
version '2.0.1'

repository 'Byte-Labs-Project/bl_customs'

ui_page 'web/build/index.html'
--ui_page 'http://localhost:5173/'

dependency 'bl_bridge'

client_scripts {
"@bl_bridge/imports/client.lua",
"client/init.lua"
}
shared_script '@ox_lib/init.lua'

dependencies {
'bl_bridge',
client_scripts {
'@bl_bridge/imports/client.lua',
'client/init.lua'
}

server_scripts {
"@bl_bridge/imports/server.lua",
"server/main.lua"
'@bl_bridge/imports/server.lua',
'server/main.lua'
}

shared_script '@ox_lib/init.lua'
ui_page 'web/build/index.html'
--ui_page 'http://localhost:5173/'

files {
'data/*.lua',
'client/modules/*.lua',
'web/build/index.html',
'web/build/**/*',
"data/chameleon/*.meta",
'data/chameleon/*.meta',
}

data_file "CARCOLS_GEN9_FILE" "data/chameleon/carcols_gen9.meta"
data_file "CARMODCOLS_GEN9_FILE" "data/chameleon/carmodcols_gen9.meta"
data_file 'CARCOLS_GEN9_FILE' 'data/chameleon/carcols_gen9.meta'
data_file 'CARMODCOLS_GEN9_FILE' 'data/chameleon/carmodcols_gen9.meta'
10 changes: 8 additions & 2 deletions web/src/components/MainContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,20 @@ const MainContainer: React.FC = () => {
icon: selectedData.icon,
menuType: selectedData.menuType,
});
setCardsCount({ total: menu.data.length, current: 1 });
}
}, [menu, setMenuData, setSelected, setCardsCount]);
}, [menu, setMenuData, setSelected]);

const RenderCards = useMemo(() => {
const hiddenItemsCount = menu.data.filter(value => value.hide).length;

return menu.data.map((value, index) => {
if (!value.hide) {
let label = value.label || value.id;

if (value.selected) {
setCardsCount({ total: menu.data.length - hiddenItemsCount, current: (index - hiddenItemsCount) + 1 });
}

return (
<Card
key={index}
Expand Down