27.09.2018, 01:18
My question is when to use CreateTextDraws and CreatePlayerTextDraw and why.
Thank you.
Thank you.
// This variable is used to store the id of the textdraw
// so that we can use it throught the script
new PlayerText:welcomeText[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
// First, create the textdraw
welcomeText[playerid] = CreatePlayerTextDraw(playerid, 320.0, 240.0, "Welcome to my SA-MP server");
// Now show it
PlayerTextDrawShow(playerid, welcomeText[playerid]);
}
// 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);
}
If I create a record with TextDrawCreate I have to show them all or I can show it to a single player??.
|