Team Points Count
#2

pawn Код:
new
    SwatScore = 0,
    NarcoScore = 0
;

new tmpstr[50];

public OnPlayerDeath(playerid, killerid, reason)
{
    if(GetPlayerTeam(killerid) == 1)
    {
        SwatScore++;
        format(tmpstr,sizeof(tmpstr),"SWAT: %d  NARCOS: %d",SwatScore,NarcoScore);
        GameTextForPlayer(killerid, tmpstr, 3000, 4);
        GameTextForPlayer(playerid, tmpstr, 3000, 4);
    }
    if(GetPlayerTeam(killerid) == 2)
    {
        NarcoScore++;
        format(tmpstr,sizeof(tmpstr),"SWAT: %d  NARCOS: %d",SwatScore,NarcoScore);
        GameTextForPlayer(killerid, tmpstr, 3000, 4);
        GameTextForPlayer(playerid, tmpstr, 3000, 4);
    }
    return 1;
}
Now every time you want to check the score(for example in a string in a command) you can use SwatScore and NarcoScore, simple as that.
Reply


Messages In This Thread
Team Points Count - by caribe88 - 11.02.2012, 13:20
Re: Team Points Count - by [XST]O_x - 11.02.2012, 13:31
Re: Team Points Count - by caribe88 - 11.02.2012, 16:37

Forum Jump:


Users browsing this thread: 1 Guest(s)