Team Chat Help - 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: Team Chat Help (
/showthread.php?tid=117626)
Team Chat Help -
xXSurviverXx - 01.01.2010
Yes i have used Search But It didnt help btw i am not using dcmd here the code
Here is the Gang Join
Код:
new Columbians;
if (strcmp(cmd, "/choose_columbians", true) == 0)
{
if(Score == 50)
{
SendClientMessage(playerid,COLOR_GREEN,"You Have Joined The Columbians");
SetPlayerTeam(playerid, 1);
SendClientMessage(playerid,COLOR_GREEN,"You Name Tag's Color Will Be Yellow");
SendClientMessage(playerid,COLOR_GREEN,"Type /c To Use Team Chat (/c [TEXT])");
SetPlayerColor(playerid,0xFFFF80FF);
PlayerInfo[playerid][pGang] = Columbians;
}
else
{
SendClientMessageToAll(COLOR_GREEN,"You Mush Be A JUNIOR SOLDIER To Join The Columbians");
}
return 1;
}
everything fine until now now is just need Team Chat using /c [Text] i am not using gTeam and the player Team is 1 Just need the message to appear for Columbians only
Re: Team Chat Help -
[HiC]TheKiller - 01.01.2010
Well, here it is in DCMD, if you don't want it in DCMD, just experiment with it.
pawn Код:
dcmd_c(playerid, params)
{
new Text[strlen(params)];
format(Text, sizeof(Text), "%s", params);
if(!strlen(params)) return SendClientMessage(playerid, 0xF60000AA, "/c [Text]");
for(new i=0; i<MAX_PLAYERS; i++)
{
if(PlayerInfo[playerid][pGang] == PlayerInfo[i][pGang])
{
new string[strlen(params) + 30];
new Pname[24];
GetPlayerName(playerid, Pname, 24);
format(string, sizeof(string), "** %s: %s", Pname, Text);
SendClientMessage(i, 0x0000F6AA, string);
}
}
return 1;
}