SendClientMessage to PlayerTeam
#8

Quote:

new gTeam[MAX_PLAYERS];

stock SendTeamMessage(playerid, color, string)
{
new teamid;
teamid = gTeam[playerid];
for (new i; i < MAX_PLAYERS; i++)
{
if(gTeam[i] == teamid)
{
SendClientMessage(i, color, string);
}
}
return 1;
}

If you use any other variable, change gTeam into yours.
This will work with any team id.
You can now use the function SendTeamMessage(playerid, color, string)

I might've scripted it wrong, did it blind without any pawno help.
Reply


Messages In This Thread
SendClientMessage to PlayerTeam - by Rolyy - 02.06.2011, 12:50
Re: SendClientMessage to PlayerTeam - by Steve M. - 02.06.2011, 12:56
Re: SendClientMessage to PlayerTeam - by Laronic - 02.06.2011, 12:59
Re: SendClientMessage to PlayerTeam - by Rolyy - 02.06.2011, 13:18
Re: SendClientMessage to PlayerTeam - by Laronic - 02.06.2011, 13:37
Re: SendClientMessage to PlayerTeam - by Rolyy - 02.06.2011, 14:47
Re: SendClientMessage to PlayerTeam - by Laronic - 02.06.2011, 15:59
Re: SendClientMessage to PlayerTeam - by Jack Shred - 02.06.2011, 16:20

Forum Jump:


Users browsing this thread: 1 Guest(s)