Most kills for a round?
#6

Bump

I mean like a global variable storing deaths and kills (I can make that by my self)
Then something finding wich player who had the biggest value in deaths or kills.

pawn Код:
enum Data
{
  Deaths,
  Kills,
};
new Info[MAX_PLAYERS][Data];

public OnPlayerDeath(playerid, killerid, reason)
{
  Info[playerid][Deaths]++;
  Info[killerid][Kills]++;
  return 1;
}

public OnRoundEnd()//Yes this is my own callback...
{
  new mKills;
  new mDeaths;
  for(new i=0; MAX_PLAYERS; i++)
  {
    GetMostKills(i, mKills, pName);//Getting the player who had the most kills by all players then storing most kills into mKills and the player with the most kills name in pName
    GetMostDeaths(i, mDeaths, pName);
    format(str, sizeof(str), "%s had most kills for this round! (Kills: 1337)", pName, mKills);
    SendClientMessageToAll(red, str);
    format(str, sizeof(str), "%s had most deaths for this round! (Deaths: 1337)", pName, mDeaths);
    SendClientMessageToAll(red, str);
  }
  return 1;
}
Reply


Messages In This Thread
Most kills for a round? - by bajskorv123 - 05.03.2010, 15:20
Re: Most kills for a round? - by bajskorv123 - 06.03.2010, 15:43
Re: Most kills for a round? - by bajskorv123 - 07.03.2010, 12:13
Re: Most kills for a round? - by bajskorv123 - 09.03.2010, 14:15
Re: Most kills for a round? - by bajskorv123 - 10.03.2010, 17:31
Re: Most kills for a round? - by bajskorv123 - 11.03.2010, 15:19
Re: Most kills for a round? - by Jeffry - 11.03.2010, 15:49
Re: Most kills for a round? - by bajskorv123 - 11.03.2010, 16:08
Re: Most kills for a round? - by Jeffry - 11.03.2010, 16:12
Re: Most kills for a round? - by iLinx - 11.03.2010, 17:02

Forum Jump:


Users browsing this thread: 3 Guest(s)