Bom,notei que a barra de exp só funciona para o primeiro jogador que entrar,era um bug bem simples,por isso,eis a solução:
No cliente,em modHandleData,troque o "HandlePlayerExp" por isso:
Pronto,a barra funcionará normalmente.
No cliente,em modHandleData,troque o "HandlePlayerExp" por isso:
- Código:
Private Sub HandlePlayerExp(ByVal Index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
Dim Buffer As clsBuffer
Dim i As Long
Dim TNL As Long
' If debug mode, handle error then exit out
If Options.Debug = 1 Then On Error GoTo errorhandler
Set Buffer = New clsBuffer
Buffer.WriteBytes Data()
SetPlayerExp MyIndex, Buffer.ReadLong
TNL = Buffer.ReadLong
frmMain.lblEXP.Caption = GetPlayerExp(Index) & "/" & TNL
' mp bar
frmMain.imgEXPBar.width = ((GetPlayerExp(MyIndex) / EXPBar_Width) / (TNL / EXPBar_Width)) * EXPBar_Width
' Error handler
Exit Sub
errorhandler:
HandleError "HandlePlayerExp", "modHandleData", Err.Number, Err.Description, Err.Source, Err.HelpContext
Err.Clear
Exit Sub
End Sub
Pronto,a barra funcionará normalmente.