All pastes #452234 Raw Edit

Mine

public text v1 · immutable
·published 2007-04-22 03:44 UTC
rendered paste body
public OnPlayerText(playerid, text[])
{
		   new strName[MAX_PLAYER_NAME];
		   new strOut[MAX_STRING];

		   GetPlayerName(playerid, strName, sizeof(strName));
		   format(strName, sizeof(strName), "chat : %d %d %s %s", playerid, strName, text);
    	   add_log(strName);
    	   
  	   		if (muted[playerid] == 1)
            {
			SendClientMessage(playerid, COLOR_RED, "*** You muted and cannot send messages. Use Team Chat. ***");
			return 0;
          	}
		    
		    if(text[0] == '!')
			{
            new string[MAX_STRING];
            strmid(string, text, 1, strlen(text), MAX_STRING);
            format(strOut, MAX_STRING, "*[TC]* %s: %s", strName, string);

            for(new i = 0; i<MAX_PLAYERS; i++)
            {
            if(gTeam[i] == gTeam[playerid])
            SendClientMessage(i, COLOR_LIGHTGREEN, strOut);
            add_log(strOut);
            }
            }
            return 1;
            }