PDA

View Full Version : Spawn Protection v1.5


Fredd
03-09-2008, 08:03
Spawn Protection Version 1.5

this plugins spawn protect people! and makes them glow in a very sexy way! yay, i have only tested this in CSS but it should work for everything..and thx for ferret for the render stock <3 check screenshot :D

Supported Mods

CSS
TF2
HL2 DM
INS
DOD

if you would like support for a different mod just post the name..

Cvars
sp_on - turns on/off spawn protection (Default 1 = on)
sp_time - amount in seconds till spawn protection is off(Default 5)
sp_notify - turns on/off notification (Default 1 = on)
sp_color - lets you set the color of the players when they are protected, "red green blue amount" amount is like transparency (Default = "0 255 0 120") max value for each field is 255...

Changelog

1.0 intial release
1.1 fixed timer problems..
1.2 another time issue, added a few conditional statements and chat notice messages
1.3 cleaned up the code, and fixed issue were spawn protection starts from the moment you are selecting a team.
1.4 Beta: added different mods support, UNTESTED!
1.5 added two new cvars one for color and one for notify... oh and AutoExecConfig, thx to whoever posted it

Fredd
03-09-2008, 23:05
fixed some timer problems...

Nican
03-09-2008, 23:21
I think if you made "offset" a global and put "offset = GetEntSendPropOffs(index, "m_clrRender")" in OnPluginStart

And I think you are using timers kind of wrong, read this:
http://wiki.alliedmods.net/Timers_%28SourceMod_Scripting%29


Other wise, good job :D

Fredd
03-10-2008, 00:59
ok i fixed the timer issue(again) and added some thigns, just look at the changelog

Nican: thats waste of lines lol

JDoc0512
03-11-2008, 07:11
does it work with rpg mod? I had to disable deathmatch spawn protection because it won't let players to spawn with additional health they purchased

Fredd
03-11-2008, 10:54
it should work fine, try it.

guys i want some feedback on this.

Fredd
03-12-2008, 02:29
updated.

NeO|GoD|LDR|SturmTiger
03-13-2008, 07:54
is there a version of this that will work with dod 1.3 ? since you changed it before I could download the older version ?

Fredd
03-16-2008, 02:23
hm ill try finding the team id's for DOD and then ill update it.

1695
03-16-2008, 07:52
Hi ! like JDoc0512 I was searching for a SpawnProtection which would work with CSSRPG. I'm gmad I found one !

One request :
- The ability to disable the advert... kind of repetitive when CSS:DM is enabled !

Thanks a lot !

JDoc0512
03-17-2008, 08:45
Hi ! like JDoc0512 I was searching for a SpawnProtection which would work with CSSRPG. I'm gmad I found one !

One request :
- The ability to disable the advert... kind of repetitive when CSS:DM is enabled !

Thanks a lot !

just look at the source code, remove the lines where it makes announcements, and recomplie to get a smx file at sourcemod.com

1695
03-18-2008, 07:07
That's what I've done as soon as I downloaded the plugin ;-)
Just told you that because maybe other people will want to disable it ? Anyway, your plugin is simple but great !

JDoc0512
03-18-2008, 07:08
it's Fredd's plugin just in case you haven't noticed :mrgreen:

Fredd
03-18-2008, 11:12
chill guys he was just trying to help, if you guys want a cvar to turn off the chat messages ill make one.

1695
03-18-2008, 12:43
JDoc0512 => Yeah, I know that it's fredd's !?

Fredd => up to you ! Personnally I edit the source, but maybe some other with absolutly no knowledge is scripting will prefere a cvar ^^ Do as you want, I'm done here, your plugin works perfectly for me, I don't need anything else :)

blackcat75
03-22-2008, 20:40
Hello,

Are you sure your mod work ? :cry::shock:

Tested in 3 servers and we have the same message :

Failed, failed and failed...

http://img262.**************/img262/3281/01ev5.gif

SourceMd 1.0.0.181

http://img262.**************/img262/5509/02mt7.gif

JDoc0512
03-22-2008, 21:01
Hello,

Are you sure your mod work ? :cry::shock:

Tested in 3 servers and we have the same message :

Failed, failed and failed...

SourceMd 1.0.0.181



