Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Programming an Admin panel
#5
For the mute command, I would add a variable to the PlayerRec: Mute As Byte

Then you'll neet to create a packet (like the ones your admin panel buttons send)

Server side, where you receive the packet, you'll need to check

Code:
If GetPlayerMute(Index) = 0 Then
    SetPlayerMute(Index, 1) ' Mute Them
Else
    SetPlayerMute(Index, 0) ' Unmute Them
End If


And this somewhere

Code:
Function GetPlayerMute(ByVal Index As Long) As Long
    GetPlayerMute = Player(Index).Char(Player(Index).CharNum).Mute
End Function

Sub SetPlayerMute(ByVal Index As Long, ByVal Mute As Byte)
    Player(Index).Char(Player(Index).CharNum).Mute = Mute
End Sub

Then, for which ever msg type you wanna mute, you just add a check

Code:
If GetPlayerMute(Index) = 1 then
    Don't Global Message
Else
    Do Global Message
End If

That should get you on the right path. If you have trouble with packets, I'll explain more.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)