Help please
#1

Hey, I have this team chat but when I try to use it it just sends the message to the player who sent it and to id 0 but no one else? Any thoughts on whats wrong? heres the code:

Код:
public OnPlayerText(playerid, text[]) 
{
    new PlayerName[MAX_PLAYER_NAME];
	GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
	if(text[0] == ';')
    {
      new string[256];
      format(string, sizeof(string), "[Team] %s(ID:%d):%s", PlayerName, playerid, text);
      for(new i = 0; i <= MAX_PLAYERS; i++ )
      {
        if(gTeam[i] == gTeam[playerid])
        {
          SendClientMessage(i, TEAMCHATCOLOR, string);
        }
      }
      return 0;
    }
  return 1;
}
Reply
#2

anyone?
Reply
#3

is that for an
Код:
public onplayercomandtext
Reply
#4

no OnPlayerText, can't u see it?
Reply
#5

ok ok just trying to help

youre not going to get any help with an attitude like that

anyway, i would chage gang chat to a command or a DCMD comand instead

just because its easier!
Reply
#6

I wasn't trying to sound like I had an attitude lol, but thanks anyway
Reply
#7

ok
if you need mor ehelp just ask
Reply
#8

yea i do, see its only working for ID 0, I need to to work for any ID that is on the same team
Reply
#9

ok, give me a min
Reply
#10

http://pastebin.com/f6635b3ad

Enjoy.
Reply


Forum Jump:


Users browsing this thread: