Jump to content

inv


Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...