legendsSystems
  • 👋Welcome
  • 💯Zed Hosting
  • Scripts-Free
    • legendsMultijob
      • Installation
      • Configuration
      • Common Issues
    • legendsNewsPaper
      • Installation
      • Configuration
      • Common Issues
  • Scripts-Paid
    • legendsATMRobbery
      • Installation
      • Configuration
      • Common Issues
    • legendsDyno
      • Installation
      • Configuration
      • Common Issues
    • legendsLogging
      • Installation
      • Configuration
      • Common Issues
    • legendsPlayerMenu
      • Installation
      • Configuration
      • Common Issues
    • legendsWeather
      • Installation
      • Configuration
      • Common Issues
    • legendsConcert
      • Installation
      • Configuration
      • Common Issues
  • Guides
    • legendsCaching
    • legendsTuning
      • Threads
  • Developer Tools
    • legendsEntityViewer
      • Installation
      • Configuration
      • Common Issues
  • Dev Tricks
    • consoleTricks
    • convarTricks
    • debuggingTricks
      • Installation
      • Configuration
      • Common Issues
    • vscodeExtensions
      • FiveM QBCore Snippets
Powered by GitBook
On this page
  1. Dev Tricks

convarTricks

Use these values in other scripts configurations.

server.cfg (Dev Server)
setr CopsRequired 0
setr CopsNeeded 0
server.cfg (Live Server)
setr CopsRequired 1
setr CopsNeeded 2
config.lua
Config.CopsRequired = GetConvarInt("CopsRequired", 1) == 1
Config.CopsNeeded = GetConvarInt("CopsNeeded", 2) == 2

This way you can test illegal activities on Dev without having to go back and make changes before you go live

Why not use a Boolean value for CopsRequired? Since LUA processes them both as false, isn't it the same? Technically yes, but LUA processes Int values much faster than Boolean values.

PreviousconsoleTricksNextdebuggingTricks

Last updated 11 months ago