Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GUIEditor = {
- gridlist = {},
- button = {},
- window = {},
- }
- addEventHandler("onClientResourceStart", resourceRoot,
- function()
- GUIEditor.window[1] = guiCreateWindow(14, 171, 389, 427, "Inventar", false)
- guiWindowSetSizable(GUIEditor.window[1], false)
- guiSetAlpha(GUIEditor.window[1], 0.84)
- guiSetProperty(GUIEditor.window[1], "CaptionColour", "FF102489")
- GUIEditor.gridlist[1] = guiCreateGridList(9, 26, 266, 388, false, GUIEditor.window[1])
- local col1 = guiGridListAddColumn(GUIEditor.gridlist[1], "Item", 0.4)
- local col2 = guiGridListAddColumn(GUIEditor.gridlist[1], "Anzahl", 0.4)
- guiSetAlpha(GUIEditor.gridlist[1], 0.74)
- GUIEditor.button[2] = guiCreateButton(280, 36, 90, 25, "Benutzen", false, GUIEditor.window[1])
- GUIEditor.button[3] = guiCreateButton(280, 71, 90, 25, "Zurücklegen", false, GUIEditor.window[1])
- GUIEditor.button[4] = guiCreateButton(280, 392, 89, 25, "Wegwerfen", false, GUIEditor.window[1])
- GUIEditor.button[5] = guiCreateButton(280, 124, 90, 25, "Ausrüsten", false, GUIEditor.window[1])
- guiSetVisible(GUIEditor.window[1], false)
- end
- )
- function invSetting()
- updateInventory()
- if guiGetVisible(GUIEditor.window[1]) == true then
- guiSetVisible(GUIEditor.window[1], false)
- else
- guiSetVisible(GUIEditor.window[1], true)
- end
- end
- function join()
- bindKey("i", "down", invSetting)
- end
- addEventHandler("onClientResourceStart", getRootElement(), join)
- addCommandHandler("rebind", join)
- function updateInventory()
- local data = getAllElementData ( localPlayer )
- for k, v in pairs ( data ) do
- local rowName = guiGridListAddRow ( GUIEditor.gridlist[1] )
- guiGridListSetItemText ( GUIEditor.gridlist[1], rowName, gridColoumn[1], tostring(k), false, false )
- local rowCount = guiGridListAddRow ( GUIEditor.gridlist[1] )
- guiGridListSetItemText ( GUIEditor.gridlist[1], rowCount, gridColoumn[2], tostring(v), false, false )
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment