SA-MP Forums Archive
[Pedido] Sistema de level DM?? - 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] Sistema de level DM?? (/showthread.php?tid=604940)



Sistema de level DM?? - joaobgnc - 12.04.2016

Bom queria um sistema assim,

Player level 0 xp << Proximo nivel [0/10] matou 1 ganha 3 de xp
Level 2 >> [0/20]
level 3 >> [0/35]

com text drawn


Re: Sistema de level DM?? - F1N4L - 12.04.2016

Esse й um sistema super simples de se fazer, utilizando textdraw ainda mais fбcil.

*Crie 2 variбveis globais com array para o player.

*Na callback OnPlayerDeath vc irб definir para o player matou (killerid) +3 xp em uma dessas variбveis globais.
*Crie uma condicional nessa mesma callback para verificar quantos players o killerid matou. Assim vc aumenta o limite mбximo de exp.
Ex:
Quote:

VarExp[killerid] += 3;
VarKiller[killerid] += 1;

*Formate a textdraw conforme o killerid vai matando e ganhando exp.
*Verifica se a VarKiller[killerid] й igual ao limite estipulado por vc. Se for vc aumenta o limite de exp e formata a textdraw novamente com o limite novo e reseta a exp da textdraw para 0.

Formatar a TextDraw use PlayerTextDrawSetString

Vc deu a ideia, eu dei a lуgica e vc termina esse sistema se quiser.


Re: Sistema de level DM?? - joaobgnc - 12.04.2016

Quote:
Originally Posted by F1N4L
Посмотреть сообщение
Esse й um sistema super simples de se fazer, utilizando textdraw ainda mais fбcil.

*Crie 2 variбveis globais com array para o player.

*Na callback OnPlayerDeath vc irб definir para o player matou (killerid) +3 xp em uma dessas variбveis globais.
*Crie uma condicional nessa mesma callback para verificar quantos players o killerid matou. Assim vc aumenta o limite mбximo de exp.
Ex:

*Formate a textdraw conforme o killerid vai matando e ganhando exp.
*Verifica se a VarKiller[killerid] й igual ao limite estipulado por vc. Se for vc aumenta o limite de exp e formata a textdraw novamente com o limite novo e reseta a exp da textdraw para 0.

Formatar a TextDraw use PlayerTextDrawSetString

Vc deu a ideia, eu dei a lуgica e vc termina esse sistema se quiser.
Obrigado :3