SA-MP Forums Archive
[Include] uMessageBox - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+---- Forum: Includes (https://sampforum.blast.hk/forumdisplay.php?fid=83)
+---- Thread: [Include] uMessageBox (/showthread.php?tid=312973)

Pages: 1 2


uMessageBox 2.0 - Fully rewritten! - Universal - 23.01.2012

uMessageBox 2.2
Updated: 2012.07.15
About

Its an include used for outputting some information for user in a message box style. It also can be used as an alert box. Its very easy to use and easy to modify to fit your needs. Things like box width, height, color, x or y location are customisable. You dont need to create multiple textdraws anymore! Its easy as it looks like!

NOTE: You dont need to worry about deleting, creating anything upon player connect or disconnect! This is managed automatically using ALS hooking.

Functions
pawn Code:
/*
       This function shows the message box for the specified player.
       You can also set the sound which will be played upon popup.
*/

ShowPlayerMessageBox( playerid, title[], content[], sound = 0, timeout = DEFAULT_TIMEOUT )

/*
       This function instantly hides the messagebox.
*/

HidePlayerMessageBox( playerid )

/*
       Updates the current active messagebox.
       It also can reset the timeout with a new one if the last param is specified.
*/

UpdatePlayerMessageBox( playerid, title[] = "", content[] = "", timeout = 0 )
Screenshot


Download
Changelogs
Code:
Version 1.0
 - Initial release

Version 1.1
 - Bug fixing

Version 2.0
 - Fully rewritten system
 - Fixed some minor bugs
 - Added title for the messagebox
 - Added sound support upon popup

Version 2.1
 - Replaced char arrays with normal arrays

Version 2.2
 - Fixed a bug with UpdatePlayerMessageBox
Please report any bugs you found, thanks!


Re: uMessageBox - kirollos1999 - 23.01.2012

Nice Induce

Keep up the good work


Re: uMessageBox - kizla - 23.01.2012

some pic how looks IG??


Re: uMessageBox - Universal - 23.01.2012

Added. In can be customised how it looks IG.

@kirollos1999 Thanks!


Re: uMessageBox - Rokenzio - 23.01.2012

Good job, bro.


Re: uMessageBox - Fires - 23.01.2012

Very Good! Kepp it Up!


Re: uMessageBox - KeKe98 - 23.01.2012

Looks good!


Re: uMessageBox - Universal - 24.01.2012

Thank you guys.
1st post updated: New version released.


Re: uMessageBox - [HK]Ryder[AN] - 24.01.2012

Nice.very useful.


Re: uMessageBox - N0FeaR - 24.01.2012

Good and useful


Re: uMessageBox - Mustafa shahzad - 24.01.2012

Nice work dude


Re: uMessageBox - T0pAz - 24.01.2012

This is useful!


Re: uMessageBox - Universal - 24.01.2012

Thanks


Re: uMessageBox - vassilis - 24.01.2012

i cant understand why people doesnt rep you its actually useful and i am not able to spend time to make textdraws like this so i am gonna use it thanks.rep[playerid] ++;


Re: uMessageBox - Universal - 24.01.2012

Quote:
Originally Posted by vassilis
Посмотреть сообщение
i cant understand why people doesnt rep you its actually useful and i am not able to spend time to make textdraws like this so i am gonna use it thanks.rep[playerid] ++;
Im glad you people find it useful! And also, thanks for the rep's!


Re: uMessageBox - iZN - 24.01.2012

Thanks dude, this will help me to make quick box textdraws.


Re: uMessageBox - Universal - 24.01.2012

Quote:
Originally Posted by [GTA]Deadly_Evil
Посмотреть сообщение
Thanks dude, this will help me to make quick box textdraws.
Np.


Re: uMessageBox - Baboon - 24.01.2012

Why do you destroy it each time it has been viewed?
That could be a problem if the server has many textdraws. Because TextdrawDestroy could also destroy other textdraws if the textdraw isn't found by some reason or it will create 2 textdraws and one will be undeletable.
Just use TextDrawSetString instead.


Re: uMessageBox - Universal - 24.01.2012

Quote:
Originally Posted by Strawhats
Посмотреть сообщение
Why do you destroy it each time it has been viewed?
That could be a problem if the server has many textdraws. Because TextdrawDestroy could also destroy other textdraws if the textdraw isn't found by some reason or it will create 2 textdraws and one will be undeletable.
Just use TextDrawSetString instead.
The ID of the textdraw is always set and hold in a variable. Destroying it, because functions uMsgBox_Show creates it, so uMsgBox_Destroy simply destroys it. I dont think it should be bugging. Textdraws usually bug because of inordinate scripting. Here, everything is done precisely. Just dont forget to uMsgBox_Destroy when player disconnects.


Re: uMessageBox - Universal - 27.01.2012

Bump.