Maker Realm
Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

Sistema de Kill's e Death's

Ir para baixo

Sistema de Kill's e Death's Empty Sistema de Kill's e Death's

Mensagem  Glen Ter Fev 14, 2012 10:27 pm

Client~Side

Na Type PlayerRec, no final antes do End Type, adicione:

Código:
Kill As Long
Dead As Long

Procure por:
Código:
Call SetPlayerPK(i, Buffer.ReadLong)

E abaixo adicione:

Código:
Player(i).Kill = Buffer.ReadLong
Player(i).Dead = Buffer.ReadLong

Serve~Side

Na Type PlayerRec, no final antes do End Type, adicione:

Código:
Kill As Long
Dead As Long

Na Sub AddChar e nela ache:

Código:
Player(Index).Vital(Vitals.MP) = GetPlayerMaxVital(Index, Vitals.MP)

E abaixo adicione:

Código:
Player(Index).Kill = 0
Player(Index).Dead = 0

Agora na Sub PlayerAttackPlayer procure por:

Código:
      If exp = 0 Then
            Call PlayerMsg(victim, "You lost no exp.", BrightRed)
            Call PlayerMsg(attacker, "You received no exp.", BrightBlue)
        Else
            Call SetPlayerExp(victim, GetPlayerExp(victim) - exp)
            SendEXP victim
            Call PlayerMsg(victim, "You lost " & exp & " exp.", BrightRed)


E acima adicione:

Código:
        ' Kill e Dead
        Player(attacker).Kill = Player(attacker).Kill + 1
        Call PlayerMsg(attacker, "Agora você tem " & Player(attacker).Kill & " Kill's", BrightRed)
        Player(victim).Dead = Player(victim).Dead + 1
        Call PlayerMsg(victim, "Agora você tem " & Player(victim).Dead & " Dead's", BrightRed)


Na Function PlayerData procure por:

Código:
Buffer.WriteLong GetPlayerPK(Index)

E abaixo adicione:

Código:
Buffer.WriteLong Player(Index).Kill
Buffer.WriteLong Player(Index).Dead
Glen
Glen
Administrador
Administrador

Mensagens : 24
Colaboração : 2
Data de inscrição : 23/10/2011
Idade : 25

https://makerealm.forumeiros.com

Ir para o topo Ir para baixo

Ir para o topo

- Tópicos semelhantes

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