[FilterScript] SAMP Clock
#4

Quote:
Originally Posted by WASD
Посмотреть сообщение
Why timer = 6 sec?
And this:
PHP код:
        TextDrawShowForPlayer(playeridClock[0]);
        
TextDrawShowForPlayer(playeridClock[1]); 
PHP код:
    for(new 0MAX_PLAYERSi++)
    {
                
TextDrawHideForPlayer(iClock[0]);
                
TextDrawHideForPlayer(iClock[1]);
                
TextDrawShowForPlayer(iClock[0]);
                
TextDrawShowForPlayer(iClock[1]);
    } 
Change to:
PHP код:
for(new t!= 2t++) TextDrawShowForPlayer(playeridClock[t]); 
PHP код:
    for(new 0MAX_PLAYERSi++)
    {
                for(new 
t!= 2t++) TextDrawHideForPlayer(iClock[t]),TextDrawShowForPlayer(iClock[t]);
    } 
You should avoid using loops for such matters (hiding/showing textdraws), they are actually slower than allotting them internally.

Want proof?

1 variable alternated 50,000 times in two different manners.



Reply


Messages In This Thread
SAMP Clock - by hamzajaved780 - 17.07.2015, 16:54
Re: SAMP Clock - by WASD - 17.07.2015, 17:07
Re: SAMP Clock - by Crayder - 17.07.2015, 20:52
Re: SAMP Clock - by SickAttack - 17.07.2015, 21:01
Re: SAMP Clock - by hamzajaved780 - 18.07.2015, 04:06
Re: SAMP Clock - by hamzajaved780 - 18.07.2015, 04:09
Re: SAMP Clock - by Kursed - 19.07.2015, 06:21
Re: SAMP Clock - by Blacky4Life - 19.07.2015, 15:41
Re: SAMP Clock - by dionisak0s - 19.07.2015, 16:01
Re: SAMP Clock - by Crayder - 19.07.2015, 20:03
Re: SAMP Clock - by BladeFire - 20.07.2015, 12:21

Forum Jump:


Users browsing this thread: 1 Guest(s)