25.07.2013, 13:54
I'm starting to make a dynamic event system but i don't know how to get the best killer..
Please help me!!
Please help me!!
for(new winner = 0; winner < MAX_PLAYERS; winner++)
{
SetPlayerPos(winner,x,y,z);
}
new kills[MAX_PLAYERS];
public OnPlayerDeath(..)
{
if killer_id was in an event - check
{
kills[killer_id]++;
}
}
WHERE YOU want to declare the winner
{
new temp = 0;
foreach( new i: Player )
{
if(kills[i] > temp)
{
temp = kills[i];
}
}