Thread: amxx plugin for longjump sound not working

Results 1 to 19 of 19
  1. #1
    BRUT
    Join Date
    Jul 2013
    Location
    BRUT
    Posts
    40

    amxx plugin for longjump sound not working

    Hello,

    I am using an amxx plugin for adding sound to the longjump, exactly like in Opposing Force. It is working on my Half-Life server, but it is not working on my Sven Co-Op server

    it is this plugin https://forums.alliedmods.net/showthread.php?t=162831

    and the code is this:
    -----------------------------------------------------------------------------------------

    #include <amxmodx>
    #include <hamsandwich>
    #include <fakemeta>

    #define M_IDEALACTIVITY_OFFSET 89 // Offset finded by KORD_12.7

    public plugin_init(){
    register_plugin("LongJump Sound","0.2","GordonFreeman")
    RegisterHam(Ham_Player_Jump, "player", "fw_PlayerJump") // call function if player jumping
    }

    public plugin_precache(){
    precache_sound("misc/pow_big_jump.wav") // copy from opposing force
    }

    public fw_PlayerJump(id){
    if(get_pdata_int(id,M_IDEALACTIVITY_OFFSET)==8&&pev(id,pev_f rame)==0){ // ACT_LEAP equal 8
    emit_sound(id,CHAN_STATIC,"misc/pow_big_jump.wav",VOL_NORM,ATTN_NORM,0,PITCH_NORM)
    }
    }

    -----------------------------------------------------------------------------------------

    Can u help me, what should i change to make this plugin work on Sven Co-Op

    //edit: from the discussion to the plugin, this number should be different in Sven Coop: M_IDEALACTIVITY_OFFSET 89

  2. #2
    Administrator AdamR's Avatar  
    Manager
    Join Date
    Mar 2004
    Location
    Cardiff, South Wales [UK]
    Posts
    8,581

    Re: amxx plugin for longjump sound not working

    That plug-in won't work because AMXX is not aware of the sound engine used in Sven Co-op. I doubt AMXX could easily be modified to know about it either, particularly as most sounds are handled client side.
    Adam "Adambean" Reece
    Sven Co-op team

    Also on: Steam | Facebook | Twitter | YouTube | Twitch
    Released AMXX plug-ins: Bind number slots | NextMap with Sven Co-op fix | Sven Co-op administrator icons

  3. #3
    Game tester  
    Programmer
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    200

    Re: amxx plugin for longjump sound not working

    you can use the following workaround to play .wav to player (locally or every player ingame)

    Code:
    new const sfx_longjump = "folder/sound.wav"
    
    public plugin_precache(){
    	
    	precache_sound(sfx_longjump)
    	
    	return PLUGIN_HANDLED
    	
    }
    then later on in the code when you want to play the sound:
    Code:
    client_cmd( ! player slot number !, "spk ^"%s^"", sfx_longjump)

  4. #4
    BRUT
    Join Date
    Jul 2013
    Location
    BRUT
    Posts
    40

    Re: amxx plugin for longjump sound not working

    I hope that workaround will work, I try to put Zodemons changes in that sma, but I am unable to compile it, because of errors :/, I am not good in scripting, should I leave the offsetcode there?

  5. #5
    Administrator AdamR's Avatar  
    Manager
    Join Date
    Mar 2004
    Location
    Cardiff, South Wales [UK]
    Posts
    8,581

    Re: amxx plugin for longjump sound not working

    You could make the client sound engine play a sound with a specific network message but it won't be as easy. If that interests you I'll look upthe exact syntax when I get home.

    In SC 5.0 the long jump HEY is included in default sentences so this plug-in won't be needed once that is out mind.
    Adam "Adambean" Reece
    Sven Co-op team

    Also on: Steam | Facebook | Twitter | YouTube | Twitch
    Released AMXX plug-ins: Bind number slots | NextMap with Sven Co-op fix | Sven Co-op administrator icons

  6. #6
    Princess liz ^.^ m0u$3[uz]'s Avatar
    Join Date
    Nov 2011
    Location
    Alto, GA
    Posts
    375

    Re: amxx plugin for longjump sound not working

    will you still be able to install amxmod in the standalone version?

  7. #7
    BRUT
    Join Date
    Jul 2013
    Location
    BRUT
    Posts
    40

    Re: amxx plugin for longjump sound not working

    Yes if u dont mind, thank you very much... great news, hope metamod and amxmodx with plugins will run withouut problems and i update my svencoop asap when it comes out

  8. #8
    Administrator AdamR's Avatar  
    Manager
    Join Date
    Mar 2004
    Location
    Cardiff, South Wales [UK]
    Posts
    8,581

    Re: amxx plugin for longjump sound not working

    Metamod (including AMXX) do appear to launch on my 5.0 test server but I've not done any real testing or checks to make sure it all works right. Remind me about it this weekend and I'll find out. I'm sure it will work as we haven't taken anything out of the engine.
    Adam "Adambean" Reece
    Sven Co-op team

    Also on: Steam | Facebook | Twitter | YouTube | Twitch
    Released AMXX plug-ins: Bind number slots | NextMap with Sven Co-op fix | Sven Co-op administrator icons

  9. #9
    BRUT
    Join Date
    Jul 2013
    Location
    BRUT
    Posts
    40

    Re: amxx plugin for longjump sound not working

    if u provide me with the 5.0 early version, i can test it on my BRUT.me server, because if 5.0 version will be released in near future, there is no need to loose time with sound in the old version, and i can improve the new version...

  10. #10
    Administrator AdamR's Avatar  
    Manager
    Join Date
    Mar 2004
    Location
    Cardiff, South Wales [UK]
    Posts
    8,581

    Re: amxx plugin for longjump sound not working

    I already have a ready AMXX instance on my 5.0 development server. Currently it looks like Metamod won't work at all,

    Host_Error: Couldn't get DLL API from └Ð↑!
    L 21/05/2015 - 20:16:11: FATAL ERROR (shutting down): Host_Error: Couldn't get DLL API from └Ð↑!

    This is likely due to our updated engine interface. We can try to find a solution for this but it will likely be more ideal for Metamod-P to be recompiled with our updated engine headers.
    Adam "Adambean" Reece
    Sven Co-op team

    Also on: Steam | Facebook | Twitter | YouTube | Twitch
    Released AMXX plug-ins: Bind number slots | NextMap with Sven Co-op fix | Sven Co-op administrator icons

  11. #11
    BRUT
    Join Date
    Jul 2013
    Location
    BRUT
    Posts
    40

    Re: amxx plugin for longjump sound not working

    ouch :/, just to be sure, what version of metamod did u use? is it possible that i can help with the metamod and amxmodx testing? because this is quite crucial thing for dedicated servers

  12. #12
    Administrator AdamR's Avatar  
    Manager
    Join Date
    Mar 2004
    Location
    Cardiff, South Wales [UK]
    Posts
    8,581

    Re: amxx plugin for longjump sound not working

    I was using P-36. I see P-37 is out now, but Sniper has already found why this happens. Metamod has an odd way of injecting itself so any additional engine functions, even if they are appended to the end of the interface structure (which is safe for mods), causes it to not load due to its' 16 reserved functions for game library handling.
    Adam "Adambean" Reece
    Sven Co-op team

    Also on: Steam | Facebook | Twitter | YouTube | Twitch
    Released AMXX plug-ins: Bind number slots | NextMap with Sven Co-op fix | Sven Co-op administrator icons

  13. #13
    Registered User
    Join Date
    Nov 2014
    Location
    around.
    Posts
    393

    Re: amxx plugin for longjump sound not working

    Quote Originally Posted by AdamR View Post
    I was using P-36. I see P-37 is out now, but Sniper has already found why this happens.....
    :/ So no working Metamod/AMXX for SC5 after all (assuming that Metamod doesn't get updated)? No HLDS server plugins.. not good news

  14. #14
    Administrator AdamR's Avatar  
    Manager
    Join Date
    Mar 2004
    Location
    Cardiff, South Wales [UK]
    Posts
    8,581

    Re: amxx plugin for longjump sound not working

    At the moment it appears that any function we've added to the engine interface will prevent Metamod from working. This is not a good reason to stop us improving the engine though. Metamod could easily be recompiled with updated engine headers. I still have Metamod sources somewhere, I might try this out today.
    Adam "Adambean" Reece
    Sven Co-op team

    Also on: Steam | Facebook | Twitter | YouTube | Twitch
    Released AMXX plug-ins: Bind number slots | NextMap with Sven Co-op fix | Sven Co-op administrator icons

  15. #15
    Administrator AdamR's Avatar  
    Manager
    Join Date
    Mar 2004
    Location
    Cardiff, South Wales [UK]
    Posts
    8,581

    Re: amxx plugin for longjump sound not working

    Bit of a positive update: Looks like Metamod-P patch 37 works fine on my desktop PC running SC 5.0 internal. Also works fine if I recompile it with our own engine headers, though that may not be needed. It's just my home server that doesn't run it for some reason. Not sure why yet.
    Adam "Adambean" Reece
    Sven Co-op team

    Also on: Steam | Facebook | Twitter | YouTube | Twitch
    Released AMXX plug-ins: Bind number slots | NextMap with Sven Co-op fix | Sven Co-op administrator icons

  16. #16
    BRUT
    Join Date
    Jul 2013
    Location
    BRUT
    Posts
    40

    Re: amxx plugin for longjump sound not working

    Good News Everyone
    Attached Images Attached Images

  17. #17
    Administrator AdamR's Avatar  
    Manager
    Join Date
    Mar 2004
    Location
    Cardiff, South Wales [UK]
    Posts
    8,581

    Re: amxx plugin for longjump sound not working

    I still think it will be worth handing out an update to include our new headers. I've already been doing this on my GIT clone, spun off a branch called 'svencoop' for my stuff, so it won't be a chore to handle.
    Adam "Adambean" Reece
    Sven Co-op team

    Also on: Steam | Facebook | Twitter | YouTube | Twitch
    Released AMXX plug-ins: Bind number slots | NextMap with Sven Co-op fix | Sven Co-op administrator icons

  18. #18
    Registered User
    Join Date
    Nov 2014
    Location
    around.
    Posts
    393

    Re: amxx plugin for longjump sound not working

    Excellent news, good job Adam!

  19. #19
    BRUT
    Join Date
    Jul 2013
    Location
    BRUT
    Posts
    40

    Re: amxx plugin for longjump sound not working

    right, looking forward the new 5 version

Posting Permissions

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