TextDraw Won't Show!
#1

Under OnGameModeInIt():
pawn Код:
Scores = TextDrawCreate(150,450,"Loading Values");
    new tmpstr[250];//Accommodate for string size
    format(tmpstr,sizeof(tmpstr),"Grove:%d  Ballas:%d  Vagos:%d  Azteca:%d  Mafia:%d",GScores,BScores,VScores,AScores,MScores);
    TextDrawSetString(Scores,tmpstr);
    TextDrawFont(Scores,1);
    TextDrawLetterSize(Scores,0.3,2.1);
    TextDrawColor(Scores,GREY);
    TextDrawSetOutline(Scores,0);
    TextDrawSetProportional(Scores,1);
    TextDrawSetShadow(Scores,0);
    TextDrawUseBox(Scores,1);
    TextDrawBoxColor(Scores,BLACK);
Under OnPlayerSpawn(playerid):
pawn Код:
TextDrawShowForPlayer(playerid,Scores);
I don't get any errors but the text draw doesn't show!
Reply
#2

You don't get any errors. Do you get any warnings? Make sure you're declaring scores with the 'text' tag.
Reply
#3

Nope, no warnings or errors.

At the top, I have dfined it:
pawn Код:
new Text:Scores;
Reply
#4

Maybe try a different TextDraw Colour...?

Try this: TextDrawColor(Scores, 16711935);
Reply
#5

No, I tried a differnt colour... Still not working
Reply
#6

you should try making a function like

CreatePlayerTextdraws( playerid )

then adding all your textdraws there, makes thing so much easier
Reply
#7

Yes, that would clear things up a bit... Do you have any idea on how I could fix this?
Reply
#8

try creating it under onplayerconnect
Reply
#9

Still doesnt work :/
Reply
#10

pawn Код:
CreatePlayerTextdraws (playerid)
{
    Scores[playerid] = TextDrawCreate(150,450,"Loading Values");
    new tmpstr[250];//Accommodate for string size
    format(tmpstr,sizeof(tmpstr),"Grove:%d Ballas:%d Vagos:%d Azteca:%d Mafia:%d",GScores,BScores,VScores,AScores,MScores);
    TextDrawSetString(Scores[playerid],tmpstr);
    TextDrawFont(Scores[playerid],1);
    TextDrawLetterSize(Scores[playerid],0.3,2.1);
    TextDrawColor(Scores[playerid],GREY);
    TextDrawSetOutline(Scores[playerid],0);
    TextDrawSetProportional(Scores[playerid],1);
    TextDrawSetShadow(Scores[playerid],0);
    TextDrawUseBox(Scores[playerid],1);
    TextDrawBoxColor(Scores[playerid],BLACK);
    return 1;
}
under ongamemodeinit

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
CreatePlayerTextdraws(i)
}
don't know if this works but i guess you got nothing to lose in testing it.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)