SA-MP Forums Archive
Please help me... - 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: Please help me... (/showthread.php?tid=246338)



Please help me... - Baboon - 03.04.2011

Код:
forward calculatingscoreboard();
public calculatingscoreboard()
{
	new string[128];
	new name[MAX_PLAYER_NAME];
	new checker[MAX_PLAYERS];
	for(new i = 0; i < MAX_PALYERS; i++)
	{
	    if(IsPlayerConnecteD(i))
	    {
	        for(new a = 0; a < MAX_PALYERS; a++)
		{
			if(IsPlayerConnecteD(a))
			{
				if(i == a)
				else
				{
					if(kills[i] >= kills[a])
					{
					    checker[i]++;
					}
				}
			}
		}
	    }
	}
	
	if(...)
        {
           GetPlayerName(playerid, name, sizeof(name));
           format(string, sizeof(string), "%s", name);
           TextDrawSetString(Name1,string);
       }
	return 1;
}
Ok, I am stuck. I need to find a way to get the top 10 killers. The textdraws go from Name1 to Name10. Name1 is the winner of the top 10 killers. I got a variable kills[playerid] in onplayerdeath. Could anyone finish this small script? Thanks!!!