Quote:
Originally Posted by Torge
PHP Code:
#include <amxmodx>
#include <engine>
#include <fakemeta>
public client_PreThink(id)
{
new button;
button = pev(id, pev_button);
if (button & IN_ATTACK)
{
// Your code
}
}
Not sure if it works too for holding, but you can try it.
|
Thats exactly how it will work and if you want to check if player just pressed attack once you must check old_buttons as well... FYI Prethink is not the correct way to check buttons.
__________________