Originally Posted by siweia
I am fine with button 7-12 showing on vehicle bar.
Would that work if I just keep the second part of the code?
|
If I'm understanding you correctly, you want your paged action bar's buttons 7-12 to still show if you enter a vehicle/override bar state. If so, try replacing the _onAttributeChanged secure snippet with this:
Lua Code:
local _onAttributeChanged = [[
if name == 'statehidden' then
if (HasOverrideActionBar() or HasVehicleActionBar()) then
for i = 1, 12 do
if i < 7 then
if overridebuttons[i]:GetAttribute('statehidden') then
buttons[i]:SetAttribute('statehidden', true)
buttons[i]:Hide()
else
buttons[i]:SetAttribute('statehidden', false)
buttons[i]:Show()
end
else
buttons[i]:SetAttribute('statehidden', false)
buttons[i]:Show()
end
end
else
for i = 1, 12 do
buttons[i]:SetAttribute('statehidden', false)
buttons[i]:Show()
end
end
end
]]
If not, please give me more detail so I can help you better