Into dialog topscores
#2

Not sure if will work or not , not tested.

Код:
COMMAND:topscores(playerid, params[])
{
new string[128], Slot1 = -1, Slot2 = -1, Slot3 = -1, Slot4 = -1, HighestCash = -9999;
new scores[300];
for(new x=0; x<MAX_PLAYERS; x++) if (IsPlayerConnected(x)) if (GetPlayerScore(x) >= HighestCash) {
			HighestCash = GetPlayerScore(x);
			Slot1 = x;
		}
		HighestCash = -9999;
		for(new x=0; x<MAX_PLAYERS; x++) if (IsPlayerConnected(x) && x != Slot1) if (GetPlayerScore(x) >= HighestCash) {
			HighestCash = GetPlayerScore(x);
			Slot2 = x;
		}
		HighestCash = -9999;
		for(new x=0; x<MAX_PLAYERS; x++) if (IsPlayerConnected(x) && x != Slot1 && x != Slot2) if (GetPlayerScore(x) >= HighestCash) {
			HighestCash = GetPlayerScore(x);
			Slot3 = x;
		}
		HighestCash = -9999;
		for(new x=0; x<MAX_PLAYERS; x++) if (IsPlayerConnected(x) && x != Slot1 && x != Slot2 && x != Slot3) if (GetPlayerScore(x) >= HighestCash) {
			HighestCash = GetPlayerScore(x);
			Slot4 = x;
		}
format(scores, sizeof(scores),"(%d) %s - %d - Rank: %s\n(%d) %s - %d - Rank: %s\n(%d) %s - %d - Rank: %s",Slot1,PlayerName2(Slot1),GetPlayerScore(Slot1), GetRankName(Slot1),Slot2,PlayerName2(Slot2),GetPlayerScore(Slot2), GetRankName(Slot2),Slot3,PlayerName2(Slot3),GetPlayerScore(Slot3), GetRankName(Slot3));
 ShowPlayerDialog(playerid,100,DIALOG_STYLE_LIST,"Top 10 Scores",scores,"Okay","");
}
Reply


Messages In This Thread
Into dialog topscores - by Hunud - 25.07.2016, 18:28
Re: Into dialog topscores - by ThatFag - 25.07.2016, 18:36
Re: Into dialog topscores - by ThatFag - 25.07.2016, 18:38
Re: Into dialog topscores - by Hunud - 25.07.2016, 18:50
Re: Into dialog topscores - by Hunud - 25.07.2016, 19:37
Re: Into dialog topscores - by ThatFag - 25.07.2016, 20:28
Re: Into dialog topscores - by Nero_3D - 26.07.2016, 02:45

Forum Jump:


Users browsing this thread: 1 Guest(s)