Exports & API
Core Mechanic exposes the following exports for integration with other scripts.
Client Exports
client
exports['core_mechanic']:getNitro()Returns the current nitro health/level of the player's vehicle. Returns 0 if no nitro is installed.
Returns:
numberExample
lua
local nitroHealth = exports['core_mechanic']:getNitro()
if nitroHealth > 0 then
print('Nitro health:', nitroHealth)
else
print('No nitro installed')
endclient
exports['core_mechanic']:getGear()Returns the current gear the player's vehicle is in. Used for manual transmission integration with HUD scripts or other displays.
Returns:
numberExample
lua
local currentGear = exports['core_mechanic']:getGear()
print('Current gear:', currentGear)