Has enough space

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

kamilleon

Member
Nov 18, 2017
48
0
6
24
I want to check if the player has enough space in his inventory for "arg 1" of stone.

code_language.skript:
command /lekér <number>:
  trigger:
    if arg 1 is a number:
      if arg 1 > 0:
        if arg 1 <= 512:
          set {_arg1kő} to arg 1
          set {_playerkövek} to {s.%player%}
          if {s.%player%} >= {_arg1kő}:
            remove {_arg1kő} from {s.%player%}
            give arg 1 of cookies to player
        else:
          send "{@bcs} &cEgyszerre csak 512 követ kérhetsz le!" to player
      else:
        send "{@bcs} &c0 Sütit nem kérhetsz le!" to player
    else:
      stop

This is my current code, but i dont know what to put in.
 
I tried this:


code_language.skript:
            if player has enough space for arg 1 of stone:
              remove {_arg1kő} from {s.%player%}
              give arg 1 of stone of unbreaking 10 named "&c&lKő" to player
              stop
            else if player has not enough space for arg 1 of stone:
              send "{@bcs} &cNincs elég helyed &7%arg-1% &ckőhöz!" to player
              stop

But when i have enough space for like 20 stone, it says i don't have enough space.
 
Status
Not open for further replies.