GM fazendo o server reiniciar?
#10

Aqui Atualizei,talvez brevemente eu lance oficialmente:

pawn Код:
#include <a_samp>
#define iMaxPlayers (500)

#define FoReX(%0) for(new %0 = 0; zPlayers[iCount] != -1; (iCount) = zPlayers[iCount], ++iCount)

static
    zPlayers[iMaxPlayers],
    iCount = 0,
    zInterators = -1
;

public OnPlayerConnect(playerid)
{
    zInterators++;
    zPlayers[ (zInterators)] = playerid;
    zPlayers[ (zInterators + 1) ]= -1;
    return true;
}

public OnPlayerDisconnect(playerid,reason)
{
    zInterators --;
    for( new i = 0; i < sizeof zPlayers; ++i )
    {
        if( zPlayers[ i ] == playerid )
        {
            zPlayers[ i ] = zPlayers[ ( i + 1 ) ];
            if( zPlayers[ (i + 1) ] != 0 )
                for( new a = i; a < sizeof(zPlayers); a++ )
                    if( zPlayers[ a ] != 0 )
                        zPlayers[ a ] = zPlayers[ ( a + 1 ) ];
          }
    }
    return true;
}
Depois basta usar:

pawn Код:
FoReX(i)
{
     printf("O ID %d й Gay",i);
}
Basta mudar o (500) caso quiser otimizar ainda mais,isto й,mudar 500 para seus Slots!
Nota: Isto й o GMADDON.
Reply


Messages In This Thread
GM fazendo o server reiniciar? - by Ricop522 - 09.12.2010, 22:04
Re: GM fazendo o server reiniciar? - by Gustavob - 09.12.2010, 22:14
Re: GM fazendo o server reiniciar? - by zSuYaNw - 10.12.2010, 10:02
Re: GM fazendo o server reiniciar? - by [Banido]HigorOliver - 10.12.2010, 10:43
Re: GM fazendo o server reiniciar? - by zSuYaNw - 10.12.2010, 11:03
Re: GM fazendo o server reiniciar? - by SuB_ZeRo0_ - 10.12.2010, 11:50
Re: GM fazendo o server reiniciar? - by Gustavob - 10.12.2010, 15:39
Respuesta: GM fazendo o server reiniciar? - by ipsBruno - 29.12.2010, 18:40
Re: Respuesta: GM fazendo o server reiniciar? - by Ricop522 - 29.12.2010, 18:50
Respuesta: GM fazendo o server reiniciar? - by ipsBruno - 29.12.2010, 18:54

Forum Jump:


Users browsing this thread: 1 Guest(s)