View Single Post
  #1  
Old 02-11-2012, 10:37 AM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
catchevent parameters?

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 ( 
010i++ ) {
    new 
GuiShowImgCtrl("test" i) {
      
55;
      
50 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.
Reply With Quote