SA-MP Forums Archive
[Dъvida] Dъvida Simples! - 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: [Dъvida] Dъvida Simples! (/showthread.php?tid=213298)



[Dъvida] Dъvida Simples! - Erick_Schultz - 18.01.2011

Bom Gente,Eu Vim Aqui Perguntar Para Quem Sabe Um Code Ou Jб Tem e Se Poder Compartilhar Agradeзo...
Bom й Aquele tipo, Quando O Player Entra No Servidor,Aparece Players Online: %s/%d, nгo й preguissa ;x й porque estive muito tempo se codar


Re: [Dъvida] Dъvida Simples! - rjjj - 18.01.2011

Isto deve resolver o seu problema.

Coloque:

pawn Код:
//No Topo do GM:

new PlayerOn;


//No OnPlayerConnect:
PlayerOn++;



//No OnPlayerDisConnect:
PlayerOn--;
E depois, quando for usar em uma string, faзa como abaixo:


pawn Код:
printf("Players On: %d/%d", PlayerOn, GetMaxPlayers());

Espero ter ajudado


Re: [Dъvida] Dъvida Simples! - Erick_Schultz - 18.01.2011

Vlw Ken '-', Vocк Pode Me Ajudar Tambйm Naquele Esquema de Recorde de Preiers?


Re: [Dъvida] Dъvida Simples! - rjjj - 18.01.2011

Quote:
Originally Posted by Erick_Schultz
Посмотреть сообщение
Vlw Ken '-', Vocк Pode Me Ajudar Tambйm Naquele Esquema de Recorde de Preiers?
Nгo testei, mas isto deve resolver o seu problema


Tendo adicionado os cуdigos do meu post anterior aqui no tуpico, coloque:


pawn Код:
//No Topo do GM:

new RecordeAntigo, RecordeAtual, MaxAtingidos, bool:Recordado;



//No OnPlayerConnect:

if(Recordado) RecordeAtual = PlayerOn, Recordado = false;
if(RecordeAtual > RecordeAntigo) MaxAtingidos = RecordeAtual;
if(!Recordado) RecordeAntigo = PlayerOn, Recordado = true;



//E quando for usar em uma string:


printf("Recorde de Players Atingidos й: %d", MaxAtingidos);

Para adicionar dia, ano etc, basta adaptar esta linha:

pawn Код:
if(RecordeAtual > RecordeAntigo) MaxAtingidos = RecordeAtual;
Espero ter ajudado