it works flawlessley on my 12 source based game servers
so you must be doing something wrong

Fredd
03-22-2008, 23:58
blackcat75@:
try using 1.3

Private Dyin
03-23-2008, 07:59
... if you open the code and change line 4 and 5, the spectator and unsigned teams values for your game it should fine with no problems.


Sorry but I'm a noob at these things and have no idea how to find out those values. I'd like to get this to work on Insurgency.

blackcat75
03-23-2008, 18:23
This is the last version I tested (first post)

So where can I found the last version ?

...

public Plugin:myinfo =
{
name = "Spawn Protection",
author = "Fredd",
description = "Adds spawn protection",
version = "1.2",
url = "www.sourcemod.net"
}

public OnPluginStart()
{
CreateConVar("spawnprotection_version", "1.3", "Spawn Protection Version", FCVAR_PLUGIN|FCVAR_SPONLY|FCVAR_REPLICATED|FC VAR_NOTIFY);

SpawnProtectionEnabled = CreateConVar("sp_on", "1", "");
SpawnProtectionTime = CreateConVar("sp_time", "5", "");

RenderOffs = FindSendPropOffs("CBasePlayer", "m_clrRender");

...

Fredd
03-24-2008, 01:50
hm yeah thats a typo mybad, anyways im working on a new version that will hopefully support the popular games...

Private Dyin
03-24-2008, 08:45
hm yeah thats a typo mybad, anyways im working on a new version that will hopefully support the popular games...

Insurgency too? :)

Fredd
03-24-2008, 15:33
hopefully.

Fredd
04-01-2008, 20:55
updated, look at the first post.

this is a untested feedback would be nice.

Private Dyin
04-01-2008, 23:05
Just quickly tested on an empty test server that I dragged a clanmate into. It works on Insurgency. For the 5 seconds you turn kind of translucent and I can empty a magazine into you with blood spraying but he doesn't die. :) Are we able to play around with the colour that you become while spawn protection is on or is this tranlucence what we're stuck with?

Other than that thank you very much for your work. :up:

Fredd
04-02-2008, 00:48
ill try adding a convar for the color :D

KezJarran
05-07-2008, 09:01
Ok is there an idiots guide on how to get this working on a DODS server ?

At the moment i have mani admin on there,, so can some one guide me plares on what to add where, in real simple terms.

Many Thanks

Fredd
05-07-2008, 17:56
click the "get plugin" button on the first post, download the "SpawnProtection.smx" and place it under addons/sourcemod/plugins/ and thats it!

Caught off Guard
05-08-2008, 17:13
ill try adding a convar for the color :D

hi,

im thinking about implimenting SP on my insurgency server. did you get round to setting a colour or wiping colour out so the player models look "normal" even when protected.

thanks in advance.

disconnect81
05-19-2008, 22:29
Would it be possible to make it so that their protection is disabled when they fire a weapon? Id like to add this to my dods server, but I dont want people running around with 1000 health killing everyone else hehe.

nenTi
06-12-2008, 09:03
hi, can you add antiblock for the spawnprotection?
so people can not block each other at the spawn point?

we are running a 32 Slot Insurgency Server with your
Plugin and really need a anti block for the spawn players.
But we dont want to install antiblock plugin because pushing
each other to another elevation level can be part of a tactic
in insurgency.

so it should only anti block the spawners ;)

imported_Anth0ny
06-17-2008, 02:43
nice work! =)

how about TF2? how this plugin works?
it protects at respawn area only or it can to protect players at all lenght Preparing Time?

Lord Max
08-17-2008, 16:33
I have just installed this mod on my Team Fortress 2 server.

It is a very good plugin and is just what I was looking for, thanks.

Great plugin, especially for TF2, works fine and the colour change is usufully effective.

Thanks again,

Max

Sgt-Mess
08-28-2008, 00:35
When you first spawn it tells you spawn protection is now off twice "2 times".

After that its fine, This was in Insurgency on a linux box.

Lord Max
08-28-2008, 11:55
When you first spawn it tells you spawn protection is now off twice "2 times".

After that its fine, This was in Insurgency on a linux box.

Hey,

Yeh don't worry this does this on my server as well. I don't really know why it does this but it only does it the time when you first join the server and start playing.

