PHP Code:
//#CLIENTSIDE
function onCreated(){ setTimer(0.05); disableselectweapons(); }
function onKeyPressed( code, key )
{
if (key == "q")
{
client.qo = 1 - client.qo;
}
}
function onTimeout()
{
if (client.qo = NULL)
hideMenu();
else showMenu();
setTimer(0.05);
}
function showMenu()
{
thiso.qx = screenwidth / 2 + 100;
thiso.qy = screenheight / 2 - 100;
thiso.item_name = NULL;
thiso.item_image = NULL;
thiso.item_pos = NULL;
thiso.item_list = NULL;
thiso.item_count = 0;
for (temp.i: player.weapons)
{
if (temp.i.name.starts("-")==0) {
thiso.item_name.add(temp.i.name);
thiso.item_image.add(temp.i.image);
thiso.item_pos.add(temp.i);
}
}
new GuiShowImgCtrl("Inv_Window")
{
x = thiso.qx;
y = thiso.qy;
width = 411;
height = 280;
image = "cyn_inventory_gui.gif";
for(thiso.i=0; thiso.i<5; thiso.i++;)
{
for(thiso.j=0; thiso.j<4; thiso.j++;)
{
new GuiShowImgCtrl("InvItem_"@thiso.item_count)
{
width = 32;
height = 32;
x = thiso.qx + 76 + (thiso.j * 45);
y = thiso.qy + 52 + (45*thiso.i);
image = thiso.item_image[thiso.item_count];
thiso.item_list[thiso.item_count] = "InvItem_"@thiso.item_count;
thiso.item_count += 1;
}
}
}
}
}
function hideMenu()
{
Inv_Window.destroy();
}
Well, I just tried and my items won't even show up? =/
EDIT: NVM WORKS FINE. I just had to delete gx, and gy.