Alguna solucion al "Server Full"?
#8

Quote:
Originally Posted by spell
Посмотреть сообщение
I think this code can work:

pawn Код:
new
    RealConnected[MAX_PLAYERS],
    secureTimer = -1;

forward legitimconnections();

public OnFilterScriptInit() {
    initTimer();
}

public OnFilterScriptExit() {
    exitTimer();
}

public OnPlayerConnect(playerid) {
    RealConnected[playerid] = true;
}
public OnPlayerDisconnect(playerid, reason) {
    RealConnected[playerid] = false;
}

stock initTimer() {
    exitTimer();
    secureTimer = SetTimer("legitimconnections", 2000, true);
}

stock exitTimer() {
    if (secureTimer != -1) {
        KillTimer(secureTimer);
    }
}

public legitimconnections() {

    for (new i, max = GetMaxPlayers(); i < max; i++) {
        // If not connected, Kick for free the slot.
        if (!RealConnected[i]) Kick(i);

    }
}
Eso puede ser que funcione, no lo he probado porque no tengo ningъn servidor. Lo que hace es darle kick a los slots que estбn realmente vacнos en el servidor para asн dejarlos libres para usuarios reales.

Si funciona correctamente avisen, igualmente esto creo que serнa una soluciуn temporal..

Creditos: spell
Reply


Messages In This Thread
Alguna solucion al "Server Full"? - by Lumabd - 14.12.2014, 17:57
Respuesta: Alguna solucion al "Server Full"? - by JessyChaos - 14.12.2014, 20:03
Respuesta: Alguna solucion al "Server Full"? - by xGenius - 15.12.2014, 17:03
Respuesta: Alguna solucion al "Server Full"? - by jotajeda - 15.12.2014, 17:11
Respuesta: Alguna solucion al "Server Full"? - by xGenius - 15.12.2014, 17:14
Respuesta: Alguna solucion al "Server Full"? - by iSanchez - 15.12.2014, 19:13
Respuesta: Alguna solucion al "Server Full"? - by Zume - 15.12.2014, 20:16
Respuesta: Alguna solucion al "Server Full"? - by The_Scope - 15.12.2014, 20:47
Respuesta: Alguna solucion al "Server Full"? - by Zume - 15.12.2014, 20:50
Respuesta: Alguna solucion al "Server Full"? - by The_Scope - 15.12.2014, 20:53

Forum Jump:


Users browsing this thread: 1 Guest(s)