Looks like it's a position problem, since I've centered it using a function and the tab panel shown up.
local sx, sy = guiGetScreenSize ( )
function centerGUI ( guiElement )
local width, height = guiGetSize ( guiElement, false )
local x, y = ( sx / 2 - width / 2 ), ( sy / 2 - height / 2 )
guiSetPosition ( guiElement, x, y, false )
end
tab = guiCreateTabPanel(429, 151, 430, 404, true)
guiSetVisible ( tab, false )
centerGUI ( tab )
tab_inventory = guiCreateTab("Weapon:", tab)
inventory_gridlist = guiCreateGridList (0.03, 0.03, 0.46, 0.94, true, tab_inventory)
weapSlots = guiGridListAddColumn(inventory_gridlist, "slots", 0.9)
function weapItemInInventory ( )
if ( weapSlots ) then
for slot = 1, 12 do
local weapon = getPedWeapon ( localPlayer, slot )
if ( weapon > 0 ) then
local row = guiGridListAddRow ( inventory_gridlist )
guiGridListSetItemText ( inventory_gridlist, row, weapSlots, getWeaponNameFromID ( weapon ), false, false )
end
end
end
end
addEventHandler ( "onClientResourceStart", getResourceRootElement(), weapItemInInventory )
setTimer ( function ( )
guiGridListClear ( inventory_gridlist )
weapItemInInventory ( )
end, 5000, 0 )
function enableInv ( )
local state = ( not guiGetVisible ( tab ) )
guiSetVisible(tab, state)
showCursor ( state )
end
bindKey ( "B", "down", enableInv )