[AYUDA] Me ayudan ah hacer esto por favor???
#1

Hola, Soy yo de nuevo
Me ayudan ah hacer un conteo de players por ejemplo:


<!>Players OnLine:<!>
<!>10<!>


Desde ya gracias por su ayuda y tiempo
Reply
#2

Код:
new data[100];
format(data,sizeof(data),"players on-line: %d ", GetPlayerPoolSize() );
// SendClientMessage
// TextDraw
// etc...
Reply
#3

Код:
new count = 0, string[50];
for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++)
{
	if(IsPlayerConnected(i)) count++;
}
format(string,sizeof(string),"Players OnLine: %d",count);
Reply
#4

Quote:
Originally Posted by OTACON
Посмотреть сообщение
Код:
new data[100];
format(data,sizeof(data),"players on-line: %d ", GetPlayerPoolSize() );
// SendClientMessage
// TextDraw
// etc...
Que estupido estas neta, no vez que alguien es nuevo y das el codigo como si alguien ya supiera si vas a comentar para ayudar mejor que se explique o que este completo y si no , mejor no lo hagas por que siempre haces lo mismo
Reply
#5

Quote:
Originally Posted by aoEXE
Посмотреть сообщение
Код:
new count = 0, string[50];
for(new i = 0, j = GetPlayerPoolSize(); i <= j; i++)
{
	if(IsPlayerConnected(i)) count++;
}
format(string,sizeof(string),"Players OnLine: %d",count);
Donde va esto , me ayudas?
Reply
#6

Ayudenme Porfavor!!!!!
Reply
#7

Hola amigo colуcalo asн de lo que te dio aoEXE

Eso lo pones donde quieras
PHP код:
stock JugadoresOnline()
{
    new 
count 0string[50];
    for(new 
0GetPlayerPoolSize(); <= ji++)
    {
        if(
IsPlayerConnected(i)) count++;
    }
    
format(stringsizeof(string), "Jugadores Online %d"count);
    return 
1;

y esto en OnGameModeInit

PHP код:
    JugadoresOnline();
    
SetTimer("JugadoresOnline"100000true);//Los nъmeros son el tiempo por el cual aparece el texto 
En textdraw es mucho mejor! no lo probй por que no tengo con quien probar el conteo jeje
Reply
#8

Ahн estб ...

PHP код:
      new 
            
players 0,//variable para almacenar la cantidad de jugadores online
            
strings[32];//cadena string para almacenar el texto a enviar con la cantidad de jugdaores online
     
for(new 0GetPlayerPoolSize(); <= ji++)if(IsPlayerConnected(i)) players++; //hace un ciclo tomando la ID del jugador mas alto conectado y va preguntando ID por ID y si esta conectado, suma +1 a la variable players
     
format(strings,sizeof(strings),"Jugadores Online: %d",players);//almacenar en la cadena strings la cantidad de jugadores online
     
SendClientMessageToAll(-1strings);//enviar mensaje a todos los jugadores conectados con la cantidad de jugadores online 
Reply
#9

esto se lo puede poner en TextDraw porfavor??
Reply
#10

Si amigo en la funciуn colocas TextDrawSetString(Tutex.., string); tambiйn debe llevar un time
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)