CreateTextDraw GLOBAL Problem -
Buzzbomb - 21.12.2012
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;
}
Re: CreateTextDraw GLOBAL Problem -
DaRk_RaiN - 21.12.2012
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.
Re: CreateTextDraw GLOBAL Problem -
Buzzbomb - 21.12.2012
No sorry still not the issue.. have others the same way still works but this textdraw
Re: CreateTextDraw GLOBAL Problem -
Buzzbomb - 21.12.2012
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??
Re: CreateTextDraw GLOBAL Problem -
Buzzbomb - 24.12.2012
[BUMP] Cant seem to figure out why it does this.. after 4 textdraws i cant have anymore wtf
Re: CreateTextDraw GLOBAL Problem -
Buzzbomb - 26.12.2012
[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
Re: CreateTextDraw GLOBAL Problem -
Buzzbomb - 27.12.2012
Probably so 2048 textdraws Are only 4 textdraws Limit.. Yeah Boy!!
Re: CreateTextDraw GLOBAL Problem -
Lordzy - 27.12.2012
Limit in textdraws? No I don't think so.
Re: CreateTextDraw GLOBAL Problem -
Intoxicated - 27.12.2012
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