Code:
on chat:
if player is op:
if message contains "{players}":
cancel event
set {_players::*} to all players
set {_msg} to message
loop {_players::*}:
set {_newmsg} to {_msg}
replace all "{players}" with "%loop-value's name%" in {_newmsg}
make player say "%{_newmsg}%"
on command:
if command contains "{players}":
cancel event
set {_cmdplayers::*} to all players
set {_cmd} to command
loop {_cmdplayers::*}:
set {_newcmd} to {_cmd}
replace all "{players}" with "%loop-value's name%" in {_newcmd}
execute sender command "%{_newcmd}%"
How to replace in command `{players}` to all players?
If anything, it works with chat
Example:
I Send:
/m {players} hello
Execute Get:
/m Player1 hello
/m Player2 hello
/m Player3 hello
When I write "/m {players} hello", it doesn't work
Please help me