TebexDiscordYouTubeTwitch
  • πŸ‘‹Introduction
  • Information
    • πŸ’¬Discord Roles
    • πŸ”FiveM Asset Escrow
    • 🀝Support Plans
    • 🌐Showcase Server
    • ⁉️Frequently Asked Questions
    • ⭐Staff & Beta Tester Applications
  • Paid Resources
  • πŸ›‘οΈPHYLAX AC
  • πŸ”«BetterFight Evolved
    • πŸ“šAbout BFE
      • πŸ’β€β™€οΈFeatures
        • 🎯Recoil System
        • πŸ’’Crosshair System
        • πŸ”₯Temperature System & Jamming
        • πŸ”«Weapon Damages
        • πŸŽ₯ViewCam Enforcer
        • ♨️Triggerbot System
        • 🦘Jump Spam & Roll Prevention
        • πŸ₯’Remove Whipping & Melee One Shot Prevention
      • πŸ”Dependencies & Compatibility
      • ⚑Optimization
      • πŸ›‘οΈSecurity
      • πŸ”Encryption - FiveM Escrow
      • πŸ†•Changelogs
    • βš™οΈConfiguration Settings
      • βš™οΈMaster Config
      • βš™οΈWeapons Config
      • βš™οΈSecurity Config
      • βš™οΈDiscord Logs Config
    • ‡️Base Installation
    • ⬅️Exports
  • πŸͺStore Robberies Evolved
    • πŸ“šAbout SRE
      • πŸ’β€β™€οΈFeatures
        • πŸ‘¨β€πŸ’ΌAI Shopkeeper System
          • πŸ—£οΈTasks & Behaviors
          • 🀠Character Manipulation
        • πŸ”«Realistic Robbery Mechanics
        • 🚨Security Systems and Measures
        • πŸ› οΈCustomizable Store Configuratins
      • πŸ”Dependencies & Compatibility
      • ⚑Optimization
      • πŸ›‘οΈSecurity
      • πŸ”Encryption - FiveM Escrow
      • πŸ†•Changelogs
    • βš™οΈConfiguration Settings
      • βš™οΈMaster Config
      • βš™οΈStores Config
        • βš™οΈGlobal Store Settings
        • βš™οΈIndividual Store Settings
          • βš™οΈMain Settings
          • βš™οΈPolyzone Settings
          • βš™οΈShopkeeper Settings
          • βš™οΈStealable Settings
          • βš™οΈSecurity Settings
      • βš™οΈAI NPC Config
        • βš™οΈShopkeeper Character Settings
        • βš™οΈShopkeeper Animation List
        • βš™οΈShopkeeper Speech List
      • βš™οΈPlayer Speech List
      • βš™οΈSecurity Config
      • βš™οΈDiscord Logs Config
    • ‡️Base Installation
    • πŸ›‘οΈSecurity Integration
    • ⬅️Exports
  • πŸ‘οΈHawkEye Surveillance
    • πŸ“šAbout HES
      • πŸ’β€β™€οΈFeatures
        • πŸ“ΉCCTV Cameras
        • 🌐Jammers & Tracker
        • πŸ› οΈDynamic Configurations
      • πŸ”Dependencies & Compatibility
      • ⚑Optimization
      • πŸ›‘οΈSecurity
      • πŸ”Encryption - FiveM Escrow
      • πŸ†•Changelogs
    • βš™οΈConfiguration Settings
      • βš™οΈMaster Config
      • βš™οΈCamera & Jammer Config
        • βš™οΈItems
        • βš™οΈCamera Settings
      • βš™οΈSecurity Config
      • βš™οΈDiscord Logs Config
    • ‡️Base Installation
    • πŸ›‘οΈSecurity Integration
    • ⬅️Exports
  • 🏦Pacific Bank Robbery
    • πŸ“šAbout PBR
      • πŸ’β€β™€οΈFeatures
        • πŸ‘¨β€πŸ‘©β€πŸ‘¦Ped Handler & Security Guards
        • πŸ’‘Vault Breaching Methods
        • πŸ”’Laser Security System
        • πŸ’°Stealables & Robbery Mechanics
        • πŸšͺDoorlocks & Alarm System
        • πŸ–₯️Server Synchronization
        • πŸ› οΈExtensive Configurations
      • πŸ”Dependencies & Compatibility
      • ⚑Optimization
      • πŸ›‘οΈSecurity
      • πŸ”Encryption - FiveM Escrow
      • πŸ†•Changelogs
    • βš™οΈConfiguration Settings
      • βš™οΈMaster Config
      • βš™οΈBank Config
      • βš™οΈSecurity Config
      • βš™οΈDiscord Logs Config
    • ‡️Base Installation
    • ⬅️Exports
  • 🏦Paleto Bank Robbery
    • πŸ“šAbout PBR
      • πŸ’β€β™€οΈFeatures
        • πŸ‘¨β€πŸ‘©β€πŸ‘¦Ped Handler & Security Guards
        • πŸ’‘Vault Breaching Methods
        • πŸͺ›Locker Drilling
        • πŸ’°Stealables & Robbery Mechanics
        • πŸšͺDoorlocks & Alarm System
        • πŸ–₯️Server Synchronization
        • πŸ› οΈExtensive Configurations
      • πŸ”Dependencies & Compatibility
      • ⚑Optimization
      • πŸ›‘οΈSecurity
      • πŸ”Encryption - FiveM Escrow
      • πŸ†•Changelogs
    • βš™οΈConfiguration Settings
      • βš™οΈMaster Config
      • βš™οΈBank Config
      • βš™οΈAI NPC Config
      • βš™οΈSecurity Config
      • βš™οΈDiscord Logs Config
    • ‡️Base Installation
    • ⬅️Exports
  • 🚘The Complete Vehicle System
    • πŸ“™About TCVS
      • πŸ’β€β™€οΈFeatures
      • πŸ”Dependencies & Compatibility
      • ⚑Optimization
      • πŸ›‘οΈSecurity
      • πŸ”Encryption - FiveM Escrow
      • πŸ†•Changelogs
    • ‡️Base Installation
    • βš™οΈConfiguration Settings
      • βš™οΈMaster Config
      • βš™οΈSecurity Config
      • βš™οΈDiscord Logs Config
      • βš™οΈPublic Garages Config
      • βš™οΈPrivate Garages Config
      • βš™οΈImpound Config
      • βš™οΈInsurance Config
      • βš™οΈParts Config
      • βš™οΈLocksystem Config
      • βš™οΈTrackers Config
      • βš™οΈVehicle Info Config
    • πŸš—Vehicle Shop Integration
    • πŸ‘¨β€πŸ”§Mechanic Integration
    • πŸ›‘οΈSecurity Integration
    • πŸš€Snippets
      • β­•QB-RadialMenu
    • ⬅️Exports
