Thread: Anti W+M1
View Single Post
MasterOfTheXP
Veteran Member
Join Date: Aug 2011
Location: Cloudbank
Old 02-28-2013 , 23:31   Re: Anti W+M1
Reply With Quote #4

PHP Code:
public Action:OnPlayerRunCmd(client, &buttons, &impulseFloat: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).
__________________
Plugins / My Steam / TF2 Sandbox (plugin beta testing!)

Last edited by MasterOfTheXP; 02-28-2013 at 23:32.
MasterOfTheXP is offline