Textdraw doesn't show.
#1

Hello,

I got a problem with this textdraw. It won't show up when TextDrawShowForPlayer is used. Here's code:

pawn Код:
new Text:InfoBoxDraw[MAX_PLAYERS]; // Located at top of script
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i ++) // This code is located in OnGameModeInit
    {
        InfoBoxDraw[i] = TextDrawCreate(500.000000, 130.000000, "~w~bladi");
        TextDrawBackgroundColor(InfoBoxDraw[i], 255);
        TextDrawFont(InfoBoxDraw[i], 1);
        TextDrawLetterSize(InfoBoxDraw[i], 0.260000, 0.899999);
        TextDrawColor(InfoBoxDraw[i], -1);
        TextDrawSetOutline(InfoBoxDraw[i], 1);
        TextDrawSetProportional(InfoBoxDraw[i], 1);
        TextDrawUseBox(InfoBoxDraw[i], 1);
        TextDrawBoxColor(InfoBoxDraw[i], 1734837503);
        TextDrawTextSize(InfoBoxDraw[i], 636.000000, 0.000000);
    }
pawn Код:
stock SetInfoBoxMessage(playerid,message[],time = -1)
{
    if(GetPVarInt(playerid,"ShowingInfoBox") == 1) KillTimer(GetPVarInt(playerid,"InfoBoxTimer"));
    TextDrawSetString(InfoBoxDraw[playerid],message);
    TextDrawShowForPlayer(playerid,InfoBoxDraw[playerid]);
    PlayerPlaySound(playerid,1083,0.0,0.0,0.0); //<== This sound plays fine, so the stock works.
    if(time != -1)
    {
        SetPVarInt(playerid,"InfoBoxTimer",SetTimerEx("OnInfoBoxHide",time,0,"i",playerid));
        SetPVarInt(playerid,"ShowingInfoBox",1);
    }
    return 1;
}
I know the positions and etcetera are OK cause I created them using Zamaroht's TextdrawCreator. What could be the reason then?

Jochem
Reply


Messages In This Thread
Textdraw doesn't show. - by Jochemd - 29.06.2011, 19:15
Re: Textdraw doesn't show. - by =WoR=Varth - 29.06.2011, 23:29
Re: Textdraw doesn't show. - by Jochemd - 30.06.2011, 06:04
Re: Textdraw doesn't show. - by [GTA-PR]Temper - 01.07.2011, 09:25

Forum Jump:


Users browsing this thread: 1 Guest(s)