PDA

View Full Version : Do i need update every time textdraw?


henkas
14/02/2017, 12:20 PM
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 UpdateKST(); 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.

AjaxM
14/02/2017, 03:19 PM
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:


pInfo[killerid][blabla] += 1;

Vince
14/02/2017, 03:20 PM
^ That's just a matter of personal preference. Both work and one isn't better than the other.

henkas
14/02/2017, 03:21 PM
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:


pInfo[killerid][blabla] += 1;


Ok thanks :)