Is using SQLite in FiveM scripts possible utilizing Lua?

The title basically says all. I want to use SQLite, but I’m not sure if it’s possible to use within the Lua language in FiveM scripts? I believe I read somewhere that the require keyword no longer works in scripts a long while back ago. Just looking for some insight/direction, thanks!

Best Regards,
Badger

It’s now almost a year later.

Did you find a viable way to do SQLite?

Sadly not :frowning:

Dangnabbit. I guess it’s time to do some C# and export some functions.
With something this trivial, it seems odd nobody has already done it.

Feels like there is some roadblock I’m not seeing yet.

1 Like

I asked around and it turns out you can use sql.js just fine.

It’s just… I… I’m too dumb to understand how it works.

1 Like

I know this post is old, but I just released a sqlite database resource that you can use from lua.

Its basically just a wrapper for sql.js with lua exports.

You can check it out here: [free] [standalone] sqlite database

1 Like