Bucr8363b Posted August 3, 2020 Share Posted August 3, 2020 Hi, I am making an Anonymous skript for my server, So when a player has Anonymous mode activated their name will appear like "&0Anonymous > %message" in chat. I seem to have done something incorrect but I can't find any errors. If you know it'll be very useful. Thanks Link to comment Share on other sites More sharing options...
_Tarna_ Posted August 3, 2020 Share Posted August 3, 2020 When a player activates anonymous mode, set a variable to true. Then when they chat, if the variable is true, set the chat format to the thing you said. Discord - tarna256 In-game name - _Tarna_ Website - https://tarna.dev Paste Site: https://paste.tarna.dev --------------------------------------------------------- [VIP] - 7/27/2020 Community Support - 7/8/20 | 11/3/20 Helper - 11/3/20 - 2/21/21 Moderator - 2/21/21 - 5/17/21 - 5/17/21 - now Moderator - 12/20/22 - now --------------------------------------------------------- Link to comment Share on other sites More sharing options...
Bucr8363b Posted August 3, 2020 Author Share Posted August 3, 2020 That's exactly what I did. But my name is still the same. Here's the skript. Could you have a look at it? anon.sk Link to comment Share on other sites More sharing options...
_Tarna_ Posted August 3, 2020 Share Posted August 3, 2020 1 minute ago, RealFTG said: That's exactly what I did. But my name is still the same. Here's the skript. Could you have a look at it? anon.sk 480 B · 0 downloads For some reason, that file is not loading for me. Can you just send the code in here or a pastebin.com. Discord - tarna256 In-game name - _Tarna_ Website - https://tarna.dev Paste Site: https://paste.tarna.dev --------------------------------------------------------- [VIP] - 7/27/2020 Community Support - 7/8/20 | 11/3/20 Helper - 11/3/20 - 2/21/21 Moderator - 2/21/21 - 5/17/21 - 5/17/21 - now Moderator - 12/20/22 - now --------------------------------------------------------- Link to comment Share on other sites More sharing options...
Bucr8363b Posted August 3, 2020 Author Share Posted August 3, 2020 Sure. command /anon <text>: trigger: if arg 1 is "on": set {chat.anon.%player%} to true send "&aAnonymous mode is on." if arg 1 is "off": set {chat.anon.%player%} to false send "&aAnonymous mode is off." on chat: if {chat.anon.%player%} is true: set chat format to "&0Anonymous&r > %message%" if {chat.anon.%player%} is false: set chat format to "%player% > %message%" Link to comment Share on other sites More sharing options...
_Tarna_ Posted August 3, 2020 Share Posted August 3, 2020 That looks like it should be working. Make sure the variable is true for you. Discord - tarna256 In-game name - _Tarna_ Website - https://tarna.dev Paste Site: https://paste.tarna.dev --------------------------------------------------------- [VIP] - 7/27/2020 Community Support - 7/8/20 | 11/3/20 Helper - 11/3/20 - 2/21/21 Moderator - 2/21/21 - 5/17/21 - 5/17/21 - now Moderator - 12/20/22 - now --------------------------------------------------------- Link to comment Share on other sites More sharing options...
AWorthySon Posted August 3, 2020 Share Posted August 3, 2020 (edited) Heya! In the future, try to use "else if" statements: on chat: if {chat.anon.%player%} is true: set chat format to "&0Anonymous&r > %message%" else if {chat.anon.%player%} is false: set chat format to "%player% > %message%" Anyways, regarding your issue, I would recommend: Perhaps you should make it a toggle feature. command /anon [<text>]: trigger: if {chat.anon.%player%} is not set: set {chat.anon.%player%} to true send "Enabled anonymous mode!" else: delete {chat.anon.%player%} send "Disabled anonymous mode!" If you do try this alternative, you must use this code: on chat: if {chat.anon.%player%} is true: set chat format to "&0Anonymous&r > %message%" else: set chat format to "%player% > %message%" Hope this helps! Edited August 3, 2020 by AWorthySon 1 Link to comment Share on other sites More sharing options...
Bucr8363b Posted August 3, 2020 Author Share Posted August 3, 2020 Ahhh... Ok. That did help, I found out what was causing the issue. It was because I forgot I had another chatformat skript to remove the world name from chat messages. Thanks a lot though for the help guys. Link to comment Share on other sites More sharing options...
_Tarna_ Posted August 3, 2020 Share Posted August 3, 2020 39 minutes ago, RealFTG said: Ahhh... Ok. That did help, I found out what was causing the issue. It was because I forgot I had another chatformat skript to remove the world name from chat messages. Thanks a lot though for the help guys. Oh nice. Just put all the chat format things in one on chat event. Discord - tarna256 In-game name - _Tarna_ Website - https://tarna.dev Paste Site: https://paste.tarna.dev --------------------------------------------------------- [VIP] - 7/27/2020 Community Support - 7/8/20 | 11/3/20 Helper - 11/3/20 - 2/21/21 Moderator - 2/21/21 - 5/17/21 - 5/17/21 - now Moderator - 12/20/22 - now --------------------------------------------------------- Link to comment Share on other sites More sharing options...
DeltaRays Posted August 3, 2020 Share Posted August 3, 2020 By the way to remove the world name from chat messages you can do /mv config prefixchat false, and you should always only have one event of each type (unless you're planning on having a feature that ignores what the other events do), as that can cause issues Link to comment Share on other sites More sharing options...
mekbturtle Posted August 3, 2020 Share Posted August 3, 2020 It's also good to use :: instead of . as :: can be looped easier if {chat::anon::%player%} is not set: If I helped you leave a reaction! Link to comment Share on other sites More sharing options...
Reassembly Posted August 4, 2020 Share Posted August 4, 2020 Also, you may want to make a system so that staff can see who sent the messages. Just incase they use it to break a chat rule 1 Default: Feb 6 2018 VIP: April 14 2019 Jr. Mod: September 12 2020 Mod: Jan 11 2021 Am a person Hello Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now