22.10.2018, 07:09
Guys don't fight,
OnTopic: I have used both mixture of ******'s and G1venchy and it produces the result as i want
if there is any fastest method. i would love to hear it
OnTopic: I have used both mixture of ******'s and G1venchy and it produces the result as i want
PHP код:
enum infofof
{
kills,
kid
};
new GetKillerID[MAX_PLAYERS][infofof];
new count = 0;
foreach (new i : Player)
{
if(Group[gattacker][gInTwar] == zoneid || Group[gattacked][gInTwar] == zoneid)
{
if(Player[i][pInTwar] == zoneid)
{
if(Player[i][pGroup] == iswinner)
SetPlayerScore(i, GetPlayerScore(i) + 8);
GetKillerID[count][kills] = Player[i][pTwarScores];
count++;
}
}
}
SortDeepArray(GetKillerID, kills);
new rstr[500];
rstr = "ID\tName\tKills";
for(new i = 0; i < count; i++)
{
foreach(new j : Player)
{
if(Player[j][pTwarScores] == GetKillerID[i][kills])
{
if(Player[j][pInTwar] != zoneid)
continue;
GetKillerID[GetKillerID[i][kills]][kid] = j;
}
}
new pid = GetKillerID[GetKillerID[i][kills]][kid];
new groupid = Player[pid][pGroup];
new colorid = Group[groupid][gcolor];
format(rstr, sizeof (rstr), "%s\n%d\t{%06x}%s\t%d", rstr, pid, PlayerColors[colorid] >>> 8, Player[pid][Name], GetKillerID[i][kills]);
}
for(new i = 0; i < count; i++)
{
new pid = GetKillerID[GetKillerID[i][kills]][kid];
if(IsPlayerConnected(pid))
{
ShowPlayerDialog(pid, DIALOG_BLANK, DIALOG_STYLE_TABLIST_HEADERS, "Turf War Stats", rstr,"close","");
GetKillerID[i][kills] = 0;
}
}