Clear it from

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

KAVKAZIE

Active Member
Feb 27, 2017
146
0
16
Hey, How to clear this:
Code:
            set {Inv::%executor%} to executor's serialized inventory
            set {stuff.%player%} to player's serialized inventory
            set {helm.%player%} to player's helmet
            set {chest.%player%} to player's chestplate
            set {legs.%player%} to player's leggings
            set {boots.%player%} to player's boots
after the player left staff mode and clear it from variables.csv

Code:
command /staffmode:
    aliases: staff, sm
    permission: staff.rank
    permission message: &cUnknown command or you don't have permission.
    trigger:
        if {mod.%player%} is not set:
            set the player's gamemode to creative
            send "&6Staff Mode&7: &aEnabled"
            reveal all players to player
            set {Inv::%executor%} to executor's serialized inventory
            set {stuff.%player%} to player's serialized inventory
            set {helm.%player%} to player's helmet
            set {chest.%player%} to player's chestplate
            set {legs.%player%} to player's leggings
            set {boots.%player%} to player's boots
            clear player's inventory
            set slot 0 of player to compass named "&6Teleporter Tool"
            set slot 1 of player to book named "&6Inventory Inspect &7(Click on Player)"
            set slot 2 of player to ice named "&6Freeze &7(Click on Player)"
            set slot 7 of player to player head named "&6Online Staff &7(Right Click)"
            set slot 8 of player to light green dye named "&6Vanish &a(Enabled)"
            set player's leggings to chain leggings
            make player execute command "/§vanish-on"
            loop all players:
                if {mod.%loop-player%} is set:
                    reveal player to loop-player
            set {mod.%player%} to true
            stop
        else:
            set the player's gamemode to survival
            send "&6Staff Mode&7: &cDisabled"
            make player execute command "/§vanish-off"
            loop all players:
                if {vanish.%loop-player%} is set:
                    hide loop-player from player
            clear player's leggings
            clear player's inventory
            restore inventory of executor from {Inv::%executor%}
            set player's helmet to {helm.%player%}
            set player's chestplate to {chest.%player%}
            set player's leggings to {legs.%player%}
            set player's boots to {boots.%player%}
            delete {mod.%player%}
            stop
 
its doesnt removing it (And its making the variables.csv file more bigger)
 
Theres nothing in your code about deleting those variables, since you aren't using list variables, you have to delete each variable, one by one
[doublepost=1560364542,1560364402][/doublepost]If you were to have used list variables for saving things, like so: (this is an example of usage)
code_language.skript:
command /save:
    trigger:
        set {inventories::%uuid of player%%::helmet} to helmet of player
        set {inventories::%uuid of player%%::chestplate} to chestplate of player
        set {inventories::%uuid of player%%::leggings} to leggings of player
        set {inventories::%uuid of player%%::boots} to boots of player

Then when you restore the player's inventory, you can easily/quickly delete the entire list:
code_language.skript:
command /load:
    trigger:
        #code to load back onto your player
        delete {inventories::%uuid of player%::*} #<-- deletes the whole list
 
Status
Not open for further replies.