Team Chat
#2

I hope it will be useful for you:
pawn Код:
public OnPlayerText(playerid, text[])
{
    if (text[0] == '@') {
        text[0] = ' ';
        new msg[128], pName[MAX_PLAYER_NAME];
        GetPlayerName(playerid, pName, sizeof(pName));
        format(msg, sizeof(msg), "[Team][%s]:%s", pName, text);
        for (new i = 0; i < GetMaxPlayers(); i++) {
            if (GetPlayerTeam(playerid) == GetPlayerTeam(i))
                SendPlayerMessageToPlayer(i, playerid, msg);
        }
        return 0;
    }
    return 1;
}
Reply


Messages In This Thread
Team Chat - by SpiderWalk - 18.02.2012, 22:10
Re: Team Chat - by Nonameman - 18.02.2012, 23:11
Re: Team Chat - by SpiderWalk - 19.02.2012, 08:06
Re: Team Chat - by vassilis - 19.02.2012, 08:27
Re: Team Chat - by SpiderWalk - 19.02.2012, 08:33
Re: Team Chat - by vassilis - 19.02.2012, 08:40
Re: Team Chat - by Nonameman - 19.02.2012, 12:00

Forum Jump:


Users browsing this thread: 4 Guest(s)