1. 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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

That is a basic skript problem i think

Discussion in 'Skript' started by MustafaEmre, Jan 10, 2021.

Thread Status:
Not open for further replies.
  1. MustafaEmre

    MustafaEmre Member

    Joined:
    Jan 10, 2021
    Messages:
    1
    Likes Received:
    0
    How can I remove %player% at %loop-player%.
    When i write my own name at minecraft. The skript is working for me.
    I tried to fix this problem with {message} true or false but it isnt working.










    Code (Text):
    1. on chat:
    2.     set {message} to true
    3.     if {message} is true:
    4.         loop all players:
    5.             if message contains "%loop-player%":
    6.                 replace all "%loop-player%" with "&[email protected]&f%loop-player%" in the message
    7.                 play "block_note_block_banjo" to loop-player
    8.                 send loop-player title "&8%player%" with subtitle "&7Senden Bahsetti" for 1 seconds
    9.     else if {message} is false:          
    10.         if message contains "%player%":
    11.             replace all "%player%" with "%player%" in the message
     
  2. FireRoz

    FireRoz Active Member

    Joined:
    May 28, 2020
    Messages:
    134
    Likes Received:
    5
    whats
    whats {message}
    what is it used for and what command/action sets it to false/true
     
  3. Marc

    Marc Active Member

    Joined:
    Nov 27, 2020
    Messages:
    94
    Likes Received:
    0
    Like FireRoz said {message} is completely useless and most probably can slow down performance by a small bit are you trying to make it so it pings a player when they type someones name bc this is a very inefficient way to do it, I have a skript for it but cant find it, ill send it to you when I find it
     
  4. FireRoz

    FireRoz Active Member

    Joined:
    May 28, 2020
    Messages:
    134
    Likes Received:
    5
    oh i get it i think i can fix it
    Code (Text):
    1. on chat:
    2.   loop all players:
    3.     loop-player's name is not "%player%"
    4.     if message contains "%loop-player%":
    5.       replace all "%loop-player%" with "&[email protected]&f%loop-player%" in the message
    6.   if message contains "%player%":
    7.     stop
    there we go. Looping all players will include the typer.
    Mark my answer as best bc I just started helping people :emoji_slight_smile:
    kthx byeee
     
    • Like Like x 2
Thread Status:
Not open for further replies.

Share This Page

Loading...