Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MS4 Simple Question.
#1
Ok, I'm creating a player rep system that allows for players to give rep to other players. I've based this on the /setaccess command. Here is what I have for the handlesetrep
Code:
' ::::::::::::::::::::::::::
' :: Set access packet ::
' ::::::::::::::::::::::::::
Private Sub HandleSetRep(ByVal Index As Long, ByRef Parse() As String)
Dim n As Long
Dim i As Long


    n = FindPlayer(Parse(1))

    i = CLng(Parse(2))
    
    End If
    

            Call SetPlayerRep(n, 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

My problem is with this part here

Code:
Call SetPlayerRep(n, i)

it sets the player rep to i, i need it to add to the player rep, so it needs to look something like this

Code:
CallSetPlayerRep(n, (code for players rep) + i)

If it were setting the players own rep, it wouldn't be a problem, but I don't know how to code it to affect someone else's rep. The rep is located in the stat enum. Any help?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)