Do i need update every time textdraw? - 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: Do i need update every time textdraw? (
/showthread.php?tid=628739)
Do i need update every time textdraw? -
henkas - 14.02.2017
Hi!
I have one question do i need update every time textdraw like example i use killstreaks textdraw and its count kills like if i make kill at same time i update him like this
Код:
pInfo[killerid][blabla]++;
UpdateKST();
So me real question is do i need everytime update this textdraw system like i have made if player connect hes kills set to zero like this
Код:
pInfo[playerid][blabla] = 0;
so do i need update it to? with
or i dont rly need it? Because i thinking if i dont update it, its just stuck on counting and didn't show correctly in textdraw.
Re: Do i need update every time textdraw? -
AjaxM - 14.02.2017
Yes, you should, if you want to update his textdraw once he had a kill streak!
Special Notice:
Use += instead of ++ for more optimisations !
Example Code:
PHP код:
pInfo[killerid][blabla] += 1;
Re: Do i need update every time textdraw? -
Vince - 14.02.2017
^ That's just a matter of personal preference. Both work and one isn't better than the other.
Re: Do i need update every time textdraw? -
henkas - 14.02.2017
Quote:
Originally Posted by AjaxM
Yes, you should, if you want to update his textdraw once he had a kill streak!
Special Notice:
Use += instead of ++ for more optimisations !
Example Code:
PHP код:
pInfo[killerid][blabla] += 1;
|
Ok thanks