Textdraws
#1

We have textdraws load but for some reason they dont want to show up but they seem to be there just invisable .
Reply
#2

https://sampwiki.blast.hk/wiki/TextDrawCreate
https://sampwiki.blast.hk/wiki/TextDrawShowForPlayer / https://sampwiki.blast.hk/wiki/TextDrawShowForAll
Код:
// This variable is used to store the id of the textdraw
// so that we can use it throught the script
new Text:welcomeText; 
 
public OnGameModeInit()
{
    // This line is used to create the textdraw. 
    // Note: This creates a textdraw without any formatting.
    welcomeText = TextDrawCreate(240.0,580.0,"Welcome to my SA-MP server");
    return 1;
}
 
public OnPlayerConnect(playerid)
{
    //This is used to show the player the textdraw when they connect.
    TextDrawShowForPlayer(playerid,welcomeText);
}
-Important Note: Maximum length of textdraw is 800 characters. Longer text will crash the client.
-Important Note: If you use color codes (such as ~R~ ~G~) beyond 255th character the client will crash trying to display the textdraw.
-Important Note: If you choose values for y that are less than 1, the first text row will be invisible and only the shadow is visible.
-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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)