Universo Games
Ola , Convidado

Deixando o Player Mudo Logo1110

Você ainda não e cadastrado então cadastre-se e veja todas as atualizações no Mundo RPG!!!
Universo Games
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.
Universo Games

Suporte e Desenvolvimento só no Universo Games
 
InícioInício  PortalPortal  EventosEventos  PublicaçõesPublicações  Últimas imagensÚltimas imagens  RegistarRegistar  EntrarEntrar  
Ola Convidado, Seja Bem vindo a equipe lhe deseja boa sorte no seu projeto!

 

 Deixando o Player Mudo

Ir para baixo 
AutorMensagem
Convidado
Convidado
Anonymous



Deixando o Player Mudo Empty
MensagemAssunto: Deixando o Player Mudo   Deixando o Player Mudo EmptyQui 29 Set 2011, 10:45

no Server~Side na frmServer na aba Players crie 1 commandbutton chamado:

Citação :
Name: mnumMute
Caption: Emudecer

de 2 clicks e adicione:

Código:
    Dim Name As String
    Name = frmServer.lvwInfo.SelectedItem.SubItems(3)
   
    If Not Name = "Not Playing" Then
        Call ToggleMute(FindPlayer(Name))
    End If

dps na modDatabase procure por:

Código:
Public Sub LoadOptions()
   
    Options.Game_Name = GetVar(App.Path & "\data\options.ini", "OPTIONS", "Game_Name")
    Options.Port = GetVar(App.Path & "\data\options.ini", "OPTIONS", "Port")
    Options.MOTD = GetVar(App.Path & "\data\options.ini", "OPTIONS", "MOTD")
    Options.Website = GetVar(App.Path & "\data\options.ini", "OPTIONS", "Website")
   
End Sub

em em baixo adicione:

Código:
Public Sub ToggleMute(ByVal index As Long)
    ' sair out for rte9
    If index <= 0 Or index > MAX_PLAYERS Then Exit Sub

    ' alternância do jogador mudo
    If Player(index).isMuted = 1 Then
        Player(index).isMuted = 0
        ' Let them know
        PlayerMsg index, "Você foi Discilenciado e ja pode falar em global.", BrightGreen
        TextAdd GetPlayerName(index) & " Você foi Discilenciado."
    Else
        Player(index).isMuted = 1
        ' Let them know
        PlayerMsg index, "Você foi silenciado e não pode falar em global.", BrightRed
        TextAdd GetPlayerName(index) & " Você foi Silenciado."
    End If
   
    ' salvar o player
    SavePlayer index
End Sub

procure por:

Código:
Private Sub HandleBroadcastMsg(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)

em baixo de :

Código:
Msg = Buffer.ReadString

adicione:

Código:
If Player(index).isMuted Then
        PlayerMsg index, "Você foi silenciado e não pode falar em global.", BrightRed
        Exit Sub
    End If

procure por :

Código:
' Position
 MAP As Long
    x As Byte
    y As Byte
    Dir As Byte

em baixo adicione:

Código:
'mudo
isMuted As Byte

Explicando oq faz: Simples Ele deixa o player mudo, o impossibilitando de falar no global !

Créditos: Thales12 pelo sistema/tutorial/postar.
Ir para o topo Ir para baixo
 
Deixando o Player Mudo
Ir para o topo 
Página 1 de 1
 Tópicos semelhantes
-
» Player Atravessando Player
» Player Kick por ausencia
» Player Atravessando NPC
» Barra de HP e MP em cima do Player
» ADM pode atacar o player e o player pode atacar o ADM.

Permissões neste sub-fórumNão podes responder a tópicos
Universo Games :: Criação de Jogos :: Eclipse Origens :: Tutorias-
Ir para: