public OnPlayerText(playerid, text[])
{
new
message[128],
name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(message, sizeof(message), \"%s mondja: %s\", name, text);
ProxDetector(30.0, playerid, message, -1);
return 0;
}
stock ProxDetector(Float:radi, playerid, string[],color)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
foreach(Player,i)
{
if(IsPlayerInRangeOfPoint(i,radi,x,y,z))
{
SendClientMessage(i,color,string);
}
}
}