Hello! This is a simple Skript tutorial on how to create a Skript proximity chat system.
How it works: It will tell the player how many people heard them and it will send the player's message to everyone within a 12 (configurable) block radius.
Skript Template:
How to configure:
"loop all players within 10 blocks of player:" - You can change "10" to any block radius you want.
"send "&7[PC] &f<%player%> %message%" to loop-player" - You can change this format any way you want, just note that "%message%" is the player's message and "%player%" is the player.
"remove 1 from {var::%player's uuid%}" - It's not recommended to change this, but removing this would say "1 people heard you" instead of "0 people heard you". This removes the player from the loop-value.
Please credit me!
How it works: It will tell the player how many people heard them and it will send the player's message to everyone within a 12 (configurable) block radius.
Skript Template:
Code:
on chat:
loop all players within 10 blocks of player:
cancel event
send "&7[PC] &f<%player%> %message%" to loop-player
set {yes::%player's uuid%::*} to loop-player
set {var::%player's uuid%} to amount of {yes::%player's uuid%::*}
remove 1 from {var::%player's uuid%}
send action bar "&f%{var::%player's uuid%}% people heard you" to player
How to configure:
"loop all players within 10 blocks of player:" - You can change "10" to any block radius you want.
"send "&7[PC] &f<%player%> %message%" to loop-player" - You can change this format any way you want, just note that "%message%" is the player's message and "%player%" is the player.
"remove 1 from {var::%player's uuid%}" - It's not recommended to change this, but removing this would say "1 people heard you" instead of "0 people heard you". This removes the player from the loop-value.
Please credit me!