need help in editing a simple spec system.
#1

Hello,
So i have edited a spec system but i have a problem. As i am making a no respawn tdm server. So I want a spec system which spec only spawned and alive players.

pawn Код:
public SpectateNext(playerid) {
    for(new i = 1, j = SpectatedPlayer[playerid] + 1; i < MAX_PLAYERS; ++i, j = (j + 1) % MAX_PLAYERS) {
        if(IsPlayerConnected(j)) {
            switch(GetPlayerState(j)) {
                case 1: PlayerSpectatePlayer(playerid, j);
                case 2, 3: PlayerSpectateVehicle(playerid, GetPlayerVehicleID(j));
                default: continue;
            }
            SpectatedPlayer[playerid] = j;

            new
                str[128]
            ;
            format(str, sizeof str, "You are now spectating %s (ID:%d).", GetName(j), j);
            return SendClientMessage(playerid, colorSPECTATE, str);
        }
    }
    return false;
}
Don't know how to edit in such a way that it only specs the spawned players not the dead one.

Any Idea ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)