Solved Help with this code it dont works

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

ImEnzo

Supporter
Jan 29, 2017
25
1
0
33
code_language.skript:
command /job:
    trigger:
        send "&cWähle einen Job aus:"
        json("%player%", "&a&oBürger||ttp:&lAuswählen!||cmd:/bürger")
       
command /bürger:
    trigger:
        if {jobcounter} is "1":
            send "&cLoliRPMC &8>> &cDu hast bereits einen Job gewählt!"
        stop
        if {jobcounter} is not set:
        set {jobcounter} to 1
        send "&cLoliRPMC &8>> &cDu hast erfolgreich den Job &aBürger &causgewählt!"
        wait 1 second
        send "&cLoliRPMC &8>> &cGebe &6/joblohn &cein um dein Joblohn zu erhalten!"
        stop
       
       
command /kündigen:
    trigger:
        if {jobcounter} is "1":
            set {jobcounter} to 0
            send "&cLoliRPMC &8>> &cJob gekündigt!"

It does not work so my goal is:
If a player types /bürger they can choose the job "Bürger" if they type it again its not working because they already chose it.

with /kündigen they can quit the job and they are again able to do /job and choose the job "Bürger"

Sorry i was so loooong inactive if this questions sounds dumb.

ERRORS:
https://i.ibb.co/fDpDC6V/22323.png
 
Last edited:
Here you go, this should work
code_language.skript:
command /job:
    trigger:
        send "&cWähle einen Job aus:"
        json("%player%", "&a&oBürger||ttp:&lAuswählen!||cmd:/bürger")
       
command /bürger:
    trigger:
        if {jobcounter::%player%} is set:
            send "&cLoliRPMC &8>> &cDu hast bereits einen Job gewählt!"
            stop
        set {jobcounter::%player%} to 1
        send "&cLoliRPMC &8>> &cDu hast erfolgreich den Job &aBürger &causgewählt!"
        wait 1 second
        send "&cLoliRPMC &8>> &cGebe &6/joblohn &cein um dein Joblohn zu erhalten!"
        stop
       
       
command /kündigen:
    trigger:
        if {jobcounter::%player%} is 1:
            set {jobcounter::%player%} to 0
            send "&cLoliRPMC &8>> &cJob gekündigt!"
 
Here you go, this should work
code_language.skript:
command /job:
    trigger:
        send "&cWähle einen Job aus:"
        json("%player%", "&a&oBürger||ttp:&lAuswählen!||cmd:/bürger")
      
command /bürger:
    trigger:
        if {jobcounter::%player%} is set:
            send "&cLoliRPMC &8>> &cDu hast bereits einen Job gewählt!"
            stop
        set {jobcounter::%player%} to 1
        send "&cLoliRPMC &8>> &cDu hast erfolgreich den Job &aBürger &causgewählt!"
        wait 1 second
        send "&cLoliRPMC &8>> &cGebe &6/joblohn &cein um dein Joblohn zu erhalten!"
        stop
      
      
command /kündigen:
    trigger:
        if {jobcounter::%player%} is 1:
            set {jobcounter::%player%} to 0
            send "&cLoliRPMC &8>> &cJob gekündigt!"
Thanks but it wont work when i type /kündigen that i can choose again the job Bürger :emoji_frowning:
 
Here you go, this should work
code_language.skript:
command /job:
    trigger:
        send "&cWähle einen Job aus:"
        json("%player%", "&a&oBürger||ttp:&lAuswählen!||cmd:/bürger")
      
command /bürger:
    trigger:
        if {jobcounter::%player%} is set:
            send "&cLoliRPMC &8>> &cDu hast bereits einen Job gewählt!"
            stop
        set {jobcounter::%player%} to 1
        send "&cLoliRPMC &8>> &cDu hast erfolgreich den Job &aBürger &causgewählt!"
        wait 1 second
        send "&cLoliRPMC &8>> &cGebe &6/joblohn &cein um dein Joblohn zu erhalten!"
        stop
      
      
command /kündigen:
    trigger:
        if {jobcounter::%player%} is 1:
            set {jobcounter::%player%} to 0
            send "&cLoliRPMC &8>> &cJob gekündigt!"
Oops, replace "if {jobcounter::%player%} is set:" with "if {jobcounter::%player%} is 1:" in /bürger
 
  • Like
Reactions: ImEnzo
Status
Not open for further replies.