04.01.2017, 03:00
Hi, I need help... I'm tired of trying make working this.
Let me explain you, I made this function.
PD: I know it seems long, but it's just about textdraws.
And I'm creating this textdraws.
But, when I try to show the textdraws, it only shows the one that is first in "OnPlayerConnect". For example, now it's first Textdraw[playerid][0](It only shows this one), but if I put first Textdraw[playerid][1] it will only shows Textdraw[playerid][1].
Between, I made this "desbug" commands
But It didn't work... In the console, when I use CreateTextDraw it send the message(printf) fine, making me think the problem isn't there.
I'll rep the one who help.
Let me explain you, I made this function.
PD: I know it seems long, but it's just about textdraws.
PHP код:
enum iText
{
Float:xTP,
Float:yTP
}
new infoT[MAX_PLAYERS][MAX_TEXTDRAWS][iText];
PlayerText:CreateTextDraw(textdrawid, playerid, Float:x, Float:y, text[])
{
CreatePlayerTextDraw(playerid, x, y, text);
infoT[playerid][textdrawid][xTP] = x;
infoT[playerid][textdrawid][yTP] = y;
printf("%f %f %i",x,y,textdrawid);
return;
}
PHP код:
new PlayerText:Textdraw[MAX_PLAYERS][MAX_TEXTDRAWS];
public OnPlayerConnect(playerid)
{
Textdraw[playerid][0] = CreateTextDraw(0, playerid, 359.319915, 243.331069, "O");/*Textdraw[playerid][1] = */
PlayerTextDrawLetterSize(playerid, Textdraw[playerid][0], 0.795679, 3.151572);
PlayerTextDrawAlignment(playerid, Textdraw[playerid][0], 1);
PlayerTextDrawColor(playerid, Textdraw[playerid][0], -1);
PlayerTextDrawSetShadow(playerid, Textdraw[playerid][0], 0);
PlayerTextDrawSetOutline(playerid, Textdraw[playerid][0], 0);
PlayerTextDrawBackgroundColor(playerid, Textdraw[playerid][0], 51);
PlayerTextDrawFont(playerid, Textdraw[playerid][0], 2);
PlayerTextDrawSetProportional(playerid, Textdraw[playerid][0], 1);
Textdraw[playerid][1] = CreateTextDraw(1, playerid, 359.439971, 224.784439, "O"); //Textdraw[playerid][0] =
PlayerTextDrawLetterSize(playerid, Textdraw[playerid][1], 0.795679, 3.151572);
PlayerTextDrawAlignment(playerid, Textdraw[playerid][1], 1);
PlayerTextDrawColor(playerid, Textdraw[playerid][1], -1);
PlayerTextDrawSetShadow(playerid, Textdraw[playerid][1], 0);
PlayerTextDrawSetOutline(playerid, Textdraw[playerid][1], 0);
PlayerTextDrawBackgroundColor(playerid, Textdraw[playerid][1], 51);
PlayerTextDrawFont(playerid, Textdraw[playerid][1], 2);
PlayerTextDrawSetProportional(playerid, Textdraw[playerid][1], 1);
return 1;
}
Between, I made this "desbug" commands
PHP код:
if(!strcmp(cmdtext,"/test3"))
{
for(new i = 0; i < MAX_TEXTDRAWS; i++)
{
PlayerTextDrawShow(playerid,Textdraw[playerid][i]);
}
return 1;
}
if(!strcmp(cmdtext,"/test4"))
{
Textdraw[playerid][1] = CreateTextDraw(1, playerid, 359.439971, 224.784439, "O"); //Textdraw[playerid][0] =
PlayerTextDrawLetterSize(playerid, Textdraw[playerid][1], 0.795679, 3.151572);
PlayerTextDrawAlignment(playerid, Textdraw[playerid][1], 1);
PlayerTextDrawColor(playerid, Textdraw[playerid][1], -1);
PlayerTextDrawSetShadow(playerid, Textdraw[playerid][1], 0);
PlayerTextDrawSetOutline(playerid, Textdraw[playerid][1], 0);
PlayerTextDrawBackgroundColor(playerid, Textdraw[playerid][1], 51);
PlayerTextDrawFont(playerid, Textdraw[playerid][1], 2);
PlayerTextDrawSetProportional(playerid, Textdraw[playerid][1], 1);
return 1;
}
I'll rep the one who help.