Minecraft Skript code custom amount of special iteam

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

saengerjakob

Member
Jan 10, 2023
2
0
1
23
I made a item with !set {coins} to player's tool.

Now should Admins can use the command
/coins <amount>
and get the amount of {coins}. How can make a Code that can do this?

Greetings, Jakob
 
I made a item with !set {coins} to player's tool.

Now should Admins can use the command and get the amount of {coins}. How can make a Code that can do this?

Greetings, Jakob
Hey, first thing you probably would want to make the variable exclusive to each player's UUID, like this:
Code:
set {coins.%uuid of player%} to player's tool
so that each player has a separate amount of coins, and second thing, in the command, you need to pass a player variable, so the command would look like this:
Code:
command /coins [<player>]:
    trigger:
        set {_amt} to amount of {coins.%uuid of arg-1%} in arg-1's inventory
        send "%{_amt}%" to player
this was based on the idea that its a physical item, if its a currency i would recommend using virtual currency to avoid dupe glitches
 
Status
Not open for further replies.