Sorry for bump, but im really interest in this. So for now you get damage, meleedamage, firetime and speed working?
EDIT: You added it here: https://github.com/M-itch/libcod/com...0f04c343e27dff
I must add all the green and red parts to my own gsc.cpp and gsc_utils.cpp and then compile it?
Last edited by Ni3ls; 3rd September 2015 at 08:28.
Ni3ls (3rd September 2015)
And then compile with that /doit command or will it auto load if I start a server?
In C there is like nothing automatic, at every change to the C code you need a rebuild (./doit.sh base; ./doit.sh cod2_1_0) and a server restart. Probably the server might even crash, when the .so is still in memory of a process and then overwritten.
timescale 0.01
Ni3ls (4th September 2015)
But also the red parts? Or just the green ones?
red = removed stuff, green = added stuff
Just clone the whole repo and build it:
PHP Code:
cd /ur/cod2/path
git clone https://github.com/M-itch/libcod
cd libcod
./doit.sh base
./doit.sh cod2_1_0
# now set ur LD_PRELOAD path to libcod/bin/cod2_1_2.so
timescale 0.01
Ni3ls (5th September 2015)
outpoot: 150 it's default values mp gametypes, mod attribute: 400. What's problems?PHP Code:
level.weapons["greasegun_mp"].id=1;
self iprintlnbold(getweaponmeleedamage(1));
how change melee damage?
outpoot: unknown functionPHP Code:
self setweapondamagemelee(1,999999);
Help me pls
You cannot just query weapon 1 if you set the .id=1 in gsc. You need to use
Second point: self is probably not a player.PHP Code:
loadedweapons = getloadedweapons();
"Does not work" is an error report for a bug between keyboard and chair.
All hail Artie Effem
Paho (17th January 2016)