Conexão Maker

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

    Add mais de 255 em Stat

    Thales12
    Thales12
    Administrador
    Administrador


    Mensagens : 140
    Level : 8
    Data de inscrição : 01/11/2011
    Idade : 29
    Localização : Rio de Janeiro

    Add mais de 255 em Stat Empty Add mais de 255 em Stat

    Mensagem por Thales12 Seg Fev 13, 2012 1:02 am

    e.e nao sei qual seria o nome ideal para o topico e.e, mais se alguem souber 1 nome melhor me fale! Very Happy

    bom.. mts tem me pedido para fazer 1 tutorial de como add mais de 255 ou 250 pts em 1 stat, então ta ai o tutorial Very Happy

    No Client~Side procure por:

    Código:
    If GetPlayerStat(Index, x) < 255 Then

    ou

    Código:
    If GetPlayerStat(Index, x) < 250 Then

    e mude para:

    Código:
    If GetPlayerStat(Index, x) < MAX_LONG Then

    dps procure por:

    Código:
    If Index > MAX_PLAYERS Then Exit Sub
        If Value <= 0 Then Value = 1
        If Value > MAX_BYTE Then Value = MAX_BYTE
        Player(Index).Stat(Stat) = Value

    e mude para:

    Código:
    If Index > MAX_PLAYERS Then Exit Sub
        If Value <= 0 Then Value = 1
        If Value > MAX_LONG Then Value = MAX_LONG
        Player(Index).Stat(Stat) = Value

    dps na Private Type PlayerRec procure por:

    Código:
    Stat(1 To Stats.Stat_Count - 1) As Byte

    e mude para:

    Código:
    Stat(1 To Stats.Stat_Count - 1) As Long

    Client~Side terminado, agora no Server~Side procure por:

    Código:
    If GetPlayerRawStat(Index, PointType) >= 255 Then

    ou

    Código:
    If GetPlayerRawStat(Index, PointType) >= 250 Then

    e mude para:

    Código:
    If GetPlayerRawStat(Index, PointType) >= MAX_LONG Then

    Agora no final da modConstants adicione:

    Código:
    'values
    Public Const MAX_BYTE As Byte = 255
    Public Const MAX_INTEGER As Integer = 32767
    Public Const MAX_LONG As Long = 2147483647

    dps na Private Type PlayerRec procure por:

    Código:
    Stat(1 To Stats.Stat_Count - 1) As Byte

    e mude para:

    Código:
    Stat(1 To Stats.Stat_Count - 1) As Long
    Acabou ;D
    Simples e Fácil.

    Créditos: A Mim Thales12

      Data/hora atual: Sáb Abr 27, 2024 6:13 am