A Textdraw isn't showing (script 100% right)
#1

Hello,

I've been searching for this bug now days (yes, serious, days), and I can't find any script bug. Maybe it's a SA-MP bug? The positions of my textdraw are all allright. Here is some script:

pawn Code:
new Text:InfoBoxDraw[MAX_PLAYERS]; // (located at top of script)
pawn Code:
for(new i = 0; i < MAX_PLAYERS; i ++) // MAX_PLAYERS is 100 here. (located in OnGameModeInit)
{
    InfoBoxDraw[i] = TextDrawCreate(500.000000, 130.000000, "~w~bladi"); // 500 - 130
    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 Code:
stock SetInfoBoxMessage(playerid,message[],time = -1)
{
    if(GetPVarInt(playerid,"ShowingInfoBox") == 1) KillTimer(GetPVarInt(playerid,"InfoBoxTimer"));
    TextDrawShowForPlayer(playerid,InfoBoxDraw[playerid]);
    TextDrawSetString(InfoBoxDraw[playerid],message);
    PlayerPlaySound(playerid,1083,0.0,0.0,0.0);
    if(time != -1)
    {
        SetPVarInt(playerid,"InfoBoxTimer",SetTimerEx("OnInfoBoxHide",time,0,"i",playerid));
        SetPVarInt(playerid,"ShowingInfoBox",1);
    }
    return 1;
}
The draw isn't out-screen at all? I wonder why it is no working, since everything is pretty ok. The textdraw is made with Zamaroht's Textdraw Creator.

Jochem
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)