Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Automation Error...
#1
Trying to render the guild name over players head, and it doesn't seem to want to work.

[Image: Error.jpg]

Code:
TexthDC = DDS_BackBuffer.GetDC ' Lock the backbuffer so we can draw text and names

Code:
For i = 1 To PlayersOnMapHighIndex
            Call DrawPlayerGuild(PlayersOnMap(i))
        Next

Code:
Sub DrawPlayerGuild(ByVal Index As Long)
Dim TextX As Long
Dim TextY As Long
Dim Color As Long
    
    ' Check guild rank level to determine color
    If GetPlayerPK(Index) = NO Then
        Select Case Player(Index).GuildRank
            Case 0
                Color = QBColor(Brown)
            Case 1
                Color = QBColor(DarkGrey)
            Case 2
                Color = QBColor(Cyan)
            Case 3
                Color = QBColor(Blue)
            Case 4
                Color = QBColor(Pink)
        End Select
    Else
        Color = QBColor(BrightRed)
    End If

    ' Determine location for text
    TextX = GetPlayerX(Index) * PIC_X + Player(Index).XOffset + (PIC_X \ 2) - ((Len(GetPlayerName(Index)) / 2) * 8)
    TextY = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset - (PIC_Y \ 2) - 2
    
    ' Draw name
    Call DrawText(TexthDC, TextX, TextY, GetPlayerGuild(Index), Color)
End Sub
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)