SkillAgentSearch skills...

Luaconsole

FiveM tool for testing LUA code at runtime

Install / Use

/learn @indilo53/Luaconsole
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

luaconsole

  • One-liner
  • Editor
  • Expression evaluator / Object explorer

screenshot

To integrate luaconsole with your resource, place this code in client / server or both :

AddEventHandler('luaconsole:getHandlers', function(cb)

  local name = GetCurrentResourceName()

  cb(name, function(code, env)
    if env ~= nil then
      for k,v in pairs(env) do _ENV[k] = v end
      return load(code, 'lc:' .. name, 't', _ENV)
    else
      return load(code, 'lc:' .. name, 't')
    end
  end)

end)

To access myResource client environnment, just type myResource instead of luaconsole

To access myResource server environnment, type @myResource instead of luaconsole

Known bugs :

  • Crash when passing huge table to explorer (right pane)

Don't start in server.cfg, instead ensure luaconsole when needed and stop it after

Alt + C for opening ingame console when loaded

Ctrl + Enter for running editor code

Related Skills

View on GitHub
GitHub Stars5
CategoryDevelopment
Updated2y ago
Forks1

Languages

JavaScript

Security Score

55/100

Audited on Mar 9, 2024

No findings