24.09.2017, 16:25
I am trying to make an XP bar which increases in size once XP is received, textdraws create successfully, but I can't seem to update the size of it for some reason.
This is my working playertextdraw code which creates it.
I then go to update the textdraw the textdraw a few seconds later with this code:
But this does not change the textdraw at all.
If I edit the first 'PlayerTextDrawTextSize' - when the textdraws are created, the size changes accordingly.
But updating it with this, does nothing.
Do I need to delete player textdraws to update the size? Haven't really used playertextdraws before so would appreciate a little help on this!
Thanks
Код:
Player_XPBar[playerid][1] = CreatePlayerTextDraw(playerid, 500.666870, 104.548019, "_"); PlayerTextDrawLetterSize(playerid, Player_XPBar[playerid][1], 0.370666, 0.285037); PlayerTextDrawTextSize(playerid, Player_XPBar[playerid][1], 500.000000, 0.000000); //Was: 605.00 PlayerTextDrawAlignment(playerid, Player_XPBar[playerid][1], 1); PlayerTextDrawColor(playerid, Player_XPBar[playerid][1], -10158081); PlayerTextDrawUseBox(playerid, Player_XPBar[playerid][1], 1); PlayerTextDrawBoxColor(playerid, Player_XPBar[playerid][1], 10354943); PlayerTextDrawSetShadow(playerid, Player_XPBar[playerid][1], 0); PlayerTextDrawSetOutline(playerid, Player_XPBar[playerid][1], 0); PlayerTextDrawBackgroundColor(playerid, Player_XPBar[playerid][1], 16711935); PlayerTextDrawFont(playerid, Player_XPBar[playerid][1], 1); PlayerTextDrawSetProportional(playerid, Player_XPBar[playerid][1], 1); PlayerTextDrawSetShadow(playerid, Player_XPBar[playerid][1], 0);
I then go to update the textdraw the textdraw a few seconds later with this code:
Код:
PlayerTextDrawTextSize(playerid, Player_XPBar[playerid][1], 550.000000, 0.000000);
If I edit the first 'PlayerTextDrawTextSize' - when the textdraws are created, the size changes accordingly.
But updating it with this, does nothing.
Do I need to delete player textdraws to update the size? Haven't really used playertextdraws before so would appreciate a little help on this!
Thanks