Team Chat help +Rep
#5

Would this work, Im unabled to test it atm
Quote:

public OnPlayerText(playerid, text[])
{
if(text[0] == '!') //change ! to what variable u wanna use
{
new string[128]; GetPlayerName(playerid, string, sizeof(string));
format(string, sizeof(string), "[RADIO]%s: %s", string, text[1]);
printf("%s", string);

for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && gTeam[i] == 1||2||3) SendClientMessage(i, GetPlayerColor(playerid), string);
}
return 0;
}
new string[128], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
format(string, sizeof(string), "[%d]%s: %s", playerid, pName, text);
SendClientMessageToAll(GetPlayerColor(playerid), string);
return 0;
}

Reply


Messages In This Thread
Team Chat help +Rep - by Dustly - 11.01.2012, 13:57
Re: Team Chat help +Rep - by Min - 11.01.2012, 14:03
Re: Team Chat help +Rep - by Dustly - 11.01.2012, 14:22
Re: Team Chat help +Rep - by KingHual - 11.01.2012, 14:36
Re: Team Chat help +Rep - by Dustly - 12.01.2012, 01:43
Re: Team Chat help +Rep - by Psymetrix - 12.01.2012, 01:45

Forum Jump:


Users browsing this thread: 5 Guest(s)