SA-MP Forums Archive
[Ajuda] A Criar Sistema de Level - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda] A Criar Sistema de Level (/showthread.php?tid=328961)



[Ajuda] A Criar Sistema de Level - Caio_Freeze - 26.03.2012

Bom Galera Estou Tentando Criar Um Sistema De Level Para Meu GM de Prisгo Mais n Tenho Ideia Por Onde Comeзar...

Eu Queria que Alguem Postasse um Codigo Como Base de Level Por Tempo Online

Obrigado Desde Ja


Re: [Ajuda] A Criar Sistema de Level - ViniBorn - 26.03.2012

Quanto tempo exatamente?


Re: [Ajuda] A Criar Sistema de Level - Caio_Freeze - 26.03.2012

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
Quanto tempo exatamente?
a cada 15 min ele ganha 1 respeito e quando completa 10 de respeito o player upa de level


Re: [Ajuda] A Criar Sistema de Level - ViniBorn - 26.03.2012

Os 15 minutos sгo em horбrios definidos. Ex: 00:00 , 00:15 , 00:30 , 00:45
Ou 15 minutos de fato jogados?


Re: [Ajuda] A Criar Sistema de Level - Caio_Freeze - 26.03.2012

Quote:
Originally Posted by Viniborn
Посмотреть сообщение
Os 15 minutos sгo em horбrios definidos. Ex: 00:00 , 00:15 , 00:30 , 00:45
Ou 15 minutos de fato jogados?
15 minutos de fato jogados


Re: [Ajuda] A Criar Sistema de Level - ViniBorn - 26.03.2012

Fiz um aqui bem simples.

pawn Код:
//Topo
new Level[MAX_PLAYERS];
new Respeito[MAX_PLAYERS];
new Pagamento[MAX_PLAYERS];

//OnPlayerConnect
Pagamento[playerid] = 0;

//OnGameModeInit
SetTimer("UpTime",1000,true);

forward UpTime();
public UpTime()
{
    for(new i; i != GetMaxPlayers(); i++)
        if(IsPlayerConnected(i))
        {
            Pagamento[playerid]++;
            if(Pagamento[playerid] > 900)
            {
                Pagamento[playerid] = 0;
                Respeito[playerid]++;
                if(Respeito[playerid] == 10)
                {
                    Respeito[playerid] = 0;
                    Level[playerid]++;
                    SetPlayerScore(playerid, Level[playerid]);
                    SendClientMessage(i,-1,"Vocк passou de level.");
                }
            }
        }

    return true;
}



Re: [Ajuda] A Criar Sistema de Level - Caio_Freeze - 26.03.2012

e qual variavel eu devo usar para mostrar o /status


Re: [Ajuda] A Criar Sistema de Level - ViniBorn - 26.03.2012

Depende de como vai ser esse /status.

Explique melhor.


Nгo se esqueзa tambйm de armazenar as informaзхes ; )


Re: [Ajuda] A Criar Sistema de Level - Caio_Freeze - 26.03.2012

Eu uso assim:

Comando Zcmd
pawn Код:
COMMAND:status(playerid)
{
    if(IsPlayerConnected(playerid))
    {
        RG(playerid);
    }
    return 1;
}

Stock
pawn Код:
stock RG(playerid)
{
    new string[128];
    new Dinheiro = PlayerInfo[playerid][pGrana];
    new Roupa = PlayerInfo[playerid][pSkin];
    new pCargo = PlayerDados[playerid][Cargo];
    new pMembro = PlayerDados[playerid][Membro];
    GetPlayerName(playerid, sendername, sizeof(sendername));
    SendClientMessage(playerid, CINZA, "=-= SEUS STATUS =-=");
    format(string, 256, "Nome: (%s) Dinheiro: (%d) Skin: (%d) Cargo: (%d) Membros: (%d)", sendername, Dinheiro, Roupa, pCargo, pMembro);
    SendClientMessage(playerid, CINZA, string);
    return 1;
}



Re: [Ajuda] A Criar Sistema de Level - ViniBorn - 26.03.2012

Й sу adicionar no format...