01.01.2013, 11:27
I've decided to use the "foreach" loop. I thank you for your constructive criticism, attitude, and help.
The script below is what the finished product (of this thread) is.
The script below is what the finished product (of this thread) is.
pawn Код:
#include <a_samp>
#include <foreach>
public OnPlayerText(playerid, text[]) {
new name[256], message[256];
new Float:x, Float:y, Float:z;
GetPlayerName(playerid, name, sizeof(name));
format(message, sizeof(message), "%s says, \"%s\"", name, text);
GetPlayerPos(playerid, x, y, z);
foreach (new player : Player) {
if (IsPlayerInRangeOfPoint(player, 20.0, x, y, z)) {
SendClientMessage(player, -1, message);
}
}
return 0;
}