For those who can't work from the snippet:
PHP Code:
//#CLIENTSIDE
function onCreated() {
createButton();
}
function createButton() {
with(Serverlist_TaskBar) {
new GuiButtonCtrl("Serverlist_TaskButton_HelloWorld") {
useownprofile = true;
// Copy GUI Values from Main Button
for (temp.i: Serverlist_TaskButton_Main.getvarnames()) {
if (temp.i != icon) (@ temp.i) = Serverlist_TaskButton_Main.(@ temp.i);
}
x = 500;
text = "Hello World";
// Draw Icon
seticonsize(20, 20);
icon.clearall();
icon.drawimagestretched(0, 0, icon.width, icon.height, "login_icon_developer4.png", 0, 0, 32, 32);
width += 10;
// Setup Action Event Catcher
thiso.catchevent(this, "onAction", "onHelloWorldClicked");
}
}
}
function onHelloWorldClicked() {
player.chat = "Whatup world!";
}