Powered by GitBook
On this page
  • Obtaining The Security Code
  • Using the Security Code
  • Server To Server Event Execution

Was this helpful?

  1. The Complete Vehicle System

Security Integration

Learn how to use our built-in TCVS security exports and events.

To ensure the security and integrity of server events within TCVS, a unique security code for each server event must be included as the first parameter when triggering any of TCVS' server events. This measure is designed to authenticate the source of the event call, reducing the risk of unauthorized access and manipulation.

Obtaining The Security Code

You can obtain the necessary security code for an event by utilizing the following code snippet. This example demonstrates how to retrieve the security code for the :server:impoundCheck event, but it can be adapted for any TCVS server event by replacing the event suffix with the one relevant to your needs.

CLIENT-SIDED

local security = GetEventCode(GetCurrentResourceName(), GetEventPrefix(GetCurrentResourceName()) .. ":server:impoundCheck")
local eventPrefix = GetEventPrefix(GetCurrentResourceName())

Using the Security Code

Once you have obtained the security code, include it as the first parameter when triggering the server event. Here’s how you can do it for the :server:impoundCheck event.

CLIENT-SIDED

TriggerServerEvent(eventPrefix .. ":server:impoundCheck", security)

Server To Server Event Execution

When triggering events from server to server, it's important to note that the security exports designed for client-server communication do not apply. Since these security measures are specifically registered through the client, server-to-server event triggering bypasses the need for a security code.

For server-sided event execution, instead of generating a security code, you should directly use the number 1 as the first parameter. This approach simplifies the process while maintaining the structured call pattern for events.

SERVER-SIDED

TriggerEvent(Security.EventPrefix .. ":server:impoundCheck", 1)
PreviousMechanic IntegrationNextSnippets

Last updated 1 year ago

Was this helpful?

🚘
πŸ›‘οΈ