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

Anti Spawn Kill V1.5 (Updated 15/7/2017 )


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   Counter-Strike        Category:   Gameplay        Approver:   HamletEagle (36)
eyal282
Veteran Member
Join Date: Aug 2011
Old 08-29-2016 , 18:34   Anti Spawn Kill V1.5 (Updated 15/7/2017 )
Reply With Quote #1

I must say, I was pretty amazed that I couldn't find this type of plugin, so I had to script one.

Cvars:
amx_antisk_enable - Enables the plugin ( Default: 1)
amx_antisk_type - 0 = gives godmode on spawn, 1 = prevents damage from players ( personally used in surf to allow damage to self a.k.a fall damage ( Default: 1)
amx_antisk_timer - For how long will the SK protection be active ( Default: 1)
amx_antisk_shoot - Whether shooting or second attack ( mostly sniper ) will disable SK Protection ( Default: 1)

Changelog:

V1.0:
Created the plugin.

V1.1:
Made it better.

V1.2:
Added a check if the victim is connected in the event of damage.

V1.3:
As Hamlet told me to, added the task in plugin init.

V1.4:
More fixes that Hamlet told me to do.

V1.5
This time a fix by Hamlet himself.
Attached Files
File Type: sma Get Plugin or Get Source (AntiSpawnKill.sma - 4016 views - 4.6 KB)

Last edited by eyal282; 07-15-2017 at 12:52.
eyal282 is offline
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 08-29-2016 , 18:55   Re: Anti Spawn Kill
Reply With Quote #2

I think this plugin can be better. I like what you made with the PreThink function
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 08-29-2016 at 18:55.
EFFx is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 08-30-2016 , 10:20   Re: Anti Spawn Kill
Reply With Quote #3

Quote:
Originally Posted by EFFx View Post
I think this plugin can be better. I like what you made with the PreThink function
Thanks

Why should I be shot by a godmode?

How can you make this plugin better? Post something

Last edited by eyal282; 08-30-2016 at 10:32.
eyal282 is offline
icimaro1337
Junior Member
Join Date: Jan 2016
Location: Moldova, Chisinau
Old 08-30-2016 , 10:40   Re: Anti Spawn Kill
Reply With Quote #4

remove client_PreThink and use hamsandwich(ham_weapon_primaryattack, ham_weapon_secondaryattack)
icimaro1337 is offline
Send a message via Skype™ to icimaro1337
EFFx
Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
Old 08-30-2016 , 16:50   Re: Anti Spawn Kill
Reply With Quote #5

Here's a suggestions:

1. Remove player_PreThink(id) and add set_task with protection time for check if player has used the primattack or secattack.

Example:

PHP Code:
set_task(1.0,"CheckAttacks",id+2016,_,_,"a",get_pcvar_num(protecttime)) 
And check if player has disconnect and remove his time.

PHP Code:
remove_task(id+2016
2. If you're using return HAM_SUPERCEDE for block player receive damage, dont need add set_user_godmode(), i think you made it for block others plugins give godmode for players, right?

3. A check at HamBurger_Spawn(id) will not be bad. Add is_user_alive().

For me, thats all.
__________________
• Ranking System • AutoMix 5vs5 System
• Web Ban System • Plugins for free

____________________________________________
For private works:
• Discord: EFFEXo#8850 • Steam: EFFEXo

Last edited by EFFx; 08-30-2016 at 16:57.
EFFx is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 08-30-2016 , 19:55   Re: Anti Spawn Kill
Reply With Quote #6

1. No idea how to do that, can you show me?

2. Some prefer to allow fall damage, some don't, I allow them to make these choices.

3. Adding is_user_alive in hamburger somehow caused bugs if used in a DM ( meant for DM ), fixed it in a different method already.

For icimaro, for every single weapon?

Last edited by eyal282; 08-30-2016 at 19:57.
eyal282 is offline
safetymoose
Senior Member
Join Date: Feb 2015
Old 08-30-2016 , 20:49   Re: Anti Spawn Kill
Reply With Quote #7

Setting godmode is enough, i dont see why you had to go through all that trouble with prethink.

And i think the best method for this is the one used in the plugin zp50_spawn_protection from the Zombie Plague 5.0 collection.
safetymoose is offline
pupdebox
Senior Member
Join Date: Feb 2016
Location: Wakanda
Old 08-30-2016 , 21:55   Re: Anti Spawn Kill
Reply With Quote #8

Plugin:
https://forums.alliedmods.net/showthread.php?t=1886

There is also spawn protection feature in amx_super plugin i dont know if its older version or not. (Read:https://forums.alliedmods.net/showthread.php?t=228928).
Thats why he needs to use Ham_TakeDamage. amx_super could turn the godmode off depending on its timer.

Last edited by pupdebox; 08-30-2016 at 21:56.
pupdebox is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 08-30-2016 , 22:51   Re: Anti Spawn Kill
Reply With Quote #9

You should always check if the user is alive in Ham_Spawn since it is called at least once before the player can actually be spawned alive.
__________________
fysiks is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 08-31-2016 , 14:05   Re: Anti Spawn Kill
Reply With Quote #10

Quote:
Originally Posted by fysiks View Post
You should always check if the user is alive in Ham_Spawn since it is called at least once before the player can actually be spawned alive.

When I did that, the the plugin didn't work when I connected, only after that, what I've done now will prevent ( or hide, no idea ) all bugs.
eyal282 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 16:19.


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