Textdraw problem
#1

Hello everybody.I create TextdrawBox in side text.But problem is in that.Box shows first and after it text.But in script is first text then box.Strange



Code:
pawn Код:
new Text:Stats[MAX_PLAYERS],
    Text:R_1[MAX_PLAYERS];
new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2[MAX_PLAYERS];
new Text:Textdraw3[MAX_PLAYERS];

LoadTextdraws()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        Stats[i] = TextDrawCreate(506.000000, 387.000000, "~y~XP:        ~w~%d");
        TextDrawBackgroundColor(Stats[i], 255);
        TextDrawFont(Stats[i], 1);
        TextDrawLetterSize(Stats[i], 0.360000, 1.000000);
        TextDrawColor(Stats[i], -1);
        TextDrawSetOutline(Stats[i], 0);
        TextDrawSetProportional(Stats[i], 1);
        TextDrawSetShadow(Stats[i], 1);
        R_1[i] = TextDrawCreate(512.000000, 421.000000, "Rank:Commander of Army");
        TextDrawBackgroundColor(R_1[i], 255);
        TextDrawFont(R_1[i], 1);
        TextDrawLetterSize(R_1[i], 0.260000, 1.000000);
        TextDrawColor(R_1[i], -1);
        TextDrawSetOutline(R_1[i], 0);
        TextDrawSetProportional(R_1[i], 1);
        TextDrawSetShadow(R_1[i], 1);

        Textdraw2[i] = TextDrawCreate(521.000000, 363.000000, "~g~Kills:        ~w~%d");
        TextDrawBackgroundColor(Textdraw2[i], 255);
        TextDrawFont(Textdraw2[i], 1);
        TextDrawLetterSize(Textdraw2[i], 0.340000, 1.000000);
        TextDrawColor(Textdraw2[i], -1);
        TextDrawSetOutline(Textdraw2[i], 0);
        TextDrawSetProportional(Textdraw2[i], 1);
        TextDrawSetShadow(Textdraw2[i], 1);

        Textdraw3[i] = TextDrawCreate(506.000000, 375.000000, "~r~Deaths:        ~w~%d");
        TextDrawBackgroundColor(Textdraw3[i], 255);
        TextDrawFont(Textdraw3[i], 1);
        TextDrawLetterSize(Textdraw3[i], 0.340000, 1.000000);
        TextDrawColor(Textdraw3[i], -1);
        TextDrawSetOutline(Textdraw3[i], 0);
        TextDrawSetProportional(Textdraw3[i], 1);
        TextDrawSetShadow(Textdraw3[i], 1);
    }
    Textdraw0 = TextDrawCreate(500.000000, 352.000000, "_");
    TextDrawBackgroundColor(Textdraw0, 255);
    TextDrawFont(Textdraw0, 1);
    TextDrawLetterSize(Textdraw0, 0.500000, 10.000000);
    TextDrawColor(Textdraw0, -1);
    TextDrawSetOutline(Textdraw0, 0);
    TextDrawSetProportional(Textdraw0, 1);
    TextDrawSetShadow(Textdraw0, 1);
    TextDrawUseBox(Textdraw0, 1);
    TextDrawBoxColor(Textdraw0, 170);
    TextDrawTextSize(Textdraw0, 635.000000, 0.000000);

    Textdraw1 = TextDrawCreate(536.000000, 350.000000, "Stats");
    TextDrawBackgroundColor(Textdraw1, 255);
    TextDrawFont(Textdraw1, 2);
    TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
    TextDrawColor(Textdraw1, -1);
    TextDrawSetOutline(Textdraw1, 1);
    TextDrawSetProportional(Textdraw1, 1);
   
    return 1;

}
public OnPlayerSpawn(playerid)
{
    TextDrawShowForPlayer(playerid,Text:Stats[playerid]);
    TextDrawShowForPlayer(playerid,Text:R_1[playerid]);
    TextDrawShowForPlayer(playerid,Text:Textdraw2[playerid]);
    TextDrawShowForPlayer(playerid,Text:Textdraw3[playerid]);
    TextDrawShowForPlayer(playerid,Text:Textdraw1);
    SetPlayerInterior(playerid, 0);
    TextDrawShowForPlayer(playerid,Text:Textdraw0);
    return 1;
}
Please reply fast.Thanks
Reply
#2

you already asked this here
http://forum.sa-mp.com/showthread.ph...89#post1860689

do like they said
create the BOX first!
then create the other textdraws.
Reply
#3

Quote:
Originally Posted by Jonny5
Посмотреть сообщение
you already asked this here
http://forum.sa-mp.com/showthread.ph...89#post1860689

