![]() |
Alert(); In Graal!
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:
This is how to use it. On any script place this directly under onCreated on the clientside. PHP Code:
PHP Code:
Alert("TITLE", "MESSAGE"); -Enjoy |
Anyone who knows how to make GUIs can make that without any problems. -__-
|
Thanks! I really needed this for my server.
|
Well I figured someone who doesn't now has this to learn off.
No need to be too sutle. |
Quote:
|
There are already guides on that on the Graal Bible.
I just thought it would be nifty to be able to do alert(); in Graal. |
It would also be much better if Alerts were created and destroyed dynamically, as if you were to receive multiple alerts in quick succession they would over-write eachother.
Alert: You've just won the Server Lottery, congratulations! 1 second later Alert: Graal765432 has sent you a hug |
Well maybe making an clientr variable as an index and then increasing it when an alert is created and decreasing when the close button is pressed..
I suppose that would work. I didn't think of this when scripting it. |
Quote:
|
I don't know how I would go about doing it using catchevent(); so il just stick with using an index for now.
|
Quote:
PHP Code:
PHP Code:
|
You can also use:
PHP Code:
One neat thing you might consider adding is perhaps some confirm function. For instance: PHP Code:
|
@Ffcmike thanks for the help, il try your idea out when I ye home.
@Tigarius I have used shared.adminMessage(); before but I wanted to make it have a title aswell. And shared.adminMessage(); I'm not sure it it would overwrite the pay if you get another message. |
| All times are GMT +2. The time now is 09:12 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.