[Ajuda] Qual lуgica usar? - 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] Qual lуgica usar? (
/showthread.php?tid=619852)
Qual lуgica usar? -
Tiu_DaColombia - 23.10.2016
Galera, tф querendo criar um sistema, mas nгo sei qual lуgica usar, venho aqui pra pedir vocкs me ajudarem "abrir a mente" skddsjk..
Seria uma avaliaзгo de certas organizaзхes.. mais ou menos assim
A cada certo tempo, talvez em 2/2 horas, o servidor irб avisar qual organizaзгo se saiu melhor em cada бrea.
Por exemplo os gangsters.. A cada roubo eles ganharгo 10 pontos, cada assalto 5 pontos, por domнnio 3 pontos etc..
No meu servidor possuem organizaзхes gangsters(criminosas), aн quando chegar no tempo de avaliar, o servidor irб avisar qual organizaзгo se saiu melhor nesse meio tempo..
EX: COMANDO VERMELHO Й A ORGANIZAЗГO MAIS PERIGOSA DE LOS SANTOS, E GANHARБ BФNUS VIP
Re: Qual lуgica usar? -
XandyMello - 23.10.2016
PHP код:
new
PontosCV,
PontosADA,
PontosPCC
;
CMD:pontoscv(playerid)
{
SendClientMessage(playerid, -1, "ORG CV ganhou 1 ponto !");
PontosCV += 1;
return 1;
}
CMD:pontosada(playerid)
{
SendClientMessage(playerid, -1, "ORG ADA ganhou 1 ponto !");
PontosADA += 1;
return 1;
}
CMD:pontospcc(playerid)
{
SendClientMessage(playerid, -1, "ORG PCC ganhou 1 ponto !");
PontosCV += 1;
return 1;
}
CMD:vencedora(playerid)
{
if(PontosCV > PontosADA && PontosCV > PontosPCC)
{
SendClientMessage(playerid, -1, "ORG CV Venceu por conter mais pontos !");
}
else if(PontosADA > PontosCV && PontosADA > PontosPCC)
{
SendClientMessage(playerid, -1, "ORG ADA Venceu por conter mais pontos !");
}
else if(PontosPCC > PontosADA && PontosPCC > PontosCV)
{
SendClientMessage(playerid, -1, "ORG PCC Venceu por conter mais pontos !");
}
PontosCV = 0; PontosADA= 0; PontosPCC = 0; //resetar
return 1;
}