Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 34

Thread: Weapon functions (+ setMoveSpeedScale)

  1. #21
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by filthy_freak_ View Post
    Found another though - if setweaponfiremeleedelay gets called on you while you are doing a weapon animation (Shooting, bashing) it will repeat the animation.
    You could read the delay value and only start sprinting after the value has reached 0.
    (When the value is above 0 then the player has a weapon animation running)

  2. #22
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    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 09:28.

  3. #23
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Quote Originally Posted by Ni3ls View Post
    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?
    or just download the modified file...
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  4. The Following User Says Thank You to IzNoGoD For This Useful Post:

    Ni3ls (3rd September 2015)

  5. #24
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    And then compile with that /doit command or will it auto load if I start a server?

  6. #25
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,010
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    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

  7. The Following User Says Thank You to kung foo man For This Useful Post:

    Ni3ls (4th September 2015)

  8. #26
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    But also the red parts? Or just the green ones?

  9. #27
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,010
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    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

  10. The Following User Says Thank You to kung foo man For This Useful Post:

    Ni3ls (5th September 2015)

  11. #28
    Private Paho's Avatar
    Join Date
    Feb 2014
    Location
    Russia
    Posts
    101
    Thanks
    43
    Thanked 48 Times in 37 Posts
    PHP Code:
    level.weapons["greasegun_mp"].id=1;
    self iprintlnbold(getweaponmeleedamage(1)); 
    outpoot: 150 it's default values mp gametypes, mod attribute: 400. What's problems?
    how change melee damage?
    PHP Code:
    self setweapondamagemelee(1,999999); 
    outpoot: unknown function
    Help me pls

  12. #29
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    You cannot just query weapon 1 if you set the .id=1 in gsc. You need to use
    PHP Code:
    loadedweapons getloadedweapons(); 
    Second point: self is probably not a player.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  13. The Following User Says Thank You to IzNoGoD For This Useful Post:

    Paho (17th January 2016)

  14. #30
    Private Paho's Avatar
    Join Date
    Feb 2014
    Location
    Russia
    Posts
    101
    Thanks
    43
    Thanked 48 Times in 37 Posts
    Quote Originally Posted by Paho View Post
    PHP Code:
    self setweapondamagemelee(1,999999); 
    second miss setweapondamagemelee need setweaponmeleedamage xD tnx for first sulution

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •