Solved Command In Gui

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

I'm making a rank skript but when I make a command inside a gui it has an error that says: '<none> is not a specified player'. The thing goes like this:

Code:
format gui slot 23 of player with purple wool named "&7Rank &e%arg-1% &7to &d[MODERATOR]" to run:
   execute player command "lp user %arg-1% parent set moderator"

Can anyone see what's wrong?

Thanks,

- TheCringleYT
 
Code:
command /rank <player>:
    permission: admin.rank
    trigger:
        if arg-1 is set:
            open virtual chest with size 5 named "&7You're ranking &e%arg-1%" to player
            format gui slot 0,1,2,3,5,6,7 and 8 of player with black stained glass pane named " " to do nothing
            format gui slot 4 of player with barrier named "&cCLOSE" to close
            format gui slot 19 of player with red wool named "&7Rank &e%arg-1% &7to &c[OWNER]" to run:
                execute player command "lp user %arg-1% parent set owner"
            format gui slot 20 of player with yellow wool named "&7Rank &e%arg-1% &7to &e[CO-OWNER]" to run:
                execute player command "lp user %arg-1% parent set coowner"
            format gui slot 21 of player with orange wool named "&7Rank &e%arg-1% &7to &c[MANAGER]" to run:
                execute player command "lp user %arg-1% parent set manager"
            format gui slot 22 of player with orange wool named "&7Rank &e%arg-1% &7to &c[ADMINISTRATOR]" to run:
                execute player command "lp user %arg-1% parent set admin"
            format gui slot 23 of player with purple wool named "&7Rank &e%arg-1% &7to &d[MODERATOR]" to run:
                execute player command "lp user %arg-1% parent set moderator"
                   
                   
            format gui slot 24 of player with blue wool named "&7Rank &e%arg-1% &7to &9[HELPER]" to run:
                execute player command "lp user %arg-1% parent set helper"
            format gui slot 25 of player with light blue wool named "&7Rank &e%arg-1% &7to &9[BUILDER]" to run:
                execute player command "lp user %arg-1% parent set builder"
            format gui slot 38 of player with blue wool named "&7Rank &e%arg-1% &7to &9[PREMIUM]"
            format gui slot 39 of player with light blue wool named "&7Rank &e%arg-1% &7to &b[MVP]"
            format gui slot 40 of player with green wool named "&7rank &e%arg-1% &7to &a[VIP+]"
            format gui slot 41 of player with lime wool named "&7Rank &e%arg-1% &7to &a[VIP]"
            format gui slot 42 of player with light gray wool named "&7Rank &e%arg-1% &7to &7[DEFAULT]"

Sorry for the late reply by the way :emoji_slight_smile:
 
Hi,

I'm making a rank skript but when I make a command inside a gui it has an error that says: '<none> is not a specified player'. The thing goes like this:

Code:
format gui slot 23 of player with purple wool named "&7Rank &e%arg-1% &7to &d[MODERATOR]" to run:
   execute player command "lp user %arg-1% parent set moderator"

Can anyone see what's wrong?

Thanks,

- TheCringleYT

instead of putting "arg-1", put "args 1"
 
Well I have been making skript gui's but um I hope this works I got it from someone answering my question. I didn't make a close button so you will have to either add that yourself or just press esc when you are done with the gui.
Code:
command /rank <player>:
    permission: admin.rank
    trigger:
        if arg-1 is set:
            set {_gui} to a new chest inventory with 6 rows with name "Ranking"
            set slot 19 of {_gui} to red wool named "&7Rank &e%arg-1% &7to &c[OWNER]"
            set slot 20 of {_gui} to yellow wool named "&7Rank &e%arg-1% &7to &e[CO-OWNER]"
            set slot 21 of {_gui} to orange wool named "&7Rank &e%arg-1% &7to &c[MANAGER]"
            set slot 22 of {_gui} to orange wool named "&7Rank &e%arg-1% &7to &c[ADMINISTRATOR]"
            set slot 23 of {_gui} to purple wool named "&7Rank &e%arg-1% &7to &d[MODERATOR]"
            set slot 24 of {_gui} to blue wool named "&7Rank &e%arg-1% &7to &9[HELPER]"
            set slot 25 of {_gui} to light blue wool named "&7Rank &e%arg-1% &7to &9[BUILDER]"
            set slot 38 of {_gui} to blue wool named "&7Rank &e%arg-1% &7to &9[PREMIUM]"
            set slot 39 of {_gui} to light blue wool named "&7Rank &e%arg-1% &7to &b[MVP]"
            set slot 40 of {_gui} to green wool named "&7rank &e%arg-1% &7to &a[VIP+]"
            set slot 41 of {_gui} to lime wool named "&7Rank &e%arg-1% &7to &a[VIP]"
            set slot 42 of {_gui} to light gray wool named "&7Rank &e%arg-1% &7to &7[DEFAULT]"
on inventory click:
    if name of event-inventory is "Ranking":
        if index of event-slot = 19:
            cancel event
            execute console command "lp user %arg-1% parent set owner"
        if index of event-slot = 20:
            cancel event
            execute console command "lp user %arg-1% parent set coowner"
        if index of event-slot = 21:
            cancel event
            execute console command "lp user %arg-1% parent set manager"
        if index of event-slot = 22:
            cancel event
            execute console command "lp user %arg-1% parent set admin"
        if index of event-slot = 23:
            cancel event
            execute console command "lp user %arg-1% parent set moderator"
        if index of event-slot = 24:
            cancel event
            execute console command "lp user %arg-1% parent set helper"
        if index of event-slot = 25:
            cancel event
            execute console command "lp user %arg-1% parent set builder"
        if index of event-slot = 38:
            cancel event
            execute console command "lp user %arg-1% parent set premium"
        if index of event-slot = 39:
            cancel event
            execute console command "lp user %arg-1% parent set mvp"
        if index of event-slot = 40:
            cancel event
            execute console command "lp user %arg-1% parent set vip+"
        if index of event-slot = 41:
            cancel event
            execute console command "lp user %arg-1% parent set vip"
        if index of event-slot = 42:
            cancel event
            execute console command "lp user %arg-1% parent set default"
 
anyone know why when i type /pvp it lets it pass instantly instead of a 5 second cooldown
command /pvp:
trigger:
set {_waited} to difference between {pvp.%player%.lastused} and now
if {_waited} is less than 5 seconds:
send "&r&cPlease wait %difference between 5 seconds and {_waited}% seconds and try again." to player
else:
if {pvp.%player%} is false:
set {pvp.%player%} to true
set {pvptoggle.%player%} to "&r&6&lDisable PvP &r&7(Right Click)"
wait 1 tick
set {_waited} to difference between {pvp.%player%.lastused} and now
else:
set {pvp.%player%} to false
set {pvptoggle.%player%} to "&r&6&lEnable PvP &r&7(Right Click)"
wait 1 tick
set {_waited} to difference between {pvp.%player%.lastused} and now
[doublepost=1603523268,1603522055][/doublepost]nvm figured it out thanks
[doublepost=1603524216][/doublepost]
Ok, You're welcome :emoji_grinning:
(I didn't test it because I was away from my main computer)
yo are you on
 
Status
Not open for further replies.