16-09-2008, 07:28 AM
I'm going to give you two ways of setting this up so that you don't need the stat labels. The first way is going to have your stats under your character just like your character's name is above The second way will put your stats in the lower left corner.
1st Way
![[Image: firstwayar4.png]](http://img329.imageshack.us/img329/8320/firstwayar4.png)
Difficulty: 1/5
::Client Side::
Find:
Replace with:
At the bottom of modText, add:
Done
2nd Way
![[Image: secondwayuc4.png]](http://img389.imageshack.us/img389/2878/secondwayuc4.png)
Difficulty: 1/5
::Client Side::
Search for:
Under:
Add:
Search for:
Under:
Add:
Search for:
Under add:
Search for:
Under add:
Add:
Done
1st Way
![[Image: firstwayar4.png]](http://img329.imageshack.us/img329/8320/firstwayar4.png)
Difficulty: 1/5
::Client Side::
Find:
Code:
For i = 1 To MAX_PLAYERS
If IsPlaying(i) Then
If GetPlayerMap(i) = GetPlayerMap(MyIndex) Then
'If CurX = GetPlayerX(i) Then
'If CurY = GetPlayerY(i) Then
Call DrawPlayerName(i)
'End If
'End If
End If
End If
Next i
Code:
For i = 1 To MAX_PLAYERS
If IsPlaying(i) Then
If GetPlayerMap(i) = GetPlayerMap(MyIndex) Then
'If CurX = GetPlayerX(i) Then
'If CurY = GetPlayerY(i) Then
Call DrawPlayerName(i)
Call DrawPlayerHP(i)
Call DrawPlayerMP(i)
Call DrawPlayerSP(i)
'End If
'End If
End If
End If
Next i
Code:
Sub DrawPlayerHP(ByVal Index As Long)
Dim TextX As Long
Dim TextY As Long
Dim Color As Long
Dim HP As String
HP = "HP: " & (GetPlayerVital(MyIndex, Vitals.HP) / GetPlayerMaxVital(MyIndex, Vitals.HP) * 100) & "%"
' 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) - 30
TextY = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset - (PIC_Y \ 2) + 44
' Draw name
Call DrawText(TexthDC, TextX, TextY, HP, Color)
End Sub
Sub DrawPlayerMP(ByVal Index As Long)
Dim TextX As Long
Dim TextY As Long
Dim Color As Long
Dim MP As String
MP = "MP: " & (GetPlayerVital(MyIndex, Vitals.MP) / GetPlayerMaxVital(MyIndex, Vitals.MP) * 100) & "%"
' 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) - 30
TextY = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset - (PIC_Y \ 2) + 54
' Draw name
Call DrawText(TexthDC, TextX, TextY, MP, Color)
End Sub
Sub DrawPlayerSP(ByVal Index As Long)
Dim TextX As Long
Dim TextY As Long
Dim Color As Long
Dim SP As String
SP = "SP: " & (GetPlayerVital(MyIndex, Vitals.SP) / GetPlayerMaxVital(MyIndex, Vitals.SP) * 100) & "%"
' 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) - 30
TextY = GetPlayerY(Index) * PIC_Y + Player(Index).YOffset - (PIC_Y \ 2) + 64
' Draw name
Call DrawText(TexthDC, TextX, TextY, SP, Color)
End Sub
2nd Way
![[Image: secondwayuc4.png]](http://img389.imageshack.us/img389/2878/secondwayuc4.png)
Difficulty: 1/5
::Client Side::
Search for:
Code:
' Checking fps
Code:
' Checking fps
If Mid$(MyText, 1, 4) = "/fps" Then
BFPS = Not BFPS
MyText = vbNullString
frmMirage.txtMyChat.Text = vbNullString
Exit Sub
End If
Code:
' Show stats
If Mid$(MyText, 1, 5) = "/Show" Then
Show = Not Show
MyText = vbNullString
frmMirage.txtMyChat.Text = vbNullString
Exit Sub
End If
Code:
Public BFPS As Boolean
Code:
Public BFPS As Boolean
Public BLoc As Boolean
Code:
' Puts your stats on screen
Public Show As Boolean
Code:
Dim rec_pos As DXVBLib.RECT
Code:
Dim HP As String, MP As String, SP As String
Code:
' draw FPS
Code:
' draw FPS
If BFPS Then
Call DrawText(TexthDC, (MAX_MAPX - 1) * PIC_X, 1, Trim$("FPS: " & GameFPS), QBColor(Yellow))
End If
Code:
' draw Stats
If Show Then
HP = (GetPlayerVital(MyIndex, Vitals.HP) / GetPlayerMaxVital(MyIndex, Vitals.HP) * 100) & "%"
MP = (GetPlayerVital(MyIndex, Vitals.MP) / GetPlayerMaxVital(MyIndex, Vitals.MP) * 100) & "%"
SP = (GetPlayerVital(MyIndex, Vitals.SP) / GetPlayerMaxVital(MyIndex, Vitals.SP) * 100) & "%"
Call DrawText(TexthDC, (MAX_MAPY - 11) * PIC_Y, 350, Trim$("HP: " & HP), QBColor(Yellow))
Call DrawText(TexthDC, (MAX_MAPY - 11) * PIC_Y, 360, Trim$("MP: " & MP), QBColor(Yellow))
Call DrawText(TexthDC, (MAX_MAPY - 11) * PIC_Y, 370, Trim$("SP: " & SP), QBColor(Yellow))
End If