PlayerOptionsFor to play Sounds on non-sender players? #228


  • Waiting
Open
  • MG_Buddy created this issue Oct 6, 2020

    So i did some sort of AdminChat ussing mycmd,
    It works ussing the Broadcast_text type command and broadcast_message_permission_node.

    It actually works so good, but i wanted better. So i tried to add a sound when any staff sends a message;
    I used a  If Script to play the sound only for online players it looks like this;

     

    - $Script$%if%$ponline.contains=STAFF1
    - '%PlayerOptionsFor%STAFF1%playSound: NOTE_BLOCK_NOTE_CHIME:1.0F:1'
    - $Script$%if%$ponline.contains=STAFF2
    - '%PlayerOptionsFor%STAFF2%playSound: NOTE_BLOCK_NOTE_CHIME:1.0F:1'
    ......
    - $Script$%else%
    (Replacing STAFF1/2/.... for every of the staff members to avoid any errors if trying to playSound to a offline player)
    The thing is that this only plays the sound for the command sender, even when the command has 1 line for each user instead of ussing a placeholder

    Im i doing it the right way? 
    I changed the command so it executes a playsound command, but it leaves a message on the console for every sound played on every staff member, wich is something that the playerOptions doesnt do and i would like to have

    Any help is very appreciated
  • MG_Buddy added a tag Waiting Oct 6, 2020

To post a comment, please login or register a new account.