TextDraw
#1

Hi there, i have one problem, can't make textdraw to show up
this is on GameModeInit:
pawn Код:
new Text:OrdersL[MAX_PLAYERS]; //this one is global, but im adding it for u just in case.....
for(new i = 0; i< MAX_PLAYERS; i++)
{
   OrdersL[i] = TextDrawCreate(350.000000,384.000000," ");
   TextDrawFont(OrdersL[i],2);
   TextDrawAlignment(OrdersL[i],0);
   TextDrawLetterSize(OrdersL[i],0.5,0.5);
   TextDrawBackgroundColor(OrdersL[i],0x000000ff);
   TextDrawColor(OrdersL[i],ZALSVA);
   TextDrawSetOutline(OrdersL[i],1);
   TextDrawSetProportional(OrdersL[i],1);
   TextDrawSetShadow(OrdersL[i],1);
}
On playerconnect:
pawn Код:
TextDrawHideForPlayer(playerid, OrdersL[playerid]);
part of code(allmost all of it)
pawn Код:
if(Orders[playerid] > 0)
{
   new point = random(sizeof(order)),s[20];
   SetPlayerCheckpoint(playerid,order[point][0],order[point][1],order[point][2],2.0);
   SendClientMessage(playerid,ZALSVA,"[Praneљimų gaviklis]: Pristatyk uћsakymą!");
   TextDrawShowForPlayer(playerid, OrdersL[playerid]);
   format(s, sizeof(s),"Pristatyta: %d/20",OrdersMade[playerid]);
   TextDrawSetString(OrdersL[playerid],s);
}
else
{
   SendClientMessage(playerid,VIOLETINE,"[Praneљimų gaviklis]: Nebeturi uћsakymų!");
   SendClientMessage(playerid,VIOLETINE,"[Praneљimų gaviklis]: Grįљk į kavinę ir pasiimk dar naujų uћsakymų!");
   SetPlayerCheckpoint(playerid,-2346.5813,1020.9704,50.5624,2.0);
}
P.S. my other texdraws, which made myself, work fine....
Reply
#2

TextDrawShowForPlayer(playerid, OrdersL[playerid]); ?
Reply
#3

its already there....
Reply
#4

You said you used TextDrawHideForPlayer when they connect, it should be TextDrawShowForPlayer.

Other than that, I can't see a problem.
Reply
#5

TextDrawSetString needs to be before TextDrawShowForPlayer,
Under OnPlayerConnect needs to be TextDrawShowForPlayer.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)