Solved Is it possible to set variable as player?

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

BrownMee

Active Member
Apr 16, 2018
126
6
18
23
Code:
on inventory click:
    if inventory name of player's current inventory is "Smith Trading":
        send "tes"
        set name of clicked item to {_player}
        loop all items in player's current inventory:
            add loop-item to {inv::*}
        open chest with 1 rows named "Smith Trading Successful" to {_player}
        set {inv::*} to all items in {_player}'s current inventory
        if {_player} has permission "smith.access":
            delete {receipt.%{_player}%.%player%}
        else:
            set {receipt.%player%.%{_player}%} to true
        close player's inventory

i set the item to a player name
so when i click the item
"set name of clicked item to {_player}"
so i set the player name to the variable
open chest with 1 rows named "Smith Trading Successful" to {_player}

basically im trying to open a chest to the {_player} name i just set
 
You can set the variable to a player
Code:
set {_player} to player
then open the chest to that player with the variable
Code:
open chest with 1 row named "Smith Trading Successful" to {_player}
 
Status
Not open for further replies.