Anyway I have made my own "Alert" function.
If you would like to see it here's how.
Step 1:
Make a new class and name it "alert".
Now place this code in the newly created class.
PHP Code:
//#CLIENTSIDE
function Alert(title, message) {
new GuiWindowCtrl("Alert_Window") {
profile = GuiBlueWindowProfile;
destroyonhide = 1;
canmaximize = false;
canminimize = false;
canclose = false;
canmove = false;
isexternal = 0;
width = 320;
height = 120;
text = title;
x = screenwidth / 2 - width / 2;
y = screenheight / 2 - height / 2;
new GuiScrollCtrl("Alert_Text_Container") {
profile = GuiBlueScrollProfile;
x = 6;
y = 24;
width = 308;
height = 69;
hScrollBar = "dynamic";
vScrollBar = "dynamic";
new GuiMLTextCtrl("Alert_Text") {
profile = GuiBlueMLTextProfile;
text = message;
width = 287;
}
}
new GuiButtonCtrl("Alert_Ok_Button") {
profile = GuiBlueButtonProfile;
width = 40;
height = 20;
x = Alert_Window.width - Alert_Ok_Button.width - 7;
y = Alert_Window.height - Alert_Ok_Button.height - 7;
text = "Ok";
}
}
}
function Alert_Ok_Button.onAction() {
Alert_Window.destroy();
}
Step 2:
This is how to use it.
On any script place this directly under onCreated on the clientside.
PHP Code:
this.join("alert");
Then to alert the player place this.
PHP Code:
Alert("Alert!", "Hello world!");
It works like this:
Alert("TITLE", "MESSAGE");
-Enjoy