SA-MP Forums Archive
I'm confused - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: I'm confused (/showthread.php?tid=151722)



I'm confused - ViruZZzZ_ChiLLL - 31.05.2010

I'm confused on how to get who has the most
number of kills in 4 teams and compare them. I
can only get the most kills in 2 teams but not 4.



What are you talking about?

Team 1 - 40 kills
Team 2 - 35 kills
Team 3 - 30 kills
Team 4 - 25 kills


Thanks.



Re: I'm confused - azzerking - 31.05.2010

Hmmmm

Try explaining better becasue im not understanding it


Re: I'm confused - DJDhan - 31.05.2010

There you go

http://pawn.pastebin.com/hTQPdH7i

EDIT: If you wana do it in ascending order of kills then i'll edit it.


Re: I'm confused - Conroy - 31.05.2010

pawn Код:
new Team1Count;
new Team2Count;
new Team3Count;
new Team4Count;
pawn Код:
//OnPlayerDeath
if(gTeam[killerid] == TEAM_1) Team1Count++;
if(gTeam[killerid] == TEAM_2) Team2Count++;
if(gTeam[killerid] == TEAM_3) Team3Count++;
if(gTeam[killerid] == TEAM_4) Team4Count++;
pawn Код:
stock GetHighestTeam()
{
if(Team1Count > Team2Count && Team1Count > Team3Count && Team1Count > Team4Count) return 1;
if(Team2Count > Team1Count && Team2Count > Team3Count && Team2Count > Team4Count) return 2;
if(Team3Count > Team1Count && Team3Count > Team2Count && Team3Count > Team4Count) return 3;
if(Team4Count > Team1Count && Team4Count > Team2Count && Team4Count > Team3Count) return 4;
}



Re: I'm confused - DJDhan - 31.05.2010

ops sorry


Re: I'm confused - azzerking - 31.05.2010

I Understand it know lol i get what he means

i thought he wanted kills and deaths to be displayed on screen all the time using
TextDraw

NVM