21-10-2008, 03:30 AM
Sonire Wrote:Use these functions to Set and Retrieve a players warning level.
Code:Function GetPlayerWarning(ByVal Index As Long) As Long
GetPlayerWarning = Player(Index).Char(TempPlayer(Index).CharNum).Warning
End Function
Sub SetPlayerWarning(ByVal Index As Long, ByVal Warning As Byte)
Player(Index).Char(TempPlayer(Index).CharNum).Warning = Warning
End Sub
Use a text command or something client side to warn a player. The server side packet should have something like:
Code:Call SetPlayerWarning(Index, GetPlayerWarning(Index) + 1)
Then after that you could use a select case:
Code:Select Case GetPlayerWarning(Index)
Case 1
' Send them a message alerting them of their first warning
Case 2
' They're second warning, kick them
Case 3
' They're third warning, ban them
End Select
Don't forget to add the proper checks to the packet making sure the player giving the warning is an admin.
Awesome thanks. I'll start working on this tomorrow, and see what I can do.