Solved Disguise Command

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

Feb 9, 2025
10
0
1
Hi, I want to make a disguise command that change your name in tab and chat and skin with the Nick put in the disguise command and the undisguise, but i don't know how to do it, can help me? Ping me if you reply, thanks!
 
Dependencies: EssentialsX (for nicknames)

command /disguise <text>:
permission: disguise.use
trigger:
if {disguised::%player%} is set:
send "&cYou are already disguised! Use /undisguise first!" to player
stop
set {disguised::%player%} to player's name
set {_nick} to arg-1

# Change name in tab & chat
execute console command "essentials:nick %player% %{_nick}%"

send "&aYou are now disguised as &f%{_nick}%!" to player

command /undisguise:
permission: disguise.use
trigger:
if {disguised::%player%} is not set:
send "&cYou are not disguised!" to player
stop
set {_realname} to {disguised::%player%}

# Reset name
execute console command "essentials:nick %player% %player%"

delete {disguised::%player%}
send "&aYou have been undisguised!" to player
 
Dependencies: EssentialsX (for nicknames)

command /disguise <text>:
permission: disguise.use
trigger:
if {disguised::%player%} is set:
send "&cYou are already disguised! Use /undisguise first!" to player
stop
set {disguised::%player%} to player's name
set {_nick} to arg-1

# Change name in tab & chat
execute console command "essentials:nick %player% %{_nick}%"

send "&aYou are now disguised as &f%{_nick}%!" to player

command /undisguise:
permission: disguise.use
trigger:
if {disguised::%player%} is not set:
send "&cYou are not disguised!" to player
stop
set {_realname} to {disguised::%player%}

# Reset name
execute console command "essentials:nick %player% %player%"

delete {disguised::%player%}
send "&aYou have been undisguised!" to player
Thank you very much, I'll try it soon
 
Dependencies: EssentialsX (for nicknames)

command /disguise <text>:
permission: disguise.use
trigger:
if {disguised::%player%} is set:
send "&cYou are already disguised! Use /undisguise first!" to player
stop
set {disguised::%player%} to player's name
set {_nick} to arg-1

# Change name in tab & chat
execute console command "essentials:nick %player% %{_nick}%"

send "&aYou are now disguised as &f%{_nick}%!" to player

command /undisguise:
permission: disguise.use
trigger:
if {disguised::%player%} is not set:
send "&cYou are not disguised!" to player
stop
set {_realname} to {disguised::%player%}

# Reset name
execute console command "essentials:nick %player% %player%"

delete {disguised::%player%}
send "&aYou have been undisguised!" to player
https://mclo.gs/aojTyD2 it gives me the errors uploaded on mclogs
 
bru you have to indent this
Python:
command /disguise <text>:
    permission: disguise.use
    trigger:
        if {disguised::%player%} is set:
            send "&cYou are already disguised! Use /undisguise first!" to player
            stop
        set {disguised::%player%} to player's name
        set {_nick} to arg-1

        # Change name in tab & chat
        execute console command "essentials:nick %player% %{_nick}%"

        send "&aYou are now disguised as &f%{_nick}%!" to player

command /undisguise:
    permission: disguise.use
    trigger:
        if {disguised::%player%} is not set:
        send "&cYou are not disguised!" to player
        stop
    set {_realname} to {disguised::%player%}

    # Reset name
    execute console command "essentials:nick %player% %player%"

    delete {disguised::%player%}
    send "&aYou have been undisguised!" to player
 
bru you have to indent this
Python:
command /disguise <text>:
    permission: disguise.use
    trigger:
        if {disguised::%player%} is set:
            send "&cYou are already disguised! Use /undisguise first!" to player
            stop
        set {disguised::%player%} to player's name
        set {_nick} to arg-1

        # Change name in tab & chat
        execute console command "essentials:nick %player% %{_nick}%"

        send "&aYou are now disguised as &f%{_nick}%!" to player

command /undisguise:
    permission: disguise.use
    trigger:
        if {disguised::%player%} is not set:
        send "&cYou are not disguised!" to player
        stop
    set {_realname} to {disguised::%player%}

    # Reset name
    execute console command "essentials:nick %player% %player%"

    delete {disguised::%player%}
    send "&aYou have been undisguised!" to player
```
[Skript] Reloading disg.sk...
[18:32:13] [Server thread/INFO]: Line 29: (disg.sk)
[18:32:13] [Server thread/INFO]: Empty configuration section! You might want to indent one or more of the subsequent lines to make them belong to this section or remove the colon at the end of the line if you don't want this line to start a section.
[18:32:13] [Server thread/INFO]: Line: if {disguised::%player%} is not set:
[18:32:13] [Server thread/INFO]:
[18:32:13] [Server thread/INFO]: Line 35: (disg.sk)
[18:32:13] [Server thread/INFO]: Unexpected entry 'set {_realname} to {disguised::%player%}'. Check that it's spelled correctly, and ensure that you have put all code into a trigger.
[18:32:13] [Server thread/INFO]: Line: set {_realname} to {disguised::%player%}
[18:32:13] [Server thread/INFO]:
[18:32:13] [Server thread/INFO]: Encountered 1 error while reloading disg.sk! (205ms)
```
I'll fix by myself