[Ajuda] Loops mais leves
#1

Eu tenho um timer de 1 segundo que tem varias funзхes para todos os players e lб varias coisas acontecem para todos os players

PHP код:
SetTimer("AtualizarPlayerALL"1000,1);
forward AtualizarPlayerALL(); public AtualizarPlayerALL() {
    for(new 
0MAX_PLAYERSi++) {
        
// funcs
    
}

Qual seria a melhor forma de deixar essa funзгo mais leve?
PHP код:
forward AtualizarPlayerALL(); public AtualizarPlayerALL() {
    for(new 
0MAX_PLAYERSi++) {
        if(
IsPlayerConnected(i)) {
            
// funcs
        
}
    }

ou

PHP код:
forward AtualizarPlayerALL(); public AtualizarPlayerALL() {
    for(new 
0MAX_PLAYERSi++) {
        if(
!= INVALID_PLAYER_ID) {
            
// funcs
        
}
    }

Ou tem algum jeito melhor?
Reply


Messages In This Thread
Loops mais leves - by gmstrikker - 16.10.2017, 03:22
Re: Loops mais leves - by PT - 16.10.2017, 06:14
Re: Loops mais leves - by De4gle - 16.10.2017, 16:09
Re: Loops mais leves - by binnyl - 17.10.2017, 02:22
Re: Loops mais leves - by C4rtm4n - 17.10.2017, 03:06
Re: Loops mais leves - by Dayvison_ - 17.10.2017, 13:50
Re: Loops mais leves - by binnyl - 20.10.2017, 19:54
Re: Loops mais leves - by Bruno13 - 20.10.2017, 20:48

Forum Jump:


Users browsing this thread: 1 Guest(s)