16.12.2011, 14:54
UNTESTED:
pawn Code:
#include <a_samp>
new TEAM_I_SCORE = 0, TEAM_U_SCORE = 0, TEAM_P_SCORE = 0, TEAM_R_SCORE = 0, TEAM_U2_SCORE = 0;
new gTeam[MAX_PLAYERS];
#define TEAM_I 0
#define TEAM_U 1
#define TEAM_U2 2
#define TEAM_P 3
#define TEAM_R 4
public OnPlayerDeath(playerid,killerid,reason)
{
SetPlayerScore(playerid,GetPlayerScore(playerid)+1);
switch(gTeam[playerid])/*I guess you used gTeam, if not just change it*/
{
case TEAM_I: TEAM_I_SCORE++;
case TEAM_U: TEAM_U_SCORE++;
case TEAM_P: TEAM_P_SCORE++;
case TEAM_R: TEAM_R_SCORE++;
case TEAM_U2: TEAM_U2_SCORE++;
default: return 1;
}
return 1;
}
public OnPlayerCommandText(playerid,cmdtext[])
{
if(!strcmp(cmdtext,"/teamscore",true))
{
new msg[128];
switch(gTeam[playerid])
{
case TEAM_U: format(msg,128,"Your Team Score: %i",TEAM_U_SCORE);
case TEAM_I: format(msg,128,"Your Team Score: %i",TEAM_I_SCORE);
case TEAM_P: format(msg,128,"Your Team Score: %i",TEAM_P_SCORE);
case TEAM_R: format(msg,128,"Your Team Score: %i",TEAM_R_SCORE);
case TEAM_U2: format(msg,128,"Your Team Score: %i",TEAM_U2_SCORE);
default: return 1;
}
SendClientMessage(playerid,0xFF0000FF,msg);
return 1;
}
return 0;
}