Mentions

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

xSadFrostiik

Member
Jul 22, 2019
20
0
1
24
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
 
This is working for me:
Code:
on chat:
    loop all players:
        if "%message%" contains "%loop-player%":
            loop-player is not player
            set {_player} to loop-player
            loop-player's gamemode is not spectator
            {vanish.%loop-player%} is not set
            replace all "%loop-player%" with "&e%loop-player%&r" in message
            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)
 
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
 
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
Code:
on chat:
    loop all players:
        if "%message%" contains "%loop-player%":
            loop-player is not player
            set {_player} to loop-player
            loop-player's gamemode is not spectator
            {vanish.%loop-player%} is not set
            replace all "%loop-player%" with "&e%loop-player%&r" in message
            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 :/)
 
Code:
on chat:
    loop all players:
        if "%message%" contains "%loop-player%":
            loop-player is not player
            set {_player} to loop-player
            loop-player's gamemode is not spectator
            {vanish.%loop-player%} is not set
            replace all "%loop-player%" with "&e%loop-player%&r" in message
            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 :/)

This code is not that good and not optimized.
Use this @xSadFrostiik :
Code:
on chat:
    loop all players:
        if message contains "%loop-player%": # Message is already a text...
            if loop-player is not player:
               if loop-player's gamemode is not spectator:
                  if {vanish::%loop-player%} is not set # Always use list
                     replace all "%loop-player%" with "&e%loop-player%&r" in message
                     send loop-player title "&eYou were mentioned"
 
This code is not that good and not optimized.
Use this @xSadFrostiik :
Code:
on chat:
    loop all players:
        if message contains "%loop-player%": # Message is already a text...
            if loop-player is not player:
               if loop-player's gamemode is not spectator:
                  if {vanish::%loop-player%} is not set # Always use list
                     replace all "%loop-player%" with "&e%loop-player%&r" in message
                     send loop-player title "&eYou were mentioned"
its literal the same code but with tabs xddd
[doublepost=1569616499,1569616468][/doublepost]
This is not working on version 1.12 +
what it isn't working?
 
Status
Not open for further replies.