So I am trying to pass a variable with an event.. Not sure if it's possible? Or if I am way wrong on how to do it? I am planning to have let's say 10 images, and clicking on them will make the player chat the number of the image it clicked on..
PHP Code:
//#CLIENTSIDE
function onCreated() {
for ( i = 0; i < 10; i++ ) {
new GuiShowImgCtrl("test" @ i) {
y = 55;
x = 50 + i * 40;
image = "block.png";
thiso.catchevent(this, "onMouseDown", "onSelect", i);
}
}
}
function onSelect() {
player.chat = "a" SPC params[0];
}
Didn't work.
Removing i from
catchevent(), however, shows the name of the Control.