30.07.2010, 04:02
pawn Код:
public OnPlayerText(playerid, text[])
{
UpperToLower(text);
new string[256];
format(string,sizeof(string),"(id:%d): %s",playerid,text);
SendPlayerMessageToAll(playerid,string);
if(text[0] == '!')
{
new string[128]; GetPlayerName(playerid, string, sizeof(string));
format(string, sizeof(string), "[*Walkie Talkie] %s: %s", string, text[1]);
printf("%s", string);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && gTeam[i] == gTeam[playerid]) SendClientMessage(i, GetPlayerColor(playerid), string);
}
return 0;
}
return 0;
}