do like they said
create the BOX first!
then create the other textdraws.
I did man.But it`s not working.I try....I make new textdraw...
Reply
#4

you need to waite untill someone answers your post,
you cannot just make a new one

you have not did what they said

pawn Код:
new Text:Stats[MAX_PLAYERS],
    Text:R_1[MAX_PLAYERS];
new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2[MAX_PLAYERS];
new Text:Textdraw3[MAX_PLAYERS];

LoadTextdraws()
{
    Textdraw0 = TextDrawCreate(500.000000, 352.000000, "_");
    TextDrawBackgroundColor(Textdraw0, 255);
    TextDrawFont(Textdraw0, 1);
    TextDrawLetterSize(Textdraw0, 0.500000, 10.000000);
    TextDrawColor(Textdraw0, -1);
    TextDrawSetOutline(Textdraw0, 0);
    TextDrawSetProportional(Textdraw0, 1);
    TextDrawSetShadow(Textdraw0, 1);
    TextDrawUseBox(Textdraw0, 1);
    TextDrawBoxColor(Textdraw0, 170);
    TextDrawTextSize(Textdraw0, 635.000000, 0.000000);

    Textdraw1 = TextDrawCreate(536.000000, 350.000000, "Stats");
    TextDrawBackgroundColor(Textdraw1, 255);
    TextDrawFont(Textdraw1, 2);
    TextDrawLetterSize(Textdraw1, 0.500000, 1.000000);
    TextDrawColor(Textdraw1, -1);
    TextDrawSetOutline(Textdraw1, 1);
    TextDrawSetProportional(Textdraw1, 1);
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        Stats[i] = TextDrawCreate(506.000000, 387.000000, "~y~XP:        ~w~%d");
        TextDrawBackgroundColor(Stats[i], 255);
        TextDrawFont(Stats[i], 1);
        TextDrawLetterSize(Stats[i], 0.360000, 1.000000);
        TextDrawColor(Stats[i], -1);
        TextDrawSetOutline(Stats[i], 0);
        TextDrawSetProportional(Stats[i], 1);
        TextDrawSetShadow(Stats[i], 1);
        R_1[i] = TextDrawCreate(512.000000, 421.000000, "Rank:Commander of Army");
        TextDrawBackgroundColor(R_1[i], 255);
        TextDrawFont(R_1[i], 1);
        TextDrawLetterSize(R_1[i], 0.260000, 1.000000);
        TextDrawColor(R_1[i], -1);
        TextDrawSetOutline(R_1[i], 0);
        TextDrawSetProportional(R_1[i], 1);
        TextDrawSetShadow(R_1[i], 1);

        Textdraw2[i] = TextDrawCreate(521.000000, 363.000000, "~g~Kills:        ~w~%d");
        TextDrawBackgroundColor(Textdraw2[i], 255);
        TextDrawFont(Textdraw2[i], 1);
        TextDrawLetterSize(Textdraw2[i], 0.340000, 1.000000);
        TextDrawColor(Textdraw2[i], -1);
        TextDrawSetOutline(Textdraw2[i], 0);
        TextDrawSetProportional(Textdraw2[i], 1);
        TextDrawSetShadow(Textdraw2[i], 1);

        Textdraw3[i] = TextDrawCreate(506.000000, 375.000000, "~r~Deaths:        ~w~%d");
        TextDrawBackgroundColor(Textdraw3[i], 255);
        TextDrawFont(Textdraw3[i], 1);
        TextDrawLetterSize(Textdraw3[i], 0.340000, 1.000000);
        TextDrawColor(Textdraw3[i], -1);
        TextDrawSetOutline(Textdraw3[i], 0);
        TextDrawSetProportional(Textdraw3[i], 1);
        TextDrawSetShadow(Textdraw3[i], 1);
    }
   
    return 1;

}
public OnPlayerSpawn(playerid)
{
    TextDrawShowForPlayer(playerid,Textdraw0);
    TextDrawShowForPlayer(playerid,Textdraw1);
    TextDrawShowForPlayer(playerid,Stats[playerid]);
    TextDrawShowForPlayer(playerid,R_1[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw2[playerid]);
    TextDrawShowForPlayer(playerid,Textdraw3[playerid]);
    SetPlayerInterior(playerid, 0);
    return 1;
}
i moved Text:Textdraw1 and Text:Textdraw0 Above the other code as this is your box!
Reply
#5

You don't need to put ' Text: ' .
pawn Код:
TextDrawShowForPlayer(playerid,Text:Textdraw0);
pawn Код:
TextDrawShowForPlayer(playerid,Textdraw0);
Reply
#6

FIXED
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)