pawn Код:
public OnPlayerText(playerid, text[])
{
new Msg[128],Name[24],Float:Coords[3];
GetPlayerPos(playerid,Coords[0],Coords[1],Coords[2]);
GetPlayerName(playerid,Name,sizeof(Name));
format(Msg,sizeof(Msg),"%s diz: %s",Name,text);
for(new x = 0; x != MAX_PLAYERS; x++) {
if(IsPlayerInRangeOfPoint(x,10.0,Coords[0],Coords[1],Coords[2])) {
SendClientMessage(x,-1,Msg);
return 0;
}
GetPlayerPos(playerid,Coords[0],Coords[1],Coords[2]);
GetPlayerName(playerid,Name,sizeof(Name));
format(Msg,sizeof(Msg),"%s diz: %s",Name,text);
for(new x = 0; x != MAX_PLAYERS; x++)
{
if(IsPlayerInRangeOfPoint(x,100.0,Coords[0],Coords[1],Coords[2]))
{
SendClientMessage(x,0x836FFFAA,zstring);
return 0;
}
GetPlayerPos(playerid,Coords[0],Coords[1],Coords[2]);
GetPlayerName(playerid,Name,sizeof(Name));
format(Msg,sizeof(Msg),"%s diz: %s",Name,text);
for(new x = 0; x != MAX_PLAYERS; x++)
{
if(IsPlayerInRangeOfPoint(x,100.0,Coords[0],Coords[1],Coords[2]))
{
SendClientMessage(x,0xAFAFAFAA,zstring);
return 0;
}
GetPlayerPos(playerid,Coords[0],Coords[1],Coords[2]);
GetPlayerName(playerid,Name,sizeof(Name));
format(Msg,sizeof(Msg),"%s diz: %s",Name,text);
for(new x = 0; x != MAX_PLAYERS; x++)
{
if(IsPlayerInRangeOfPoint(x,800.0,Coords[0],Coords[1],Coords[2]))
{
SendClientMessage(x,0x363636AA,zstring);
return 0;
}
return 1;
}
Em cada um ..