Message problem

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Rosathorn

Member
Oct 29, 2019
13
0
1
18
https://pastebin.com/ydq2f6md

This skript is complicated. I tried this with two alts, one could see its own message in chat after talking through it AND see my main accounts messages. However, my main account could not see its own messages through the walkie talkie nor' the alts messages'.

When I removed the 'stop' it shows! But spams it 7 times over, granted why it has to be there.

And when there's only one person on the server? Works great! With multiple people on it usually targets one or two people so that they have the same defects my main account did, couldnt see their messages through walkie talkie and couldn't see others' walkie talkie messages.





Skript Version (do not put latest):
Skript 2.4
Skript Author: Bensku
Minecraft Version: 1.14.4
Addons: Skrayfall,SkQuery,Skellett,skript-votifier-hook,vixio,TuSKe
 
code_language.skript:
on chat:
    if held item is ghast tear with name "&fWalkie Talkie":
        loop all players:
            loop the loop-player's inventory:
                if loop-player's inventory contains ghast tear with name "&fWalkie Talkie":
                    send "&8Walkie Talkie: &7%player%: &8%message%" to loop-player
                    wait 5 seconds
                    stop #<--------------------------------------------------WHY?

Are you aware of what stop does? It stops your code from running.
Also when looping all players, make sure to exclude the player in the chat event from the loop
 
Status
Not open for further replies.