Page 1 of 1

gg_quake (GunGame Leader Sounds)

PostPosted: Mon Nov 01, 2010 10:56 am
by DanielB
gg_quake
By DanielB

Description
  • Plays sounds to players as they take the lead, tie for the lead or lose the lead!

Installation
  • Download the latest version from here
  • Extract and upload files to your gameserver
  • Restart server or reload gungame
  • If desired, edit the config at ../cfg/gungame51/custom_addon_configs/gg_quake.cfg The addon is loaded by default.

DOWNLAOD
You can download the sounds from the attachment on this thread

[Deleted]

PostPosted: Mon Nov 01, 2010 6:17 pm
by lqhnybear
PostThis post was deleted by lqhnybear on Mon Nov 01, 2010 6:39 pm.

Re: gg_quake (GunGame Leader Sounds)

PostPosted: Mon Nov 01, 2010 6:50 pm
by lqhnybear
Thanx for updating this so quickly, however I'm having some issues.

Upon loading it with the latest ES 2.1.1.360 and GG 5.1.492 the addon doesn't appear to be working. No config is written and the console keeps seeing errors. My server is running with bots, not sure if that could be effecting it. The preceding errors go away when I delete the addon from the ES directory.
lserror.jpg



I also noticed in your code, on line 45 of gg_quake_config.py that the line reads
   es.dbgmsg(0, '\tgg_quake.cfg')

Is that suppose to have a "t" in it? I don't know code, just poking around and looking. :) Even if I changed that though the addon still doesn't load properly.

PostPosted: Mon Nov 01, 2010 10:55 pm
by satoon101
That \t makes a 'tab' in the server console, so it is fine.

I believe the issue is that the folder is mis-named in the download:
../addons/eventscripts/gungame51/scripts/custom/gg_quuake

Try just changing the folder name and see if it loads correctly.

Satoon

PostPosted: Tue Nov 02, 2010 7:45 am
by DanielB
whoops.

I've updated the download.

PostPosted: Sat Dec 03, 2011 4:25 pm
by Shadow
Does DanielB still exist?

Since the last GG51 update (GG51_5_1_591). GG51 don't provide the old_leaders Event Variable anymore.

Isn't there a way to manually add a variable like we do on Windows servers & computers (e.g. %variablename% = something) in a config file?

Can someone be of assist?

Re: gg_quake (GunGame Leader Sounds)

PostPosted: Wed Dec 21, 2011 7:11 am
by Corvette911
Ok this might not be elegant...and certainly someone can improuve on it but here is a quick patch that done some good..

Main issue i have with this modification is the es_map_start(event_var) does not see to reset the global variable old_leaders. so at the beginning of a map the previous leader might get a message..but at least not every time he get's a kill..not perfect but a little less anoying..I'd really like to know why the es_map_start(event_var) doesn't work though :/..


#Add under Server var section..
old_leaders = 0


def es_map_start(event_var):
    global old_leaders
   
    old_leaders= 0

# Change this function as described below
def gg_new_leader(event_var):
    global old_leaders
   
    leader      = event_var['userid']
             
    # Don't play the sound if they were already the leader
    if not leader == old_leaders:
        es.playsound(leader, snd_taken, 1.0)
   
    # Play "lost the lead", if needed
    if old_leaders != 0:
        for userid in old_leaders.split(','):
            # Play "lost the lead" to all previous leaders,
            # Except the current leader
            if not userid == leader:
                es.playsound(userid, snd_lost, 1.0)
               
    old_leaders = leader

 

Re: gg_quake (GunGame Leader Sounds)

PostPosted: Sat Feb 04, 2012 5:02 pm
by meanconnie
For those of you interested:
Here is the full script complete with enhanced sounds to go along with it
I credit Corvette911 for his dedication at fixing this (nice job!!)

enjoy

Place the script in the eventscripts/gungame folder.
After loading make sure you edit your gg_quake.cfg located in cfg/gungame51/custom_addon_configs
It will look like this:

Simply change to this:

// Sound to play to the new leader
gg_quake_taken "gungame/takenlead.wav"

// Sound to play to the old leader(s)
gg_quake_lost "gungame/lostlead.wav"

// Sound to play to the leaders
gg_quake_tied "gungame/tiedlead.wav"

PostPosted: Sat Feb 04, 2012 6:12 pm
by Shadow
On release 5.1.611, GG51 team added back the old_leaders Event Variable in on leader events. So now gg_quake from DanielB works fine. (Thanks Satoon101 for that fix). What will this "enhanced sounds" give more?

Re: gg_quake (GunGame Leader Sounds)

PostPosted: Sat Feb 04, 2012 7:26 pm
by meanconnie
Good news about the fix satoon made .
As far as the sounds, I suggest you listen to them if you wish to know what makes them different.

PostPosted: Sun Feb 05, 2012 5:53 pm
by Shadow
Nice but if the plugin & wav files already exist and configured on the client side, the server won't upload them to the client. You need to manually replace them on your own computer if you want to hear them.

Re: gg_quake (GunGame Leader Sounds)

PostPosted: Wed Feb 08, 2012 11:46 pm
by meanconnie
The script is now set to preload the sounds into another directory so as NOT to overwrite the old sounds
thanks for pointing that out...

btw,
I tried the original script, and it does NOT work!
It continues to repeat "You the lead" over and over instead of saying it just once when you are in the lead
It is extremely annoying
Needless to say the script that corvette fixed works much better.

PostPosted: Sat Feb 11, 2012 2:03 pm
by Shadow
What version of GG51 are you runing? As mentioned in the post previously, the old_leaders Event variable was added back on GG51_5_1_611 release and now GG51 even as released 619.

PostPosted: Tue Feb 14, 2012 5:15 pm
by meanconnie
I am using current version 619
I even made a comparison with both scripts and I find the old one very inaccurate
It will say you have the lead when you do not, and many times it will not announce anything at all!
I have 2 gungame servers, and I use this script (fixed by corvette) on both of them because the old just doesnt work as well
I really do appreciate you assistance and support.

Re: gg_quake (GunGame Leader Sounds)

PostPosted: Sun Mar 25, 2012 2:09 am
by Corvette911
Thanks for the credit like i said it's a quick fix...I wish there were all that easy...and happy to see it helped.

I was running .591 at the time i wrote that ..I just updated to server to .622

And left the modified version in and it still works..might not be needed though haven`t tested

removing the modification.