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


    Level aparecer em baixo do nome

    Nãner
    Nãner
    Iniciante
    Iniciante


    Mensagens : 65
    Créditos : 21

    Ficha do personagem
    Nível: 1
    Experiência:
    Level aparecer em baixo do nome Left_bar_bleue0/0Level aparecer em baixo do nome Empty_bar_bleue  (0/0)
    Vida:
    Level aparecer em baixo do nome Left_bar_bleue30/30Level aparecer em baixo do nome Empty_bar_bleue  (30/30)

    Level aparecer em baixo do nome Empty Level aparecer em baixo do nome

    Mensagem por Nãner Sáb maio 07, 2011 1:11 pm

    Cliente Side, e Procure por ' Draw Player Names, em seguida em baixo de:
    Código:
    Call BltPlayerName(I)

    Adicione:
    Código:
    Call BltPlayerLevel(I)

    Agora vá ao modGameLogic e procure por Sub BltPlayerName(ByVal Index As Long), e mude a Sub toda por:
    Código:
    Sub BltPlayerName(ByVal Index As Long)
    Dim TextX As Long
    Dim TextY As Long
    Dim Color As Long
       
        ' Check access level
        If GetPlayerPK(Index) = NO Then
            Select Case GetPlayerAccess(Index)
                Case 0
                    Color = QBColor(Yellow)
                Case 1
                    Color = QBColor(BrightBlue)
                Case 2
                    Color = QBColor(Cyan)
                Case 3
                    Color = QBColor(Blue)
                Case 4
                    Color = QBColor(Pink)
            End Select
        Else
            Color = QBColor(BrightRed)
        End If
           
        ' Draw name
        TextX = GetPlayerX(Index) * PIC_X + sx + Player(Index).XOffset + Int(PIC_X / 2) - ((Len(GetPlayerName(Index)) / 2) * 8)
        TextY = GetPlayerY(Index) * PIC_Y + sx + Player(Index).YOffset - Int(PIC_Y / 2) - (12)
        Call DrawText(TexthDC, TextX - (NewPlayerX * PIC_X) - NewXOffset, TextY - (NewPlayerY * PIC_Y) - NewYOffset, GetPlayerName(Index), Color)
    End Sub

    E logo abaixo dessa sub, adicione a seguinte sub:
    Código:
    Sub BltPlayerLevel(ByVal Index As Long)
    Dim TextX As Long
    Dim TextY As Long
    Dim Color As Long
       
        ' Check access level
        If GetPlayerPK(Index) = NO Then
            Select Case GetPlayerAccess(Index)
                Case 0
                    Color = QBColor(Yellow)
                Case 1
                    Color = QBColor(BrightBlue)
                Case 2
                    Color = QBColor(Cyan)
                Case 3
                    Color = QBColor(Blue)
                Case 4
                    Color = QBColor(Pink)
            End Select
        Else
            Color = QBColor(BrightRed)
        End If
           
        ' Draw name
        TextX = GetPlayerX(Index) * PIC_X + sx + Player(Index).XOffset + Int(PIC_X / 2) - ((Len(GetPlayerName(Index)) / 2) * 8)
        TextY = GetPlayerY(Index) * PIC_Y + sx + Player(Index).YOffset - Int(PIC_Y / 2) - (SIZE_Y - PIC_Y)
        Call DrawText(TexthDC, TextX - (NewPlayerX * PIC_X) - NewXOffset, TextY - (NewPlayerY * PIC_Y) - NewYOffset, "Level: " & GetPlayerLevel(Index), Color)
    End Sub

    Ainda nesse module, procure por Sub BltPlayerGuildName(ByVal Index As Long) e Mude essa sub toda para:
    Código:
    Sub BltPlayerGuildName(ByVal Index As Long)
    Dim TextX As Long
    Dim TextY As Long
    Dim Color As Long

        ' Check access level
        If GetPlayerPK(Index) = NO Then
            Select Case GetPlayerGuildAccess(Index)
                Case 0
                    If GetPlayerSTR(Index) > 0 Then
                        Color = QBColor(Red)
                    Else
                        Color = QBColor(Red)
                    End If
                Case 1
                    Color = QBColor(BrightCyan)
                Case 2
                    Color = QBColor(Yellow)
                Case 3
                    Color = QBColor(BrightGreen)
                Case 4
                    Color = QBColor(Yellow)
            End Select
        Else
            Color = QBColor(BrightRed)
        End If

    If Index = MyIndex Then
        TextX = NewX + sx + Int(PIC_X / 2) - ((Len(GetPlayerGuild(MyIndex)) / 2) * 8)
        TextY = NewY + sx - Int(PIC_Y / 4) - 34
       
        Call DrawText(TexthDC, TextX, TextY, GetPlayerGuild(MyIndex), Color)
    Else
        ' Draw name
        TextX = GetPlayerX(Index) * PIC_X + sx + Player(Index).XOffset + Int(PIC_X / 2) - ((Len(GetPlayerGuild(Index)) / 2) * 8)
        TextY = GetPlayerY(Index) * PIC_Y + sx + Player(Index).YOffset - Int(PIC_Y / 2) - 12
        Call DrawText(TexthDC, TextX - (NewPlayerX * PIC_X) - NewXOffset, TextY - (NewPlayerY * PIC_Y) - NewYOffset, GetPlayerGuild(Index), Color)
    End If
    End Sub

    E é isso ai pessoal, até o próximo tuto!

    Obs: Para que o Level apareça corretamente, é necessário ter o GetPlayerlevel ativado pelo cliente!

      Data/hora atual: Qui Mar 28, 2024 11:28 am