[Include] uMessageBox
#1

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
  • Version 2.1:
    Not available
  • Version 2.0:
    Not available
  • Version 1.1:
    Not available
  • Version 1.0:
    Not available
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!
Reply
#2

Nice Induce

Keep up the good work
Reply
#3

some pic how looks IG??
Reply
#4

Added. In can be customised how it looks IG.

@kirollos1999 Thanks!
Reply
#5

Good job, bro.
Reply
#6

Very Good! Kepp it Up!
Reply
#7

Looks good!
Reply
#8

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

Nice.very useful.
Reply
#10

Good and useful
Reply
#11

Nice work dude
Reply
#12

This is useful!
Reply
#13

Thanks
Reply
#14

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] ++;
Reply
#15

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!
Reply
#16

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

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

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.
Reply
#19

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.
Reply
#20

Bump.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)