Forum

> > CS2D > Scripts > CS2D lua "extended mod"
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch CS2D lua "extended mod"

7 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt CS2D lua "extended mod"

MAX-russia
User Off Offline

Zitieren
I was working on this extension but it's not working.Because there is no special command for the mod,or I'm doing something wrong.

I made a dll file in cs2d\sys\lua_e\sample.dll -application extension file(command and command's settings)
Create a lua file in cs2d\sys\lua_e\sample.lua -lua with command from dll file
Add a text in cs2d\sys\lua\server.lua -
1
2
dofile("sys/lua_e/sample.dll")
dofile("sys/lua_e/sample.lua")

And i made in cs2d every thing to make the lua work,and nothing isn't working.Please help !

link - www.mediafire.com/?oiqg5x9520z29kk
1× editiert, zuletzt 16.09.11 18:22:32

alt Re: CS2D lua "extended mod"

Yasday
User Off Offline

Zitieren
"Dofile" won't work with ".dll" files.

1
2
3
4
5
6
function loadbinaries()
	local f, e, d = package.loadlib("module.dll", "init")
	if e then error("loadbinaries(" .. d .. "): " .. e) return os.exit() end
	return f()
end
loadbinaries()

This is what I'm using.

alt Re: CS2D lua "extended mod"

Yasday
User Off Offline

Zitieren
You can't just write a .dll file in Lua.
You can write some code in C and then compile it to a dll, like I did.

alt Re: CS2D lua "extended mod"

palomino
User Off Offline

Zitieren
user Yasday hat geschrieben
You can't just write a .dll file in Lua.
You can write some code in C and then compile it to a dll, like I did.

Aren't dll files written in C++?
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht