Kill Counter
#3

Quote:
Originally Posted by DJDhan
It's got to do with OnPlayerDeath function.
I'm fairly new to coding but...

You can add a new variable with arguments playerid and kills like so
Код:
new PlayerInfo[MAX_PLAYERS][PlayerData];
enum PlayerData
{ Kills;
};
new PlayerInfo[MAX_PLAYERS][PlayerData];
public OnPlayerConnect(playerid)
{PlayerInfo[playerid][Kills] = 0;
}

public OnPlayerDeath(playerid, killerid, reason)
{     PlayerInfo[playerid][Deaths]++
      SendDeathMessage(killerid, playerid, reason);

}
Hope I Helped
you must be really new, cause that is hurting my eyes.

pawn Код:
new pKills[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
    pKills[playerid] = 0;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    pKills[killerid]++;
    SendDeathMessage(killerid, playerid, reason);

}
that would make a variable holding how many kills each player has. what you do with it is entirely up to you.
Reply


Messages In This Thread
Kill Counter - by Ironboy500 - 05.12.2009, 14:51
Re: Kill Counter - by DJDhan - 05.12.2009, 16:08
Re: Kill Counter - by Daren_Jacobson - 05.12.2009, 16:18
Re: Kill Counter - by Sergei - 05.12.2009, 16:31
Re: Kill Counter - by Ironboy500 - 05.12.2009, 17:51
Re: Kill Counter - by DJDhan - 06.12.2009, 04:51

Forum Jump:


Users browsing this thread: 1 Guest(s)