LEGACY SCRIPT
  • 💻LEGACY SCRIPT DOCUMENTATION
  • 🆓FREE RELEASE
    • 🏦LGF_BANKING
      • 🎲CONFIGURATION (CONVARS)
      • 🧠INSTALLATION
      • 🖋️FUNCTIONS
      • ✈️EXPORTS
    • 🚗ENT510 OX GARAGE
    • 🏠ENT510 HOUSING SYSTEM
      • ⚙️DEPENDENCY
      • 🛠️INSTALLATION
      • 🎮CONFIGURATION
    • 🦊ENT510 CHAT V1
      • 🛠️INSTALLATION
      • 🎮CONFIGURATION
      • 💻UTILITY
      • 🖇️INFORMATION
    • 🔫ENT510 CRIMINAL MENU
      • ⚙️DEPENDENCY
      • 🛠️INSTALLATION
      • 🎮UTILITY
      • 🖇️INFORMATION
    • 👕ENT510 BAG OUTFIT
      • ⚙️DEPENDENCY
      • 🛠️INSTALLATION
      • 💻UTILITY
      • 🖇️INFORMATION
  • 💰PAID RELEASE
    • 🚗ENT510 ADVANCED GARAGE
      • ⚙️DEPENDENCY
      • 🛠️INSTALLATION
      • 📦EXPORTS
    • 🌎LEGACY JOB CREATOR
      • ⚙️DEPENDENCY
      • 🛠️INSTALLATION
      • 🎮CONFIGURATION
    • 👕LGF CHAR CREATOR
      • 🏅EXPORTS / EVENT
  • 🌎LGF UTILITY
    • 👨‍💻INIT CORE
    • ✈️COMMON
      • 🌙CL COMMON REPLACEMENT
      • 🌙SERVER COMMON REPLACEMENT
      • 🌜CL COMMON REPLACEMENT (FRAMEWORK)
      • 🌜SV COMMON REPLACEMENT (FRAMEWORK)
    • 🔋ENTITY CACHE
      • 👩‍🔬CL CACHE
    • ⚒️FUNCTION UTILITY
Powered by GitBook
On this page
  1. LGF UTILITY

INIT CORE

EXPLANATION OF THE MAIN MODULE EXPORT

_ENV.LGF = lib.load(("modules.%s.main"):format(lib.context))

This line assigns the loaded main module to the application's environment variable _ENV.LGF by:

  • Dynamically Loading: It dynamically loads the main module using lib.load.

  • Path Construction: It constructs the path with ("modules.%s.main"), where %s is replaced by lib.context.

  • Environmental Assignment: The module is then assigned to _ENV.LGF for simplified access.

This approach allows seamless integration of the main module into the application environment.

Importing Modules

To directly import the modules in the fxmanifest.lua file, follow the guidelines provided below:

  • Import All Modules:

shared_scripts {
    '@LGF_Utility/init.lua',
}

Comprehensive fxmanifest.lua Example

fx_version 'adamant'
game 'gta5'

author 'ENT510'
version '1.0.0'
lua54 'yes'

shared_scripts {
    '@ox_lib/init.lua',
    '@LGF_Utility/init.lua',
    'shared/*.lua'
}

client_scripts {
    'client/*.lua',
}

server_scripts {
    'server/*.lua'
}
  • In this configuration, the fxmanifest.lua file incorporates the necessary modules and scripts

Last updated 1 year ago

🌎
👨‍💻