1 [ALL] Adicionando uma Tag ao lado do Nome 2/10/2012, 18:55
Myke ~
Membro Honorário I
Eu sei que poucas pessoas ainda usam o eclipse(eu sou uma delas), e a maioria migrou pro origins... mas vamos la...
Nesse tuto voce ira aprender a deixar o nome do jogador com uma tag ao lado...
Abra o Cliente ~ Side
Proucure pela Sub BltPlayerName
Substitua toda por:
Pronto Se você quiser personalizar apenas mude essa parte:
Créditos ~
caiozinho100
Eu por Postar
Nesse tuto voce ira aprender a deixar o nome do jogador com uma tag ao lado...
Abra o Cliente ~ Side
Proucure pela Sub BltPlayerName
Substitua toda por:
- Código:
Sub BltPlayerName(ByVal Index As Long)
Dim TextX As Long
Dim TextY As Long
Dim color As Long
Dim Tag As String
If Player(Index).color <> 0 Then
If Player(Index).color > 16 Then
Exit Sub
Else
color = QBColor(Val(Player(Index).color - 1))
End If
Else
' Check access level
If GetPlayerPK(Index) = NO Then
color = QBColor(BRIGHTRED)
Select Case GetPlayerAccess(Index)
Case 0
color = QBColor(WHITE)
Case 1
color = QBColor(DARKGREY)
Case 2
color = QBColor(BRIGHTGREEN)
Case 3
color = QBColor(YELLOW)
Case 4
color = QBColor(PINK)
End Select
Else
color = QBColor(BRIGHTRED)
End If
End If
'checa o acesso do player
Select Case GetPlayerAccess(MyIndex)
Case 0
Tag = ("")
Case 1
Tag = ("[MONITOR]")
Case 2
Tag = ("[MAPPER]")
Case 3
Tag = ("[GM]")
Case 4
Tag = ("[GM]")
Case Is >= 5
Tag = ("[ADM]")
End Select
If SpriteSize = 1 Then
If Index = MyIndex Then
If lvl >= 1 Then
TextX = NewX + sx + Int(PIC_X / 2) - ((Len(GetPlayerName(MyIndex) & " lvl: " & GetPlayerLevel(Index)) / 2) * 8)
Else
TextX = NewX + sx + Int(PIC_X / 2) - ((Len(Tag & GetPlayerName(MyIndex)) / 2) * 8)
End If
TextY = NewY + sx - 50
If lvl >= 1 Then
Call DrawText(TexthDC, TextX, TextY, GetPlayerName(MyIndex) & " lvl: " & GetPlayerLevel(Index), color)
Else
Call DrawText(TexthDC, TextX, TextY, Tag & GetPlayerName(MyIndex), color)
End If
Else
' Draw name
If lvl >= 1 Then
TextX = GetPlayerX(Index) * PIC_X + sx + Player(Index).xOffset + Int(PIC_X / 2) - ((Len(Tag & GetPlayerName(Index) & " lvl: " & GetPlayerLevel(Index)) / 2) * 8)
Else
TextX = GetPlayerX(Index) * PIC_X + sx + Player(Index).xOffset + Int(PIC_X / 2) - ((Len(Tag & GetPlayerName(MyIndex)) / 2) * 8)
End If
TextY = GetPlayerY(Index) * PIC_Y + sx + Player(Index).yOffset - Int(PIC_Y / 2) - 32
If lvl >= 1 Then
Call DrawText(TexthDC, TextX - (NewPlayerX * PIC_X) - NewXOffset, TextY - (NewPlayerY * PIC_Y) - NewYOffset, GetPlayerName(Index) & " lvl: " & GetPlayerLevel(Index), color)
Else
Call DrawText(TexthDC, TextX - (NewPlayerX * PIC_X) - NewXOffset, TextY - (NewPlayerY * PIC_Y) - NewYOffset, Tag & GetPlayerName(Index), color)
End If
End If
Else
If SpriteSize = 2 Then
If Index = MyIndex Then
If lvl >= 1 Then
TextX = NewX + sx + Int(PIC_X / 2) - ((Len(Tag & GetPlayerName(MyIndex) & " lvl: " & GetPlayerLevel(Index)) / 2) * 8)
Else
TextX = NewX + sx + Int(PIC_X / 2) - ((Len(Tag & GetPlayerName(MyIndex)) / 2) * 8)
End If
TextY = NewY + sx - 50
If lvl >= 1 Then
Call DrawText(TexthDC, TextX, TextY - PIC_Y, Tag & GetPlayerName(MyIndex) & " lvl: " & GetPlayerLevel(Index), color)
Else
Call DrawText(TexthDC, TextX, TextY - PIC_Y, Tag & GetPlayerName(MyIndex), color)
End If
Else
' Draw name
If lvl >= 1 Then
TextX = GetPlayerX(Index) * PIC_X + sx + Player(Index).xOffset + Int(PIC_X / 2) - ((Len(Tag & GetPlayerName(Index) & " lvl: " & GetPlayerLevel(Index)) / 2) * 8)
Else
TextX = GetPlayerX(Index) * PIC_X + sx + Player(Index).xOffset + Int(PIC_X / 2) - ((Len(Tag & GetPlayerName(Index)) / 2) * 8)
End If
TextY = GetPlayerY(Index) * PIC_Y + sx + Player(Index).yOffset - Int(PIC_Y / 2) - 32
If lvl >= 1 Then
Call DrawText(TexthDC, TextX - (NewPlayerX * PIC_X) - NewXOffset, TextY - (NewPlayerY * PIC_Y) - NewYOffset, Tag & GetPlayerName(Index) & " lvl: " & GetPlayerLevel(Index), color)
Else
Call DrawText(TexthDC, TextX - (NewPlayerX * PIC_X) - NewXOffset, TextY - (NewPlayerY * PIC_Y) - NewYOffset - PIC_Y, Tag & GetPlayerName(Index), color)
End If
End If
Else
If Index = MyIndex Then
If lvl >= 1 Then
TextX = NewX + sx + Int(PIC_X / 2) - ((Len(Tag & GetPlayerName(MyIndex) & " lvl: " & GetPlayerLevel(Index)) / 2) * 8)
Else
TextX = NewX + sx + Int(PIC_X / 2) - ((Len(Tag & GetPlayerName(MyIndex)) / 2) * 8)
End If
TextY = NewY + sx - Int(PIC_Y / 2)
If lvl >= 1 Then
Call DrawText(TexthDC, TextX, TextY, Tag & GetPlayerName(MyIndex) & " lvl: " & GetPlayerLevel(Index), color)
Else
Call DrawText(TexthDC, TextX, TextY, Tag & GetPlayerName(MyIndex), color)
End If
Else
' Draw name
If lvl >= 1 Then
TextX = GetPlayerX(Index) * PIC_X + sx + Player(Index).xOffset + Int(PIC_X / 2) - ((Len(Tag & GetPlayerName(Index) & " lvl: " & GetPlayerLevel(Index)) / 2) * 8)
Else
TextX = GetPlayerX(Index) * PIC_X + sx + Player(Index).xOffset + Int(PIC_X / 2) - ((Len(Tag & GetPlayerName(Index)) / 2) * 8)
End If
TextY = GetPlayerY(Index) * PIC_Y + sx + Player(Index).yOffset - Int(PIC_Y / 2)
If lvl >= 1 Then
Call DrawText(TexthDC, TextX - (NewPlayerX * PIC_X) - NewXOffset, TextY - (NewPlayerY * PIC_Y) - NewYOffset, Tag & GetPlayerName(Index) & " lvl: " & GetPlayerLevel(Index), color)
Else
Call DrawText(TexthDC, TextX - (NewPlayerX * PIC_X) - NewXOffset, TextY - (NewPlayerY * PIC_Y) - NewYOffset, Tag & GetPlayerName(Index), color)
End If
End If
End If
End If
End Sub
Pronto Se você quiser personalizar apenas mude essa parte:
- Código:
Case 0
Tag = ("")
Case 1
Tag = ("[MONITOR]")
Case 2
Tag = ("[MAPPER]")
Case 3
Tag = ("[GM]")
Case 4
Tag = ("[GM]")
Case Is >= 5
Tag = ("[ADM]")
Créditos ~
caiozinho100
Eu por Postar