💡 Overview
The [Codex] Trust Level System is a versatile, fully customizable framework for RedM that turns reputation into a core gameplay mechanic.
Use it to control access to missions, black markets, NPCs, zones, and more – while the built-in Trust Shop lets you attach powerful, trust-based stores to any NPC in your world.
🔑 Customizable Trust Levels
Shape trust to match your server’s identity:
Define any number of trust levels (e.g. Stranger, Known, Trusted, Inner Circle).
Configure your own criteria for each level (jobs, missions, kills, playtime, actions, etc.).
Attach privileges per level:
Access to locations or interiors
Special missions, jobs, or outlaw content
Discounts, unique items, or high-risk black-market options
Everything is fully driven by codex_core, so other scripts can read & modify trust cleanly.
🛍 Advanced Trust Shop System (Multi-Shop, Multi-NPC)
Turn trust into real purchasing power:
Each NPC can open its own unique Trust Shop (Weapons, Drugs, Moonshine, etc.).
Shop menus are fully independent per NPC – no shared or overlapping menu issues.
Menu titles are generated from the shop key name (e.g.
BlackMarketDrugs) for clear, contextual UIs.Every shop uses its own menu ID (e.g.
codex_main_shops_menu_BlackMarketDrugs), keeping things clean with both ox_lib and menuapi.NPC prompts are shop-specific and smooth, guiding players naturally into the right store.
Purchases are tracked per player source, with item costs and limits safely handled to prevent type issues or exploit attempts.
⚙️ Seamless Integration for Your Scripts
The Trust Level System is built to plug into anything:
Gate access to:
Heists, missions, robberies, or black-market contacts
Special jobs, factions, and high-tier rewards
Secret interiors, outlaw hubs, or endgame content
Simple API for:
Checking a player’s trust level
Adding or removing trust
Linking trust requirements directly into your existing resources
Designed to enhance gameplay without adding unnecessary overhead.
🧠 Robust, Safe & Data-Aware Design
Behind the scenes, the system is hardened for long-term use:
Trust values are always treated as proper numeric values before calculations.
Trust data is validated and normalized into safe JSON structures.
On resource start, any malformed or legacy rows in the
trustleveltable are automatically brought back into a valid state.Add/remove trust handlers:
Sanitize input categories
Fall back to presets if a DB row is missing or malformed
Both SecurityAPI and non-SecurityAPI paths share the same protection layer.
This means fewer surprises, fewer errors, and a system that stays healthy as your server grows.
🤝 Dynamic Player Interaction
Let trust drive how your world responds:
Influence:
Relationships with NPCs or factions
Access to restricted zones or hidden vendors
Eligibility for events, missions, or special tasks
Encourage:
Long-term progression
Group play & loyalty
Story-driven reputation systems
Trust becomes an actual metric players care about – not just lore.
📊 Visual Feedback & UX
Make progression clear and satisfying:
Display a player’s current trust level and progress toward the next rank.
Use codex-notifications and your UI stack to surface:
Level-up messages
Access denied / allowed prompts
Shop requirements and unlocks
Players always know where they stand and what to work toward.
🧩 Dependencies & Framework Support
Dependencies:
codex_corecodex-notificationsoxlib
Frameworks supported via Codex Core:
RSG
VORP
TPZ-CORE
Version Info:
Core Dependency: CodexCore v1.0+
Compatible with both ox_lib and menuapi for menus and interactions.
🎥 Preview
▶️ Video Preview:
https://youtu.be/6Wkq-4R59oY
Empower your server with a true reputation and progression backbone.
[Codex] Trust Level System turns trust, loyalty, and underworld access into gameplay your players will feel every time they interact with your world.

