SA-MP Forums Archive
[Include] mBoxes - Simple Info boxes showing by one function. ( TEXTDRAW ) - 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] mBoxes - Simple Info boxes showing by one function. ( TEXTDRAW ) (/showthread.php?tid=251421)



mBoxes - Simple Info boxes showing by one function. ( TEXTDRAW ) - Mean - 26.04.2011

So, another Include I made when I was srsly bored.

Now, it's an infobox system.
To use it, do this:
Extract mBoxes.inc into your pawno\include folder
Add this at top of your script:
pawn Код:
#include < mBoxes >
And add this to OnPlayerKeyStateChange:
pawn Код:
InfoBoxKeyStateChange( playerid, newkeys, oldkeys );
So it should look like:
pawn Код:
public OnPlayerKeyStateChange( playerid, newkeys, oldkeys )
{
    InfoBoxKeyStateChange( playerid, newkeys, oldkeys );
    // Your other code...
    return 1;
}
Now to use mBoxes, simply use:
pawn Код:
ShowInfoBox( playerid, text[ ] )
Example usage:
pawn Код:
ShowInfoBox( playerid, "This is a sample infobox. " );
It will automatically add "Use Fire button to close" thingy at bottom of your textdraw, and you just need to use your Fire Button to close the box.

Screenshot:


Click me to download!


EDIT: Also credits to Zamaroht for his TextDraw editor.


Re: mBoxes - Simple Info boxes showing by one function. ( TEXTDRAW ) - SchurmanCQC - 26.04.2011

This is great, but its also kind-of simple. You should make a "advanced users" version that allows for specific positioning.

EDIT: Also, this would be good for displaying stats on command.


Re: mBoxes - Simple Info boxes showing by one function. ( TEXTDRAW ) - Mean - 26.04.2011

It's just meant to show a string you entered.

Thanks for the suggestion .


Re: mBoxes - Simple Info boxes showing by one function. ( TEXTDRAW ) - MrDeath537 - 26.04.2011

Good job


Re: mBoxes - Simple Info boxes showing by one function. ( TEXTDRAW ) - Millionaire - 27.04.2011

Good job Mean


Re: mBoxes - Simple Info boxes showing by one function. ( TEXTDRAW ) - Phanto90 - 27.04.2011

Quote:
Originally Posted by Mean
Посмотреть сообщение
So, another filterscript I made when I was srsly bored.
Include asd.
The idea is not bad, you can improve a lot this.


Re: mBoxes - Simple Info boxes showing by one function. ( TEXTDRAW ) - Steven82 - 27.04.2011

Great job, i might use this.


Re: mBoxes - Simple Info boxes showing by one function. ( TEXTDRAW ) - Miguel - 27.04.2011

/pagesize 20


Re: mBoxes - Simple Info boxes showing by one function. ( TEXTDRAW ) - Steven82 - 27.04.2011

Quote:
Originally Posted by Miguel
Посмотреть сообщение
/pagesize 20
Then use a smaller pagesize. Nothing in the world is going to be perfect..


Re: mBoxes - Simple Info boxes showing by one function. ( TEXTDRAW ) - Mean - 27.04.2011

Quote:
Originally Posted by Miguel
Посмотреть сообщение
/pagesize 20
Okay, I will move the position in the next update.


Thanks for the positive feedback.
And yeah, it's an Include, I failed .
The position is kinda ugly due to me making it after midnight, I was awake till' 3AM.

I will improve that.


Re: mBoxes - Simple Info boxes showing by one function. ( TEXTDRAW ) - GaGlets(R) - 27.04.2011

Quote:
Originally Posted by Mean
Посмотреть сообщение
I was awake till' 3AM.
Lie, lieee lie!!!!
Look at screenshot, it was 12 minutes past midnight. Lie!!!!

Make it better, use more textdraws to improve interface.. it looks too simple, so i guess ugly.


Re: mBoxes - Simple Info boxes showing by one function. ( TEXTDRAW ) - Mean - 27.04.2011

Quote:
Originally Posted by GaGlets®
Посмотреть сообщение
Lie, lieee lie!!!!
Look at screenshot, it was 12 minutes past midnight. Lie!!!!

Make it better, use more textdraws to improve interface.. it looks too simple, so i guess ugly.
Yes, I posted this at midnight, but I was awake till 3Am actually.


Also, ever heard of timezones?


Re: mBoxes - Simple Info boxes showing by one function. ( TEXTDRAW ) - GaGlets(R) - 27.04.2011

It was a joke.. . These forum smileys are terrible.