TextDrawCreate
From SA-MP Wiki
TextDrawCreate
Creates a textdraw.
(Float:x, Float:y, text[])
| x | X-Coordinate |
| y | Y-Coordinate |
| text[] | The text in the textdraw. |
| Returns | The ID of the created textdraw |
Important Note: text[] must NOT be empty or the server will crash! If you need a textdraw that shows nothing, use " " (a space) or _ (underscore)
Note: The x,y coordinate is the top left coordinate for the text draw area based on a 640x480 "canvas" (irrespective of screen resolution). If you plan on using TextDrawAlignment with alignment 3 (right), the x,y coordinate is the top right coordinate for the text draw.
Note: This function merely CREATES the textdraw, you must use TextDrawShowForPlayer to show it.
Related Functions
The following functions might be useful as well, as they're related to this function in one way or another.
- TextDrawDestroy: Destroy a textdraw.
- TextDrawColor: Set the color of the text in a textdraw.
- TextDrawBoxColor: Set the color of the box in a textdraw.
- TextDrawBackgroundColor: Set the background color of a textdraw.
- TextDrawAlignment: Set the alignment of a textdraw.
- TextDrawFont: Set the font of a textdraw.
- TextDrawLetterSize: Set the letter size of the text in a textdraw.
- TextDrawTextSize: Set the size of a textdraw box.
- TextDrawSetOutline: Choose whether the text has an outline.
- TextDrawSetShadow: Toggle shadows on a textdraw.
- TextDrawSetProportional: Scale the text spacing in a textdraw to a proportional ratio.
- TextDrawUseBox: Toggle if the textdraw has a box or not.
- TextDrawSetString: Set the text in an existing textdraw.
- TextDrawShowForPlayer: Show a textdraw for a certain player.
- TextDrawHideForPlayer: Hide a textdraw for a certain player.
- TextDrawShowForAll: Show a textdraw for all players.
- TextDrawHideForAll: Hide a textdraw for all players.
