I meant to say how we can compel the region/zone for a message, like people do with the shout command, How can we change it's radius.
There was a keyboard key to do that, but there's no other way.
Press F7 key
function onPlayerCommand(player, cmd, text) {
if (cmd.tolower() == "shout") {
if (!text) return MessagePlayer("/shout <text>", player);
for(local i = 0; i < GetMaxPlayers(); ++i) {
local plr = FindPlayer(i);
if (plr && player.Pos.Distance(plr.Pos) < 20 /* radius, edit as you want */) {
MessagePlayer(format("[SHOUT]: [#%02X%02X%02X]%s%s: %s", player.Colour.r, player.Colour.g, player.Colour.b, player.Name, "[#FFFFFF]", text), player);
}
}
}
}
Quote from: Xmair on Apr 08, 2020, 01:03 PMfunction onPlayerCommand(player, cmd, text) {
if (cmd.tolower() == "shout") {
if (!text) return MessagePlayer("/shout <text>", player);
for(local i = 0; i < GetMaxPlayers(); ++i) {
local plr = FindPlayer(i);
if (plr && player.Pos.Distance(plr.Pos) < 20 /* radius, edit as you want */) {
MessagePlayer(format("[SHOUT]: [#%02X%02X%02X]%s%s: %s", player.Colour.r, player.Colour.g, player.Colour.b, player.Name, "[#FFFFFF]", text), player);
}
}
}
}
Quote from: EnForcer on Apr 08, 2020, 07:16 AMPress F7 key
Thanks alot, Topic to be locked.