Team Chat using gteam
#3

Try this:
pawn Код:
public OnPlayerText(playerid, text[])
{
    if(text[0] == '#')
    {
        new string[128]; GetPlayerName(playerid, string, sizeof(string));
        format(string, sizeof string, "[Team Radio] %s: %s", string, text[1]);
        printf("%s", string);

        for(new i = 0; i < MAX_PLAYERS; i ++)
        {
            if(IsPlayerConnected(i) && GetPlayerTeam(i) == GetPlayerTeam(playerid)) SendClientMessage(i, GetPlayerColor(playerid), string);
        }
        return (0);
    }
    return (0);
}
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)