kukimuki Posted May 6, 2023 Share Posted May 6, 2023 A little inventory with 1 tab and with like 8 slot and if press I its shows and close how can I do that? Link to comment
Shady1 Posted May 6, 2023 Share Posted May 6, 2023 41 minutes ago, kukimuki said: A little inventory with 1 tab and with like 8 slot and if press I its shows and close how can I do that? hello, welcome to the forum, I prepared a simple code upon your request, this code is an example code, you can continue through this code or you can see what I've done through this code and make 1 new one yourself. local inventoryOpen = false local inventoryTab = guiCreateTab("Inventory") local inventoryGrid = guiCreateGridList(0.01, 0.05, 0.98, 0.9, true, inventoryTab) for i = 1, 8 do guiGridListAddColumn(inventoryGrid, "Slot " .. i, 0.125) end guiSetVisible(inventoryTab, false) function toggleInventory() if inventoryOpen then guiSetVisible(inventoryTab, false) showCursor(false) inventoryOpen = false else guiSetVisible(inventoryTab, true) showCursor(true) inventoryOpen = true end end addCommandHandler("i", toggleInventory) Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now