Raised This Month: $159 Target: $400
 39% 

Anti W+M1


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Merbo
Member
Join Date: Jul 2012
Plugin ID:
3550
Plugin Version:
1.0.0.0
Plugin Category:
Fun Stuff
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Don't you just hate those bad pyros?
    Unapprover:
    Reason for Unapproving:
    No plugin
    Old 02-28-2013 , 19:06   Anti W+M1
    Reply With Quote #1

    Pretty simple. Those who go W+M1 for about 3-5 seconds kersplode.
    I don't believe there's a plugin like this, I just got annoyed with the amount of W+M1 kiddies who do this. If you want a boring version without the explosion I can make it, but for now here it is with the explosion.

    Have fun with pyros that learn how to use the flare gun and axtinguisher!

    Last edited by psychonic; 07-17-2013 at 17:23.
    Merbo is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 02-28-2013 , 21:19   Re: Anti W+M1
    Reply With Quote #2

    Code:
    PrintToChat(i, "{red}Don't W+M1!");
    That will work as expected?
    __________________
    Mitchell is offline
    NameUser
    Senior Member
    Join Date: Apr 2012
    Location: Bay Area, California
    Old 02-28-2013 , 23:18   Re: Anti W+M1
    Reply With Quote #3

    Quote:
    Originally Posted by Mitchell View Post
    Code:
    PrintToChat(i, "{red}Don't W+M1!");
    That will work as expected?
    Heh. I'm sure it will.
    __________________
    NameUser is offline
    Send a message via Skype™ to NameUser
    MasterOfTheXP
    Veteran Member
    Join Date: Aug 2011
    Location: Cloudbank
    Old 03-01-2013 , 00: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; 03-01-2013 at 00:32.
    MasterOfTheXP is offline
    Merbo
    Member
    Join Date: Jul 2012
    Old 03-01-2013 , 00:37   Re: Anti W+M1
    Reply With Quote #5

    Quote:
    Originally Posted by MasterOfTheXP View Post
    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).
    I'd asked asherkin the other day about such bitmasks and was told to do it that way.
    Alright.
    Merbo is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 03-01-2013 , 12:12   Re: Anti W+M1
    Reply With Quote #6

    Quote:
    Originally Posted by Merbo View Post
    I'd asked asherkin the other day about such bitmasks and was told to do it that way.
    Alright.
    You probably didnt read it right then.
    As Master pointed out the correct way.
    __________________
    Mitchell is offline
    Powerlord
    AlliedModders Donor
    Join Date: Jun 2008
    Location: Seduce Me!
    Old 03-01-2013 , 14:36   Re: Anti W+M1
    Reply With Quote #7

    Quote:
    Originally Posted by Mitchell View Post
    You probably didnt read it right then.
    As Master pointed out the correct way.
    SourcePawn lets you get away with doing it that way (because non-zero values are considered to be true), but it won't work in programming languages with a strict type system.

    The method Merbo used is the correct cross-language way to do it.
    __________________
    Am I back? Well, we'll see.

    Last edited by Powerlord; 03-01-2013 at 14:40.
    Powerlord is offline
    sheng
    Member
    Join Date: Jan 2013
    Old 03-15-2013 , 20:36   Re: Anti W+M1
    Reply With Quote #8

    why the explosion kills all the players, for that, this plugins fails. horrible
    sheng is offline
    Seta00
    The Seta00 user has crashed.
    Join Date: Jan 2010
    Location: Brazil
    Old 03-15-2013 , 23:06   Re: Anti W+M1
    Reply With Quote #9

    Quote:
    Originally Posted by MasterOfTheXP View Post
    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).
    Quote:
    Originally Posted by Mitchell View Post
    You probably didnt read it right then.
    As Master pointed out the correct way.
    Quote:
    Originally Posted by Powerlord View Post
    SourcePawn lets you get away with doing it that way (because non-zero values are considered to be true), but it won't work in programming languages with a strict type system.
    No, it's not the same thing. If IN_ATTACK was 0 the check would fail. No one is crazy enough to have bitflags that are zero, so in practice you can just do if (var & FLAG).

    Quote:
    The method Merbo used is the correct cross-language way to do it.
    In what language does if (var & FLAG == FLAG) differ from if (var & FLAG), provided you don't have flags that are set to zero?
    Seta00 is offline
    Powerlord
    AlliedModders Donor
    Join Date: Jun 2008
    Location: Seduce Me!
    Old 03-16-2013 , 03:01   Re: Anti W+M1
    Reply With Quote #10

    Quote:
    Originally Posted by Seta00 View Post
    In what language does if (var & FLAG == FLAG) differ from if (var & FLAG), provided you don't have flags that are set to zero?
    C#. Java. C and C++ may, I haven't checked them.

    Basically, if (var & FLAG) won't even compile in C# and Java, because var & FLAG doesn't evaluate to a boolean.
    __________________
    Am I back? Well, we'll see.
    Powerlord 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 18:01.


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