SA-MP Forums Archive
Textdraw not updating - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Textdraw not updating (/showthread.php?tid=485613)



Textdraw not updating - NeroX98 - 05.01.2014

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 ?


Re: Textdraw not updating - BlackBank - 05.01.2014

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


Re: Textdraw not updating - NeroX98 - 05.01.2014

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.


Re: Textdraw not updating - BlackBank - 05.01.2014

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.