09.08.2011, 17:11
Try this one:
pawn Код:
public OnPlayerText(playerid, text[])
{
new string[256];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
for(new i = 0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(playerid == i) continue; // I have added this line
if(IsPlayerNearPlayer(i, playerid, 20.0))
{
format(string,sizeof(string),"%s : %s",name,text);
ProxDetector(20.0,playerid,string,GetPlayerColor(p layerid),GetPlayerColor(playerid),GetPlayerColor(p layerid),GetPlayerColor(playerid),GetPlayerColor(p layerid));
return 0;
} else {
SendClientMessage(playerid, COLOR_WHITE, "[INFO] You are too far, no one hear you ! ");
return 0;
}
}
}
return 0;
}