PHP Code:
//#CLIENTSIDE
function onKeyPressed(code, key, scancode) {
if (key == clientr.hatkey)
{
new GuiWindowCtrl("Hats_Window1") {
profile = GuiBlueWindowProfile;
clientrelative = true;
clientextent = "188,174";
canmove = true;
canresize = false;
closequery = false;
destroyonhide = false;
text = "Hats";
x = 568;
y = 207;
new GuiScrollCtrl("Hats_TextList1_Scroll") {
profile = GuiBlueScrollProfile;
height = 132;
hscrollbar = "alwaysOff";
vscrollbar = "dynamic";
width = 152;
x = 16;
new GuiTextListCtrl("Hats_TextList1") {
profile = GuiBlueTextListProfile;
height = 32;
horizsizing = "width";
width = 148;
clearrows();
for (temp.i=1; temp.i <= clientr.hatsize; temp.i++)
{
addrow(0,clientr.hat(@ temp.i));
}
}
Hats_Window1.show();
}
new GuiButtonCtrl("Hats_Button1") {
profile = GuiBlueButtonProfile;
text = "Equip Hat";
width = 80;
x = 53;
y = 138;
}
Hats_Window1.show();
}
}
}
function Hats_Button1.onAction() {
temp.text = Hats_TextList1.getSelectedText();
if (temp.text != player.attr[1])
{
player.attr[1] = temp.text;
client.message.add("Equiped "@temp.text);
}
else
{
player.attr[1] = "no-hat.png";
client.message.add("Took Off My Hat");
}
}
Lets say my clientr.hatsize = 5;
It displays the 5 hats you have. Yet it says 0, I belive there might be a problem right here ++ addrow(0,clientr.hat(@ temp.i));
Because there are flags clientr.hat1
clientr.hat2....
Yeah so I need help with fixing that