Textdraw not updating
#1

Hi scripters

Is PlayerTextDrawTextSize updating like PlayerTextDrawSetString ?
I'm making my own progress bar but PlayerTextDrawTextSize is not updating when i change it ?

My Code
pawn Код:
new Float:Exp = PlayerInfo[playerid][pExp];
        new Float:ExpAmount = expamount[playerid];
        new Float:Delba = floatdiv(Exp, ExpAmount);
        new Float:procentce = floatmul(Delba, 100.00);
        new Float:procent = floatadd(501.00, procentce);
        printf("procent: %f", procent); // Just to make sure if the calculations are correct and they ARE CORRECT !
        PlayerTextDrawTextSize(playerid,level1[playerid], procent, 80.000000); // Doesn't update

        new stringexp[126];
        format(stringexp,sizeof(stringexp),"%d/%d", PlayerInfo[playerid][pExp], expamount[playerid]);
        PlayerTextDrawSetString(playerid, level4[playerid], stringexp); // It Updates and it is changing the values
Any idea ?
Reply
#2

I'm not sure if this works, but you can try.
You need to hide the textdraw and show it again to make the changes visible.

EDIT:
https://sampwiki.blast.hk/wiki/TextDrawTextSize
Reply
#3

Quote:
Originally Posted by BlackBank3
Посмотреть сообщение
I'm not sure if this works, but you can try.
You need to hide the textdraw and show it again to make the changes visible.

EDIT:
https://sampwiki.blast.hk/wiki/TextDrawTextSize
Can i just show the textdraw again without hiding it ? I tried showing one same textdraw 10 times and with just one HideTextdraw function the textdraw dissapeared.
Reply
#4

Quote:
Originally Posted by NeroX98
Посмотреть сообщение
Can i just show the textdraw again without hiding it ? I tried showing one same textdraw 10 times and with just one HideTextdraw function the textdraw dissapeared.
Yes, it's mentioned on the wiki.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)