Aldeia RPG

Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Suporte ao desenvolvimento de jogos


    Player_HighIndex

    Ricardo
    Ricardo
    Ocasional
    Ocasional


    Mensagens : 162
    Créditos : 71

    Ficha do personagem
    Nível: 1
    Experiência:
    Player_HighIndex  Left_bar_bleue0/0Player_HighIndex  Empty_bar_bleue  (0/0)
    Vida:
    Player_HighIndex  Left_bar_bleue30/30Player_HighIndex  Empty_bar_bleue  (30/30)

    Player_HighIndex  Empty Player_HighIndex

    Mensagem por Ricardo Dom Jun 21, 2015 12:42 pm

    Descrição

    Quando um jogador se desconecta, não é refeita a contagem do Player_HighIndex.

    Server~Side

    modServerTCP

    Na CloseSocket abaixo de:

    Código:
    Call ClearPlayer(index)

    Adicione:

    Código:
            Dim i As Integer
            ' re-set the high index
            Player_HighIndex = 0
            For i = MAX_PLAYERS To 1 Step -1
                If IsConnected(i) Then
                    Player_HighIndex = i
                    Exit For
                End If
            Next
            ' send the new highindex to all logged in players
            SendHighIndex

    Créditos

    Ricardo

    Kotol gosta desta mensagem


      Data/hora atual: Seg maio 20, 2024 4:09 pm