[Help]Team Chat
#4

simple team chat try if works

pawn Код:
forward TeamChat(playerid,string[]);

public TeamChat(playerid,string[])
{
    foreach(Player,i)
    {
        if(GetPlayerTeam(i) == GetPlayerTeam(playerid))
        {
            SendClientMessage(i,-1,string);
        }
    }
    return 1;
}

CMD:tc(playerid,params[])
{
    new text[128],pName[MAX_PLAYER_NAME],formatted[156];
    if(sscanf(params,"s[128]",text)) return SendClientMessage(playerid,-1,"Usage: /tc [teamchat text]");
    GetPlayerName(playerid,pName,sizeof(pName));
    format(formatted,sizeof(formatted),"[Team Chat]: %s(%d): %s",pName,playerid,text);
    TeamChat(playerid,formatted);
    return 1;
}
Reply


Messages In This Thread
[Help]Team Chat - by qazwsx - 15.08.2013, 14:47
Re: [Help]Team Chat - by Vanter - 15.08.2013, 14:55
Re: [Help]Team Chat - by qazwsx - 15.08.2013, 15:19
Re: [Help]Team Chat - by IceBilizard - 15.08.2013, 16:15
Re: [Help]Team Chat - by qazwsx - 16.08.2013, 02:16
Re: [Help]Team Chat - by PrinceKumar - 16.08.2013, 02:29
Re : [Help]Team Chat - by Matnix - 16.08.2013, 02:33
Re: [Help]Team Chat - by qazwsx - 16.08.2013, 02:34
Re: Re : [Help]Team Chat - by qazwsx - 16.08.2013, 02:39

Forum Jump:


Users browsing this thread: 1 Guest(s)