SA-MP Forums Archive
solved - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: solved (/showthread.php?tid=112541)



solved - jaksimaksi - 08.12.2009

solved


Re: Help please. - Andy_McKinley - 08.12.2009

Код:
public OnPlayerText(playerid, text[])
{
	if(text[0]== '!')
	{
  new string[STR], tmpcolour;
  switch(Player[playerid][pTeam])
  {
  case T_REF: tmpcolour = COLOR_LBLUE;
  case T_DEF: tmpcolour = COLOR_LBLUE;
  case T_ATT: tmpcolour = COLOR_LBLUE;
  default:
  {
  SendClientMessage(playerid, AAD_COLOR_GREY, "You are not spawned");
  return 0;
  }
  HERE! <<<<
  }
  format(string,STR,"[TEAM] %s: %s", Playername(playerid), text[1]);
  for(new i; i < MAX_PLAYERS; i++)
  {
  if(IsPlayerConnected(i))
  {
  if(Player[playerid][pTeam] == Player[i][pTeam])
  {
  	SendClientMessage(i, tmpcolour, string);
  }
  }
  }
  return 0;
	}
	return 1;
}



Re: Help please. - jaksimaksi - 08.12.2009

i have this error:
Код:
(455) : error 002: only a single statement (or expression) can follow each "case"