Vice City: Multiplayer

Server Development => Scripting and Server Management => Script and Content Requests => Topic started by: Rardodus Bruise on Mar 30, 2020, 04:59 PM

Title: Decreasing the chat region.
Post by: Rardodus Bruise on Mar 30, 2020, 04:59 PM
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.
Title: Re: Decreasing the chat region.
Post by: NicusorN5 on Mar 30, 2020, 08:48 PM
There was a keyboard key to do that, but there's no other way.
Title: Re: Decreasing the chat region.
Post by: EnForcer on Apr 08, 2020, 07:16 AM
Press F7 key
Title: Re: Decreasing the chat region.
Post by: Xmair on Apr 08, 2020, 01:03 PM
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);
}
}
}
}
Title: Re: Decreasing the chat region.
Post by: Rardodus Bruise on Apr 09, 2020, 10:34 AM
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.