CreateTextDraw GLOBAL Problem
#1

I dont know what is non of the textdraws are conflicting with one another just this one textdraw wont show a word what so ever
justtt a big black line Grrr



here code

Dont Matter what i do or how many posts i read and read the wiki Every setup the same.. Am i missing something this is driving me Insane... Here my Codes for the Main ones I like to work normaly

pawn Код:
new Text:GMXDRAW[MAX_PLAYERS] = Text:INVALID_TEXT_DRAW;
pawn Код:
public OnGameModeInit() AND on PlayerConnect
{    
    for(new i=0; i <MAX_PLAYERS; i++)
    {
        GMXDRAW[i] = TextDrawCreate(1.000000, 437.000000, " ");
        TextDrawBackgroundColor(GMXDRAW[i], 255);
        TextDrawFont(GMXDRAW[i], 1);
        TextDrawLetterSize(GMXDRAW[i], 0.370000, 1.000000);
    TextDrawColor(GMXDRAW[i], 65535);
        TextDrawSetOutline(GMXDRAW[i], 0);
        TextDrawSetProportional(GMXDRAW[i], 1);
        TextDrawSetShadow(GMXDRAW[i], 1);
        TextDrawUseBox(GMXDRAW[i], 1);
        TextDrawBoxColor(GMXDRAW[i], 255);
        TextDrawTextSize(GMXDRAW[i], 639.000000, 0.000000);
    }
    return 1;
}
pawn Код:
new GMXTIMER;
CMD:gmx(playerid, params[])
{
    new gstring[128],reason[75],seconds;
    if(PlayerOnline[playerid] != 0)
    {
        if (PlayerInfo[playerid][pAdminLevel] >= 4)
        {
            new aname[MAX_PLAYER_NAME];
            GetPlayerName(playerid,aname,sizeof(aname));
            if(sscanf(params, "ds",seconds,reason)) return SendClientMessage(playerid, WARNING, "/gmx (seconds) (reason)");
            if(strval(params) < 1 || strval(params) > 1000000) return SendClientMessage(playerid, WARNING, "Allowed GMX Seconds 1-1000000");
            for(new i = 0; i <MAX_PLAYERS; i++)
            {
            GMXTIMER = SetTimer("GameModeRestart",seconds*1000, true);
            format(gstring,sizeof(gstring),"Admin %s(%d) Has Requested A Server Restart In %i Seconds Reason: %s",aname,playerid,GMXTIMER);
            SaveWeapsAmmo(i);
            PlayerUpdate(i);
            GameGMX[i] = 1;

            TextDrawSetString(GMXDRAW[i],gstring);
            TextDrawShowForPlayer(i, GMXDRAW[i]);
           
            }
        }
        else
        {
            SendClientMessage(playerid, 0xFF0000AA, "Do What?");
            return 1;
        }
    }
    return 1;
}
pawn Код:
public OnPlayerDisconnect(playerid)
{
    TextDrawDestroy(GMXDRAW[playerid]);
        return 1;
}
Reply
#2

The problem is here
pawn Код:
public OnGameModeInit() AND on PlayerConnect
{    
    for(new i=0; i <MAX_PLAYERS; i++)
    {
        GMXDRAW[i] = TextDrawCreate(1.000000, 437.000000, " ");
        TextDrawBackgroundColor(GMXDRAW[i], 255);
        TextDrawFont(GMXDRAW[i], 1);
        TextDrawLetterSize(GMXDRAW[i], 0.370000, 1.000000);
    TextDrawColor(GMXDRAW[i], 65535);
        TextDrawSetOutline(GMXDRAW[i], 0);
        TextDrawSetProportional(GMXDRAW[i], 1);
        TextDrawSetShadow(GMXDRAW[i], 1);
        TextDrawUseBox(GMXDRAW[i], 1);
        TextDrawBoxColor(GMXDRAW[i], 255);
        TextDrawTextSize(GMXDRAW[i], 639.000000, 0.000000);
    }
    return 1;
}
You can't do that just move it to OnPlayerConnect and change the loop (i) to playerid.
Happened to me btw.
Reply
#3

No sorry still not the issue.. have others the same way still works but this textdraw
Reply
#4

No i set them in different places this one just shows a background box but really thin ill try make one up higher maybe see what happens No I created one way above a spec textdraw and still shows bottom textdraw black line i have them all set to playertext and Invalid text draw What else could be the issue do you know??
Reply
#5

[BUMP] Cant seem to figure out why it does this.. after 4 textdraws i cant have anymore wtf
Reply
#6

[BUMP] Cant seem to figure out why it does this.. after 4 textdraws i cant have anymore wtf
[BUMP] Cant seem to figure out why it does this.. after 4 textdraws i cant have anymore wtf
[BUMP] Cant seem to figure out why it does this.. after 4 textdraws i cant have anymore wtf
[BUMP] Cant seem to figure out why it does this.. after 4 textdraws i cant have anymore wtf
Reply
#7

Probably so 2048 textdraws Are only 4 textdraws Limit.. Yeah Boy!!
Reply
#8

Limit in textdraws? No I don't think so.
Reply
#9

I have a similiar problem which no-one has replied to in quite a few days.

https://sampforum.blast.hk/showthread.php?tid=400276&page=2
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)