29.01.2013, 23:12
So the problem is I can't see what I'am writing in global chat..
Team chat is working fine!
Code:
Team chat is working fine!
Code:
PHP код:
SendBALLASMessage(color, text[])
{
foreach(Player, i)
{
if (gTeam[i] == BALLAS)
{
SendClientMessage(i, color, text);
}
}
return 1;
}
SendGROVEMessage(color, text[])
{
foreach(Player, i)
{
if(gTeam[i] == GROVE)
{
SendClientMessage(i, color, text);
}
}
return 1;
}
SendVAGOSMessage(color, text[])
{
foreach(Player, i)
{
if(gTeam[i] == VAGOS)
{
SendClientMessage(i, color, text);
}
}
return 1;
}
SendAZTECAMessage(color, text[])
{
foreach(Player, i)
{
if(gTeam[i] == AZTECA)
{
SendClientMessage(i, color, text);
}
}
return 1;
}
public OnPlayerText(playerid, text[])
{
if(text[0] == '#')
{
new NameP[256], string[256];
for(new i=0; i<256; i++)
{
if(gTeam[playerid] == BALLAS)
{
GetPlayerName(playerid,NameP,sizeof(NameP));
format(string,sizeof(string),"|- Ballas Radio -| (%s): %s",NameP,text[1]);
SendBALLASMessage(GetPlayerColor(playerid), string);
return 0;
}
if( gTeam[playerid] == GROVE)
{
GetPlayerName(playerid,NameP,sizeof(NameP));
format(string,sizeof(string),"|- Grove Radio -| (%s): %s",NameP,text[1]);
SendGROVEMessage(GetPlayerColor(playerid), string);
return 0;
}
if( gTeam[playerid] == VAGOS)
{
GetPlayerName(playerid,NameP,sizeof(NameP));
format(string,sizeof(string),"|- Vagos Radio -| (%s): %s",NameP,text[1]);
SendVAGOSMessage(GetPlayerColor(playerid), string);
return 0;
}
if( gTeam[playerid] == AZTECA)
{
GetPlayerName(playerid,NameP,sizeof(NameP));
format(string,sizeof(string),"|- Varios Radio -| (%s): %s",NameP,text[1]);
SendAZTECAMessage(GetPlayerColor(playerid), string);
return 0;
}
}
}
return 0;
}