Simple error

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

Leonardo_

Member
Sep 21, 2020
18
0
1
24
How I run a command as op on tuske gui?
I searched but found nothing
Here's the code:
Code:
command /shop [<player>]:
    permission: ww2.shop
    usage: /shop
    trigger:
        if player has permission "ww2.shop":
            create a gui with id "Shop" with virtual chest with 3 rows named "&nShop":
                make gui slot 10 with player head named "&6&nCibo e bevande" with nbt "{@nbt1}"
                format a gui slot 13 of player with paper to run player command "CommandHere" as op
            open gui "Shop" to player

"format a gui slot 13 of player with paper to run player command "CommandHere" as op" doesn't work
 
Code:
command /shop [<player>]:
    permission: ww2.shop
    usage: /shop
    trigger:
        if player has permission "ww2.shop":
            create a gui with id "Shop" with virtual chest with 3 rows named "&nShop":
                make gui slot 10 with player head named "&6&nCibo e bevande" with nbt "{@nbt1}"
                format a gui slot 13 of player with paper to run:
                    execute command "CommandHere"
            open gui "Shop" to player

You might be able to rewrite the command so that console can execute the command on a player, and that code should help. If it brings up an error, you should be able to get rid of the line I made and just do the gui slot in 1 row, and that should fix it. I don't know if that is correct syntax for the plugin.
 
Status
Not open for further replies.