Bem vindo visitante.
Caso ainda não tenha uma conta,pedimos para que crie uma,assim você terá acesso a todos os links e imagens disponíveis no fórum.
Bem vindo visitante.
Caso ainda não tenha uma conta,pedimos para que crie uma,assim você terá acesso a todos os links e imagens disponíveis no fórum.

Você não está conectado. Conecte-se ou registre-se

Enviar convite aos jogadores.

Ir para baixo  Mensagem [Página 1 de 1]

1Enviar convite aos jogadores. Empty Enviar convite aos jogadores. Qua Fev 15, 2012 11:50 pm

Kisuke

Kisuke
Organizador
Organizador

Como Funciona : Vocês vão aprender a instalar um sistema de eventos no seu servidor perguntando a todos os players online se desejam ir ao evento. Se Sim serão teleportados até o Administrador criador do Evento.

[size=14pt]Cliente~Side[/size]
Na frmMirage crie uma PictureBox, com o nome picEvento.
Deixe-a Deste jeito Abaixo :

[Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]

Deixe a PictureBox Visible = False.

Na Label que você criou com o Caption : %Jogador% Coloque o Nome de : lblAdmin

Certo, Agora Crie um Timer com estas Propriedades :

[Tens de ter uma conta e sessão iniciada para poderes visualizar esta imagem]

Clique Duas vezes no Timer e Coloque isso :

Código:
timer.Enabled = False
    picEvento.Visible = False

Na Label De Caption : Sim Dê 2 cliques e coloque :

Código:
 Call AceitarEvento(GetPlayerName(MyIndex), lblAdmin.Caption)
    picEvento.Visible = False

Na Label de [color=red]Caption : Não[color] Dê 2 cliques e coloque :

Código:
picEvento.Visible = False

Agora, No ModGameLogic Procure Por :

Código:
 ' Checking fps
            If LCase(Mid(MyText, 1, 4)) = "/fps" Then
                Call AddText("FPS: " & GameFPS, Pink)
                MyText = vbNullString
                Exit Sub
            End If

Abaixo Adicione :

Código:
 'Evento
            If LCase(Mid(MyText, 1, 12)) = "/fazerevento" Then
                If GetPlayerAccess(MyIndex) >= 3 Then
                Call FazerEvento(GetPlayerName(MyIndex))
                MyText = vbNullString
                Exit Sub
                Else
                Call AddText("Você não tem permissão para fazer Eventos!", Red)
                Exit Sub
                End If
            End If

Agora no ModClienteTCP Procure Por :

Código:
Sub SendPartyRequest(ByVal Name As String)
    Dim Packet As String

        Packet = "PARTY" & SEP_CHAR & Name & END_CHAR
        Call SendData(Packet)
    End Sub

Abaixo Adicione :

Código:
  Sub FazerEvento(ByVal Name As String)
    Dim Packet As String

        Packet = "EVENTO" & SEP_CHAR & Name & END_CHAR
        Call SendData(Packet)
    End Sub

    Sub AceitarEvento(ByVal Name As String, ByVal Admin As String)
    Dim Packet As String

        Packet = "ACCEVENTO" & SEP_CHAR & Name & SEP_CHAR & Admin & END_CHAR
        Call SendData(Packet)
    End Sub

Ainda no ModClienteTCP Procure Por :

Código:
  ' ::::::::::::::::::::::::::
        ' :: Party request window ::
        ' ::::::::::::::::::::::::::
        If Parse(0) = "partywindow" Then
            frmMirage.lblPlayer.Caption = GetPlayerName(Val(Parse(1)))
            frmMirage.picPartyRequest.Visible = True
            Exit Sub
        End If

Abaixo Adicione :

Código:
 If Parse(0) = "evento" Then
            frmMirage.picEvento.Visible = True
            frmMirage.timer.Enabled = True
            frmMirage.lblAdmin.Caption = GetPlayerName(Val(Parse(1)))
            Exit Sub
        End If


[size=14pt]Server~Side[/size]

No ModServerTCP Procure Por :

Código:
Case "party"

Acima Adicione :

Código:
Case "accevento"
            N = FindPlayer(Parse(1))
            Dim A As String
            A = FindPlayer(Parse(2))
         
            Call PlayerWarp(N, GetPlayerMap(A), GetPlayerX(A), GetPlayerY(A), False)
            Call GlobalMsg(GetPlayerName(N) & " foi ao Evento!", Yellow)
         
            Exit Sub
         
            Case "evento"
         
            N = FindPlayer(Parse(1))
         
            For i = 1 To MAX_PLAYERS
     
            If IsPlaying(i) Then
            Packet = "Evento" & SEP_CHAR & N & END_CHAR
            Call SendDataTo(i, Packet)
            End If
            Next i
         
            Call GlobalMsg("[EVENTO] " & GetPlayerName(N) & " está fazendo um Evento, aperte Sim para ir até o Evento.", Magenta)
         
            Exit Sub



Utilizando : Se Você é acesso 3 ou mais, você digita /fazerevento e aquela mensagem irá aparacer para todos os players Online no momento. Quem quiser participar vai clicar em Sim e vai se teleportar para onde o criador do Evento (Você) está.

Créditos : César

Ir para o topo  Mensagem [Página 1 de 1]

Tópicos semelhantes

-

» Mostrar jogadores online

Permissões neste sub-fórum
Não podes responder a tópicos