Renanr Membro
Mensagens : 19 Moeda : 31 Pontos : 5 Data de inscrição : 17/01/2013
| Assunto: Cor definitiva pros jogadores e outros acessos + Titulo dos acessos Sáb Jan 19, 2013 2:37 pm | |
| O que faz?Quem tem acesso maior que 1, não tem outras cores no nome. É uma cor e pronto, pra todo mundo. Mas, como saberemos se é um adm ou um game master, e etc??? Irá adicionar o titulo do acesso em cima. Menos pra quem é um jogador normal.Preview[Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]Demonstração do sistema - O texto "Teste" é uma guild teste criada ~~ Tutorial em Cliente Side. Procure por - Código:
-
Sub BltPlayerName(ByVal Index As Long) Mude a sub toda para: - 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 Is >= 0 Color = QBColor(Brown) 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, GetPlayerName(Index), Color) End Sub Procure por: - Código:
-
' Draw Player Names If Val(GetVar(App.Path & "\config.ini", "CONFIG", "PlayerName")) = 1 Then For I = 1 To MAX_PLAYERS If IsPlaying(I) And GetPlayerMap(I) = GetPlayerMap(MyIndex) Then Call BltPlayerGuildName(I) Call BltPlayerName(I) If Player(I).Pet.Alive = YES And Player(I).Pet.Map = GetPlayerMap(MyIndex) Then Call BltPetName(I) End If End If Next I End If Mude para: - Código:
-
' Draw Player Names If Val(GetVar(App.Path & "\config.ini", "CONFIG", "PlayerName")) = 1 Then For I = 1 To MAX_PLAYERS If IsPlaying(I) And GetPlayerMap(I) = GetPlayerMap(MyIndex) Then Call BltPlayerGuildName(I) Call BltPlayerName(I) Call BltPlayerAccessName(I) If Player(I).Pet.Alive = YES And Player(I).Pet.Map = GetPlayerMap(MyIndex) Then Call BltPetName(I) End If End If Next I End If Procure por : - Código:
-
Sub BltPlayerGuildName(ByVal Index As Long) Abaixo da sub toda (Em baixo do End Sub) adicione: - Código:
-
Sub BltPlayerAccessName(ByVal Index As Long) '''''''''''''''''''''''''''''''''''''''''''' '''''''''''' CRIADO POR RENANR ''''''''''''' '''''''''''''''''''''''''''''''''''''''''''' Dim TextX As Long Dim TextY As Long Dim Color As Long Dim CNome As String
If GetPlayerAccess(Index) = 0 Then Exit Sub
' Check access color If GetPlayerPK(Index) = NO Then Select Case GetPlayerAccess(Index) Case 1 Color = QBColor(BrightBlue) Case 2 Color = QBColor(BrightGreen) Case 3 Color = QBColor(Yellow) Case 4 Color = QBColor(BrightGreen) Case Is >= 5 Color = QBColor(Yellow) End Select End If 'Check acess name Select Case GetPlayerAccess(Index) Case 0 Exit Sub Case 1 CNome = ("Monitor") Case 2 CNome = ("Mapper") Case 3 CNome = ("Game Master") Case 4 CNome = ("Sub.Administrador") Case Is >= 5 CNome = ("Administrador") End Select If Not GetPlayerGuild(Index) = "" Then TextX = GetPlayerX(Index) * PIC_X + sx + Player(Index).XOffset + Int(PIC_X * 0.9) - ((Len(CNome) * 0.6) * 8) TextY = GetPlayerY(Index) * PIC_Y + sx + Player(Index).YOffset - Int(PIC_Y * 0.9) - 13 Call DrawText(TexthDC, TextX - (NewPlayerX * PIC_X) - NewXOffset, TextY - (NewPlayerY * PIC_Y) - NewYOffset, CNome, Color) Else TextX = GetPlayerX(Index) * PIC_X + sx + Player(Index).XOffset + Int(PIC_X * 0.5) - ((Len(CNome) * 0.5) * 8) TextY = GetPlayerY(Index) * PIC_Y + sx + Player(Index).YOffset - Int(PIC_Y * 0.5) - 14 Call DrawText(TexthDC, TextX - (NewPlayerX * PIC_X) - NewXOffset, TextY - (NewPlayerY * PIC_Y) - NewYOffset, CNome, Color) End If End Sub Se você tiver sistema de VIP(Só 1), em vez desse codigo que falei assima, ponha: - Código:
-
Sub BltPlayerAccessName(ByVal Index As Long) '''''''''''''''''''''''''''''''''''''''''''' '''''''''''' CRIADO POR RENANR ''''''''''''' '''''''''''''''''''''''''''''''''''''''''''' Dim TextX As Long Dim TextY As Long Dim Color As Long Dim CNome As String
If GetPlayerAccess(Index) = 0 Then Exit Sub
' Check access color If GetPlayerPK(Index) = NO Then Select Case GetPlayerAccess(Index) Case 1 Color = QBColor(BrightBlue) Case 2 Color = QBColor(BrightGreen) Case 3 Color = QBColor(Yellow) Case 4 Color = QBColor(BrightGreen) Case Is >= 5 Color = QBColor(Yellow) End Select End If 'Check acess name Select Case GetPlayerAccess(Index) Case 0 Exit Sub Case 1 CNome = ("Jogador VIP") Case 2 CNome = ("Mapper") Case 3 CNome = ("Game Master") Case 4 CNome = ("Sub.Administrador") Case Is >= 5 CNome = ("Administrador") End Select If Not GetPlayerGuild(Index) = "" Then TextX = GetPlayerX(Index) * PIC_X + sx + Player(Index).XOffset + Int(PIC_X * 0.9) - ((Len(CNome) * 0.6) * 8) TextY = GetPlayerY(Index) * PIC_Y + sx + Player(Index).YOffset - Int(PIC_Y * 0.9) - 13 Call DrawText(TexthDC, TextX - (NewPlayerX * PIC_X) - NewXOffset, TextY - (NewPlayerY * PIC_Y) - NewYOffset, CNome, Color) Else TextX = GetPlayerX(Index) * PIC_X + sx + Player(Index).XOffset + Int(PIC_X * 0.5) - ((Len(CNome) * 0.5) * 8) TextY = GetPlayerY(Index) * PIC_Y + sx + Player(Index).YOffset - Int(PIC_Y * 0.5) - 14 Call DrawText(TexthDC, TextX - (NewPlayerX * PIC_X) - NewXOffset, TextY - (NewPlayerY * PIC_Y) - NewYOffset, CNome, Color) End If End Sub Caso em vez de VIP(1) você tenha VIP(Dois vips) em vez desse, coloque: - Código:
-
Sub BltPlayerAccessName(ByVal Index As Long) '''''''''''''''''''''''''''''''''''''''''''' '''''''''''' CRIADO POR RENANR ''''''''''''' '''''''''''''''''''''''''''''''''''''''''''' Dim TextX As Long Dim TextY As Long Dim Color As Long Dim CNome As String
If GetPlayerAccess(Index) = 0 Then Exit Sub
' Check access color If GetPlayerPK(Index) = NO Then Select Case GetPlayerAccess(Index) Case 1 Color = QBColor(BrightBlue) Case 2 Color = QBColor(BrightGreen) Case 3 Color = QBColor(Yellow) Case 4 Color = QBColor(BrightGreen) Case Is >= 5 Color = QBColor(Yellow) End Select End If 'Check acess name Select Case GetPlayerAccess(Index) Case 0 Exit Sub Case 1 CNome = ("Jogador VIP") Case 2 CNome = ("Jogador VIP 2") Case 3 CNome = ("Game Master") Case 4 CNome = ("Sub.Administrador") Case Is >= 5 CNome = ("Administrador") End Select If Not GetPlayerGuild(Index) = "" Then TextX = GetPlayerX(Index) * PIC_X + sx + Player(Index).XOffset + Int(PIC_X * 0.9) - ((Len(CNome) * 0.6) * 8) TextY = GetPlayerY(Index) * PIC_Y + sx + Player(Index).YOffset - Int(PIC_Y * 0.9) - 13 Call DrawText(TexthDC, TextX - (NewPlayerX * PIC_X) - NewXOffset, TextY - (NewPlayerY * PIC_Y) - NewYOffset, CNome, Color) Else TextX = GetPlayerX(Index) * PIC_X + sx + Player(Index).XOffset + Int(PIC_X * 0.5) - ((Len(CNome) * 0.5) * 8) TextY = GetPlayerY(Index) * PIC_Y + sx + Player(Index).YOffset - Int(PIC_Y * 0.5) - 14 Call DrawText(TexthDC, TextX - (NewPlayerX * PIC_X) - NewXOffset, TextY - (NewPlayerY * PIC_Y) - NewYOffset, CNome, Color) End If End Sub - Citação :
- Creds: RenanR
| |
|
SSO Moderador.G
Mensagens : 83 Moeda : 117 Pontos : 6 Data de inscrição : 06/01/2013
| Assunto: Re: Cor definitiva pros jogadores e outros acessos + Titulo dos acessos Seg Jan 21, 2013 5:30 pm | |
| Bem legal, cara, valeu por compartilhar gostei da ideia, rs | |
|