Textdraw keeps dissapearing.
#1

I created TextDraws in my GM using Zamroht's in-game textdraw system, and i put them to show up 'OnPlayerSpawn'.

The problem is, every time I spawn, TextDraw2 dissapears. Why, can somebody explain?

This is the part of script where I created TextDraws
pawn Код:
Textdraw1 = TextDrawCreate(1.000000,214.000000,"VIETNAM:");
Textdraw2 = TextDrawCreate(1.000000,191.000000,"USA:");
Textdraw3 = TextDrawCreate(82.000000,191.000000,"0");
Textdraw4 = TextDrawCreate(166.000000,214.000000,"0");
And 'OnPlayerSpawn'...
pawn Код:
TextDrawShowForPlayer(playerid,Textdraw1);
TextDrawShowForPlayer(playerid,Textdraw2);
TextDrawShowForPlayer(playerid,Textdraw3);
TextDrawShowForPlayer(playerid,Textdraw4);
Reply
#2

Quote:
Originally Posted by Doom8890
Посмотреть сообщение
I created TextDraws in my GM using Zamroht's in-game textdraw system, and i put them to show up 'OnPlayerSpawn'.

The problem is, every time I spawn, TextDraw2 dissapears. Why, can somebody explain?

This is the part of script where I created TextDraws
pawn Код:
Textdraw1 = TextDrawCreate(1.000000,214.000000,"VIETNAM:");
Textdraw2 = TextDrawCreate(1.000000,191.000000,"USA:");
Textdraw3 = TextDrawCreate(82.000000,191.000000,"0");
Textdraw4 = TextDrawCreate(166.000000,214.000000,"0");
And 'OnPlayerSpawn'...
pawn Код:
TextDrawShowForPlayer(playerid,Textdraw1);
TextDrawShowForPlayer(playerid,Textdraw2);
TextDrawShowForPlayer(playerid,Textdraw3);
TextDrawShowForPlayer(playerid,Textdraw4);
Feed us, we need more code.
Reply
#3

Like what exactly?
Reply
#4

Quote:
Originally Posted by Doom8890
Посмотреть сообщение
Like what exactly?
All I'm saying is that in the code you posted there's nothing wrong.
Reply
#5

Quote:
Originally Posted by hanzen
Посмотреть сообщение
All I'm saying is that in the code you posted there's nothing wrong.
I was 90% precent sure about that too, I posted here just in case.

Have a look at this, tell me if you find anything strange-
pawn Код:
TextDrawUseBox(Textdraw1,1);
TextDrawBoxColor(Textdraw1,0x00000033);
TextDrawTextSize(Textdraw1,161.000000,0.000000);
TextDrawUseBox(Textdraw2,1);
TextDrawBoxColor(Textdraw2,0x00000033);
TextDrawTextSize(Textdraw2,77.000000,0.000000);
TextDrawUseBox(Textdraw3,1);
TextDrawBoxColor(Textdraw3,0x00000033);
TextDrawTextSize(Textdraw3,120.000000,5.000000);
TextDrawUseBox(Textdraw4,1);
TextDrawBoxColor(Textdraw4,0x00000033);
TextDrawTextSize(Textdraw4,207.000000,-2.000000);
TextDrawAlignment(Textdraw1,0);
TextDrawAlignment(Textdraw2,0);
TextDrawAlignment(Textdraw3,0);
TextDrawAlignment(Textdraw4,0);
TextDrawBackgroundColor(Textdraw1,0x000000ff);
TextDrawBackgroundColor(Textdraw2,0x000000ff);
TextDrawBackgroundColor(Textdraw3,0x000000ff);
TextDrawBackgroundColor(Textdraw4,0x000000ff);
TextDrawFont(Textdraw1,3);
TextDrawLetterSize(Textdraw1,1.000000,2.000000);
TextDrawFont(Textdraw2,3);
TextDrawLetterSize(Textdraw2,1.000000,2.000000);
TextDrawFont(Textdraw3,3);
TextDrawLetterSize(Textdraw3,1.000000,1.999999);
TextDrawFont(Textdraw4,3);
TextDrawLetterSize(Textdraw4,1.000000,2.000000);
TextDrawColor(Textdraw1,0xff000066);
TextDrawColor(Textdraw2,0x0000ff66);
TextDrawColor(Textdraw3,0xffffffff);
TextDrawColor(Textdraw4,0xffffffff);
TextDrawSetOutline(Textdraw1,1);
TextDrawSetOutline(Textdraw2,1);
TextDrawSetOutline(Textdraw3,1);
TextDrawSetOutline(Textdraw4,1);
TextDrawSetProportional(Textdraw1,1);
TextDrawSetProportional(Textdraw2,1);
TextDrawSetProportional(Textdraw3,1);
TextDrawSetProportional(Textdraw4,1);
TextDrawSetShadow(Textdraw1,1);
TextDrawSetShadow(Textdraw2,1);
TextDrawSetShadow(Textdraw3,1);
TextDrawSetShadow(Textdraw4,1);
Timer over here...
pawn Код:
public updatescore(playerid)
{
for(new p = 0;p < MAX_PLAYERS;p++)
{
if(GetPlayerState(p) == PLAYER_STATE_SPAWNED)
{
new sUSAscore[4],sVIETNAMscore[4];
format(sUSAscore,sizeof(sUSAscore),"%d",USAscore);
format(sVIETNAMscore,sizeof(sVIETNAMscore),"%d",VIETNAMscore);
TextDrawSetString(Textdraw3,sUSAscore);
TextDrawSetString(Textdraw4,sVIETNAMscore);
}
}
}
This is all code concering textdraws...If you can't find anything problematic here...Then obviously problem isn't in textdraws.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)