Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Automation Error...
#12
Alright so I got it to work... Sorta. No errors, but this is what I get when it draws my "guild"

[Image: mahguildiszero.jpg]

Code:
If GetPlayerGuild(i)  vbNullString Then
            For i = 1 To PlayersOnMapHighIndex
                Call DrawPlayerGuild(PlayersOnMap(i))
            Next i
        End If

Code:
Public Sub DrawPlayerGuild(ByVal Index As Long)
Dim TextX As Long
Dim TextY As Long
Dim Color As Long
    
    ' Check access level to determine color
    If GetPlayerPK(Index) = NO Then
        Select Case GetPlayerAccess(Index)
            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(GetPlayerGuild(Index)) / 2) * 8)
    TextY = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset - (PIC_Y \ 2) - 16
    
    ' Draw name
    Call DrawText(TexthDC, TextX, TextY, GetPlayerGuild(Index), Color)
End Sub
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)