Releases: Byte-Labs-Studio/bl_customs
Releases · Byte-Labs-Studio/bl_customs
v2.2.1
v2.2.0
v2.1.1
What changed
- Add
canInteract
(whether to show the mod or not)
-- example
canInteract = function(vehicle)-- we check if vehicle has any extras, if not we return false so menu doesn't show
for extra = 0, 20 do
if DoesExtraExist(vehicle, extra) then
return true
end
end
return false
end
v2.1.0
Bl_customs
Bug Fixes
- Menu type not resetting
What new
- Add
onToggle: function(vehicle, index, toggle)
, it will trigger if you click on a toggle mod of the current mod
-- example, this to toggle vehicle extra
onToggle = function(vehicle, index, toggle)
SetVehicleExtra(vehicle, index, not toggle)
end,
- Add
onSelect: function(vehicle, modIndex)
, it will trigger if you click on a child of the current mod
-- example, this to set plate index
onSelect = function(vehicle, index)
SetVehicleNumberPlateTextIndex(vehicle, index)
end,
- Add
onClick: function(vehicle)
, this will be triggered if you click on the current mod and want to create child cards
-- example, this to get vehicle plates indexes
onClick = function(vehicle, stored)
local mods = {
{ label = 'Blue/White', id = 0, price = 200 },
{ label = 'Yellow/black', id = 1, price = 200 },
{ label = 'Yellow/Blue', id = 2, price = 200 },
{ label = 'Blue/White2', id = 3, price = 200 },
{ label = 'Blue/White3', id = 4, price = 200 },
{ label = 'Yankton', id = 5, price = 200 },
}
local currentMod = GetVehicleNumberPlateTextIndex(vehicle)
stored.currentMod = currentMod
for _, v in ipairs(mods) do
if v.id == currentMod then
v.selected = true
v.applied = true
break
end
end
return mods
end,
NOTE: the mods methods onToggle, onSelect, onClick will override the default effect!
- Add vehicle Extras ( @Laxasw thanks for the suggestion )
- Early return when you go back to the previous menu instead of sending unnecessary data to Lua
- Overall cleanup/improvements
v2.0.1
bl_customs v2.0.0
What changed
- Optimized UI
- Rewrite mods code
- Add repair (price will change depend on vehicle damage)
- Custom selectors to edit/create cards
- Extra configurable (look
/data
) - Separate config to own folder (
/data
) - Add Performance menu that has Upgrades instead of all in Decals
- Global Cleanup/Improvements
bl_customs v1.0.6
- Refactor mods toggle code
- Add turbo toggle
- Add livery mod
- add vehicle classes
classes = {18} --only allow emergency cars
bl_customs v1.0.5
Full Changelog: v1.0.4...v1.0.5
what changed
- Fixed issue where the menu would close when clicking arrows or Enter.
- Fixed issue requiring two clicks to apply the control effect.
- Fixed issue with mods failing to reset properly.
bl_customs v1.0.3
- Added Chameleon paint options. Credits @KoolAiddTV
bl_customs v1.0.4
- add(group) : multiple jobs and grades
group = {
police = 4 -- [job] = [grade]
}
- Location mod restrictions, added
mods
prop in locations table in config
mods = {
decals = true,
paint = true,
}
-- mods: {[key: 'wheels' | 'decals' | 'paint']: boolean}
-
group
is now inside eachlocations
table. -
add
free
to specify whether the mods are free or paid for specified location.
free: boolean