Monthly Target: $400 Donations: $147
 36% 

Spawn & Kill Protection v1.4.0 (updated 09.12.2012)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Plugin ID:
1095
Plugin Version:
1.4.0
Plugin Category:
Gameplay
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    56 
    Plugin Description:
    Spawnprotection against spawnkilling and Killprotection when you stand close to the wall for a longer time
    Old 08-15-2009 , 15:23   Spawn & Kill Protection v1.4.0 (updated 09.12.2012)
    Reply With Quote #1




    Name:  github-icon.png
Views: 16409
Size:  1.4 KB Plugin on Github: https://github.com/bcserv/spawnandkillprotection
    Code contributions are welcome! - How do I create a pull request on Github ?


    Description


    Adds a spawnprotection to the game that protects all players on spawn until they move or shoot. Displays a notification when the protection is enabled. Provides various cvar options for customizing.
    Since it's common that players who look at a wall shouldn't be killed, this also adds a protection for players who are chatting or are away for a short time. They just have to stand close to the wall and look at it, after some seconds (set sakp_walltime) they are given protection against getting killed.


    Screenshots

    Click image for larger version

Name:	dm_overwatch0000.jpg
Views:	3552
Size:	84.4 KB
ID:	47780 Click image for larger version

Name:	dm_overwatch0001.jpg
Views:	2160
Size:	61.8 KB
ID:	47781

    Features
    • spawnprotection until player moves or shoots
    • max time a player is protected
    • protected players are transparent
    • protected players don't see their HUD
    • different kind of punishments
    • noblock when protected
    • chatprotection when a player looks at wall
    • multilanguage
    • configurable
    Downloads

    spawnandkillprotection-release-1.4.0.zip

    Compiled with smlib 0.11 or higher

    Authors
    • Berni
    • Chanz
    • ph

    Requirements

    Installation


    1. Download the SDKHooks extension and install it: Download

    TF2, CSS, HL2DM, DODS = ob-valve, ask for other games.
    extract the contents of the zip into your sourcemod directory

    2. Simply extract the contents of the attached zip file into the sourcemod directory.

    Updating

    1. Delete cfg/sourcemod/plugin.spawnandkillprotection.cfg when new cvars got added or cvars got changed
    2. Follow the Installation instructions
    Commands

    sm_enablekillprotection - mainly used for debugging purposes.

    ConVars

    Code:
    // Sourcemod Spawn & kill protection plugin:
    // 0 = don't disable, 1 = disable the spawnprotection when player moves or shoots, 2 = disable the spawn protection when shooting only
    // -
    // Default: "1"
    sakp_disableonmoveshoot "1"
    
    // Sourcemod Spawn & kill protection plugin:
    // Time in seconds until the protection is removed after the player moved and/or shooted, 0 = immediately
    // -
    // Default: "0"
    sakp_disabletime "0"
    
    // Sourcemod Spawn & kill protection plugin:
    // same as sakp_disabletime, but for team 2 only (overrides sakp_disabletime if not set to -1)
    // -
    // Default: "-1"
    sakp_disabletime_team1 "-1"
    
    // Sourcemod Spawn & kill protection plugin:
    // same as sakp_disabletime, but for team 2 only (overrides sakp_disabletime if not set to -1)
    // -
    // Default: "-1"
    sakp_disabletime_team2 "-1"
    
    // Sourcemod Spawn & kill protection plugin:
    // Spawn & Kill Protection enabled
    // -
    // Default: "1"
    sakp_enabled "1"
    
    // Sourcemod Spawn & kill protection plugin:
    // Fade screen to black
    // -
    // Default: "1"
    sakp_fadescreen "1"
    
    // Sourcemod Spawn & kill protection plugin:
    // Set to 1 to hide the HUD when being protected
    // -
    // Default: "1"
    sakp_hidehud "1"
    
    // Sourcemod Spawn & kill protection plugin:
    // The amount of time in seconds pressing any keys will not turn off spawn protection
    // -
    // Default: "0.8"
    sakp_keypressignoretime "0.8"
    
    // Sourcemod Spawn & kill protection plugin:
    // same as sakp_keypressignoretime, but for team 1 only (overrides sakp_keypressignoretime if not set to -1)
    // -
    // Default: "-1"
    sakp_keypressignoretime_team1 "-1"
    
    // Sourcemod Spawn & kill protection plugin:
    // same as sakp_keypressignoretime, but for team 1 only (overrides sakp_keypressignoretime if not set to -1)
    // -
    // Default: "-1"
    sakp_keypressignoretime_team2 "-1"
    
    // Sourcemod Spawn & kill protection plugin:
    // max timelimit in seconds the spawnprotection stays, 0 = no limit
    // -
    // Default: "0"
    sakp_maxspawnprotection "0"
    
    // Sourcemod Spawn & kill protection plugin:
    // same as sakp_maxspawnprotection, but for team 1 only (overrides sakp_maxspawnprotection if not set to -1)
    // -
    // Default: "-1"
    sakp_maxspawnprotection_team1 "-1"
    
    // Sourcemod Spawn & kill protection plugin:
    // same as sakp_maxspawnprotection, but for team 2 only (overrides sakp_maxspawnprotection if not set to -1)
    // -
    // Default: "-1"
    sakp_maxspawnprotection_team2 "-1"
    
    // Sourcemod Spawn & kill protection plugin:
    // 1 = enable noblock when protected, 0 = disabled feature
    // -
    // Default: "1"
    sakp_noblock "1"
    
    // Sourcemod Spawn & kill protection plugin:
    // 0 = off, 1 = HUD message, 2 = center message, 3 = chat message, 4 = auto
    // -
    // Default: "4"
    sakp_notify "4"
    
    // Sourcemod Spawn & kill protection plugin:
    // alpha amount of a protected player 0-255
    // -
    // Default: "50"
    sakp_player_alpha "50"
    
    // Sourcemod Spawn & kill protection plugin:
    // amount of blue when a player is protected 0-255
    // -
    // Default: "0"
    sakp_player_color_blue "0"
    
    // Sourcemod Spawn & kill protection plugin:
    // amount of green when a player is protected 0-255
    // -
    // Default: "0"
    sakp_player_color_green "0"
    
    // Sourcemod Spawn & kill protection plugin:
    // amount of red when a player is protected 0-255
    // -
    // Default: "255"
    sakp_player_color_red "255"
    
    // Sourcemod Spawn & kill protection plugin:
    // 0 = off, 1 = slap, 2 = decrease health 3 = slay, 4 = apply damage done to enemy
    // -
    // Default: "0"
    sakp_punishmode "0"
    
    // Sourcemod Spawn & kill protection plugin:
    // The amount of health to take from the player when shooting at protected players (when punishmode = 2)
    // -
    // Default: "5"
    sakp_takedamage "5"
    
    // Sourcemod Spawn & kill protection plugin:
    // How long a player has to look at a wall to get kill protection activated, set to -1 to disable
    // -
    // Default: "4"
    sakp_walltime "4"


    Config

    cfg/sourcemod/spawnandkillprotection.cfg (auto generated OnPluginStart)


    Games tested & support
    • Tested with Half Life 2: Deathmatch and Counter-Strike: Source
    • Should work with any games


    Natives for other plugins

    PHP Code:
    /**
     * Returns if a client is currently protected.
     *
     * @param client    Client index.
     * @return          Returns true if the client is protected otherwise false.
     */
    native bool:SAKP_IsClientProtected(client); 
    Todo

    -

    Changelog

    Date: 09.12.2012
    Version: 1.4.0
    • Fixed the physical mayhem bug (by not setting collision groups anymore and using sdkhooks)
    • Fixed the health issues reported (by not setting the health anymore)
    • Fixed the kill protection staying when a player dies.
    • Fixed not using relieable userid's instead of client indexes when creating timers.
    • Changed the HUD elements not getting completely removed anymore to allow the player to see and write chat message (the chatkill protection didn't really make sense before).
    • Added some team specific cvars (by ph, thanks)
    • Code cleanup

    Date: 03.02.2011
    Version: 1.3.0
    • Fixed the errors people reported (hopefully)
    • Enhanced ConVar sakpdisableonmoveshoot
    • Added ConVar sakpdisabletime
    • Added ConVar sakpkeypressignoretime
    • Added ConVar sakpfadescreen
    • Added ConVar sakp_player_color_red
    • Added ConVar sakp_player_color_green
    • Added ConVar sakp_player_color_blue
    • Added ConVar sakp_player_alpha
    • Added ConVar sakp_disabletime
    • Added french translation (thanks to pywaie)
    • Replaced allot of code with smlib function calls.
    • Optimized code allot.

    Date: 29.01.2010
    Version: 1.0.2
    • No wallprotection when player is pressing the Use button

    Date: 24.01.2010
    Version: 1.0.1
    • Took back in fadeclientscreen feature and other things I removed by accident
    • Some small changes

    Date: 24.01.2010

    Version: 1.0
    • Changed to the Sdkhooks extension for better OnTakeDamage support
    • Added cvar sakp_noblock for enable/disabling playercollisions when protected for usage of this plugin with other noblock plugins
    • Added cvar sakp_disableonmoveshoot for auto enabling/disabling spawnprotection when player shoots or moves
    • Added cvar sakp_maxspawnprotection for specifying a time after which the spawnprotection automatically gets disabled
    • Removed cvar sakp_fadescreen
    • Fixed a possible bug/exploit with the wallprotection
    • Added code for handling midgame loading of the plugin
    • renamed the plugin to "spawnandkillprotection"
    • Fixed bug in ProtectedPlayerHurted
    • Fixed bug with sakp_notify cvar
    • Added german translation
    • Put server warning when hud support is not enabled into translation file

    Date: 18.08.2009

    Version: 0.9.6
    • Added ability to turn notifications & damage off
    • Renamed spawnkillprotection files to killprotection
    • Added Fadescreen, the players screen now fades to black when is protected (new cvar sakp_fadescreen)
    • Further code improvements

    Date: 15.08.2009
    Version: 0.9.4
    • Added 2 different messages to the translations for spawn and wall kill protection.

    Date: 15.08.2009
    Version: 0.9.3
    • Initial release

    Last edited by berni; 12-08-2012 at 21:50.
    berni is offline
    shustas
    SourceMod Donor
    Join Date: May 2007
    Location: London
    Old 08-15-2009 , 15:52   Re: Spawn & Kill Protection
    Reply With Quote #2

    And your plugin differs from the other 2 already created in what?
    __________________
    shustas is offline
    berni
    SourceMod Plugin Approver
    Join Date: May 2007
    Location: Austria
    Old 08-15-2009 , 16:27   Re: Spawn & Kill Protection
    Reply With Quote #3

    Well there are a number of reasons:

    • This plugin has protection for players who are chatting or afk (look at the wall)
    • There isn't a spawnprotection based on time, but till the player moves/shoots
    • This plugin is well coded
    • There are various cvars to configure it
    • There is a translation file for other languages
    __________________
    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

    Last edited by berni; 08-15-2009 at 16:30.
    berni is offline
    shustas
    SourceMod Donor
    Join Date: May 2007
    Location: London
    Old 08-15-2009 , 17:22   Re: Spawn & Kill Protection
    Reply With Quote #4

    fair enough
    __________________
    shustas is offline
    berni
    SourceMod Plugin Approver
    Join Date: May 2007
    Location: Austria
    Old 08-18-2009 , 11:41   Re: Spawn & Kill Protection
    Reply With Quote #5

    Plugin updated

    Date: 18.08.2009

    Version: 0.9.6
    • Added ability to turn notifications & damage off
    • Renamed spawnkillprotection files to killprotection
    • Added Fadescreen, the players screen now fades to black when is protected (new cvar sakp_fadescreen)
    • Further code improvements
    __________________
    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
    Maxis010
    Senior Member
    Join Date: Jun 2009
    Old 09-16-2009 , 10:13   Re: Spawn & Kill Protection
    Reply With Quote #6

    Nice plugin but I have a bug

    After installing this plugin the over heal degeneration seems to have been disabled, only found this when another plugin I use boosted the HP, not tested on medic overheal

    EDIT: tested on the medic, that works as normal
    Nvrmind the bug fix as my players seem to like the health boost not dropping

    Last edited by Maxis010; 09-16-2009 at 10:51. Reason: More Info
    Maxis010 is offline
    Junior Member
    Join Date: Sep 2009
    Location: Belgium
    Old 09-27-2009 , 05:27   Re: Spawn & Kill Protection
    Reply With Quote #7

    Does NOT work in CS:S or at least a bug...you get 500 HEALTH and it stays after you start moving....I would like to use this plugin but am unable because of this...
    R@ndom is offline
    Junior Member
    Join Date: Sep 2009
    Location: Belgium
    Old 09-27-2009 , 05:49   Re: Spawn & Kill Protection
    Reply With Quote #8

    recompiled it with 100 in stead of 500 health, works beautifull now and you stay protected until you move, GREAT plugin!!! Ideal for Death Match SERVERS to discourage the spawnkillers on maps like aim_texture2_v2 some guys grab a M249 and get 500 kills(and more) in 15 mins playing time. They just run to enemy spawn and start killing...not very amusing if you get killed 30 times in 30 secs and on a HLX ranked server, your killer gets 15 points a kill and it costs you alot of points if you just joined...and IF you manage to kill him you most likely get 2 points .... very frustrating and it ENDS with this plugin!!

    Also for admins that themselves PLAY on their server, on a DM server with lots of people on it , trying to adjust something, kick someone, whatever you while in game as admin you most likely get killed more then a few times....thats also past tense from now on ...

    GOOD work
    R@ndom is offline
    berni
    SourceMod Plugin Approver
    Join Date: May 2007
    Location: Austria
    Old 09-27-2009 , 11:42   Re: Spawn & Kill Protection
    Reply With Quote #9

    100 instead of 500 health ? What's that good for ? Why should that have anything todo with moving ? 100 health isn't enough to be protected... people can headshot kill you then.
    __________________
    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
    CS:S*
    BANNED
    Join Date: Jun 2009
    Old 09-29-2009 , 17:55   Re: Spawn & Kill Protection
    Reply With Quote #10

    Berni any chance to make this to work in css in this way :

    player are protected from team-mates whole the roung and shooting a team-mate to give damage to the attacker but not to the victim ,i have one started to work on this plugin but it crashes the server ,he did extention for that and actually works ... if you attack team-mate it gives damage to you but not to the victim ..

    can you create this ?
    CS:S* 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 09:37.


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