So I'm trying to make an Info script, that will show information to the player, like when %arg-1% joined the server, etc. And I'm having problems with when the %arg-1% joined. When I try to do "%arg-1%" in a variable, it won't work, but I need it for the command. How can I solve this problem?
Here Is my Code:
It would be amazing if someone could help me, I only started learning Skript 2 weeks ago. Thank you!
Also I'm planning on adding sounds to the script, so whenever you try to take out the item in the GUI, it will make a TNT blowing up sound, But unfortunately, I cannot do it, because when I try to:
It won't work,because it's %arg-1%
Here Is my Code:
It would be amazing if someone could help me, I only started learning Skript 2 weeks ago. Thank you!
code_language.skript:
on first join:
set {mysql._joined.%arg-1%} to true
set {mysql._jtime.%arg-1%} to now
stop
command /info [<offline player>]:
usage: Sorry> /info <player>
trigger:
arg-1 is not set:
send "Sorry> /info <player>"
stop
set {_player} to "%player%"
if {mysql._joined.%arg-1%} is true:
arg-1 is set:
if arg-1 has permission "test.1":
set slot 5 of player's current inventory to feather named "&c%arg-1%" with lore "Joined - {mysql._jtime.%player%}"
else if arg-1 has permission "test.2":
set slot 5 of player's current inventory to feather named "&4%arg-1%" with lore "Joined - {mysql._jtime.%player%}"
else:
open chest with 3 rows named "%arg-1% Never Joined!" to player
set slot 5 of player's current inventory to feather named "&1%arg-1%" with lore "Never joined!"
Also I'm planning on adding sounds to the script, so whenever you try to take out the item in the GUI, it will make a TNT blowing up sound, But unfortunately, I cannot do it, because when I try to:
code_language.skript:
on inventory click:
if "%inventory name of player's current inventory%" is "Stats":
cancel event
if name of clicked item is "&c%arg-1%":
#do sound stuff
It won't work,because it's %arg-1%
Last edited: