AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   What do these do? (https://forums.alliedmods.net/showthread.php?t=324368)

Grovliom 05-14-2020 08:12

What do these do?
 
i was looking at a plugin and i saw these two :
Code:
get_user_button(id)     get_user_oldbutton(id)
what do these 2 do?

thanks!

elmedin 05-14-2020 08:14

Re: What do these do?
 
We cant know if we dont see the plugin, share the plugin

OciXCrom 05-14-2020 08:16

Re: What do these do?
 
https://www.amxmodx.org/api/engine_s...et_user_button
https://www.amxmodx.org/api/engine_s...user_oldbutton

thEsp 05-14-2020 10:29

Re: What do these do?
 
pev_button (eq: EV_INT_button) = Buttons a client is pressing in the current frame.
pev_oldbuttons (eq: EV_INT_oldbuttons) = Buttons a client has pressed (released) in the last frame.

Generally both functionalities are hooked via FM_CmdStart and FM_CmdStop, afaik. Tho take in mind that both functions return a bitwise value, which means you can hook multiple buttons in this case.

https://www.amxmodx.org/api/hlsdk_co...buttons-values

Grovliom 05-14-2020 17:57

Re: What do these do?
 
Ok, i got it. Thank you all!


All times are GMT -4. The time now is 00:08.

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