Solved function from guis..?

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

DoronS

New Member
Sep 15, 2017
9
0
0
20
Hey! I need some help. how do I make player execute a function on a GUI?
here's the code:
code_language.skript:
command /pet:
  permission: pets.use
  trigger:
    message "&aplease wait..."
    wait 1 seconds
    open chest with 6 rows named "&6Pets Menu" to player
    format slot 9 of player with fish named "&6Cat Pet" to close then run [function SpawnPet(player, "ocelot")]
    format slot 10 of player with name tag named "&6rename your pet" to close then run [make player execute command "/renamememememememe"]






function SpawnPet(p: player, pet: text):
  spawn {_pet} at {_p}
  tame {_pet} to %player%
plz help thx
 
Hey! I need some help. how do I make player execute a function on a GUI?
here's the code:
code_language.skript:
command /pet:
  permission: pets.use
  trigger:
    message "&aplease wait..."
    wait 1 seconds
    open chest with 6 rows named "&6Pets Menu" to player
    format slot 9 of player with fish named "&6Cat Pet" to close then run [function SpawnPet(player, "ocelot")]
    format slot 10 of player with name tag named "&6rename your pet" to close then run [make player execute command "/renamememememememe"]






function SpawnPet(p: player, pet: text):
  spawn {_pet} at {_p}
  tame {_pet} to %player%
plz help thx
you can do this with Tuske's advanced GUI. heres a tutorial.
Also note your function needs to come before your code that calls it.
 
Status
Not open for further replies.