public OnPlayerText(playerid, text[]) { new string[256]; if (text[0] == '!') { new name[24]; GetPlayerName(playerid, name, 24); format(string, 256, "[Color] %s : %s", name,text[1]); for (new a = 0; a < 20; a++) { if (IsPlayerConnected(a)) { if (GetPlayerColor[a] == GetPlayerColor[playerid]) SendClientMessage(a, orange, string); } } return 0; } return 1; }
error 028: invalid subscript (not an array or too many subscripts): "GetPlayerColor"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
if (GetPlayerColor[a] == GetPlayerColor[playerid]) SendClientMessage(a, orange, string);
Originally Posted by [AC
Etch ]
Код:
error 028: invalid subscript (not an array or too many subscripts): "GetPlayerColor" Код:
if (GetPlayerColor[a] == GetPlayerColor[playerid]) SendClientMessage(a, orange, string); |
GetPlayerColor(a)
public OnPlayerText(playerid, text[])
{
new
string[144];
if (text[0] == '!')
{
new
name[24],
Color = GetPlayerColor(playerid);
GetPlayerName(playerid, name, 24);
format(string, 144, "[Color] %s : %s", name, text[1]);
for(new a = 0; a < GetMaxPlayers(); a++)
{
if(IsPlayerConnected(a))
{
if(Color == GetPlayerColor(a))
{
SendClientMessage(a, orange, string);
}
}
}
return 0;
}
return 1;
}