Rather than using a command to change the score of each team, i'd recommend using a timer, it should save you time having to change team's score manually. I can make you a command to change the team names using a command, but i need to know what command processing method you use. (e.g. strcmp, dcmd, zcmd etc and whether you use sscanf).
pawn Код:
#define MAX_SERVER_PLAYERS 50 //change to the max player slots in your server
#define TEAM_HOME 0
#define TEAM_AWAY 1
#define INGAME 0
#define OUTGAME 1
new TeamName[2][64] = {{"Home"}, {"Away"}}; //change the default team names here
new TeamPlayers[2][2]; //TeamPlayers[TeamID][ingame/outgame]
new TeamScore[2];//TeamScore[TEAMID][Score]
new RoundID;
new ModeTimer;
forward ModeUpdate();
public ModeUpdate()
{
for(new i = 0; i < MAX_SERVER_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new string[256];
format(string,sizeof(string),"~g~Round: %s ~y~Home * ~h~~h~ Players: ~w~%d ~y~~h~~h~/ ~w~%d Life: ~w~%d ~y~~h~~h~/ ~w~%d ~r~Guest * ~h~~h~ Players: ~w~%d ~r~~h~~h~/ ~w~%d Life: ~w~%d ~r~Score: ~w~%d", RoundID, TeamName[TEAM_HOME], TeamPlayers[TEAM_HOME][INGAME], TeamPlayers[TEAM_HOME][OUTGAME], TeamScore[TEAM_HOME], TeamName[TEAM_AWAY], TeamPlayers[TEAM_AWAY][INGAME], TeamPlayers[TEAM_AWAY][OUTGAME], TeamScore[TEAM_HOME]);
TextDrawSetString(TEXTDRAWNAME,string); //CHANGE TEXTDRAW NAME WITH YOUR CREATED TEXTDRAW
}
}
ModeTimer = SetTimer("ModeUpdate",1000,0);
}
//To Stop textdraw updating use: KillTimer(ModeTimer);
//change the value of RoundID for each round or whatever
Untested, there may be some mistakes. If so, post errors, or anyone can correct.
EDIT: it would help if you gave the variable to identify whether the player is in a round(alive) and not alive, how you identify teams etc to be in the timer.