Problem with teamchat
#1

Hi all,i maked this code for the team chat:

Код:
    if(text[0] == ';')
	{
		if( gTeam[playerid] == TEAM_MEDICS )
        {
			new string[128];
			GetPlayerName(playerid,nameee,sizeof(nameee));	format(string,sizeof(string),"Team Chat: [%s] ID: [%i]: %s",nameee,playerid,text[3]); SendClientMessageToAll(COLOR_YELLOW, string);
			new str[100];
   	        format(str,sizeof(str),"08,02Team Chat Medics: [%s] ID: [%i]: %s", nameee,playerid,text[3]);
   	   	    IRC_GroupSay(gGroupID, IRC_CHANNEL, str);
		}
		if( gTeam[playerid] == TEAM_RICHS )
		{
            new string[128];
			GetPlayerName(playerid,nameee,sizeof(nameee));	format(string,sizeof(string),"Team Chat: [%s] ID: [%i]: %s",nameee,playerid,text[3]); SendClientMessageToAll(COLOR_YELLOW, string);
			new str[100];
   	        format(str,sizeof(str),"08,02Team Chat Richs: [%s] ID: [%i]: %s", nameee,playerid,text[3]);
   	   	    IRC_GroupSay(gGroupID, IRC_CHANNEL, str);
		}
		if( gTeam[playerid] == TEAM_FARMERS )
		{
	    	new string[128];
			GetPlayerName(playerid,nameee,sizeof(nameee));	format(string,sizeof(string),"Team Chat: [%s] ID: [%i]: %s",nameee,playerid,text[3]); SendClientMessageToAll(COLOR_YELLOW, string);
             new str[100];
   	        format(str,sizeof(str),"08,02Team Chat Farmers: [%s] ID: [%i]: %s", nameee,playerid,text[3]);
   	   	    IRC_GroupSay(gGroupID, IRC_CHANNEL, str);
		}
		if( gTeam[playerid] == TEAM_SWAT )
		{
            new string[128];
			GetPlayerName(playerid,nameee,sizeof(nameee));	format(string,sizeof(string),"Team Chat: [%s] ID: [%i]: %s",nameee,playerid,text[3]); SendClientMessageToAll(COLOR_YELLOW, string);
            new str[100];
   	        format(str,sizeof(str),"08,02Team Chat Swat: [%s] ID: [%i]: %s", nameee,playerid,text[3]);
   	   	    IRC_GroupSay(gGroupID, IRC_CHANNEL, str);
		}
		if( gTeam[playerid] == TEAM_PILOTS )
		{
            new string[128];
    		GetPlayerName(playerid,nameee,sizeof(nameee));	format(string,sizeof(string),"Team Chat: [%s] ID: [%i]: %s",nameee,playerid,text[3]); SendClientMessageToAll(COLOR_YELLOW, string);
            new str[100];
   	        format(str,sizeof(str),"08,02Team Chat Pilots: [%s] ID: [%i]: %s", nameee,playerid,text[3]);
   	   	    IRC_GroupSay(gGroupID, IRC_CHANNEL, str);
		}
	    if( gTeam[playerid] == TEAM_KAMIKAZERS )
		{
            new string[128];
    		GetPlayerName(playerid,nameee,sizeof(nameee));	format(string,sizeof(string),"Team Chat: [%s] ID: [%i]: %s",nameee,playerid,text[3]); SendClientMessageToAll(COLOR_YELLOW, string);
    		new str[100];
   	        format(str,sizeof(str),"08,02Team Chat Kamikazers: [%s] ID: [%i]: %s", nameee,playerid,text[3]);
   	   	    IRC_GroupSay(gGroupID, IRC_CHANNEL, str);
		}
		if( gTeam[playerid] == TEAM_IMMIGRANTS )
		{
            new string[128];
    		GetPlayerName(playerid,nameee,sizeof(nameee));	format(string,sizeof(string),"Team Chat: [%s] ID: [%i]: %s",nameee,playerid,text[3]); SendClientMessageToAll(COLOR_YELLOW, string);
            new str[100];
   	        format(str,sizeof(str),"08,02Team Chat Immigrants: [%s] ID: [%i]: %s", nameee,playerid,text[3]);
   	   	    IRC_GroupSay(gGroupID, IRC_CHANNEL, str);
		}
	    if( gTeam[playerid] == TEAM_CHICKENS )
	  	{
            new string[128];
    		GetPlayerName(playerid,nameee,sizeof(nameee));	format(string,sizeof(string),"Team Chat: [%s] ID: [%i]: %s",nameee,playerid,text[3]); SendClientMessageToAll(COLOR_YELLOW, string);
    		new str[100];
            format(str,sizeof(str),"08,02Team Chat Kamikazers: [%s] ID: [%i]: %s", nameee,playerid,text[3]);
 	        IRC_GroupSay(gGroupID, IRC_CHANNEL, str);
		}
		return 1;
	}
And i've 2 problems:

I write "test" ingame,and and irc appear in this way:



The name doesnt show,and the text is cutted.

Same happen in-game:



What i done wrong?
Reply


Messages In This Thread
Problem with teamchat - by Face9000 - 19.12.2010, 12:51
Re: Problem with teamchat - by Moglizorz. - 19.12.2010, 12:58
Re: Problem with teamchat - by Face9000 - 19.12.2010, 13:27
Re: Problem with teamchat - by Face9000 - 20.12.2010, 15:59

Forum Jump:


Users browsing this thread: 2 Guest(s)