code_language.skript:
options:
prefix: &eArtix&cRPG &8|
on join:
if {joined::%player's uuid%} is not set:
set {class::%player's uuid%} to "&b&lUNRANKED"
set {joined::%player's uuid%} to true
on join:
if {class::%player's uuid%} is not set:
set {class::%player's uuid%} to "&b&lUNRANKED"
on join:
if {class::%player's uuid%} is not set:
set {_class} to {class::%player's uuid%}
command /deldata:
permission: console
trigger:
delete {class::*}
function classGUI(p: player):
create a gui with virtual chest inventory with size 3 named "Choose Class" with shape "---------" and "-1-2-3-4-" and "---------":
make gui slot "-" with black stained glass pane
make gui slot "1" with SHIELD named "&eWarrior (Tank)":
chooseClass({_p}, "Warrior")
make gui slot "2" with diamond ore named "&eArcher":
chooseClass({_p}, "Knight")
make gui slot "3" with wheat named "&eArcher":
chooseClass({_p}, "Archer")
make gui slot "4" with raw cod named "&eMage":
chooseClass({_p}, "Mage")
open last gui to {_p}
command /class:
trigger:
classGUI(player)
function chooseClass(p: player, t: text):
{_t} is "Warrior":
set {_class} to {_t}
send "{@prefix} &eYou have choosed class &b%{_t}%&e." to {_p}
stop
{_t} is "Knight":
set {_class} to {_t}
send "{@prefix} &eYou have choosed class &b%{_t}%&e." to {_p}
stop
{_t} is "Archer":
set {_class} to {_t}
send "{@prefix} &eYou have choosed class &b%{_t}%&e." to {_p}
stop
{_t} is "Mage":
set {_class} to {_t}
send "{@prefix} &eYou have choosed class &b%{_t}%&e." to {_p}
stop
When I choose any class it doesn't show in sidebar and my stats my class, just UNRANKED it doesn't change.
Can anyone help me?
Posted by: .h4xr from the skUnity Discord. View the thread on skUnity Discord here