English [Salad Fingers] LuaSQL /WIN/ icon

23 comments
16.10.13 01:51:20 am
like 12 like it!
864 kb, 163 Downloads
sqpp15
Super User
Offline Off
Welcome!

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

IMG:http://i43.tinypic.com/dz6ohi.png


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:
Code:
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

Youtube video from connection:
http://www.youtube.com/watch?v=x-4SfTN4ax4

Enjoy!
edited 6×, last 03.04.14 07:15:50 pm
ok This file has been reviewed and approved by EngiN33R (03.12.15 08:12:03 pm)

Comments

23 comments
Goto 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
10.05.17 12:13:54 pm
Up
sqpp15
Super User
Offline Off
@user Starkkz: I can, but it's pretty useless. (since it's old and for windows)

But fixed.
28.10.16 11:18:38 pm
like I like it!
Up
Starkkz
Moderator
Offline Off
Could you make the video public, please?
21.08.14 12:02:52 am
like I like it!
Up
Spartandu
BANNED
Offline Off
Cool!
07.02.14 01:03:12 pm
like I like it!
Up
BATTLEKOT
User
Offline Off
Wow! Very cool program. Thank!
21.10.13 07:15:06 pm
like I like it!
Up
Thug Life
User
Offline Off
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.
19.10.13 07:52:30 pm
like I like it!
Up
krto
User
Offline Off
this script will be at the top
19.10.13 06:02:07 pm
like I like it!
Up
Happy Camper
User
Offline Off
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.
19.10.13 02:14:16 pm
like I like it!
Up
KimKat
GAME BANNED
Offline Off
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.
17.10.13 10:56:12 pm
like I like it!
Up
Happy Camper
User
Offline Off
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?
edited 1×, last 19.10.13 06:04:37 pm
16.10.13 05:38:00 pm
like I like it!
Up
oxytamine
User
Offline Off
@user KimKat:
It is bloody retarded what you want to do. Wine is shit.
16.10.13 02:36:19 pm
Up
sqpp15
Super User
Offline Off
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
16.10.13 01:25:53 pm
like I like it!
Up
KimKat
GAME BANNED
Offline Off
@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 sqpp15 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.
16.10.13 01:03:42 pm
Up
ohaz
User
Offline Off
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 sqpp15: Rather add linux compatibility (you can just use the mysql libraries for linux)
16.10.13 11:47:00 am
like I like it!
Up
KimKat
GAME BANNED
Offline Off
Pretty cool submission user sqpp15. 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 sqpp15 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...
Code:
1
~/.wine/drive_c/windows/system32/
16.10.13 10:10:16 am
like I like it!
Up
EngiN33R
Moderator
Offline Off
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.
16.10.13 08:27:10 am
like I like it!
Up
StirlizZ-Fapicon
Super User
Offline Off
very specifical script, like for (possibly) hard work, but I can't see where it useful
16.10.13 07:31:10 am
Up
sqpp15
Super User
Offline Off
Then?
I published it, and anybody can use it..
16.10.13 07:26:34 am
Up
MikuAuahDark
User
Offline Off
I think that i already create something like this, but it's private.
16.10.13 06:39:20 am
Up
sqpp15
Super User
Offline Off
@user FlooD: There is SQLite too. but that should be compiled, and i don't have time for it, sorry.

@user EP: Thanks!
16.10.13 04:02:14 am
like I like it!
Up
EP
User
Offline Off
i like it i like it
To the start Previous 1 2 Next To the start