Top killer
#1

Hi there.

Iґm using this code to figure the top killer in 10 minutes out:
Код:
public killstats()
{
	new string[128], id[3] = {-1, ...}, i;
	for(i = 0; i < 3; i++)
	{
		GetMaxKillz(id[i], id[0], id[1], id[2]);
		if(!GetPlayerName(id[i], string, MAX_PLAYER_NAME)) string = "Unknown";
		format(string, sizeof string, "%d. %s (%d)\n", i + 1, string, Killz[id[i]]);
	}
	for(i = 0; i < MAX_PLAYERS; i++)
	{
	ShowPlayerDialog(i,1, DIALOG_STYLE_MSGBOX, "TOP KILLERS (10 MINUTES)", string, "Okay", "Cancel");
	}
	return 1;
}

stock GetMaxKillz(&id, ...)
{
	new i, a, n = numargs(), bool:next, maxx;
	for(i = 0; i < MAX_PLAYERS; i++, next = false)
	{
		if(Killz[i] < maxx) continue;
		for(a = 1; a < n; a++) if(i == getarg(a)) next = true;
		if(next) continue;
		maxx = Killz[i];
		id = i;
	}
}
But now Iґd like to figure the THREE best killers out. Howto?
Reply


Messages In This Thread
Top killer - by Striker_Moe - 04.11.2009, 21:13
Re: Top killer - by Nameless303 - 05.11.2009, 00:16
Re: Top killer - by Zeromanster - 05.11.2009, 07:48

Forum Jump:


Users browsing this thread: 1 Guest(s)