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


    Limpando target

    Valentine
    Valentine
    Administrador
    Administrador


    Medalhas : Limpando target ZgLkiRU
    Mensagens : 5336
    Créditos : 1163

    Limpando target Empty Limpando target

    Mensagem por Valentine Dom Jun 23, 2013 10:37 am

    Se você tem um alvo e ele sai do jogo ou morre, isso não é limpado do seu jogador, ou seja, você continuará com um alvo selecionado mesmo que esse jogador não esteja mais online ou vivo naquele mapa.

    1 - No modPlayer, procure por:
    Código:
    Call SetPlayerVital(index, Vitals.HP, 0)

    2- Embaixo adicione:
    Código:
        ' Loop through entire map and purge NPC from targets
        For i = 1 To Player_HighIndex
            If IsPlaying(i) And IsConnected(i) Then
                If GetPlayerMap(i) = GetPlayerMap(index) Then
                    If TempPlayer(i).targetType = TARGET_TYPE_PLAYER Then
                        If TempPlayer(i).target = index Then
                            TempPlayer(i).target = 0
                            TempPlayer(i).targetType = TARGET_TYPE_NONE
                            SendTarget i
                        End If
                    End If
                End If
            End If
        Next

    3 - Procure por:
    Código:
    TempPlayer(index).InGame = False

    4 - Embaixo adicione:
    Código:
            ' Loop through entire map and purge NPC from targets
            For i = 1 To Player_HighIndex
                If IsPlaying(i) And IsConnected(i) Then
                    If GetPlayerMap(i) = GetPlayerMap(index) Then
                        If TempPlayer(i).targetType = TARGET_TYPE_PLAYER Then
                            If TempPlayer(i).target = index Then
                                TempPlayer(i).target = 0
                                TempPlayer(i).targetType = TARGET_TYPE_NONE
                                SendTarget i
                            End If
                        End If
                    End If
                End If
            Next

    Créditos:
    Valentine

      Data/hora atual: Sex Abr 26, 2024 6:14 am