Files

> > CS2D > Misc. > LuaSQL CS2D (win32) OUTDATED
Files overviewCS2D overviewMisc. overview

English LuaSQL CS2D (win32) OUTDATED >

23 comments864 kb, 630 Downloads

old LuaSQL CS2D (win32) OUTDATED

Marcell
Super User Off Offline

illegal OUTDATED, DO NOT USE illegal

Instead, you can use @user MikuAuahDark: 's LuaJIT with LuaPower's MySQL libraries.

Today i'd like to share what i made today, to get work MySQL-connection via LUA under Counter-Strike 2D.

Features:
> Store informations in database, delete, or load these
> Website-features(UCP)
> Advanced scripting
> New-type admin system
> Other

Website:
http://www.keplerproject.org/luasql/

> Connection Example:
1
env:connect(sourcename[,username[,password[,hostname[,port]]]])

Install:
Copy file "mysql.dll" to cs2d "luasql" folder.
Copy files "libmysql.dll, lua5.1.dll" to C:\Windows\System32 folder

May you should register these files via regsvr32
edited 10×, last 19.04.21 02:06:26 pm
Approved by EngiN33R

Download Download

864 kb, 630 Downloads

Comments

23 comments
Page
To the start Previous 1 2 Next To the start

Log in!

You need to log in to be able to write comments!Log in

old

Marcell
Super User Off Offline

@user Starkkz: I can, but it's pretty useless. (since it's old and for windows)

But fixed.

old

Starkkz
Moderator Off Offline

Could you make the video public, please?
I like it!

old

Spartandu
BANNED Off Offline

Cool!
I like it!

old

BATTLEKOT
User Off Offline

Wow! Very cool program. Thank!
I like it!

old

Thug Life
User Off Offline

NULL has written
Great contribution, but most of kids like G-Unit won't simply get it

Is obvious that you've a problem with me. I think you've nightmares with me. Take some pills and let alone this obsession with me

About that LuaSQL, is very good.
I like it!

old #Nice

krto
User Off Offline

this script will be at the top
I like it!

old

Happy Camper
User Off Offline

I found a workaround for my own question below. If you build the shared lib from source and link it with the object files for Lua itself, it works. I now have a working Lua SQLite 3 lib for Linux. It's similar to Lua SQL, except that it only supports SQLite 3, of course. If someone is interested in trying it, send me a PM.
I like it!

old Storing data in a SQL DB

KimKat
GAME BANNED Off Offline

I'm sure you could have a database server running as a background job on Linux rather easily just invoke (&) ampersand at the end of the command. After the script handler filename or the like, just make sure it runs in the background and ensure it's functional. The script handler will then deal with the data that comes in and hopefully securely sanitize the data as it comes into the database.

Although obviously you'd have to install some type of SQL database server on the PC (this works for Windows too, don't worry). I'd pick preferebly SQLite3 or MySQL, since SQLite3 is more file-based in a way. I'm quite sure that it can work flawlessly when done right. No need to cry over spilled milk but I've noticed that some aren't able to set things up like I do nor are they willing to experiment with what you can do as it's all free methods in the means of downloading and installing. Anyways there's various ways to do things with databases and this is just how I would of done it. It may seem like a "horrible" idea at first glance but at least it works and you don't see me complaining.
I like it!

old

Happy Camper
User Off Offline

Very interesting project. I tried to get CS2D working with sqlite3 on Linux, but I get: undefined symbol: lua_settop. From this link I draw the conclusion that CS2D needs to be linked with the flags -Wl,--export-dynamic. Does anyone know if there's a workaround or would we have to ask some help from DC in order to be able to use external Lua libs on Linux?
I like it!
edited 1×, last 19.10.13 06:04:37 pm

old

Marcell
Super User Off Offline

Thanks for all!

Got idea from SA-MP, by Pawn scripts (same as lua) which also could connect to MySQL, and it's can be useful if you run some roleplay server

Edit:

If someone wants linux version i can post it, but no time to test it, cause i have no another machine yet, and i don't want to install linux for this pc just this why..
edited 3×, last 16.10.13 02:51:30 pm

old

KimKat
GAME BANNED Off Offline

@user ohaz: Well, just don't over do it. Wine is very good to be honest. It's a compatability layer. It's better than not being able to run anything at all.

It seems user Marcell won't provide anything else, so either go here to download Lua libraries and executables which are cross-platform and try to fix it yourselves or don't.
I like it!

old

ohaz
User Off Offline

Good idea, just pretty useless since it's windows only.
@user KimKat: What. Using wine under linux to run a cs2d dedicated with some random dlls. Really? That's almost like running a virtual machine with windows on it on your linux server (which probably is just a virtual machine itself) to run the cs2d server in there...

@user Marcell: Rather add linux compatibility (you can just use the mysql libraries for linux)

old Great stuff.

KimKat
GAME BANNED Off Offline

Pretty cool submission user Marcell. Will be useful to store user information for Lua scripts and the likes.

@user EngiN33R: On Linux you could have Wine to emulate the Lua MySQL stuff rather easily. You could even emulate CS2D with this thing along with Lua MySQL directly. This page will tell you how to do that. Either way user Marcell would be great if you could create some Winelibs for this as it'd simplify things. For more information on running things on Linux, BSD, Solaris and Mac OS X then go to Wine website.

If you use Wine to emulate software. You can place the DLL files by default into this path right here...
1
~/.wine/drive_c/windows/system32/
I like it!

old

EngiN33R
Moderator Off Offline

It's nice and all, though a majority of serious servers run on Linux machines. The libraries you provide are Windows-only, which significantly narrows down the target audience. If you really want to make a good project, you should find time for it.
I like it!

old

StirlizZ-Fapicon
Super User Off Offline

very specifical script, like for (possibly) hard work, but I can't see where it useful
I like it!

old

Marcell
Super User Off Offline

Then?
I published it, and anybody can use it..

old

MikuAuahDark
User Off Offline

I think that i already create something like this, but it's private.

old

Marcell
Super User Off Offline

@user FlooD: There is SQLite too. but that should be compiled, and i don't have time for it, sorry.

@user EP: Thanks!

old

EP
User Off Offline

i like it i like it
I like it!
To the start Previous 1 2 Next To the start