Solved Reset Argument

  • 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.
code_language.skript:
command /kingdom [<text>] [<text>]:
    trigger:
        if arg-1 is not set:
            send "&a-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-"
            send "&6/kingdom create <KD naam> &9Dit create een kingdom!"
            send "&6/kingdom invite <Speler naam> &9Hiermee invite je iemand!"
            send "&6/kingdom accept <Speler naam> &9Hiermee accept je een invite!"
            send "&a-+-+-+-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-+-++-+-+-+-+-+-+-+-"
        if arg-1 is "create":
            if arg-2 is set:
                if {Kingdom.Naam.%player%} is not set:
                    set {Kingdom.Naam.%player%} to arg-2
                    broadcast "&7[&cKingdom&7] &9Het kingdom &6%arg-2% &9is zojuist aangemaakt!"
                else:
                    send "&7[&cKingdom&7] &9Je zit al in een kingdom!"
            else:
                send "&7[&cKingdom&7] &9Vergeet geen Kingdom naam te kiezen!"
        if arg-1 is "disband" or "leave":
            if {Kingdom.Naam.%player%} is set:
                reset {Kingdom.Naam.%player%}
                send "&7[&cKingdom&7] &9Je bent je kingdom geleaved&9!"
            else:
                send "&7[&cKingdom&7] &9Je bent al &aKingdom-Loos&9!"
on chat:
    cancel event
    if {Kingdom.Naam.%player%} is set:
        broadcast "&8[&6%{Kingdom.Naam.%player%}%&8][&f%player%&8]&f: &7%message%"
    else:
        broadcast "&8[&aKingdom-Loos&8][&f%player%&8]&f: &7%message%"
I want it to reset on line 20, but idk how
 
code_language.skript:
 delete {Kingdom.Naam.%player%}

Something like this? Or are you trying to reset it to a specific value?
 
Status
Not open for further replies.