11.03.2015, 06:13
Just loop through all players, and check if they're near the player that wrote, and then send the message.
In /g, just use Send Player/Client MessageToAll.
pawn Код:
public OnPlayerText(playerid, text[])
{
new Float:x, Float:y, Float:z; // Declares 3 floats
GetPlayerPos(playerid, x, y, z); // Store the position of the player that wrote in the floats we created
foreach(new i : Player) // Loop through all players, and define them as "i"
{
if(IsPlayerInRangeOfPoint(i, range, x, y, z)) SendPlayerMessageToPlayer(playerid, i, text);
// If "i" is in range of the xyz (which is the position of the player that wrote) send him the message, change the range to the distance you want
}
return 1;
}