12.05.2015, 16:32
Hi there,
I have a few PlayerTextDraws, but they seem not to be showing up.
The syntax is completely checked, td array is dumped and is OK, and the debuginfo clarifies that the function (RefreshXPBar) is called, and has never went to stop or fail, so each PlayerTextDrawShow instance is called successfully.
and here is to show up:
I hope you can help, it's really strange
I have a few PlayerTextDraws, but they seem not to be showing up.
The syntax is completely checked, td array is dumped and is OK, and the debuginfo clarifies that the function (RefreshXPBar) is called, and has never went to stop or fail, so each PlayerTextDrawShow instance is called successfully.
PHP код:
stock CreateXPBar(playerid)
{
// Background
xpBarTD[playerid][0] = CreatePlayerTextDraw(playerid, 320.0 - 50.0, 480.0 - 20.0, " ");
PlayerTextDrawAlignment(playerid, xpBarTD[playerid][0], 1);
PlayerTextDrawUseBox(playerid, xpBarTD[playerid][0], true);
PlayerTextDrawTextSize(playerid, xpBarTD[playerid][0], 100.0, 15.0);
PlayerTextDrawBoxColor(playerid, xpBarTD[playerid][0], 0x000000AA);
PlayerTextDrawLetterSize(playerid, xpBarTD[playerid][0], 0.48 , 1.6);
PlayerTextDrawBackgroundColor(playerid, xpBarTD[playerid][0], 0x000000AA);
// and 3 other TDs just like this...
}
PHP код:
stock RefreshXPBar(playerid)
{
new xpstr[23];
format(xpstr, sizeof xpstr, "%i / 0", pInfo[playerid][pXP]);
PlayerTextDrawSetString(playerid, xpBarTD[playerid][2], xpstr);
PlayerTextDrawShow(playerid, xpBarTD[playerid][0]);
PlayerTextDrawShow(playerid, xpBarTD[playerid][1]);
PlayerTextDrawShow(playerid, xpBarTD[playerid][2]);
PlayerTextDrawShow(playerid, xpBarTD[playerid][3]);
}