Team Chat Help
#1

pawn Код:
public OnPlayerText(playerid, text[])
{
    if(text[0] == "*") //Error line
    {
        if(Team[playerid] == TEAM_BLUE)
        {
            for(new i = 0; i < MAX_PLAYERS; i++)
            if(IsPlayerConnected(i) && Team[i] == TEAM_BLUE || GetPVarInt(i,"VIP") == 1 || GetPVarInt(i,"Admin") == 1)
            {
                new string[128];
                new name[24];
                GetPlayerName(playerid,name,24);
                format(string,128,"[BLUE TEAM CHAT]%s [ID:%d]: %s",name,playerid,text[1]);
                SendClientMessage(i,grey,string);
                return 0;
            }
        }
        else
        {
            for(new i = 0; i < MAX_PLAYERS; i++)
            if(IsPlayerConnected(i) && Team[i] == TEAM_RED || GetPVarInt(i,"VIP") == 1 || GetPVarInt(i,"Admin") == 1)
            {
                new string[128];
                new name[24];
                GetPlayerName(playerid,name,24);
                format(string,128,"[RED TEAM CHAT]%s [ID:%d]: %s",name,playerid,text[1]);
                SendClientMessage(i,grey,string);
                return 0;
            }
        }
    }
    return 1;
}
Код:
cod5.pwn(209) : error 033: array must be indexed (variable "-unknown-")
Reply


Messages In This Thread
Team Chat Help - by Tigerbeast11 - 24.08.2011, 11:30
Re: Team Chat Help - by =WoR=Varth - 24.08.2011, 11:34
Re: Team Chat Help - by Tigerbeast11 - 24.08.2011, 11:38
Re: Team Chat Help - by Meller - 12.04.2017, 13:39

Forum Jump:


Users browsing this thread: 2 Guest(s)