Sorry for bumping this (it has been a year

), but I've been attempting this method to no avail.
I've attempted even Thor's simple example; any other ways to do this? Or am I just doing something incorrectly?
EDIT: FIXED! Thanks to Hoyt1134
In case anyone else has this problem, here's a possible solution based off of ffcmike's example. I instead wanted to send the image of the selected weapon, so I will replace it with what I wanted to do with it:
PHP Code:
//#CLIENTSIDE
function onCreated() {
this.images = {};
for ( temp.i = 0; temp.i < player.weapons.size(); temp.i ++ ) {
thiso.images.add( player.weapons[ temp.i ].image );
new GuiShowImgCtrl( "test" @ temp.i ) {
y = 55;
x = 50 + temp.i * 40;
image = player.weapons[ temp.i ].image;
thiso.catchEvent( this.name, "onMouseDown", "onSelect" );
}
}
}
function onSelect( temp.gui ) {
temp.gui = temp.gui.substring( 4 );
temp.image = this.images[ temp.gui ];
player.chat = temp.image;
}
Again, sorry for the bump, but this may be useful for others as catchEvent() does not include parameters... Maybe a useful addition?