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.

Mentions

Discussion in 'Skript' started by xSadFrostiik, Sep 26, 2019.

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

    xSadFrostiik Member

    Joined:
    Jul 22, 2019
    Messages:
    20
    Likes Received:
    0
    Hi, I would like to make a script mention but to mark it in the chats and send the title to the given player that he marked it in the chalet but that it does not work on players that have a vanish or spectator mode
     
  2. PuchiGFX

    PuchiGFX Member

    Joined:
    Jan 26, 2017
    Messages:
    246
    Likes Received:
    5
    This is working for me:
    Code (Text):
    1. on chat:
    2.     loop all players:
    3.         if "%message%" contains "%loop-player%":
    4.             loop-player is not player
    5.             set {_player} to loop-player
    6.             loop-player's gamemode is not spectator
    7.             {vanish.%loop-player%} is not set
    8.             replace all "%loop-player%" with "&e%loop-player%&r" in message
    9.             send player title "&eYou were mentioned"
    i used "{vanish.%loop-player%}" for check vanish, but you can use "loop-player is vanished" if you use vanish from Essentials (WolvSK needed)
     
  3. xSadFrostiik

    xSadFrostiik Member

    Joined:
    Jul 22, 2019
    Messages:
    20
    Likes Received:
    0
    Its working but title is sending to sender not to mentioned player and if the player have a spectator gamemode is still can be mentioned
     
  4. PuchiGFX

    PuchiGFX Member

    Joined:
    Jan 26, 2017
    Messages:
    246
    Likes Received:
    5
    Code (Text):
    1. on chat:
    2.     loop all players:
    3.         if "%message%" contains "%loop-player%":
    4.             loop-player is not player
    5.             set {_player} to loop-player
    6.             loop-player's gamemode is not spectator
    7.             {vanish.%loop-player%} is not set
    8.             replace all "%loop-player%" with "&e%loop-player%&r" in message
    9.             send loop-player title "&eYou were mentioned"
    i forgot to send the title to mentioned player, but its working perfectly for me (i mean, i can't be mentioned while in spectator gamemode :/)
     
  5. xSadFrostiik

    xSadFrostiik Member

    Joined:
    Jul 22, 2019
    Messages:
    20
    Likes Received:
    0
    Its working but if player is having spectator gamemode he can still be mentioned
     
  6. CharcoalToast

    CharcoalToast Member

    Joined:
    Mar 10, 2018
    Messages:
    23
    Likes Received:
    4
    This code is not that good and not optimized.
    Use this @xSadFrostiik :
    Code (Text):
    1. on chat:
    2.     loop all players:
    3.         if message contains "%loop-player%": # Message is already a text...
    4.             if loop-player is not player:
    5.                if loop-player's gamemode is not spectator:
    6.                   if {vanish::%loop-player%} is not set # Always use list
    7.                      replace all "%loop-player%" with "&e%loop-player%&r" in message
    8.                      send loop-player title "&eYou were mentioned"
     
  7. xSadFrostiik

    xSadFrostiik Member

    Joined:
    Jul 22, 2019
    Messages:
    20
    Likes Received:
    0
    This is not working on version 1.12 +
     
  8. PuchiGFX

    PuchiGFX Member

    Joined:
    Jan 26, 2017
    Messages:
    246
    Likes Received:
    5
    its literal the same code but with tabs xddd
    --- Double Post Merged, Sep 27, 2019, Original Post Date: Sep 27, 2019 ---
    what it isn't working?
     
  9. xSadFrostiik

    xSadFrostiik Member

    Joined:
    Jul 22, 2019
    Messages:
    20
    Likes Received:
    0
    I tried the skript on the 1.12 + version but its not working and is spaming 4 errors
     
  10. PuchiGFX

    PuchiGFX Member

    Joined:
    Jan 26, 2017
    Messages:
    246
    Likes Received:
    5
    Can u send us an image?
     
  11. CharcoalToast

    CharcoalToast Member

    Joined:
    Mar 10, 2018
    Messages:
    23
    Likes Received:
    4
    Its litterly not.
     
  12. PuchiGFX

    PuchiGFX Member

    Joined:
    Jan 26, 2017
    Messages:
    246
    Likes Received:
    5
    I can't see where you code is better than mine xd
     
Thread Status:
Not open for further replies.

Share This Page

Loading...