11.02.2014, 17:23
(
Последний раз редактировалось Samjoc18; 14.02.2014 в 20:16.
Причина: SOLVED
)
SOLVED
new
MostKills,
RoundKills[MAX_PLAYERRS];
public OnPlayerConnect(playerid)
{
RoundKills[playerid] = 0;
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
RoundKills[killerid] ++;
return 1;
}
// wherever the round ends
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(!IsPlayerConnected(i)) continue;
if(RoundKills[i] > MostKills)
{
MostKills = RoundKills[i];
}
}
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(!IsPlayerConnected(i)) continue;
if(RoundKills[i] >= MostKills)
{
GetPlayerName(i, sendername, sizeof(sendername));
format(string, sizeof(string),"%s has achieved the most kills.", sendername);
SendClientMEssageToAll(COLOR_BLUE, string);
}
RoundKills[i] = 0;
}
MostKills = 0;