The code is supposed to be adding to libcod. See https://github.com/kungfooman/libcod. (you will need to be able to edit your start up line for this to work. Also linux only)
But i never got around to test that code.
In https://github.com/kungfooman/libcod...er/libcod.cpp:
Add after 'char * hook_AuthorizeState( int arg ) { **** }' (line 1446)
Add this before #ifdef IS_JAVA_ENABLED (line 2022)PHP Code:
int hook_StateCompare(char * state, char * base)
{
if ((CvarVariableValue == NULL || CvarVariableValue("sv_cracked") == 1) && strcmp (state, "deny") == 0) // when sv_cracked 1 and deny state
{
if(strcmp(base, "accept") == 0) // when compare value is accept return true
return 0;
else
return 1; // when compare to value is deny return false
}
return strcmp(state, base);
}
Note: This code hasn't be tested so it might be that it could crash your game server. (cod4_lnxded)PHP Code:
#if COD_VERSION == COD4_1_7
cracking_hook_call(0x0816FF42, (int)hook_StateCompare);
cracking_hook_call(0x081701D6, (int)hook_StateCompare);
#endif
Edit: try this binary at http://znation.nl/libcod/
Hi Mitch,
Thanks for your reply. Well, i downloaded this file here: http://znation.nl/libcod/, so what to do with this now?
KB
I added a nomysql version (less work to install).
Download http://znation.nl/libcod/libcod4_1_7_nomysql.so and upload it next to your cod4 binary.
Modify your startup line to:
(LD_LIBRARY_PATH might be optional)PHP Code:
LD_LIBRARY_PATH=. LD_PRELOAD=libcod4_1_7_nomysql.so ./cod4_lnxded ...your other parameters here...
kung foo man (14th June 2014)
When you say "next to your cod4 binary" you mean the cod4_lnxded (cracked file or original file?)
Thanks,
KB
No need for cracked lnxded file when you have sv_cracked with libcod
but ye, next to that file
"Does not work" is an error report for a bug between keyboard and chair.
All hail Artie Effem
Hi guys, a friend of mine has cod 4 legit game and when he start original server, but when people like me with cracked game try to join it says key code in use. When he starts cracked server everyone can join but need to have server ip adress cuz it dont shows up in the master server list, I followed the tutorial with hex editor and edited cracked server.exe now the server shows but says key code in use on cracked games. How to fix that.
I tested my libcod cracked version for cod4, but it doesn't work yet. The server is currently rejecting the connection because of mismatched guid.
Edit: fixed the rejecting connection now
https://github.com/M-itch/libcod/com...a9923472725116
Download ('set sv_cracked 1' to enable semi-cracked)
1.7: http://znation.nl/libcod/libcod4_1_7.so
1.7 (query limit): http://znation.nl/libcod/libcod4_1_7_l.so
I couldn't test it completely, because I am having trouble with my previous cod4 installation. I need to install cod4 correctly.
kung foo man (9th November 2014)
In the coming days Ill try to make my servers available by the second libcod file.
Right me if Im wrong - my starting commands should be like this? :
Code:LD_LIBRARY_PATH=. LD_PRELOAD=libcod4_1_7_l.so ./cod4_lnxded +set sv_punkbuster "0" + set net_port "28968" +exec hc.cfg +map_rotate