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

Colocando tag [ADM] e [GM] do lado do nick (32x64)

2 participantes

Ir para baixo

Colocando tag [ADM] e [GM] do lado do nick (32x64) Empty Colocando tag [ADM] e [GM] do lado do nick (32x64)

Mensagem por lordsams Qua Jul 20, 2011 12:02 pm

Esse tutorial pode ser MUITO complicado
Prestem BASTANTEEE atenção pois tenho certeza que terá muitas reclamações

O tutorial é 100% Client-Side

Irei logo avisando, esse tutorial só funcionará se o servidor estiver programado para sprites 32x32 =]

Na sub BltPlayerName vá no final dela (na End Sub)
Subindo algumas linhas verá: Call DrawText(...
Substitua esta linha inteira por:

Código:
Call DrawText(TexthDC, TextX - (NewPlayerX * PIC_X) - NewXOffset, TextY - (NewPlayerY * PIC_Y) - NewYOffset, Add & GetPlayerName(index), color)

Indo umas 3 linhas para cima, verá: TextX = ...
Substitua essa linha inteira por:

Código:
TextX = GetPlayerX(index) * PIC_X + sx + Player(index).xOffset + Int(PIC_X / 2) - (((Len(GetPlayerName(index)) + Len(Add)) / 2) * 8)

Suba uma linha e adicione:
Código:

                If GetPlayerAccess(index) > 0 And GetPlayerAccess(index) < 5 Then
                Add = "[GM]"
                End If
                If GetPlayerAccess(index) = 5 Then
                Add = "[ADM]"
                End If

Subindo algumas linhas, verá outro Call DrawText
Substitua esta linha inteira por:

Código:
Call DrawText(TexthDC, TextX, TextY, Add & "" & GetPlayerName(MyIndex), color)

Umas 3 linhas para cima verá outro TextX = ...
Substitua novamente a linha por:

Código:
TextX = NewX + sx + Int(PIC_X / 2) - (((Len(GetPlayerName(MyIndex)) + Len(Add)) / 2) * 8)

Suba uma linha e adicione:

Código:
                    If GetPlayerAccess(MyIndex) > 0 And GetPlayerAccess(MyIndex) < 5 Then
                    Add = "[GM]"
                    End If
                    If GetPlayerAccess(MyIndex) = 5 Then
                    Add = "[ADM]"
                    End If

Logo à cima, verá: If index = MyIndex Then
Logo em cima dessa linha adicione:

Código:

Dim Add

Coisa simples

Obs:
Caso tenha algo como: If lvl >= 1 Then
Terá dois Call DrawText e dois TextX, substitua no de baixo ^^
lordsams
lordsams
Mod. Global
Mod. Global

Mensagens : 3
Créditos : 1
Data de inscrição : 19/07/2011

Ir para o topo Ir para baixo

Colocando tag [ADM] e [GM] do lado do nick (32x64) Empty Re: Colocando tag [ADM] e [GM] do lado do nick (32x64)

Mensagem por RenanR Qua Jul 20, 2011 11:28 pm

Muito bom!! +1 crédito continue assim.
RenanR
RenanR
Administrador
Administrador

Mensagens : 20
Créditos : 0
Data de inscrição : 06/06/2011

https://mmomakerbr.directorioforuns.com

Ir para o topo Ir para baixo

Ir para o topo


 
Permissões neste sub-fórum
Não podes responder a tópicos