-
Notifications
You must be signed in to change notification settings - Fork 0
How to use function removeRank?
ClickedTran_VN edited this page Jan 10, 2024
·
3 revisions
As the name of the function suggests, this function was created for the purpose of removing rank from the player
Its usage is quite similar to giveRank
Example:
if($this->rankProvider->getRank($player) == "Admin"){
$this->rankProvider->removeRank($player, "Admin");
$this->rankProvider->giveRank($player, "Owner");
}
OR
if($this->rankProvider->getRank("ClickedTran") == "Admin"){
$this->rankProvider->removeRank("ClickedTran", "Admin");
$this->rankProvider->giveRank("ClickedTran", "Owner");
}It's easy, right? But it has one difference from the other functions, it is ONLY used for RankSystem, You might ask why it's only for RankSystem because in RankSystem when give you new rank, it will not delete the old rank but it will set a new rank next to the old rank. Example: Quest, Admin
So this function was added to fix that, if you add this function to the code it will only give you rank Owner instead of Admin, Owner