My Script won't work?
This is a money script. And i made it so if i change the player's money, it updates their scoreboard too!
But!
Only works for my admins, not owners (line 26-37). What am i doing wrong?
This is a money script. And i made it so if i change the player's money, it updates their scoreboard too!
But!
Only works for my admins, not owners (line 26-37). What am i doing wrong?
code_language.skript:
command /setdollar [<offline player>] [<text>]:
permission: setmoneyy
permission message: cant do that
trigger:
if arg-2 parsed as integer isn't set:
send "wrong usage"
stop
arg 1 is set:
arg 2 is set:
set {_num} to arg-2 parsed as an integer
if arg 1 is online:
if arg 1 is player:
send "not a number"
stop
difference between {sql_.diff.setmoney::%player%} and now is less than 30 seconds:
send "cooldown"
stop
if {_num} is greater than 500000:
send "too much"
stop
set {sql_.diff.setmoney::%player%} to now
{@run_async} is "true":
$ thread
set {_message} to adddollar(arg 1, {_num}, 1)
send "you set %arg-1%&9's dollar to &5%{_num}%."
arg-1 has permission "tag.admin"
wait 1 tick
createBoard(arg-1, "Admin", 15)
set title of stylish scoreboard "Admin-%arg-1%" to "&a test"
set stylish scoreboard of arg-1 to "Admin-%arg-1%"
updateBoard7(arg-1)
arg-1 has permission "tag.owner"
wait 1 tick
createBoard(arg-1, "Owner", 15)
set title of stylish scoreboard "Owner-%arg-1%" to "&a test2"
set stylish scoreboard of arg-1 to "Owner-%arg-1%"
updateBoard8(arg-1)
else:
send "offline"
else:
send "wrong usage"
else:
send "wrong usage"