I've updated this function, there was a bug.
PHP Code:
function getUpgradeStatus(pl) {
temp.status = pl.upgradestatus;
switch (pl.upgradestatus) {
case "gold":
temp.status = "Gold";
break;
case "classic":
temp.status = "Classic";
break;
case "trial":
if (pl.communityname != pl.account || (!pl.account.starts("Graal") && !pl.account.starts("pc:"))) {
temp.status = "Community";
} else {
temp.status = "Trial";
}
break;
}
return temp.status;
}
Control-NPC Usage:
PHP Code:
function onActionPlayerOnline() {
clientr.upgradestatus = getUpgradeStatus(player);
}
function getUpgradeStatus(pl) {
temp.status = pl.upgradestatus;
switch (pl.upgradestatus) {
case "gold":
temp.status = "Gold";
break;
case "classic":
temp.status = "Classic";
break;
case "trial":
if (pl.communityname != pl.account || (!pl.account.starts("Graal") && !pl.account.starts("pc:"))) {
temp.status = "Community";
} else {
temp.status = "Trial";
}
break;
}
return temp.status;
}