Explaination:
I'm trying to open an Anvil GUI so players can search (or whatever) for a player/item. The issue is that the anvil GUI does not open to the {_p} variable.
Code:
Addons: skQuery, TuSKe
Any help will be highly appreciated!
EDIT: I have changed the `anvil` to `chest` and the GUI successfully opened to the player, and formatted the slots correctly.
I'm trying to open an Anvil GUI so players can search (or whatever) for a player/item. The issue is that the anvil GUI does not open to the {_p} variable.
Code:
code_language.skript:
function anvilSearch(p: player):
send "1" to {_p}
open virtual anvil inventory to {_p}
send "2" to {_p}
make a gui slot 0 of {_p} with player head named "&7&oSearch for..." to do nothing
make a gui slot 1 of {_p} with paper named "&r" to do nothing
on anvil rename:
if event-item's name = "&7&oSearch for...":
if event-string = "MINECRAFT":
cancel event
close event-player's inventory
broadcast "&lMINECRAFT&r IS &nCOOL"
command /anvilsearch:
trigger:
anvilSearch(sender)
Any help will be highly appreciated!
EDIT: I have changed the `anvil` to `chest` and the GUI successfully opened to the player, and formatted the slots correctly.