[Ajuda] Total de players no times
#1

Bom dia galera, Hoje eu fiz um comando que a mostrar o numero total de players conectado nos times, e cada vez que o comando e digitado o numero vai somando.

Exemplo: O time 1 esta com 1 player online ai quando digita o comando aparece que o time 1 esta com 1 player online, mais se ele digitar de novo o numero multiplica ai fica como 2 player online mais que sу tem 1...

rep++ pra todos que me ajudar ou ate mesmo tentar, Obrigado desde ja <3

Cуdigo:
Код:
dcmd_totaltimes(playerid, params[])
{
	#pragma unused params

	GetTimePlayers();

	new String[500];
	format(String, sizeof(String), "{FFFFFF}Players Time 1:%d\n\
	{FFFFFF}Players Time 2: %d", TotalTime1, TotalTime2);
	ShowPlayerDialog(playerid, 96251, DIALOG_STYLE_MSGBOX, "Total Players dos Times", String, "Ok", "");
	return 1;
}

stock GetTimePlayers()
{
    for(new i, g = GetMaxPlayers(); i < g; i++)
	{
		if(IsPlayerConnected(i))
		{
			if(Player[i][pTime1] == 1)
			{
				TotalTime1++;
				return 1;
			}
			if(Player[i][pTime2] == 1)
			{
				TotalTime2++;
				return 1;
			}
		}
	}
	return 1;
}
Reply


Messages In This Thread
Total de players no times - by cellps - 22.11.2016, 09:36
Re: Total de players no times - by PT - 22.11.2016, 13:34
Re: Total de players no times - by cellps - 23.11.2016, 19:22
Re: Total de players no times - by XandyMello - 23.11.2016, 19:27
Re: Total de players no times - by PT - 24.11.2016, 14:53
Re: Total de players no times - by cellps - 24.11.2016, 15:12
Re: Total de players no times - by cellps - 25.11.2016, 09:54
Re: Total de players no times - by PT - 25.11.2016, 17:46
Re: Total de players no times - by pWesley - 25.11.2016, 17:49
Re: Total de players no times - by cellps - 27.11.2016, 13:33

Forum Jump:


Users browsing this thread: 2 Guest(s)