PHP Code:
public Action:OnPlayerRunCmd(client, &buttons, &impulse, Float:vel[3], Float:angles[3], &weapon)
{
if (IsPlayerAlive(client))
{
if (buttons & IN_ATTACK == IN_ATTACK)
{
Er...what?
Though granted, that
would work, considering that checks if buttons & IN_ATTACK is equal to 1 (true), and IN_ATTACK is, coincidentally, 1 (1 << 0). But it can just be shortened to
if (buttons & IN_ATTACK).
__________________