TextDraw help
#1

Ok so i putted a text draw in my script like this

Код:
Top of screen:
new Text:Help;
Код:
}

public OnPlayerCommandText(playerid, cmdtext[])

if(strcmp("/help", cmdtext, true, 5) == 0)
{

Help = TextDrawCreate(260.000000,222.000000,"Help info:");
Help = TextDrawCreate(260.000000,202.000000,"Type /cmds for a list of commands");
Help = TextDrawCreate(260.000000,182.000000,"Type /teles for a list of teleports");
Help = TextDrawCreate(260.000000,162.000000,"Type /serverinfo for server info");
Help = TextDrawCreate(260.000000,142.000000,"Type /rules to see the server rules");

TextDrawUseBox(Help,1);
TextDrawBoxColor(Help, 0xa0d3ffAA);
TextDrawBackgroundColor(Help, 0xa0d3ffAA);

TextDrawShowForPlayer(playerid,Help);
I have no erors or warnings but when i open the game it shows me only
Код:
Type /rules to see the server rules
it shows me only the last text draw. Pls help Thanks for forward help
Reply
#2

Код:
TextDrawCreate(260.000000,222.000000,"Help info:~n~Type /cmds for a list of commands~n~Type /teles for a list of teleports~n~Type /serverinfo for server info~n~Type /rules to see the server rules");
You cant do it that way, to do it your way, you would need to make a seperate textdraw for each line.

Use just one textdraw and make a new line with ~n~
Reply
#3

Let's try to fix it by this:

TOP OF SCREEN:
Код:
new Text:Help1;
new Text:Help2;
new Text:Help3;
new Text:Help4;
new Text:Help5;
AND THE SCRIPT:

Код:
if(strcmp("/help", cmdtext, true, 5) == 0)
{

Help1 = TextDrawCreate(260.000000,222.000000,"Help info:");
Help2 = TextDrawCreate(260.000000,202.000000,"Type /cmds for a list of commands");
Help3 = TextDrawCreate(260.000000,182.000000,"Type /teles for a list of teleports");
Help4 = TextDrawCreate(260.000000,162.000000,"Type /serverinfo for server info");
Help5 = TextDrawCreate(260.000000,142.000000,"Type /rules to see the server rules");

TextDrawUseBox(Help1,1);
TextDrawBoxColor(Help1, 0xa0d3ffAA);
TextDrawBackgroundColor(Help1, 0xa0d3ffAA);

TextDrawUseBox(Help2,1);
TextDrawBoxColor(Help2, 0xa0d3ffAA);
TextDrawBackgroundColor(Help2, 0xa0d3ffAA);

TextDrawUseBox(Help3,1);
TextDrawBoxColor(Help3, 0xa0d3ffAA);
TextDrawBackgroundColor(Help3, 0xa0d3ffAA);

TextDrawUseBox(Help41,1);
TextDrawBoxColor(Help4, 0xa0d3ffAA);
TextDrawBackgroundColor(Help4, 0xa0d3ffAA);

TextDrawUseBox(Help5,1);
TextDrawBoxColor(Help5, 0xa0d3ffAA);
TextDrawBackgroundColor(Help5, 0xa0d3ffAA);

TextDrawShowForPlayer(playerid,Help1);
TextDrawShowForPlayer(playerid,Help2);
TextDrawShowForPlayer(playerid,Help3);
TextDrawShowForPlayer(playerid,Help4);
TextDrawShowForPlayer(playerid,Help5);
}
U can't put more than 1 TextDraw in 1 Text variable. 1 Text Variable is only for 1 TextDraw (Except if u use arrays )
Hopez helpz!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)