25.03.2013, 14:20
A include which adds a function to create Text Draw Box messages with only one line of code.






Overview
TD_SendMessage
Sends a message box to a playerid.
Note:
Things to do:
Include+Example Script:






Overview
Код:
native TD_SendMessage(playerid, const string_[], header[], hide_in = 5000, bgcolor = 12840, Float:padding = 24.0000, Float:BaseX = 319.000000, Float:BaseY = 231.000000, length = 90); native TD_HideMessage(playerid);
Sends a message box to a playerid.
Note:
- If the input text is to long the function stops writing, creates a new line and continues.
- If you wish to send the text without the background box just use an invisible color for the box (e.g. 0xFFAAFF00).
- If you want to change the text color use as following ~y~, ~r~
- If the text exceeds the screen the function auto aligns the position of the box!
- If 'hide_in' is set to 0 the box will first disappear when TD_SendMessage is used a second time or TD_HideMessage is used
- playerid: Playerid who will see the text draw messages.
- const string_[]: Message that has to be send to playerid.
- header: Message Box header.
- hide_in[]: Amount of time till the box disappears.
- bgcolor[]: Color of the background box.
- padding[]: Space between the box border and actual text.
- BaseX[]: X coordinate to start the box with.
- BaseY[]: Y coordinate to start the box with.
- length[]: Length of a line till the text jumps into the next line.
- playerid: Playerid for whom the box will be hidden.
Things to do:
- Fade box out/in
Include+Example Script: