Solved Saving armor in a variable - not working

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

    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.

Zunick

New Member
Nov 1, 2018
5
0
0
So I have this problem, where when the command says "set {helmet.%player%} to player's helmet" it just saves it as "Air".

code_language.skript:
command /staffmode:
    permission: Staff
    permission message: &8» &cDu har ikke adgang til dette!
    trigger:
        if {staffmode.%player%} is false:
            loop all items in player's inventory:
                add loop-item to {inv.%player%::*}
            clear player's inventory
            set {staffmode.%player%} to true
            message "&8» &7Staffmode&8: &bAktiveret"
            set {helmet.%player%} to player's helmet
            set {chestplate.%player%} to player's chestplate
            set {leggings.%player%} to player's leggings
            set {boots.%player%} to player's boots
            stop
        else if {staffmode.%player%} is true:
            clear player's inventory
            set {_slot} to 0
            loop {inv.%player%::*}:
                set slot {_slot} of player to loop-value
                add 1 to {_slot}
            set {staffmode.%player%} to false
            delete {inv.%player%::*}
            set player's helmet to {helmet.%player%}
            set player's chestplate to {chestplate.%player%}
            set player's leggings to {leggings.%player%}
            set player's boots to {boots.%player%}
            message "&8» &7Staffmode&8: &bDeaktiveret"
 
Thats because the player's helmet is air, after you cleared their inventory
Screen Shot 2018-12-03 at 3.03.38 pm.png
 
Please mark the answer above as the best answer or set the question to solved
 
Status
Not open for further replies.