Viking

Members
  • Content Count

    443
  • Joined

  • Last visited

  • Days Won

    17

Viking last won the day on May 4

Viking had the most liked content!

Community Reputation

41 Excellent

About Viking

  • Rank
    Senior Member

Converted

  • Site
    https://discord.gg/wDV8Eeu

Recent Profile Visitors

2033 profile views
  1. 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
  2. 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?
  3. 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.py cod4x.pyc
  4. Uhm, sorry for the dump question. What is the contentmask?
  5. 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.
  6. 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.
  7. 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
  8. 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/libtest.so gcc -m32 -shared -fPIC main.c -L bin/shared -l test -o testplugin.so which results in Error: Sys_LoadLibrary error: libtest.so: 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
  9. 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; }
  10. 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 testplugin.so 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/libtest.so #link the shared library and build the final plugin #gcc -m32 -shared -L bin/shared -l test -fPIC main.c -o testplugin.so 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.
  11. 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 https://github.com/callofduty4x/CoD4x_Server/blob/0581a7dc6c53b834877103e5982d9c8ab845b3c3/src/g_cmds.c#L708 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.
  12. 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.
  13. 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: https://github.com/callofduty4x/CoD4x_Server/blob/202c06a7d6c970d258ecb84184114a726a524f8d/src/sys_patch.c#L127 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.
  14. Viking

    xbox 360 controller

    cod4 has no controller support by default.