Team score help!(rep+) + Veh save file!
#3

So you're adding score to the team of the person that just died?

EDIT:

pawn Код:
#include <a_samp>

new TEAM_1_SCORE = 0, TEAM_2_SCORE = 0;
new gTeam[MAX_PLAYERS];
#define TEAM_1 0
#define TEAM_2 1

public OnPlayerDeath(playerid,killerid,reason)
{
    if(killerid != INVALID_PLAYER_ID) SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
    switch(gTeam[playerid])
    {
        case TEAM_1: TEAM_1_SCORE++;
        case TEAM_2: TEAM_2_SCORE++;
        default: return 1;
    }
    return 1;
}

public OnPlayerCommandText(playerid,cmdtext[])
{
    if(strcmp(cmdtext,"/teamscore",true) == 0)
    {
        new msg[128];
        switch(gTeam[playerid])
        {
            case TEAM_1: format(msg,128,"Your Team Score: %i",TEAM_1_SCORE);
            case TEAM_2: format(msg,128,"Your Team Score: %i",TEAM_2_SCORE);
            default: return 1;
        }
        SendClientMessage(playerid,0xFF0000FF,msg);
        return 1;
    }
    return 0;
}
Reply


Messages In This Thread
Team score help!(rep+) + Veh save file! - by Ballu Miaa - 18.12.2011, 09:51
Re: Team score help!(rep+) + Veh save file! - by Mrki_Drakula - 18.12.2011, 10:26
Re: Team score help!(rep+) + Veh save file! - by Thresholdold - 18.12.2011, 10:29
Re: Team score help!(rep+) + Veh save file! - by Mrki_Drakula - 18.12.2011, 10:31
Re: Team score help!(rep+) + Veh save file! - by Thresholdold - 18.12.2011, 10:37
Re: Team score help!(rep+) + Veh save file! - by Mrki_Drakula - 18.12.2011, 10:38
Re: Team score help!(rep+) + Veh save file! - by suhrab_mujeeb - 18.12.2011, 10:54
Re: Team score help!(rep+) + Veh save file! - by Gazmull - 18.12.2011, 10:58
Re: Team score help!(rep+) + Veh save file! - by Mrki_Drakula - 18.12.2011, 11:22

Forum Jump:


Users browsing this thread: 1 Guest(s)