After that the plugin works fine, and personally I feel it's one of the best spawn protection plugins around so I will be using it on my server for the future.

Thanks, hope that helps,

Lord Max

Fredd
08-28-2008, 23:03
yeah that means you are being respawned twice, it's prob because its deathmatch making sure when you spawn you are not by any enemies by the game itself.

Silent_Water
09-27-2008, 10:01
Works fine on DOS:S latest Patch (Palermo) and SourceMod 1.1 SVN

Great work!!!

I've added a line

AutoExecConfig(true, "spawn_protection");
on line 78 (after creating ConVars) just to make a separate config for spawn protection. It can be found in your cfg/sourcemod/ folder as spawn_protection.cfg and has two settings:


// enable (1) spawn protection
sp_on 1

// time a player is spawn protected (not vulnerable)
sp_time 5

abelp
11-10-2008, 01:32
I removed the 2 lines of code where PrintChatToAll so it would'nt keep advertising when it starts and stops spawnprotection.
Im not a coder but i figured that was common sense to me. Is that the way to not make it print to chat?

Blowin.oO
03-22-2009, 15:47
does this work for dods???? Source>
nvm :P Works fine on DOS:S latest Patch (Palermo) and SourceMod 1.1 SVN

Dundeex
03-23-2009, 11:00
Hi. First of all, thank you for this plugin!

Im going to use this protection on our gungame server. So i think that 5 secs is to much time to be protected. Is there any way to change that?

Greets, Dundeex.

krzynek1
03-23-2009, 14:26
put this cvar in your server.cfg


sp_time 3

3 is just example

Fredd
04-16-2009, 22:50
Hai. update.

zhelev81
04-17-2009, 08:08
I would like to give you an idea Fredd.Can you do another spwan protection plugin which does the following :

Protected whole the round ,and if you hit team player damage to be done to you but not to the team player .In this way everyone will be playing carefully and not like now shooting like crazy all over the map :wink:

Can you create this plugin ?

Fredd
04-17-2009, 12:01
zheleve81: there is a request forum :D

shustas
04-17-2009, 12:57
On spawnplayer why chat print colors?

Fredd
04-17-2009, 13:52
On spawnplayer why chat print colors?

sp_notify 0

to turn it off.

shustas
04-17-2009, 13:55
Line 129 got nothing to do with sp_notify im afraid

Fredd
04-17-2009, 14:32
oops sorry about that... was using it as a debug message... try now.

RickyInsanity
04-18-2009, 01:26
ahah this is cool. lol worked great for my DoD:S server ^_^

ty

zhelev81
04-18-2009, 11:14
zheleve81: there is a request forum :D

I request this before ,nobody care .... I tought that u may help ... but i think not ...

Tnx anyway

deadandgone
06-08-2009, 13:33
Is it possible to get this to work with ZPS? The main problem with the spawn protection is when a player turns from human to zombie they are protected for however long is set so they can kill lots of people :)

Is there a way to prevent this from happening with your plugin maybe?

templetonpeck
06-18-2009, 14:55
One Question: I would like to put the Protection to 1,5 Seconds.

Should i use 1,5 or 1.5...

Just to ensure that it doesnt last for 1,5 minutes..

entourage
08-14-2009, 13:25
FYI, no longer works with the new TF2 update. Using SM 1.2.2 hg 2737.

entourage
08-18-2009, 10:27
Updating to the 2738 version of SM fixed this issue.

GTA
09-25-2009, 14:30
sp_notify 0
Unknown command: sp_notify
tryed in console
tryed in server.cfg
and added 0 to pluggin sp_notify

Game HL2DM

chriser
10-14-2009, 00:29
Hello...

Yes one more dumb question... I've now ben looking at this for some time... And i wonder? Where do i place this file? Do i place it in eventscript? Or where do i place it?

And how do i edit the timer of how long i want the spawn protectiong?
Counter Strike:Source
I just hoped i could get some answers, cause i look forward to use this

Thank you for reading

BLeeK
11-15-2009, 18:00
Will this work for gun game (Deathmatch) and if not is there one that will work?

Warbucks
02-22-2010, 11:07
It would be nice if there was an option to disable spawn protection if the player fires their weapon during the time they are protected.

