PHP Code:
//#CLIENTSIDE
//Try creating the GUI first before you actually try modifying/adding to it.
function onCreated() {
if (isObject("GUI_Inventory")) {
GUI_Inventory.destroy();
}
new GuiWindowCtrl("GUI_Inventory") {
width = 350;
height = 300;
x = GraalControl.width / 2 - (width / 2);
y = GraalControl.height / 2 - (height / 2);
hide;
}
}
function onKeyPressed(code, key) {
if (key == "q") {
this.on = !this.on;
if (this.on) {
GUI_Inventory.visible = true;
player.chat = "I opened my inventory!";
} else {
GUI_Inventory.visible = false;
player.chat = "I closed my inventory!";
}
}
}
Good luck buddy, I didn't test it!