ok, i collect the following data for each round of play:
1. total frags (each player)
2. total headshots (each player)
3. total damage (each player)
objective: assign the title "MVP Fragger: playername" based on:
1. Rank of total Frags comparing each of the 32 players against the others
2. Rank of total Headshots comparing each of the 32 players against the others
3. Rank of total Damage comparing each of the 32 players against the others
if You have the time, show me a structure i can use to evaluate the rank of each player in relation to all the others in each of the 3 categories. i'll probly figure out how to do this in time, but if You feel like offering suggestions on how to go about it, that'd be cool.
Code:
#define MAXPLAYERS 32
new g_MaxPlayers
new gs_Name[MAXPLAYERS+1][32]
// Arrays used for for public stats
new g_KillStreak[MAXPLAYERS+1] // How many kills a user has in a row.
new g_DeathCount[MAXPLAYERS+1] //Deaths per round (ea. player)
new g_HeadShotK[MAXPLAYERS+1] //Total Headshots (ea. killer)
new g_HeadShotV[MAXPLAYERS+1] //Headshots Taken (ea. victim)
new g_KillCount[MAXPLAYERS+1] //Total Killcount (ea. player)
new g_DmgGiven[MAXPLAYERS+1] //Total Dmg (ea. player)
new g_DmgTaken[MAXPLAYERS+1] //Dmg Taken (ea. player)
// Used for personaly stats
new g_PKillerStats[MAXPLAYERS+1][MAXPLAYERS+1]
Here are stats for 1 round of play:
Playername Frags HS's Damage
Player1: 3 2 320
Player2: 7 1 1200
Player3: 12 6 1200
Player4: 16 8 1900
Ok, the MVP Fragger for the round should be: Player4, because he ranked #1 in each of the 3 categories.