Client Side
βοΈ Default Trust Categories
By default, the script includes several categories for criminal activities:
π Adding Custom Trust Levels
One of the key features of this system is the ability to add custom trust levels for new activities you want to track. Here's an example of adding a custom level for smuggling:
Now, you have a custom level called smuggler, and you can use this like any of the default categories!
π§ Using the Trust Level System (Client-side)
The Codex Trust Level system interacts with the player's trust in various categories through events and exports.
1οΈβ£ Add Trust Points to a Category
To add trust points to a category, use the following:
Explanation:
"boost"
: The category you're adding trust points to (e.g., boosting).5
: The number of trust points to add.
You can use any of the predefined or custom categories (like "moonshine"
, "smuggler"
, etc.).
2οΈβ£ Remove Trust Points from a Category
To remove trust points, use this:
Explanation:
"moonshine"
: The category you're removing trust points from.3
: The number of trust points to remove.
You can replace "moonshine"
with any other category you wish.
3οΈβ£ Get Player's Trust from a Category
To get the current trust level for a category, use this export:
Explanation:
This will return the current trust level for the boost category.
You can get the trust level for any of the predefined categories, like so:
π§βπ» Using Custom Trust Levels
You can easily define custom trust levels for your own criminal activities, such as smuggling, assault, or theft. This is how you would do it:
This way, you can track custom criminal activities with ease.
π Full Example: Adding, Removing, and Querying Trust Levels
Hereβs how you can add, remove, and query trust levels for different categories:
π Use Case Example: Tracking Progress in Criminal Activities
Letβs say you want to create a progression system for a drug dealer. The player might start as a drugfarmer and move to a drugcooker as they progress. Hereβs an example:
This system could unlock special abilities or new items for players as they progress through these criminal activities.
π Summary
The Codex Trust Level system is a flexible, customizable way to manage criminal activities and player progression. You can track trust levels for predefined categories (like boosting, moonshine, and smuggling) and even create custom categories for new activities. This system supports adding, removing, and querying trust levels to create dynamic gameplay systems based on criminal reputation!
π‘ Key Features:
Custom Levels: Create your own categories (e.g., smuggler, assault).
Exports: Use
exports['codex_trustlevel']:getTrustLevel()
to check trust levels.Events: Use
TriggerServerEvent()
to modify trust levels.
Last updated
Was this helpful?