Hi again Sebastian et al'

Here is the code for the enhanced ESR, (original, courtesy of Derek London, and modded by me)

  First, open defs.qc and add the following two lines to the bottom.

.float SNAP_ESR_BEEPTIME_DIVISOR;
.float SNAP_ESR_GAP_TIME;

Next, open ESR.qc in your agrip folder, and search on each of the above variables. You should first see two constant declarations near the top of the file, one for each of the above variables. Comment these out.

Next, continue searching the file for each of the two variable names. When you see them, add "self.owner." before them, obviously without the quotes, so one would look something like this:

self.owner.SNAP_ESR_BEEPTIME_DIVISOR

When you've gone through the entire file and replaced all the instances of each variable name with the addition of self.owner., then open client.qc.

locate the function called PutClientInServer and place this code near the beginning. (I have it just after the health declaration)

if(infokey(self, "EnhancedESR") != "0")
{
self.SNAP_ESR_BEEPTIME_DIVISOR = 50000;
self.SNAP_ESR_GAP_TIME = 0.1;
}
else
{
self.SNAP_ESR_BEEPTIME_DIVISOR = 1100;
self.SNAP_ESR_GAP_TIME = 0.2;
}

Now open hooks.qc in your agrip folder, and paste the following code:

if(self.impulse == 77)
{
        if(infokey(self, "EnhancedESR") != "0")
        {
            stuffcmd(self, "setinfo EnhancedESR 0\n");
self.SNAP_ESR_BEEPTIME_DIVISOR = 1100;
self.SNAP_ESR_GAP_TIME = 0.2;
            snap_misc_m2m("Standard ESR\n");
safe_soundtoclient(self, self, CHAN_VOICE, "toggles/off.wav", 1, ATTN_NORM);
        }
        else
        {
            stuffcmd(self, "setinfo EnhancedESR 1\n");
self.SNAP_ESR_BEEPTIME_DIVISOR = 50000;
self.SNAP_ESR_GAP_TIME = 0.1;
            snap_misc_m2m("Enhanced ESR\n");
safe_soundtoclient(self, self, CHAN_VOICE, "toggles/on.wav", 1, ATTN_NORM);
        }
}



And that should be all you need to do. Of course, you can change the impulse and messages and such to your liking.
  <smile>  Let me know how it goes, K?  Talk with ya soon!...

Smiles,

Cara 

No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.1.394 / Virus Database: 268.10.5/407 - Release Date: 8/3/2006
_______________________________________________
AGRIP-discuss mailing list
[email protected]
http://lists.agrip.org.uk/cgi-bin/mailman/listinfo/agrip-discuss

Reply via email to