PDA

View Full Version : Cod4 install libcod and make the mod



balaz98
28th December 2013, 20:36
Hello! I trying to install your libcod, but any files is missing, or i don't know...

Pls help me, how to use to githube scripts?
( https://github.com/kungfooman/libcod )
Where I find this "read me", or install guide.

And I where find the files
( http://killtube.org/showthread.php?1572-CoD4-MySQL-problem )
There I find this files, thats is not found for me server.
libmysqlclient.a libmysqlclient.so libmysql.so.16
libmysqlclient_r.so libmysql.so libmysql.so.16.0.0

And if I finish this install, i trying to make a mod with mysql commands...
Because I run my server with my now files and no error, but not work this...
mysql = std\mysql::mysql_real_connect(std\mysql::mysql_ini t(), "ip", "uss", "pw", "db", "port");
std\mysql::mysql_query(mysql, "INSERT INTO `clansys`.`players` (`id` ,`name` ,`score` ,`kills`)VALUES (NULL , 'a', 'a', 'a');");
std\mysql::mysql_close(mysql);

Thank you, and Merry Mristmass!

kung foo man
28th December 2013, 20:51
Hey, do you have main\std\mysql.gsc already?

http://killtube.org/downloads/cod2/exampleserver/main/std/mysql.gsc

balaz98
28th December 2013, 22:49
I would like to request a complete file map, file to the correct place.
COD4 would be used to create a way to ask for a sample of what you need plus mode put into it.

kung foo man
28th December 2013, 23:06
I have no clue whats actually wrong, since you didn't post any errors. Which commands did you try yet and how did they fail (post output)?

All needed commands are written on the start page: https://github.com/kungfooman/libcod (you dont need to compile it, just use the binaries)

Files you need: libcod.so (for your CoD version) and the helper .gsc files (just std\mysql.gsc in your case)

balaz98
28th December 2013, 23:15
All right.
The problem is that the error does not require a server.
I do not know where to put the files you download, and what files you need CoD4 7.1.
Not to be placed in the file linux / home/cod4 / inside?

I'm sorry if I sound stupid but we are looking for a solution for several days, now found, but we can not put into operation.

balaz98
29th December 2013, 10:16
Actually I do not have such folder, nor can I find between downloads.
libc / mysql

These files can be included, these results do not download.
libmysqlclient.a
libmysqlclient.so
libmysql.so.16
libmysqlclient_r.so
libmysql.so
libmysql.so.16.0.0
This can be a source of error.

The mysql.gsc placed here.
cod4/mods/MyMod/std/mysql.gsc

This is the test script:
#include std\mysql; // at the beginning

mysql_test () {
mysql_init = mysql ();
ret = mysql_real_connect (mysql, "---", "---", "---", "---", "---") // correctly completed course
if (ret) {
iprintln("errno =" + mysql_errno (mysql) + "error ='' '+ mysql_error (mysql)); // does not show anything
mysql_close(mysql);
}
ret = mysql_query (mysql, "INSERT INTO` players `(` id `,` name `,` score `,` kills `) VALUES (NULL, '0 ', '0', '0 ')") / / verifying correct
mysql_close(mysql);
}
The game server does not return an error log screen shows no error, server works, you can play it, mysql query ineffective on the board.

kung foo man
29th December 2013, 19:03
The game server does not return an error log screen shows no error, server works, you can play it, mysql query ineffective on the board.

You should see a starting message like:



> [INFO] Compiled for: CoD2 1.0
Compiled: Dec 17 2013 19:42:16
> [INFO] value of closer=08111d32
> [PLUGIN LOADED]
CoD2 MP 1.0 build linux-i386 Oct 24 2005


Otherwise some LD error/warning

How does your start script look like?

balaz98
29th December 2013, 20:46
No such message CoD4 log in screen.
However, do not start an error.
I use startup:
LD_LIBRARY_PATH="/home/libcod/" LD_PRELOAD="./libcod4_1_7.so" screen -AdmSL cod4server ./start +set dedicated "2" +set fs_basepath "/home/cod4/" +set fs_homepath "/home/cod4/" +set fs_game "mods/MyMod" +map mp_strike

kung foo man
29th December 2013, 21:08
That's now easier than expected ^^

You basically try to load libcod.so in the process of "screen". You need to start a server.sh INSIDE of screen, which LD_PRELOAD's libcod.so for "cod4-lnxded-bin" then (make sure you dont use the script infront of cod4-servers)


helper.sh


LD_LIBRARY_PATH="/home/libcod/" LD_PRELOAD="./libcod4_1_7.so" ./cod4-lnxded-bin +set dedicated "2" +set fs_basepath "/home/cod4/" +set fs_homepath "/home/cod4/" +set fs_game "mods/MyMod" +map mp_strike


server.sh


screen -AdmSL helper.sh

balaz98
29th December 2013, 22:36
A short time later, I realized what a mistake, thank you.
However, now I see this:
> [WARNING] Compiled for: 417
Compiled: Dec 28 2013 20:04:50
> [INFO] = value of closer 080c206e
./start: symbol lookup error: ./libcod4_1_7.so: undefined symbol: cracking_hook_function

IzNoGoD
29th December 2013, 22:58
Feels like the cod2 extension for cracking your serv through libcod was not properly ifdeffed

kung foo man
30th December 2013, 00:58
You compiled that binary for yourself? Try some precompiled binary from here: http://dbg.killtube.org/libcod/libs/