Mod This Team Chat :S - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Mod This Team Chat :S (
/showthread.php?tid=185541)
Mod This Team Chat :S -
<Weponz> - 25.10.2010
Please someone show me what i got to do to make this team chat work for all my Teams not just TEAM_USA..But ovc only the teams can see there chat..
Код:
if(!strcmp(cmdtext, "/tc", true))
{
new string[128], Player[MAX_PLAYER_NAME];
GetPlayerName(playerid, Player, MAX_PLAYER_NAME);
format(string, 128, "(Team Chat): %s: %s", Player, cmdtext[2]);
for(new i=0; i<MAX_PLAYERS; i++) if(gTeam[i]==TEAM_USA) SendClientMessage(i, RED, string);
return 1;
}
Re: Mod This Team Chat :S -
Miguel - 25.10.2010
pawn Код:
if(!strcmp(cmdtext, "/tc", true))
{
new string[128], Player[MAX_PLAYER_NAME];
GetPlayerName(playerid, Player, MAX_PLAYER_NAME);
format(string, 128, "(Team Chat): %s: %s", Player, cmdtext[2]);
for(new i=0; i<MAX_PLAYERS; i++) if(gTeam[i]==gTeam[playerid]) SendClientMessage(i, RED, string);
return 1;
}
I changed:
By:
pawn Код:
if(gTeam[i] == gTeam[playerid]) // if the player has the same team as the player being loopd.
Re: Mod This Team Chat :S -
<Weponz> - 25.10.2010
is that all i had to do? Use gTeam and it automatically checks there team? If so nice now i know why its Global Team xDDD