team chat is not team chat lol
#1

hi guyz i used this code for team chat and now i can do team chat, but player of other team can see this chat

public OnPlayerText(playerid, text[])
{

if(text[0] == '!')
{
new string[128];
GetPlayerName(playerid, string, sizeof(string));
format(string, sizeof(string), "[Team] %s: %s", string, text[1]);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && gTeam[i] == gTeam[playerid]) SendClientMessage(i, GetPlayerColor(playerid), string);
}
return 0;
}

return 1;
}
Reply


Messages In This Thread
team chat is not team chat lol - by cvnr0 - 25.12.2013, 05:14
Re: team chat is not team chat lol - by 0x41726d79 - 25.12.2013, 05:18

Forum Jump:


Users browsing this thread: 2 Guest(s)