Team PM
#1

Hey guys, Could you Please Give me some kind of Team Chat or Team Pm? I tried to search but I have not ben able to find it

((I use Gteam))
Reply
#2

You should use search. There were so many examples of team chat. I'll give you mine.

Код:
dcmd_t(playerid, params[])
{
	new string[256], message;
	if(sscanf(params, "z", message)) return SendClientMessage(playerid, ORANGE, "Usage: /T [Text]");
	format(string, sizeof(string), "[Team Chat] %s (%d): %s", Name(playerid), playerid, message);

	for(new i = 0; i < MAX_PLAYERS; i++)
	{
		 	if(IsPlayerConnected(i))
			{
		 		if(GetPlayerTeam(i) == GetPlayerTeam(playerid))	SendClientMessage(i, YELLOW, string);
			}
	}
	return 1;

}
Reply
#3

Heres a way for gang chat that might work and no need for a command (but its not pm just gang chat).
Not tested should work. Anything after a player types '#' (without quotes) will be sent to that players team only. If they are not in a team nothing will be sent.

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(text[0] == '#')
    {
        new str[128],playername[24];
        for(new i; i < MAX_PLAYERS; i++)
        {
            if(gTeam[playerid] == gTeam[i])
            {
                GetPlayerName(playerid,playername,sizeof(playername));
                format(str,sizeof(str),"Gang(%s): %s",playername,text[1]);
                SendClientMessage(i,0x7fff00FF,str);
            }
        }
        return 0;
    }
    //rest of player text stuff here.
    return 1;
}
Reply
#4

Nevermind.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)