Raised This Month: $32 Target: $400
 8% 

[TF2] Anti Resp-Kill 1.0


Post New Thread Reply   
 
Thread Tools Display Modes
Author
krolus
Senior Member
Join Date: May 2009
Location: Russia, Omsk
Plugin ID:
965
Plugin Version:
1.0
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Spawn protection for TF2
    Old 07-01-2009 , 10:36   [TF2] Anti Resp-Kill 1.0
    Reply With Quote #1

    Anti Resp-Kill 1.0

    Based on Spawn Protection (by Fredd) http://forums.alliedmods.net/showthread.php?p=594838. I added turning off protection when player shoot and add different colors for teams.

    Cvars

    sm_ark_color_blu - set the color of the blue players when they are protected, "red green blue amount" amount is like transparency, max value for each field is 255. (Default "0 0 255 200")
    sm_ark_color_red - set the color of the red players when they are protected.(Default "255 0 0 200")
    sm_ark_doa (0|1 ) - if non zero then disable protection when player trying to attack somebody (Default "1")
    sm_ark_enabled (1|0) enable/disable protection (Default "1")
    sm_ark_notify (1|0) enable/disable notification (Default "1")
    sm_ark_time (max 10) amount in seconds untill protection wears off (Default "5")
    Attached Files
    File Type: sp Get Plugin or Get Source (ark_tf2.sp - 2726 views - 5.8 KB)

    Last edited by krolus; 09-07-2009 at 02:16.
    krolus is offline
    berni
    SourceMod Plugin Approver
    Join Date: May 2007
    Location: Austria
    Old 09-10-2009 , 15:35   Re: [TF2] Anti Resp-Kill 1.0
    Reply With Quote #2

    Try asking the original author of this plugin to add this as options to his plugin.
    Why is this suddenly for TF2 only ?
    __________________
    Why reinvent the wheel ? Download smlib with over 350 useful functions.

    When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
    powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
    berni is offline
    krolus
    Senior Member
    Join Date: May 2009
    Location: Russia, Omsk
    Old 09-10-2009 , 16:41   Re: [TF2] Anti Resp-Kill 1.0
    Reply With Quote #3

    because plugin use TF2_CalcIsAttackCritical to detect player shooting
    krolus is offline
    Frus
    Senior Member
    Join Date: Aug 2009
    Old 09-10-2009 , 17:22   Re: [TF2] Anti Resp-Kill 1.0
    Reply With Quote #4

    Correct me if I'm wrong, since I don't code for TF2. But I believe it was mentioned some weapons (i.e. huntsman) do not call TF2_CalcIsAttackCritical.
    Frus is offline
    berni
    SourceMod Plugin Approver
    Join Date: May 2007
    Location: Austria
    Old 09-10-2009 , 17:34   Re: [TF2] Anti Resp-Kill 1.0
    Reply With Quote #5

    I think the best way would be to check the client buttons in OnGameFrame(), this is how I also do it in one of my plugins...
    __________________
    Why reinvent the wheel ? Download smlib with over 350 useful functions.

    When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
    powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
    berni is offline
    krolus
    Senior Member
    Join Date: May 2009
    Location: Russia, Omsk
    Old 09-11-2009 , 09:09   Re: [TF2] Anti Resp-Kill 1.0
    Reply With Quote #6

    berni, In all plugins that i see was TF2_CalcIsAttackCritical.

    Frus, huntsman using TF2_CalcIsAttackCritical.
    krolus is offline
    berni
    SourceMod Plugin Approver
    Join Date: May 2007
    Location: Austria
    Old 09-11-2009 , 09:15   Re: [TF2] Anti Resp-Kill 1.0
    Reply With Quote #7

    Frus says TF2_CalcIsAttackCritical() might not work for some weapons.
    And checking in OnGameFrame would let this plugin stay game independent and should be therefore preferred.
    Did you already ask Fred ?

    Greetings ~Berni
    __________________
    Why reinvent the wheel ? Download smlib with over 350 useful functions.

    When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
    powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
    berni is offline
    krolus
    Senior Member
    Join Date: May 2009
    Location: Russia, Omsk
    Old 09-11-2009 , 12:27   Re: [TF2] Anti Resp-Kill 1.0
    Reply With Quote #8

    berni, all weapons which can make damage are calling critical check if crits are enabled.
    Fred's last post was in may. Did you think he care about this plugin?
    krolus is offline
    berni
    SourceMod Plugin Approver
    Join Date: May 2007
    Location: Austria
    Old 09-11-2009 , 13:51   Re: [TF2] Anti Resp-Kill 1.0
    Reply With Quote #9

    Yes, maybe he does and will add your update, you can't know.
    __________________
    Why reinvent the wheel ? Download smlib with over 350 useful functions.

    When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
    powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
    berni is offline
    naris
    AlliedModders Donor
    Join Date: Dec 2006
    Old 09-13-2009 , 04:26   Re: [TF2] Anti Resp-Kill 1.0
    Reply With Quote #10

    I noticed that in your OnPlayerSpawn() handler that you check if !IsPlayerAlive().

    I am not aware any any case where a player could spawn and not be alive.
    naris is offline
    Reply



    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 22:49.


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