Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MS4 Simple Question.
#4
Ok, as I said, I have everything set up just like set access command. The SetPlayerRep is below.

Code:
Public Sub SetPlayerRep(ByVal Index As Long, ByVal Rep As Long)
    Player(Index).Char(TempPlayer(Index).CharNum).Skills(Skills.Rep) = Rep
End Sub

So I think I got it working correctly. Here is my Set Rep Packet. It works how I want it to, but my question, is this the best way to do it, or is there a different way?

Code:
' ::::::::::::::::::::
' :: Set Rep Packet ::
' ::::::::::::::::::::
Private Sub HandleSetRep(ByVal Index As Long, ByRef Parse() As String)
Dim n As Long
Dim i As Long
Dim r As Long


    n = FindPlayer(Parse(1))
    ' The access
    i = CLng(Parse(2))
    r = Player(n).Char(TempPlayer(n).CharNum).Skills(Skills.Rep)

            
            Call SetPlayerRep(n, (r + i))
            Call SendPlayerData(n)
            Call AddLog(GetPlayerName(Index) & " has modified " & GetPlayerName(n) & "'s reputation.", ADMIN_LOG)
        Else
            Call PlayerMsg(Index, "Player is not online.", White)
        End If

End Sub
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)