• Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Viking

  1. Confirmed. for me the screenshots are not saved in mods/mymod/screenshots anymore too. they are now in main/screenshots
  2. The latest ktk mod requires cod4x because I have added lots of new assets and little gametypes. The latest files were not released yet, simply because of the missing players & Feedback. The development server is: I will set up a github repro soon and release the latest files so maybe some more servers will show up. Last mod release Was in 2017 but i constantly worked on it until early 2021
  3. Never heard of sv_steamserverlogintoken, I have sv_authtoken in config. Do we have to change that or is it fine?
  4. I can not help much tbh, but maybe the lagometer is a start and can point you into the right direction. atleast it will show if it's Hardware or connection lags cg_drawlagometer
  5. Viking

    Lua Plugin

    The folder with the lua scripts has to be in the root folder of your server. So when your cod4x binary is in /home/cod4x/ then your lua script folder should be /home/cod4x/lua/ At least i never got it working outside the root folder
  6. Sadly i am not skilled enough to change the source in a way to achieve what you suggested. Is there anybody who could give this a try? Thanks in advance
  7. what's wrong with the teambalance of stock cod4?
  8. player setWeaponAmmoClip( "colt45_mp", 0 ); player setWeaponAmmoStock( "colt45_mp", 0 );
  9. Viking

    Spelling Mistake use that localized string in your mod and you will see.
  10. First of, why do you define the variables in unit()? When init runs then self is level, not a player. second, to stop it from running on every round restart add at check if its defined and return when it is. On first connection the variable is undefined
  11. Viking

    Spelling Mistake

    in the german Version of the game (not sure about others) the translation for "spanish" is "best"
  12. I did not check this in a while but on older cod4x versions there was sv_modstats or just modstats Iirc 0 forced the mod to use vanilla stats
  13. I really have no idea where to find that field. I also have no clue if it can be accessed or changed, that's why I came here. You guys know the source best. Edit: in entity.h i found the field, it's integer, but is that not just the Definition for Solid/non Solid if the model has a collmap?
  14. I don't host any servers anymore so i am sorry but i can not send you a parser file. You should see a rcon execution in your server log console_mp.log or qconsole.log when b3 sends a command. edit: found a backup of our old servers on my pc i've attached the two parser files. in b3 log you will see the command execution like this (because you type it in chat): 181128 17:27:30 CONSOLE '484:29 say;123hiddenguid456;12;Viking;!map mp_killhouse_2' and in server log it appears like this: Rcon from 123.hidden.ip.456:54653: map mp_killhouse_2 (the ip will be the ip of the machine the b3 tool is running at. cod4x.pyc
  15. Uhm, sorry for the dump question. What is the contentmask?
  16. check your b3 and server log for the rcon command b3 sends to the server. i guess it's either wrong (parser problem?) or not sent at all.
  17. I don't know, but i don't think so. The clips are added to the map source in radiant. If not, do you have an idea how to create a blocker (invisible wall - rectangle) to block one group only? I am working on a zombie map and would like to prevent the players to go outside the playarea but still allow the bots to enter/leave at same position.
  18. Hey guys, is it possible to change the bot code so they get blocked by clip_ai but not by clip_player. Right now they are handled like a real player and move through clip_ai but get blocked by clip_player. Cheers
  19. I added this to my main.c and also tried it within an inlcuded main.h Sadly i still get the undefined symbol: foo_bar_test error message when running the plugin on the server. GCC compiles fine. this example compiles a litte program, which works, but not a plugin for cod4x. i tried to add plugin support and now ended with gcc -m32 -c -fPIC source_a.c -o source_a.o gcc -m32 -c -fPIC source_b.c -o source_b.o gcc -m32 -c -fPIC source_c.c -o source_c.o gcc -m32 -shared -fPIC source_a.o source_b.o source_c.o -o bin/shared/ gcc -m32 -shared -fPIC main.c -L bin/shared -l test -o which results in Error: Sys_LoadLibrary error: cannot open shared object file: No such file or directory Error: Failed to load the plugin /home/viking/cod4/server/plugin.testplugin.tmp! where do i have to place the library to? edit: nvm, i have build a static library, now the exmaple plugin works. thanks
  20. This is what i have right now, just some test files yet... nothing great main.c #include "../pinc.h" #include <ctype.h> #include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> /*######################## functions of the plugin ########################*/ /*######################## required plugin init ########################*/ /*============ Function used to load the new functions and methods of the plugin ============*/ PCL int OnInit() { Plugin_Printf("^5Multiple Source Test Plugin"); foo_bar_test(); int valSrc_a = test_func_source_a(); int valSrc_b = test_func_source_b(); int valSrc_c = test_func_source_c(); Plugin_Printf("^5Multiple Source Test Plugin - done"); return 0; } /*============ Function used to obtain information about the plugin Memory pointed by info is allocated by the server binary, just fill in the fields ============*/ PCL void OnInfoRequest(pluginInfo_t *info) { // ===== MANDATORY FIELDS ===== info->handlerVersion.major = PLUGIN_HANDLER_VERSION_MAJOR; info->handlerVersion.minor = PLUGIN_HANDLER_VERSION_MINOR; // Requested handler version // ===== OPTIONAL FIELDS ===== info->pluginVersion.major = 1; // Plugin version info->pluginVersion.minor = 0; // Plugin sub version strncpy(info->fullName,"Test",sizeof(info->fullName)); //Full plugin name strncpy(info->shortDescription,"Test Desc Short",sizeof(info->shortDescription)); // Short plugin description strncpy(info->longDescription,"Test Dec Long",sizeof(info->longDescription)); // Long plugin description } source_a.c #include <ctype.h> #include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> int test_func_source_a() { Plugin_Printf("^5Called func in source_a"); return 1; } void foo_bar_test() { Plugin_Printf("^5foo_bar_test"); } source_b.c #include <ctype.h> #include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> int test_func_source_b() { Plugin_Printf("^5Called func in source_b"); return 2; } source_c.c #include <ctype.h> #include <stdio.h> #include <string.h> #include <math.h> #include <stdlib.h> int test_func_source_c() { Plugin_Printf("^5Called func in source_c"); return 3; }
  21. Hello, is it possible to build a plugin from multiple source files. I tried to create a library but still get a unknown symbol error for a function call, no matter if it's a static or a shared library. Maybe i have a fault in the compile process. Static try: #create static library gcc -m32 -c source_a.c -o bin/static/source_a.o gcc -m32 -c source_b.c -o bin/static/source_b.o gcc -m32 -c source_c.c -o bin/static/source_c.o ar rcs bin/static/libtest.a bin/static/source_a.o bin/static/source_b.o bin/static/source_c.o #link the static library and build the final plugin gcc -m32 -shared -L bin/static -l test -fPIC main.c -o Shared try: #create shared library gcc -m32 -c -fPIC source_a.c -o bin/shared/source_a.o gcc -m32 -c -fPIC source_b.c -o bin/shared/source_b.o gcc -m32 -c -fPIC source_c.c -o bin/shared/source_c.o gcc -m32 -shared bin/shared/source_a.o bin/shared/source_b.o bin/shared/source_c.o -o bin/shared/ #link the shared library and build the final plugin #gcc -m32 -shared -L bin/shared -l test -fPIC main.c -o both compiles fine but fail on server launch with this error: ]./cod4x18_dedrun: symbol lookup error: /home/viking/cod4/server/plugin.testplugin.tmp: undefined symbol: foo_bar_test edit: i have the plugin in cod4x folder only, in case this info is needed.
  22. The iprintlnbold was just a fast example because that memory address was public in the source on github. As mentioned i would like to replace a non gsc function with a new one in a plugin. CMD_Score_f() to be exact I just dont understand how to execute my function from the plugin instead of the function coming within the binary. A plugin is what i want because i dont want to compile a new cod4x server whenever you release an update.
  23. What i want to do is to replace a stock function with a custom one in a plugin. not a function you can use in gsc. I think the correct term is jump or function-hook.
  24. Hey guys, I found two interesting functions in the cod4x source which might help me to realise a plugin i have in mind. Can you explain how to use setCall and setJump? Whenever i use them the server crashs with a segmentation fault. They can be found here: My input looks like that: setJump(0x80aa1cc, Test_Function); where 0x80aa1cc is the memory address of iprintlnbold and Test_Function a new function (void) i wanted to call for a test. Thanks.