Team Chat using gteam
#7

Quote:
Originally Posted by ThePhenix
Посмотреть сообщение
PHP код:
public OnPlayerText(playeridtext[])
{
/*=========================================================================================================
                                    Team Chat
==========================================================================================================*/
if(text[0] == '#')
    {
        new 
string[128]; GetPlayerName(playerid,string,sizeof(string));
        
format(string,sizeof(string),"|Team Chat| %s: %s",string,text[1]);
        
MessageToTeam(0xDC686BAA,string);
        }
        return 
0;
    }
//=======================================================================================================//
stock MessageToTeam(color,const string[])
{
    for(new 
0MAX_PLAYERSi++)//Loop through all the players.
    
{
    if(
IsPlayerConnected(i) == 1)//Just if the player is connected.
    
if(GetPlayerTeam(i))//Gets the player team
    
SendClientMessage(icolorstring);//Sends the message to the team.
    
}
    return 
1;

Hey thanks dude I'm gonna try this out now! Looks very neat & tidy =]
Reply


Messages In This Thread
Team Chat using gteam - by Phil_Cutcliffe - 29.01.2013, 19:04
Re: Team Chat using gteam - by Patrick - 29.01.2013, 19:15
Re: Team Chat using gteam - by Roach_ - 29.01.2013, 19:15
Re: Team Chat using gteam - by Phil_Cutcliffe - 29.01.2013, 19:19
Re: Team Chat using gteam - by Phil_Cutcliffe - 29.01.2013, 20:12
Re: Team Chat using gteam - by ThePhenix - 29.01.2013, 20:51
Re: Team Chat using gteam - by Phil_Cutcliffe - 29.01.2013, 22:06

Forum Jump:


Users browsing this thread: 1 Guest(s)