What's new

Discussion Universal Button Monitoring for All Clients

  • Thread starter XeXWill
  • Start date
  • Views 2,106
XeXWill

willdebeers

Enthusiast
Messages
892
Reaction score
396
Points
150
Sin$
0
Yeah but I think it's PC only, rank_3arc I think I saw.


Did some digging, finally found it :smile:

d11b8a4129058af27ae3406acf343d90.png



logo_treyarch_1k
 
Mikeeeyy

Mikeeeyy

Member
Modder Programmer Grammar Nazi
Messages
2,176
Reaction score
1,307
Points
485
Sin$
7
Okay Will so I had a mess around with this with my friend, and we got it to work perfectly fine :smile:
This code obviously doesn't include activeAction loops and button unbindings that it needs because it was just a quick go at using it.
Bottled down to the wait having to be 2, if it was 1, only scrolling down would work, and if it was above it would skip options and continuously scroll.
I even got my friend to lag his connection to >= 200ms ping and he still said it was fine, so this seems to be a winner :smile: It works perfect, I guess the only down sides are you pretty much have to freezeControls unless you wanna shoot with the dpad XD and it requires a restart. Even I have tried it on client side will and it seriously is perfect, gratz!

Here's the dvars that I used:
Code:
self setClientDvar("activeAction", "bind uparrow vstr bUp;bind downarrow vstr bDown");
self setClientDvar("bUp", "+speed_throw;wait 2;-speed_throw");
self setClientDvar("bDown", "+attack;wait 2;-attack");
Here's my button monitor:
Code:
if(self adsButtonPressed() || self attackButtonPressed())
{
    self.activeOpt -= self adsButtonPressed();
    self.activeOpt += self attackButtonPressed();
 
    self updateUserInterface();
    wait(0.2);
}
 
Last edited:
Deathy

Deathy

Anime & Manga <3
Messages
552
Reaction score
177
Points
280
Sin$
7
Okay Will so I had a mess around with this with my friend, and we got it to work perfectly fine :smile:
This code obviously doesn't include activeAction loops and button unbindings that it needs because it was just a quick go at using it.
Bottled down to the wait having to be 2, if it was 1, only scrolling down would work, and if it was above it would skip options and continuously scroll.
I even got my friend to lag his connection to >= 200ms ping and he still said it was fine, so this seems to be a winner :smile: It works perfect, I guess the only down sides are you pretty much have to freezeControls unless you wanna shoot with the dpad XD and it requires a restart.

Here's the dvars that I used:
Code:
self setClientDvar("activeAction", "bind uparrow vstr bUp;bind downarrow vstr bDown");
self setClientDvar("bUp", "+speed_throw;wait 2;-speed_throw");
self setClientDvar("bDown", "+attack;wait 2;-attack");
Here's my button monitor:
Code:
if(self adsButtonPressed() || self attackButtonPressed())
{
    self.activeOpt -= self adsButtonPressed();
    self.activeOpt += self attackButtonPressed();
 
    self updateUserInterface();
    wait(0.2);
}

This tester is sexy and he knows it :/
 
Last edited:
QM Haackz

QM Haackz

Getting There
Messages
1,346
Reaction score
359
Points
180
Sin$
0
Okay Will so I had a mess around with this with my friend, and we got it to work perfectly fine :smile:
This code obviously doesn't include activeAction loops and button unbindings that it needs because it was just a quick go at using it.
Bottled down to the wait having to be 2, if it was 1, only scrolling down would work, and if it was above it would skip options and continuously scroll.
I even got my friend to lag his connection to >= 200ms ping and he still said it was fine, so this seems to be a winner :smile: It works perfect, I guess the only down sides are you pretty much have to freezeControls unless you wanna shoot with the dpad XD and it requires a restart. Even I have tried it on client side will and it seriously is perfect, gratz!

Here's the dvars that I used:
Code:
self setClientDvar("activeAction", "bind uparrow vstr bUp;bind downarrow vstr bDown");
self setClientDvar("bUp", "+speed_throw;wait 2;-speed_throw");
self setClientDvar("bDown", "+attack;wait 2;-attack");
Here's my button monitor:
Code:
if(self adsButtonPressed() || self attackButtonPressed())
{
    self.activeOpt -= self adsButtonPressed();
    self.activeOpt += self attackButtonPressed();
 
    self updateUserInterface();
    wait(0.2);
}
you could maybe take all weapons and disable them from buying guns while in the menu i guess that would work to :smile: personally i hate frozen inmenu controls :/
 
XeXWill

willdebeers

Enthusiast
Messages
892
Reaction score
396
Points
150
Sin$
0
Okay Will so I had a mess around with this with my friend, and we got it to work perfectly fine :smile:
This code obviously doesn't include activeAction loops and button unbindings that it needs because it was just a quick go at using it.
Bottled down to the wait having to be 2, if it was 1, only scrolling down would work, and if it was above it would skip options and continuously scroll.
I even got my friend to lag his connection to >= 200ms ping and he still said it was fine, so this seems to be a winner :smile: It works perfect, I guess the only down sides are you pretty much have to freezeControls unless you wanna shoot with the dpad XD and it requires a restart. Even I have tried it on client side will and it seriously is perfect, gratz!

Here's the dvars that I used:
Code:
self setClientDvar("activeAction", "bind uparrow vstr bUp;bind downarrow vstr bDown");
self setClientDvar("bUp", "+speed_throw;wait 2;-speed_throw");
self setClientDvar("bDown", "+attack;wait 2;-attack");
Here's my button monitor:
Code:
if(self adsButtonPressed() || self attackButtonPressed())
{
    self.activeOpt -= self adsButtonPressed();
    self.activeOpt += self attackButtonPressed();
 
    self updateUserInterface();
    wait(0.2);
}


Remember that CFG waits are in milliseconds!!!!

I use wait 20; which is like doing wait 0.2; in gsc. I'm suprised the game recognised wait 2, as it would press and de-press the button so fast.
 
Mikeeeyy

Mikeeeyy

Member
Modder Programmer Grammar Nazi
Messages
2,176
Reaction score
1,307
Points
485
Sin$
7
Remember that CFG waits are in milliseconds!!!!

I use wait 20; which is like doing wait 0.2; in gsc. I'm suprised the game recognised wait 2, as it would press and de-press the button so fast.

Yes I know Will!!!!!!!, but you try doing 20 and watch what happens, it's fine for the host but for clients it skips and continuously scrolls on its own.
 
Top Bottom
Login
Register