HALOGREG8889
03-21-2010, 16:47
i dont have a plugins folder help
ps im a newbie to sever makeing and i want cool thing for my sever

shustas
06-25-2010, 14:29
gets crazy on new CSS update, players dont loose protection green color, or some dont get hte color on spawn...

kore
06-27-2010, 01:31
On my updated server, works great, without any problems.

SM 1.3.3, MM 1.8.2

ssphreak
07-05-2010, 14:10
It would be nice if there was an option to disable spawn protection if the player fires their weapon during the time they are protected.

This plugin works great on my server - But I second this motion - cancel on fire would make this plugin supreme!!!

turk89
07-16-2010, 05:13
Edit: Problem solved.

ssphreak
08-16-2010, 13:27
Still no cancel spawn protection on fire? Bummer - alot of people like that option from gg5. Also a cvar to remove notifications in chat would be great since it is kinda not needed (for most)

thanks - phreak

Böhser Onkel Leo
08-20-2010, 12:47
Hey!
First sry for my bad english!... I have a Question: is it possible to add a cvar which turn spawnprotection of if somebody starts shooting...

Leo

Speak
10-16-2010, 15:11
The plugin works but whenever I put a command in the console it comes up as unknown -.-''

FuFU
01-18-2011, 10:45
How to insert it to plugin, sry for the bad question but i'm new at Sourcemod ...
Need it becouse of the DM spawnprotection dont work fine with RPG...

coty9090
01-06-2012, 22:41
Is there a way to set the cvars in the server.cfg? i put them in but every map change it changes back to default.

ph
01-17-2012, 14:56
the players seem to have 500+ even after when the time protection time expires.

Poi5on
03-06-2012, 16:56
Does someone kno why i get the chat message 2x ?

Willywonka
05-07-2012, 06:12
How do you UN-INSTALL


I removed .smx to disabled and yet its still spamming "protected no longer protected" (I also removed the automated .cfg cvar) is there anything else im missing?

and glowset blue or red on users in spawn for default 3-5sec....

lil help please sir

The mod works flawless and had no issues there but it effects my Donation glow settings say a donor sets glow pink at death the transparent default green will disable it and the donor will have to set his color again each death...

AeroAcrobat
05-07-2012, 07:43
How do you UN-INSTALL


I removed .smx to disabled and yet its still spamming "protected no longer protected" (I also removed the automated .cfg cvar) is there anything else im missing?

and glowset blue or red on users in spawn for default 3-5sec....

lil help please sir

The mod works flawless and had no issues there but it effects my Donation glow settings say a donor sets glow pink at death the transparent default green will disable it and the donor will have to set his color again each death...

delete or move the smx to disabled folder.
after this do a map change or restart server.
may check after this: sm plugins list if everything is corectly running.

you can also delete the config file in .../cfg/sourcemod

Willywonka
05-07-2012, 07:46
lol I did that.. DUH

But after all that is done there is still something running

they will glow red and say "you are no longer protected"

I tryed

Map change
Server Restart
sm plugins refresh
sm plugins list
DELETED/RENAMED .cfg ALSO

"it will not show up in sm plugins list"

so IT IS DISABLED and not running

it IS disabled but there is something else like a cvar that is making it run

68.233.249.97:27351 heres a server that you may join to see what im talking about

AeroAcrobat
05-07-2012, 09:02
lol I did that.. DUH

But after all that is done there is still something running

they will glow red and say "you are no longer protected"

I tryed

Map change
Server Restart
sm plugins refresh
sm plugins list
DELETED/RENAMED .cfg ALSO

"it will not show up in sm plugins list"

so IT IS DISABLED and not running

it IS disabled but there is something else like a cvar that is making it run

68.233.249.97:27351 heres a server that you may join to see what im talking about

if you have removed / disabled the .smx from your plugins folder then it must be another plugin.
you may try to disable plugin by plugin or frist check your donatro color plugin if it is causing the problem.

Willywonka
05-08-2012, 08:28
Ya I checked that but is was not causing this ISSUE before adding this protection

What ima do is take this guys code and remove the transparent and release a 1.6 its been since 09 someone touched it..

I just want it disabled what im thinking it is SMAC client protection saying it.

