How to make a Group/Team Chat?
#8

Ay mate. Well here is what I use

PHP Code:
public OnPlayerText(playeridtext[])
{
    if(
text[0] == "!" || text[0] == "@")
    {
        new 
name[MAX_PLAYER_NAME], msg[128];
        
GetPlayerName(playeridnamesizeof(name));
       
        
format(msgsizeof(msg), "[Team Chat] %s[%d]: %s"nameplayeridtext[1]);
       
        for(new 
ii<=MAX_PLAYERSi++)
        {
            if(
GetPlayerTeam(playerid) == GetPlayerTeam(i))
            {
                
SendClientMessage(iTEAMCOLORmsg);
            }
        }
        return 
0;
    }

This works perfectly fine with me. Just change "@" to your desired letter for example #. This way it will say

PHP Code:
[Team-ChatMyNameText 
Of course. If you wish to change your team message you should change

PHP Code:
format(msgsizeof(msg), "[Team Chat] %s[%d]: %s"nameplayeridtext[1]); 
to desired text.
For example:
PHP Code:
format(msgsizeof(msg), "[My Team] %s[%s]: %s"nameplayeridtext[1]); 
I hope it will help you

+rep
Reply


Messages In This Thread
How to make a Group/Team Chat? - by HydraX - 12.04.2009, 02:27
Re: How to make a Group/Team Chat? - by RobertGraham - 12.04.2009, 02:30
Re: How to make a Group/Team Chat? - by HydraX - 12.04.2009, 02:34
Re: How to make a Group/Team Chat? - by RobertGraham - 12.04.2009, 03:11
Re: How to make a Group/Team Chat? - by Dylan_Madigan69 - 30.01.2012, 23:41
Re: How to make a Group/Team Chat? - by jamesbond007 - 30.01.2012, 23:52
Re: How to make a Group/Team Chat? - by DonWade - 31.01.2012, 01:20
Re: How to make a Group/Team Chat? - by Twinki1993 - 01.02.2012, 14:08

Forum Jump:


Users browsing this thread: 1 Guest(s)