Hello everyone,
I want to know 2 things,
Lets take this script as an example which show you how many kills players got "Frags".
PHP Code:
int KillCount [MAXPLAYERS+1];
public void OnPluginStart()
{
HookEvent("round_start", Event_RoundStart);
HookEvent("player_death", EVENT_PlayerDeath);
}
public void Event_RoundStart(Event event, const char[] name, bool dontBroadcast)
{
for (int i = 1; i <= MaxClients; i++)
if (IsClientInGame(i)) KillCount[i] = 0;
}
public void EVENT_PlayerDeath(Event event, const char[] name, bool dontBroadcast)
{
int victim = GetClientOfUserId(event.GetInt("userid"));
if (!victim || !IsClientInGame(victim)) return;
int attacker = GetClientOfUserId(event.GetInt("attacker"));
if (!attacker || !IsClientInGame(attacker)) return;
if(attacker != victim)
{
KillCount[attacker]++;
if (KillCount[attacker] > 0) PrintHintText(attacker, "Kills: %d", KillCount[attacker]);
}
}
- The first thing I would like to know, is how print in the end of the round everyone's kill like:
mario kills: 15, sonic kills: 10, dragon kills: 8, noob kills: 5
- The second thing is how to show in the end of the round only the highest killer, like:
mario kills: 15 > thats all
Thank you