01.04.2013, 23:30
What if I wanted like
/setscore [team id] [score]
my two teams are TEAM_HOME and TEAM_AWAY so it would be:
??
/setscore [team id] [score]
my two teams are TEAM_HOME and TEAM_AWAY so it would be:
pawn Код:
new tmp[128];
tmp = strtok(cmdtext,teamid, score);
if(!strlen(tmp)) return SendClientMessage(playerid,-1,"Usage: /setscore [TEAM ID] [SCORE]");
if(!gTeam[tmp] == TEAM_HOME || gTeam[tmp] TEAM_AWAY) return SendClientMessage(playerid,-1,"Invalid team id.");
new id = strval(tmp);
tmp = strtok(cmdtext,teamid, score);
if(!strlen(tmp)) return SendClientMessage(playerid,-1,"Usage: /setscore [TEAM ID] [SCORE]");
teamhomescore = tmp;
return 1;

