HELP Gang chat - 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: HELP Gang chat (
/showthread.php?tid=122111)
HELP Gang chat -
deather - 20.01.2010
Код:
static gTeam[MAX_PLAYERS];
new gPlayerClass[MAX_PLAYERS];
Код:
public OnPlayerText(playerid, text[])
{
if(text[0] == '!')
{
new string[256];
new pName[24];
GetPlayerName(playerid,pName,sizeof(pName));
format(string, sizeof(string), "Gang Chat: %s: %s", pName, text[1]);
SendClientMessage(gTeam[playerid],COLOR_YELLOW, string);
}
return 1;
}
It doesnt work!!
Re: HELP Gang chat -
[HiC]TheKiller - 20.01.2010
pawn Код:
static gTeam[MAX_PLAYERS];
new gPlayerClass[MAX_PLAYERS];
public OnPlayerText(playerid, text[])
{
if(text[0] == '!')
{
new string[256];
new pName[24];
GetPlayerName(playerid,pName,sizeof(pName));
format(string, sizeof(string), "Gang Chat: %s: %s", pName, text[1]);
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && gTeam[i] == gTeam[playerid] )
{
SendClientMessage(i,COLOR_YELLOW, string);
}
}
}
return 1;
}
Re: HELP Gang chat -
deather - 20.01.2010
Thank you. But it also shows for all. I want it to show only for the members in certain team