Nickname - Help

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

TullyMastully

Member
Aug 9, 2017
38
0
0
33
Skript Version: Skript 2.2
Skript Author: TullyMastully
Minecraft Version: 1.8

---
Full Code:



code_language.skript:
command /nick [<text>]:
    permission: tullycore.nick
    permission message: &a&lTULLYCORE &cYou can't execute this command, You need to be the VIP rank or higher!
    trigger:
        if arg is not set:
            send "&cIncorrect usage, Try /nick (Username)"
        if arg 1 is set:
            if {tullycore.nickname.%player%} is not set:
                set player tab name to "&9%arg-1%"
                set {tullycore.rank.scoreboard.%arg 1%} to "&cNICKED"
                set {tullycore.nickname.%player%} to "%arg 1%"
                set player's display name to "%arg 1%"
                set player's tablist name to "%arg 1%"
                set {vanish.%player%} to true
                send "{@secprefix} &aYou are now nicked as %arg 1%!" to player
                stop

#Nickname Chat event
on chat:
    cancel event
    broadcast "&9%{tullycore.nickname.%player%}% &8» &f%message%"

#Setrank Chat Event
on chat:
    cancel event
    broadcast "%{tullycore.rank.%player%}%%player% &8» &f%message%"

#Make sure you read the "Other Useful Info" section that I detail my problem there.

Errors on Reload:

code_language.skript:
ERROR HERE

No errors.

code_language.skript:
ERROR HERE

Other Useful Info: Yes, I have /setrank command, When I change my rank it changes my prefix in chat, using the chat event. When I do /nick I also use the chat event.
My problem is, When I type something in chat, it shows both my real IGN, and the nicked username at the same time.

Addons using (including versions):
ADDONS HERE

Have you tried searching the docs? Yes
Have you tried searching the forums? Yes
 
You don't need a whole new post, next time just edit your first one^^;;;;
But you only need one chat event. With two it's going to post two every time because you're telling it to, %player% is your ign, while {tullycore.nickname.%player%} is the nickname you set. you are telling it to broadcast both instances of this with two chat events.
 
You don't need a whole new post, next time just edit your first one^^;;;;
But you only need one chat event. With two it's going to post two every time because you're telling it to, %player% is your ign, while {tullycore.nickname.%player%} is the nickname you set. you are telling it to broadcast both instances of this with two chat events.
So, how do I make it so both aren't showing together?
If I'm disabling the setrank chatevent for example it won't work for me,
Sorry if i'm being a noob haha, I'm kind of new ;c
 
So, how do I make it so both aren't showing together?
If I'm disabling the setrank chatevent for example it won't work for me,
Sorry if i'm being a noob haha, I'm kind of new ;c
Perhaps something like this? You really only need it to just choose between them so its not spewing everything at you~
code_language.skript:
on chat:
    if {nicked-check} is true:
        broadcast "&9%{tullycore.nickname.%player%}% &8» &f%message%"
    else:
        broadcast "%{tullycore.rank.%player%}%%player% &8» &f%message%"
 
Status
Not open for further replies.