multitheftauto / amx

MTA AMX compatibility layer.
zlib License
31 stars 8 forks source link

MySQL in SAMP #39

Closed Disinterpreter closed 4 years ago

Disinterpreter commented 4 years ago

Is your feature request related to a problem? Please describe. Many people connect the mysql with their gamemodes. But there isn't internal mysql-connector, so people use plugins (in samp people use plugins everywhere).

The most popular plugin for MySQL is a MySQL plugin from BlueG

Describe the solution you'd like I suggest the make a native support for methods from this plugin.

It is low priority proposal, because people can use plugins in the emulator.

Additional context https://github.com/pBlueG/SA-MP-MySQL https://wiki.sa-mp.com/wiki/MySQL

colistro123 commented 4 years ago

I have been using BlueG's plugin just fine (R41-2). The only thing that was missing was the ProcessTick function, which was fixed early on. I'm using the one at this commit:

https://github.com/pBlueG/SA-MP-MySQL/commit/c96ca7151062935d8e64cb7827866f388a88d85a

There's an important thing to know which is that plugin natives don't need to be added to syscalls.lua hence why you might have not seen any.

Disinterpreter commented 4 years ago

There's an important thing to know which is that plugin natives don't need to be added to syscalls.lua hence why you might have not seen any.

Yes, I know about plugins. But I mean we can make all BlueG methods over MTA db* functions. In future. But I'm not sure about it, so I created this issue. We can close the issue if it won't need for us.

theSpool commented 4 years ago

SA-MP's MySQL plugin has a unique and extensive API, larger than MTA's, even with something similar to an ORM, so it would be unfeasible to emulate it in its entirety. Also, AMX benefits from less overhead when using SA-MP plugins (AMX <-> C++ instead of AMX <-> C++ <-> Lua <-> C++ from MTA Server).

That said, for interoperability purposes, it would be a good thing to have MTA's db functions added as natives in a_amx.inc in a future.

qaisjp commented 4 years ago

Gonna close this for the reason above but perhaps later we can integrate proper db functions / create an issue for it. (There's an endless number of issues we can create for exposing MTA's Lua API, so I'm not rushing to create a new one now.)