If score is same.. - 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: If score is same.. (
/showthread.php?tid=153110)
If score is same.. -
iStarzz - 07.06.2010
I am making a tdm server. But how do i detect if the teams score both is = 0 ?
Re: If score is same.. -
Calgon - 07.06.2010
Teams don't have an individual score, players have individual scores which are stored. You can add them together to calculate a team score if you really wish though.
pawn Код:
// With PVars.
new TeamCounts[ 5 ]; // You have 5 teams, for example.
foreach(Player, i)
{
if( GetPlayerScore( i ) >= 1 && GetPVarInt( i, "Team" ) >= 1 )
{
TeamCounts[ GetPVarInt( i, "Team" ) ] ++;
}
}
Re: If score is same.. -
iStarzz - 07.06.2010
Ehh, i have 2 teams. when i detect for a team winning i use this: if...teamkills[0] > teammkils[1] etc.