AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Calling a players bound key\mouse. (MOUSE1, MOUSE2 etc) (https://forums.alliedmods.net/showthread.php?t=85113)

Bugsy 02-05-2009 21:50

Calling a players bound key\mouse. (MOUSE1, MOUSE2 etc)
 
I have a good feeling this isn't possible but it's worth a shot. Is it possible, for example, to force a player to use\execute MOUSE1?

fysiks 02-05-2009 22:27

Re: Calling a players bound key\mouse. (MOUSE1, MOUSE2 etc)
 
How do you know what a player has MOUSE1 bound to?

Speed! 02-05-2009 22:59

Re: Calling a players bound key\mouse. (MOUSE1, MOUSE2 etc)
 
Quote:

Originally Posted by Bugsy (Post 756519)
I have a good feeling this isn't possible but it's worth a shot. Is it possible, for example, to force a player to use\execute MOUSE1?

mmm
client_cmd(id, +attack)
not to press a key but yep to accion a comand (so, do what a key can do)

Bugsy 02-06-2009 00:17

Re: Calling a players bound key\mouse. (MOUSE1, MOUSE2 etc)
 
Quote:

Originally Posted by fysiks (Post 756560)
How do you know what a player has MOUSE1 bound to?

I don't but would like to know if it is possible to execute actual button\mouse presses before I consider anything else.

Quote:

Originally Posted by Speed! (Post 756602)
mmm
client_cmd(id, +attack)
not to press a key but yep to accion a comand (so, do what a key can do)

I want the actual key\mouse click, not just a command.

Speed! 02-06-2009 00:45

Re: Calling a players bound key\mouse. (MOUSE1, MOUSE2 etc)
 
Quote:

Originally Posted by Bugsy (Post 756642)
I don't but would like to know if it is possible to execute actual button\mouse presses before I consider anything else.



I want the actual key\mouse click, not just a command.

well you could query the bind of MOUSE1 and then execute that command...

Bugsy 02-06-2009 00:49

Re: Calling a players bound key\mouse. (MOUSE1, MOUSE2 etc)
 
Quote:

Originally Posted by Speed! (Post 756649)
well you could query the bind of MOUSE1 and then execute that command...

I am inquiring for my aimbot detection plugin. Some aimbots function by binding to the shoot button so it only aims when the shoot button is pressed. I would like to force the button press for this purpose.

ConnorMcLeod 02-06-2009 00:49

Re: Calling a players bound key\mouse. (MOUSE1, MOUSE2 etc)
 
You can't.

Speed! 02-06-2009 12:08

Re: Calling a players bound key\mouse. (MOUSE1, MOUSE2 etc)
 
mmmm and what with trying this

PHP Code:

static victimflags
victimflags 
pev(victimpev_flags

isnt there a flag for shooting? sorry i just remember DUCKING; ONGROUND etc

SnoW 02-06-2009 12:29

Re: Calling a players bound key\mouse. (MOUSE1, MOUSE2 etc)
 
Quote:

Originally Posted by Speed! (Post 756880)
mmmm and what with trying this

PHP Code:

static victimflags
victimflags 
pev(victimpev_flags

isnt there a flag for shooting? sorry i just remember DUCKING; ONGROUND etc

There's ways to detect when player is shooting, still:
Quote:

Originally Posted by Bugsy (Post 756642)
I want the actual key\mouse click...

Bugsy wants to detect the mouse pressing, which is not possible.

Emp` 02-06-2009 17:03

Re: Calling a players bound key\mouse. (MOUSE1, MOUSE2 etc)
 
in a client's prethink, get their pev_button, if has the bit for IN_ATTACK they are starting to attack, if pev_oldbutton has the bit IN_ATTACK, they are holding the attack button.

or at least that's what I thought...


All times are GMT -4. The time now is 01:43.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.