It was ADVCOMMANDS.smx causing it!

but i am still going to re-write this guys work clean it up some and make it more "endgame"

odin
05-10-2012, 23:04
If you rewrite it to remove the color I will for sure download and use it. It screws up stealth on sourcerpg mod. Ill be watching for your work!

wtfaatp
09-13-2012, 01:37
ANy chance of getting this to work on GO and getting "Cancel on Fire?"

mirage2k
12-06-2012, 20:18
Can somone give me the .cfg for download pls?
my server dont put it automatic on my FTP Server :(

ALKINDA
11-19-2013, 03:20
Can somone give me the .cfg for download pls?
my server dont put it automatic on my FTP Server :(

// This file was auto-generated by SourceMod (v1.6.0-dev+4166)
// ConVars for plugin "SpawnProtection.smx"


// -
// Default: "0 255 0 120"
sp_color "0 255 0 120"

// -
// Default: "1"
sp_notify "1"

// -
// Default: "1"
sp_on "1"

// -
// Default: "5"
sp_time "5"

// Spawn Protection Version
// -
// Default: "1.5 [CS:GO Support]"
spawnprotection_version "1.5 [CS:GO Support]"

KillBill74
12-09-2013, 02:58
Hello Folks,

can someone help me? I need to disable the sp_color for this plugin. I am running NotD-Store on my Server and when the players buy a glow it works only for 10 seconds (this is my spawnprotect-time).

I think I need to disable the sp_color in this plugin. How can i realize that? Thanxk in advance!

Greetz
Alex aka KillBill74

P.S.: I need this plugin only protect CT because I am running a ZRiot-Server.

maxolahird
04-11-2014, 09:23
Hello Folks,

can someone help me? I need to disable the sp_color for this plugin. I am running NotD-Store on my Server and when the players buy a glow it works only for 10 seconds (this is my spawnprotect-time).

I think I need to disable the sp_color in this plugin. How can i realize that? Thanxk in advance!

Greetz
Alex aka KillBill74

P.S.: I need this plugin only protect CT because I am running a ZRiot-Server.

There you go.

-- Untested tho but should work --

--- Also attaching one version with translation support! ---
>> Phrases file to use attached too.

Kaharos
07-17-2014, 17:35
A question to this plugin: does it disable EVERY spawn protection or only that of this plugin?
Thanks in Advance,
Kaharos

Imitation
05-23-2015, 01:35
Just an idea. In certain games / modes / maps it's not good to have the same spawn protect times. Sometimes it might be 3 seconds and others it might be 10 seconds as the ideal time. Would be good if times could change based on maps.

pubhero
12-29-2015, 04:38
Anyone can do a weapon colors version too?
Like this plugin for players, but for the weapons.
Spawn protection not need ofc. Only give setable colors for all weapon on roundstart in the first x seconds.
Why? CS:S is a bugmine. :D Sometimes the player spawn with the invisible weapon.
This plugin what i search, must solve this problem.
Thanks in advance.

KALASH NICOLE
07-15-2016, 09:17
hello. i'm using it for Insurgency 2014 (pvp) . but the plugin only works for the security team, not for insurgents. what to change to get it working for both teams ?

KALASH NICOLE
07-15-2016, 13:16
Ok I found myself how to modify the plugin, to make it works for both team :

} else if(StrEqual(ModName, "Insurgency", false))
{
TeamSpec = 1;
TeamUna = 0;
NoTeams = false;
--------

TeamSpec = 1 (default was 3)

sil_El_mot
08-02-2016, 10:44
Nice thing @Kalash Nicole

is there a way to disable spawnprotection just for bots?

Grey83
07-14-2018, 06:03
A little bit fixed the code (now the correctness of the entered color values ​​will be checked, the values ​​of convars will be obtained only if they change, but not with each spawn of players and other small optimizations)
P.S. Added disabling protection when trying to use a weapon by the player

puma133
12-19-2020, 18:45
A little bit fixed the code (now the correctness of the entered color values ​​will be checked, the values ​​of convars will be obtained only if they change, but not with each spawn of players and other small optimizations)
P.S. Added disabling protection when trying to use a weapon by the player

Illumination of players does not work, they are invisible. How fix it ?