Player:VF_GetFactionName(nilFallback)
Returns the current faction name of a player.
Player:VF_GetFactionTag(nilFallback)
Returns the current faction tag of a player.
Player:VF_GetRankName(nilFallback)
Returns the current rank name of a player.
Player:VF_GetRankTag(nilFallback)
Returns the current rank tag of a player.
All functions above share the same single argument:
string nilFallback = "None"
When no data was found, "None" will be returned on default.
You can use this argument to override the fallback with anything you want.
Color fallbackColor
White on default, pass another color if you want to override that fallback color.
To promote a player to the next rank via code example:
-- In this example, we only want to promote cadets into their next rank
if ply:VF_GetRankName() == "Cadet" then
-- first we need to the the member object:
local member = ply:GetVFMember();
-- now simply promote via API:
VoidFactions.API:PromoteMember(member)
-- (optional) Notify the player that he was promoted:
VoidLib.Notify(ply, "Promotion", "You got promoted!", VoidUI.Colors.Green, 5)
end