Textdraw String Problem
#1

I made these textdraws :-
pawn Код:
Textdraw12 = TextDrawCreate(297.875000, 407.583374, "50");
TextDrawLetterSize(Textdraw12, 0.283124, 1.302500);
TextDrawAlignment(Textdraw12, 1);
TextDrawColor(Textdraw12, -1);
TextDrawSetShadow(Textdraw12, 0);
TextDrawSetOutline(Textdraw12, 1);
TextDrawBackgroundColor(Textdraw12, 51);
TextDrawFont(Textdraw12, 1);
TextDrawSetProportional(Textdraw12, 1);

Textdraw13 = TextDrawCreate(410.125000, 408.000152, "50");
TextDrawLetterSize(Textdraw13, 0.283124, 1.302500);
TextDrawAlignment(Textdraw13, 1);
TextDrawColor(Textdraw13, -1);
TextDrawSetShadow(Textdraw13, 0);
TextDrawSetOutline(Textdraw13, 1);
TextDrawBackgroundColor(Textdraw13, 51);
TextDrawFont(Textdraw13, 1);
TextDrawSetProportional(Textdraw13, 1);
And then i added Textdrawstrings -
pawn Код:
forward MapKill1();
public MapKill1()
{
    new string[16];
    format(string, sizeof string, "%d", MapKillsSoldiers);
    TextDrawSetString(Textdraw12, string);
    return 1;
}

forward MapKill2();
public MapKill2()
{
    new string[16];
    format(string, sizeof string, "%d", MapKillsTerrorists);
    TextDrawSetString(Textdraw13, string);
    return 1;
}
Still, the textdraw shows 50, not the Kills.
Any help?
Reply
#2

To show changed textdraw, you must hide and show textdraw again.

Quote:

forward MapKill1();
public MapKill1()
{
TextDrawHideForAll(MapKillsSoldiers);
new string[16];
format(string, sizeof string, "%d", MapKillsSoldiers);
TextDrawSetString(Textdraw12, string);
TextDrawShowForAll(MapKillsSoldiers);
return 1;
}

forward MapKill2();
public MapKill2()
{
TextDrawHideForAll(MapKillsTerrorists);
new string[16];
format(string, sizeof string, "%d", MapKillsTerrorists);
TextDrawSetString(Textdraw13, string);
TextDrawShowForAll(MapKillsTerrorists);
return 1;
}

Reply
#3

Quote:
Originally Posted by jidavid
Посмотреть сообщение
To show changed textdraw, you must hide and show textdraw again.
Didn't worked.
Reply
#4

Код:
forward MapKill1();
public MapKill1()
{
TextDrawHideForAll(MapKillsSoldiers);
new string[16];
format(string, sizeof string, "%d", MapKillsSoldiers);
TextDrawSetString(Textdraw12, string);
TextDrawShowForAll(Textdraw12);
return 1;
}

forward MapKill2();
public MapKill2()
{
TextDrawHideForAll(MapKillsTerrorists);
new string[16];
format(string, sizeof string, "%d", MapKillsTerrorists);
TextDrawSetString(Textdraw13, string);
TextDrawShowForAll(Textdraw13);
return 1;
}
Reply
#5

I was wrong, fixed:

Quote:

forward MapKill1();
public MapKill1()
{
TextDrawHideForAll(Textdraw12);
new string[16];
format(string, sizeof string, "%d", MapKillsSoldiers);
TextDrawSetString(Textdraw12, string);
TextDrawShowForAll(Textdraw12);
return 1;
}

forward MapKill2();
public MapKill2()
{
TextDrawHideForAll(Textdraw13);
new string[16];
format(string, sizeof string, "%d", MapKillsTerrorists);
TextDrawSetString(Textdraw13, string);
TextDrawShowForAll(Textdraw13);
return 1;
}

Reply
#6

Quote:
Originally Posted by jidavid
Посмотреть сообщение
I was wrong, fixed:
Still, it says 50.
Reply
#7

Show us every place where you use MapKillsSoldiers/MapKillsTerrorists
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)