Hello,help me with run the libcod on windows,please.
Printable View
Hello,help me with run the libcod on windows,please.
Have you tried anything?
The current version only supports cod2 1.3.
Download the dll from this post.
http://killtube.org/showthread.php?1...ll=1#post10310
Or compile it yourself from https://github.com/M-itch/libcod_win using CodeBlocks.
(copy the dll next to your server.exe)
(You might need https://github.com/M-itch/libcod_win...b/libmysql.dll too)
Now use kung's InjectLibcod.bat to inject libcod.
So how i can run it in cod2 1.0?
there a version 1.0?
I will post that tutorial and this one too later today.
Edit: this is for only adding the real functions. I still need to make the part for reading the parameters and the return function.
Edit 2: moved tutorial to a new thread.
http://killtube.org/showthread.php?2...ur-cod-version
Why libcod dont work?
Attachment 835
Attachment 836
what did you mean?
Pls help me with run libcod on windows.
Try this in your _menus.gsc
Now in game type this in your console:PHP Code:
onMenuResponse()
{
for(;;)
{
self waittill("menuresponse", menu, response);
//iprintln("^6", response);
if(response == "libcodtest")
{
self iprintln("IP: " + self getIP());
self iprintln("Ping: " + self getPing());
self iprintln("Jump: " + self jumpButtonPressed());
self iprintln("Velocity: " + self getVelocity());
}
if(response == "libcodtest2")
{
self setVelocity((0,0,1000));
}
/openscriptmenu -1 libcodtest
/openscriptmenu -1 libcodtest2
Error:Unknown Function.Quote:
if(response == "libcodtest")
{
self iprintln("Velocity: " + self getVelocity());
}
if(response == "libcodtest2")
{
self setVelocity((0,0,1000));
}
If i put
And use in game console:Quote:
getVelocity()
{
player = self;
functionid = 1;
playerid = player getEntityNumber();
ret = closer(functionid, playerid);
//iprintln("ret=", ret);
return ret;
}
setVelocity(velocity)
{
player = self;
functionid = 0;
playerid = player getEntityNumber();
x = velocity[0];
y = velocity[1];
z = velocity[2];
ret = closer(functionid, playerid, x, y, z);
}
/openscriptmenu -1 libcodtest or /openscriptmenu -1 libcodtest2
Nothing happens
We aren't using closer anymore for our functions in libcod.
You can now just call 'player getVelocity()' when libcod has been loaded.
(Windows supports only the basic functions compared to Linux version)
(Short support list: mysql_..., Cmd_ExecuteString, printf, ..Velocity, ...ButtonPressed, getPing, getIP)
help me)
Attachment 837
Don't start your server with "map command" and then inject the .dll-file. After that, you can load a map (which will load the scripting engine). Otherwise you want to use functions, which are not registered yet.
I start server
getVelocity() work but setVelocity and getIP() and other functions kill my server.Why?
Define "crash my server"... does it crash at runtime? Does it crash start? Any error message?
When getVelocity() works but no other functions, I suspect you still have the closer-stuff in.
Start the server without setting the map. Then inject dll. Start a map and it works