15.12.2011, 06:38
Remember OnPlayerText always returns true to be able to chat. So the code should be:
So maybe try this
pawn Код:
public OnPlayerText(playerid, text[])
{
// Rest of the code
return 1;
}
pawn Код:
//
if(text[0] == '!')
{
new name[24], string[256];
GetPlayerName(playerid, name, 24);
format(string, sizeof(string), "{AD855C}[Team Chat]%s: %s", name, text[1]);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(GetPlayerTeam(playerid) == GetPlayerTeam(i))
SendClientMessage(i,yellow, string);
}
}
}
return 1;