21-10-2008, 03:06 AM
Use these functions to Set and Retrieve a players warning level.
Use a text command or something client side to warn a player. The server side packet should have something like:
Then after that you could use a select case:
Don't forget to add the proper checks to the packet making sure the player giving the warning is an admin.
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.