AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   Spawn & Kill Protection v1.4.0 (updated 09.12.2012) (https://forums.alliedmods.net/showthread.php?t=100541)

berni 08-15-2009 14:23

Spawn & Kill Protection v1.4.0 (updated 09.12.2012)
 
5 Attachment(s)
http://www.ice-gfx.com/pics/sourcemo...protection.png


Attachment 113022 Plugin on Github: https://github.com/bcserv/spawnandkillprotection
Code contributions are welcome! - How do I create a pull request on Github ?


http://www.sourcemodplugins.org/bund...escription.png 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.


http://www.sourcemodplugins.org/bund...mod/Images.png Screenshots

Attachment 47780 Attachment 47781

http://www.sourcemodplugins.org/bund...d/Features.png 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
http://www.sourcemodplugins.org/bund.../Downloads.png Downloads

Attachment 113017

Compiled with smlib 0.11 or higher

http://www.sourcemodplugins.org/bund...od/Authors.png Authors
  • Berni
  • Chanz
  • ph

http://www.sourcemodplugins.org/bund...quirements.png Requirements

http://www.sourcemodplugins.org/bund...stallation.png 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.

http://www.sourcemodplugins.org/bund...mod/Update.png Updating

  1. Delete cfg/sourcemod/plugin.spawnandkillprotection.cfg when new cvars got added or cvars got changed
  2. Follow the Installation instructions
http://www.sourcemodplugins.org/bund...d/Commands.png 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

shustas 08-15-2009 14:52

Re: Spawn & Kill Protection
 
And your plugin differs from the other 2 already created in what?

berni 08-15-2009 15:27

Re: Spawn & Kill Protection
 
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

shustas 08-15-2009 16:22

Re: Spawn & Kill Protection
 
fair enough :)

berni 08-18-2009 10:41

Re: Spawn & Kill Protection
 
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

Maxis010 09-16-2009 09:13

Re: Spawn & Kill Protection
 
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

R@ndom 09-27-2009 04:27

Re: Spawn & Kill Protection
 
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 09-27-2009 04:49

Re: Spawn & Kill Protection
 
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 :)

berni 09-27-2009 10:42

Re: Spawn & Kill Protection
 
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.

CS:S* 09-29-2009 16:55

Re: Spawn & Kill Protection
 
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 ?


All times are GMT -4. The time now is 07:48.

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