PHP Code:
new MyScore[MAX_PLAYERS];
public OnPlayerDeath(playerid, killerid, reason) {
MyScore[killerid]++;
return 1;
}
CMD:gameover(playerid, params[])
{
new currentwinner, score, finalwinner[24], string[128];
foreach(Player, i)
{
if(MyScore(i) > score)
{
score = MyScore(i);
currentwinner = i;
}
}
GetPlayerName(currentwinner, finalwinner, sizeof(finalwinner));
format(string, sizeof(string), "%s (ID %d) has won this game with a total score of %d.", finalwinner, currentwinner, score);
return 1;
}
This a very blank way of doing it, you'll have to integrate it with your code by yourself.
(Not tested)