Like in javascript, subscribe to events using code.
PHP Code:
function onCreated() {
this.addEventListener("this.onWeaponfired", function() {
player.chat = "Hi!";
});
showGUI();
}
function showGUI() {
new GuiBitmapBorderCtrl("this.radiogui") {
profile = GuiBitmapBorderProfile;
canmove = false;
canresize = false;
height = 50;
width = 385;
x = screenwidth - width - 20;
y = -50;
visible = true;
new GuiButtonCtrl("PlayButton") {
x = 25;
y = 5;
alpha = 1;
width = 50;
height = 20;
text = "Play";
}
new GuiButtonCtrl("MuteButton") {
x = 25;
y = 25;
alpha = 1;
width = 50;
height = 20;
text = "Mute";
}
}
this.addEventListener("MuteButton.onMouseDown", function(MouseEvent) {
echo(@MouseEvent.mousescreenx);
});
}
etc. What say thee Stefan?