Faction

Server functions that are in some way related to the faction aspects.

Wosa.Character.Faction.Add(
    user, --[[ int ]]
    job, --[[ string ]]
    rank, --[[ string ]]
    subRank --[[ string ]]
)

--[[

Parameters:
-> user: The PlayerID of the user.
-> job: The "job" label so to say, for pd it is "Law Enforcement" etc.
-> rank: The current "rank" in the faction.
-> subRank: Can leave it as anything, can be used for anything "extra" such as callsign etc.

Description:
Add a player to a faction manually. This just straight accesses the database and uses a
"insert" method to add it manually to the database. As this is not synced with the server or
client at all the player will most likley have to restart their game for the rank to be active.

]]
Wosa.Character.Faction.Remove(
    license, --[[ string ]]
    characterTable, --[[ string ]]
    job --[[ string ]]
)

--[[

Parameters:
-> license: The r* license of the user.
-> characterTable: Which "character table" for the user.
-> job: The "job" entry you want to remove.

Description:
This function can be used to remove a player from a faction, As this function utilizes
license + character table means that you can remove players from a faction when they are
offline as well.

]]
Wosa.Character.Faction.Update(
    license, --[[ string ]]
    characterTable, --[[ string ]]
    job, --[[ string ]]
    rank, --[[ string ]]
    subRank --[[ string ]]
)

--[[

Parameters:
-> license: The r* license of the user.
-> characterTable: Which "character table" that you want to update.
-> job: The "job" entry you want to update.
-> rank: The rank you want to update.
-> subRank: The "subRank" section you want to update to.

Description:
Used if you want to update a specific row in the database for a faction, You can
update users rows when they are offline as well.

]]

Last updated

Was this helpful?