That is a basic skript problem i think

  • 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.

MustafaEmre

Member
Jan 10, 2021
1
0
1
23
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:
on chat:
    set {message} to true
    if {message} is true:
        loop all players:
            if message contains "%loop-player%":
                replace all "%loop-player%" with "&e@&f%loop-player%" in the message
                play "block_note_block_banjo" to loop-player
                send loop-player title "&8%player%" with subtitle "&7Senden Bahsetti" for 1 seconds
    else if {message} is false:           
        if message contains "%player%":
            replace all "%player%" with "%player%" in the message
 
whats
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:
on chat:
    set {message} to true
    if {message} is true:
        loop all players:
            if message contains "%loop-player%":
                replace all "%loop-player%" with "&e@&f%loop-player%" in the message
                play "block_note_block_banjo" to loop-player
                send loop-player title "&8%player%" with subtitle "&7Senden Bahsetti" for 1 seconds
    else if {message} is false:          
        if message contains "%player%":
            replace all "%player%" with "%player%" in the message
whats {message}
what is it used for and what command/action sets it to false/true
 
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
 
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
oh i get it i think i can fix it
Code:
on chat:
  loop all players:
    loop-player's name is not "%player%"
    if message contains "%loop-player%":
      replace all "%loop-player%" with "&e@&f%loop-player%" in the message 
  if message contains "%player%":
    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
Reactions: TehCheetah and Marc
Status
Not open for further replies.