Este tutorial fará com que mostre um "titulo" acima do nome do personagem,dependendo do nível dele.
Vá no final de modText e coloque:
Em seguida,no modDirectDraw procure por:
Abaixo adicione:
Explicando:
Se o jogador for nível maior que cinco.
Mostrar acima do nome dele "Pokemon".
Vá no final de modText e coloque:
- Código:
Public Sub DrawPlayerTitulo(ByVal Index As Long)
Dim TextX As Long
Dim TextY As Long
Dim rankcolor As Long
Dim Rank As String
If Options.Debug = 1 Then On Error GoTo errorhandler
rankcolor = QBColor(Green)
If Player(Index).Level > 0 Then
titulo = "Cara verde"
Else
End If
If Player(Index).Level > 5 Then
titulo = "Pokemon"
Else
End If
Rank = titulo
TextX = ConvertMapX(GetPlayerX(Index) * PIC_X) + Player(Index).XOffset + (PIC_X \ 2) - getWidth(TexthDC, (Trim$(Rank)))
If GetPlayerSprite(Index) < 1 Or GetPlayerSprite(Index) > NumCharacters Then
TextY = ConvertMapY(GetPlayerY(Index) * PIC_Y) + Player(Index).YOffset - 16
Else
TextY = ConvertMapY(GetPlayerY(Index) * PIC_Y) + Player(Index).YOffset - (DDSD_Character(GetPlayerSprite(Index)).lHeight / 4) + 6
End If
Call DrawText(TexthDC, TextX, TextY, Rank, rankcolor)
' Error handler
Exit Sub
errorhandler:
HandleError "DrawPlayerTitulo", "modText", Err.Number, Err.Description, Err.Source, Err.HelpContext
Err.Clear
Exit Sub
End Sub
Em seguida,no modDirectDraw procure por:
- Código:
For i = 1 To Player_HighIndex
If IsPlaying(i) And GetPlayerMap(i) = GetPlayerMap(MyIndex) Then
Call DrawPlayerName(i)
End If
Next
Abaixo adicione:
- Código:
For i = 1 To Player_HighIndex
If IsPlaying(i) And GetPlayerMap(i) = GetPlayerMap(MyIndex) Then
Call DrawPlayerTitulo(i)
End If
Next
Explicando:
- Código:
If Player(Index).Level > 5 Then
titulo = "Pokemon"
Else
End If
Se o jogador for nível maior que cinco.
Mostrar acima do nome dele "Pokemon".