Raised This Month: $32 Target: $400
 8% 

[L4D2] Hook special buttons press


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BRU7US
Member
Join Date: Jul 2020
Location: Tatarstan, Kazan
Old 09-24-2021 , 17:12   [L4D2] Hook special buttons press
Reply With Quote #1

How can i hook a pressing of buttons like:

3 - Grenade Slot;
4 - Medkit / Defibrillator / Incendiary Ammo Pack / Explosive Ammo Pack Slot;
5 - Pain Pills, Adrenaline Slot.

and

F1 - Vote Yes command;
F2 - Vote No command.

OnPlayerRunCmd &buttons doesn't hook that button pressing.

Thank you!
BRU7US is offline
little_froy
Senior Member
Join Date: May 2021
Old 09-30-2021 , 04:19   Re: [L4D2] Hook special buttons press
Reply With Quote #2

some buttons are not able to check, but some EntProps else is the way instead of them.
look at this.

https://forums.alliedmods.net/showthread.php?p=2459368

i may improve the reply later.
little_froy is offline
Marttt
Veteran Member
Join Date: Jan 2019
Location: Brazil
Old 09-30-2021 , 11:42   Re: [L4D2] Hook special buttons press
Reply With Quote #3

For weapon (1,2,3,4,5) you can check on EquipPost which slot is the active weapon.
Still is not 100%
__________________
Marttt is offline
BRU7US
Member
Join Date: Jul 2020
Location: Tatarstan, Kazan
Old 09-30-2021 , 18:07   Re: [L4D2] Hook special buttons press
Reply With Quote #4

Quote:
Originally Posted by Marttt View Post
For weapon (1,2,3,4,5) you can check on EquipPost which slot is the active weapon.
Still is not 100%
I need to hook this buttons pressing even if weapon/equipment slot is empty.
BRU7US is offline
BRU7US
Member
Join Date: Jul 2020
Location: Tatarstan, Kazan
Old 09-30-2021 , 18:12   Re: [L4D2] Hook special buttons press
Reply With Quote #5

Quote:
Originally Posted by little_froy View Post
some buttons are not able to check, but some EntProps else is the way instead of them.
look at this.

https://forums.alliedmods.net/showthread.php?p=2459368

i may improve the reply later.
I have already considered this plugin. Its implementation does not suit me, since it also does not work if the required slot is empty.
BRU7US is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 23:10.


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