SA-MP Forums Archive
[Pedido] Mata 10 Ganha UP 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: [Pedido] Mata 10 Ganha UP Level (/showthread.php?tid=269513)



[Pedido] Mata 10 Ganha UP Level - [Red]Maninho - 16.07.2011

Bom No Meu Servidor, Todos Querem Aumentar De Level Rapido.
Intao Resolvi Pedir Aki Um Negocio Para Que Quando o Player Mate 10 Pessoas
Ela Ganhe +2 Level UP, e Tenha o Comando /score [id]
Para Ver Os Scores Dos Players
Tipo No /score [ID]
Se Fosse Possivel Mostrar Tipo

[Red]Maninho = Matou (Quantia)
Morreu (quantia)
Level UP (Quantia) = Aki No Level UP Tipo Mostra Quantos LEVEIS Ganhou Matando

Se Alguem Poder Ajudar Obrigado!


Re: [Pedido] Mata 10 Ganha UP Level - Dark.Angel - 16.07.2011

Bom , olha esse tutorial do DraKiNs:
https://sampforum.blast.hk/showthread.php?tid=151296
Aqui ele ensina criar um sistema de level ... tenta adaptar para oque vocк quiser =)

E um tutorial do Devastador:
https://sampforum.blast.hk/showthread.php?tid=243018
de como criar 'estatisticas' (Matou , Morreu)...

Espero ter ajudado


Respuesta: [Pedido] Mata 10 Ganha UP Level - [Red]Maninho - 16.07.2011

Vou Olhar Obrigado!


Re: [Pedido] Mata 10 Ganha UP Level - Josma_cmd - 16.07.2011

pawn Код:
//*************************** Inicio do GM **********************
new Score[MAX_PLAYERS], Matou[MAX_PLAYERS];

//*************************** OnPlayerDeath ********************
    Matou[killerid] ++;
    if(Matou[killerid] >= 10)
    {
        SendClientMessage(killerid, 0xFFFFFFFF, "Vocк subiu de nнvel o/");
        Score[killerid] += 2;
        Matou[killerid] = 0;
        return 1;
    }
//*************************** OnPlayerCommandText ********************
    if(strcmp(cmd, "/score", true) == 0)
    {
        #define Branco 0xFFFFFFFF
        new tmp[20], PlayerB, string[30], Manolo[MAX_PLAYER_NAME];
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) return SendClientMessage(playerid, Branco, "Uso correto: /Score [id]");
        PlayerB = strval(tmp);
        GetPlayerName(PlayerB, Manolo, sizeof(Manolo));
        format(string, sizeof(string), "%s: %d", Manolo, Score[PlayerB]);
        SendClientMessage(playerid, Branco, string);
        return 1;
    }
Й apenas uma base, acredito que seja isso que vocк estб procurando, edite da forma que achar melhor.


Respuesta: [Pedido] Mata 10 Ganha UP Level - [Red]Maninho - 16.07.2011

Josma й Isso Sim Mais Veja

Quote:

//LEVEL UP================================================ =====================================
if(dini_Int(file, "EXP") >=5){
dini_IntSet(file, "Level", dini_Int(file, "Level")+1);
new string[256];
format(string, sizeof(string), "[Info-RedBull] Vocк Juntou 5 De Respeito, e Ganhou +1 Level",dini_Int(file, "Level"));
SendClientMessage(i, 0x75EA00AA, string);
PlayerPlaySound(i, 1057, 0, 0, 0);
dini_IntSet(file, "EXP",0);
dini_IntSet(file, "rouboubanco", 0);
jasequestro[i] = 0;
}

No Meu +1 Up Level Ta Assim, Sou Meio Novato Pawno
Intao Como Faz Para Fazer Esse Seu Comando Ai
o UP Ser Por Base Desse


Re: Respuesta: [Pedido] Mata 10 Ganha UP Level - Josma_cmd - 16.07.2011

Quote:
Originally Posted by [Red]Maninho
Посмотреть сообщение
Josma й Isso Sim Mais Veja


No Meu +1 Up Level Ta Assim, Sou Meio Novato Pawno
Intao Como Faz Para Fazer Esse Seu Comando Ai
o UP Ser Por Base Desse
pawn Код:
//**************** Troca o script no OnPlayerDeath antigo por este *************************
    Matou[killerid] ++;
    if(Matou[killerid] >= 10)
    {
        SendClientMessage(killerid, 0xFFFFFFFF, "Vocк subiu de nнvel o/");
        Score[killerid] += 1;
        dini_IntSet(file, "Level", dini_Int(file, "Level")+1);
        Matou[killerid] = 0;
        return 1;
    }
//************************* Troca o comando antigo por este ********************************
    if(strcmp(cmd, "/score", true) == 0)
    {
        #define Branco 0xFFFFFFFF
        new tmp[20], PlayerB, string[30], Manolo[MAX_PLAYER_NAME];
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) return SendClientMessage(playerid, Branco, "Uso correto: /Score [id]");
        PlayerB = strval(tmp);
        GetPlayerName(PlayerB, Manolo, sizeof(Manolo));
        format(string, sizeof(string), "%s: %d", Manolo, dini_Int(file, "Level"));
        SendClientMessage(playerid, Branco, string);
        return 1;
    }
Desta forma o Score[playerid] se torna desnecessбrio entгo apague-o se quiser.
Espero que funcione.
Aconselho vocк a criar uma public para carregar e salvar Dados.


Respuesta: [Pedido] Mata 10 Ganha UP Level - [Red]Maninho - 16.07.2011

xD Obrigado


Respuesta: [Pedido] Mata 10 Ganha UP Level - [Red]Maninho - 16.07.2011

3 Erros xD

(3569) : error 017: undefined symbol "cmd"
(3572) : error 017: undefined symbol "idx"
(3572) : error 047: array sizes do not match, or destination array is too small


Re: [Pedido] Mata 10 Ganha UP Level - Devastador - 16.07.2011

Leia meu tutorial cara, serб mais fбcil vocк aprender do que pegar essa base do Josma, nгo que esteja ruim, Josma um grande coder!

https://sampforum.blast.hk/showthread.php?tid=243018


Re: Respuesta: [Pedido] Mata 10 Ganha UP Level - Josma_cmd - 16.07.2011

Quote:
Originally Posted by [Red]Maninho
Посмотреть сообщение
3 Erros xD

(3569) : error 017: undefined symbol "cmd"
(3572) : error 017: undefined symbol "idx"
(3572) : error 047: array sizes do not match, or destination array is too small
coloca isso no inicio da sua public OnPlayerCommandText
pawn Код:
new cmd[256], idx;
E onde tб new tmp[20]; muda pra new tmp[128];
Se der erros manda as linhas dos erros.


Quote:
Originally Posted by Devastador
Посмотреть сообщение
Leia meu tutorial cara, serб mais fбcil vocк aprender do que pegar essa base do Josma, nгo que esteja ruim, Josma um grande coder!

https://sampforum.blast.hk/showthread.php?tid=243018
Obrigado