Hello all! Im working on a homes GUI skript, and im running into a very small problem. Its very close on being done now. The problem im having is, teleporting to the homes in the GUI. Setting the homes work. Adding the homes in the GUI works. Just teleporting isnt working. Im use to using Tuske for GUI's, and not using vanilla. How can i get the teleport to the homes part work?
Thanks!
~Matt
Code:
[doublepost=1589416227,1589329814][/doublepost]bump
[doublepost=1589573881][/doublepost]bump
Thanks!
~Matt
Code:
Code:
on first join:
set {maxhomes::%player%} to 0
command /sethome [<text>]:
trigger:
if arg-1 isn't set:
send "&7[&aHomes&7] &7You must have a home name!"
else:
if {HOME::%player%::*} contains arg-1:
send "&7[&aHomes&7] &7You already have a home named that!"
set {LOC::HOME::%player%::%arg 1%} to player's location
add arg-1 to {HOME::%player%::*}
set {HCOL::%player%::%arg 1%} to "&c&l"
send "&7[&aHomes&7] &7You set a home named %arg-1%&7!"
command /delhome [<offlineplayer>]:
trigger:
if player has permission "%{SKHOME::DB::PERM::DELH}%":
if arg-1 is set:
delete {HOME::%arg-1%::*}
send "&7[&aHomes&7] &7You deleted all of %arg-1%&7's homes!"
command /homes:
trigger:
open chest inventory with 6 rows named "&c&lHomes(s)" to player
set {_o} to 0
loop 55 times:
set slot {_o} of player's current inventory to gray glass pane named ""
add 1 to {_o}
if size of {HOME::%player%::*} is bigger than 0:
set {_home} to 0
loop {HOME::%player%::*}:
set {_ahome} to loop-value
set slot {_home} of player's current inventory to chest named "%{HCOL::%player%::%{_ahome}%}%%{_ahome}%"
add 1 to {_home}
on inventory click:
if "%event.getView().getTitle()%" = "&c&lHomes(s)":
cancel event
if size of {HOME::%player%::*} is bigger than 0:
set {_home} to 0
loop {HOME::%player%::*}:
set {_ahome} to loop-value
teleport player to {LOC::HOME::%player%::%{_ahome}%}
send "&7[&aHomes&7] &7You have been teleported to your home!"
[doublepost=1589573881][/doublepost]bump