Raised This Month: $66 Target: $400
 16% 

Anti-Spawnkill God (V 1.0)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Gameplay        Approver:   Exolent[jNr] (178)
Grinf4ce
Senior Member
Join Date: May 2006
Old 06-22-2008 , 04:11   Anti-Spawnkill God (V 1.0)
Reply With Quote #1

ANTI-SPAWNKILL GOD
Version 1.0

Hello! This is my first plugin ever. I'm a beginner at Pawn, but leanring every time more
I hope its usefully, i needed it for my Gungame Deathmatch-Server, because everyone spawnkilled all the time, and that sucks very hardly *g*.


DESCRIPTION:
The Anti-Spawnkill-God (SKG) protect every player who spawn for a certain amount of seconds. You can choose between two modes:

Mode 1: Godmode
The Player get godmode for X seconds and cant get damage. After X seconds, the godmode will removed and the player can damaged again.

Mode 2: Protect Health
The Player get more HP and AP for X seconds (certain through a cvar). After X seconds it will set to a cvar amount of health and ap back.


FEATURES:
*) Choose between 2 modes.
*) Player glow in a color you certain through a cvar.
*) Work with bots.
*) Specified Protecttime each map. If you dont do it, every map have the default skg_delay time.
*) Shows a warning, if you aim a protected player
*) On Spawn you see a timebar, which shows you howlong your protecttime left.
*) Disable SKG ([Anti]-SpawnKill God) by setting <seconds> in mapfile to 0.



CVAR's:
skg_mode (Default: 1)
Anti-Spawnkill God - 1: Godmode , 2: ProtectHealth

skg_protecthp (Default: 100)
Needed if skg_mode is 2: ProtectHP on Spawn

skg_protectap (Default: 100)
Needed if skg_mode is 2: ProtectAP on Spawn

skg_normalhp (Default: 100)
Needed if skg_mode is 2: HP after Protect Delay

skg_normalap (Default: 100)
Needed if skg_mode is 2: AP after Protect Delay

skg_glow (Default: 1)
If 1, player will glow if he is protect through Anti-Spawnkill God

skg_glow_r (Default: 000)
Needed if skg_glow is 1: Color of glow (RGB) .. Red

skg_glow_g (Default: 255)
Needed if skg_glow is 1: Color of glow (RGB) .. Green

skg_glow_b (Default: 000)
Needed if skg_glow is 1: Color of glow (RGB) .. Blue

skg_warning (Default: 1)
Shows a warning, if someone aim a protect player.

skg_timebar (Default: 1)
Shows yourself an timebar how long your protect left.

skg_delay (Default: 5.0)
Spawnprotection Delay (in Seconds .. example.: 10.0)


SPECIFIE PROTECT-TIME EACH MAP:
1.) Create a configfile in amxmodx/configs/.
2.) Rename it to "skg_map.cfg"
3.) One Map per line in following format:
Quote:
<mapname> <seconds>
Specified <mapname> protecttime to <seconds> seconds.
example:
Quote:
cs_assault 4
Specified cs_assault protecttime to 4 seconds.
If you set <seconds> to 0, SKG will disabled for this map.

4.) Save it and restart server.
5.) Done


REQUIRES:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>


SERVER RUNNING SKG
Check it (Some *g*)


CHANGELOG:
Version 0.2:
- First release
Version 0.2.1:
- Fixed fullupdate Issue. Thanks to connorr [Working on better solution...]
Version 0.3:
- The funmodule is'nt needed anymore.
- You need fakemeta for this plugin.
Version 0.4:
- Update Source :: Thanks to connor and atomen.
Version 0.5:
- You can specifed for every map own spawnprotect-times.
Version 1.0:
- You can now disable SKG for specifed maps (set seconds to zero in mapfile).
- Timebar now available (shows your own protect).
- Warning now available (shows a warning if you aim a protect player).


I hope you can use it :-) I have tested it on my server without any problems.
- Grinf4ce


Total Downloads without v1.0: 26
Latest Anti-Spawnkill God (Version 1.0 [06-28-2008]) - Download here:
Attached Files
File Type: sma Get Plugin or Get Source (anti_spawnkill_god.sma - 5112 views - 7.4 KB)
__________________

Last edited by Grinf4ce; 06-28-2008 at 08:41. Reason: Update to Version 1.0
Grinf4ce is offline
4dd3
New Member
Join Date: Jun 2008
Old 06-22-2008 , 05:00   Re: Anti-Spawnkill God
Reply With Quote #2

First Post :]

Great Plugin ! I'm downloading right now +K !
Glad someone made a new spawn protection.
4dd3 is offline
Killer12201
Senior Member
Join Date: Dec 2007
Old 06-22-2008 , 05:17   Re: Anti-Spawnkill God
Reply With Quote #3

If you go with Protect HP and AP does it bring your hp up and you can still get attacked? Well what if you go lower then 100 hp does it still bring them both back to 100?
__________________
Killer12201 is offline
Grinf4ce
Senior Member
Join Date: May 2006
Old 06-22-2008 , 05:20   Re: Anti-Spawnkill God
Reply With Quote #4

Yes you can attack if you choose Protect HP. But you have more Healths, so you died slower. If you go lower than 100 HP, you get i back by CVAR. Because, in the first X seconds, you can only spawnattacked, and nothing else (my opinion). If you set Normalap to 0, you lose your AP which you get through ProtectHealth.
__________________
Grinf4ce is offline
Killer12201
Senior Member
Join Date: Dec 2007
Old 06-22-2008 , 05:21   Re: Anti-Spawnkill God
Reply With Quote #5

I think you should make it so if they have godmode when they spawn and it lasts for a certain amount of time they cannot attack. It would be unfair for them to shoot at people when people cannot shoot back.
__________________
Killer12201 is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-22-2008 , 05:26   Re: Anti-Spawnkill God
Reply With Quote #6

You should look at this tut to see how properly catch a spawn event :
http://forums.alliedmods.net/showthread.php?t=54887

Then you can get rid of issues (player can be protected by typing 'fullupdate' in console or by recording a demo)
__________________
- tired and retired -
ConnorMcLeod is offline
Grinf4ce
Senior Member
Join Date: May 2006
Old 06-22-2008 , 05:31   Re: Anti-Spawnkill God
Reply With Quote #7

Oh i see..
I'll fix it in some minutes..

Thank you.
__________________
Grinf4ce is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 06-22-2008 , 05:43   Re: Anti-Spawnkill God
Reply With Quote #8

Hey, take your time ;)
It's usually bad to post the first plugin you made.

As you'll need to use fakemeta, i suggest you to include fakemeta_util and to replace all fun's native with FM ones (fm_set_user_godmode, fm_set_user_hp ...), so you can only use fakemeta module.
__________________
- tired and retired -
ConnorMcLeod is offline
Grinf4ce
Senior Member
Join Date: May 2006
Old 06-22-2008 , 05:57   Re: Anti-Spawnkill God
Reply With Quote #9

Hehe, i only written some other mini plugins for me like givehp and something like this. this is my "first" (for me) good plugin

Would it work, if i catch the fullupdate command?
I use following commandline in plugin_init():
Code:
register_clcmd("fullupdate", "cmd_fullupdate")
And:
Code:
public cmd_fullupdate() {    
return PLUGIN_HANDLED_MAIN;
}
But i dont understand why to use fakemeta? It is better or faster than funmodule? Please explain me
__________________
Grinf4ce is offline
AntiBots
Veteran Member
Join Date: May 2008
Location: La Plata, Bs As, Argenti
Old 06-22-2008 , 05:59   Re: Anti-Spawnkill God
Reply With Quote #10

Exelent for me when i play a map this many players.
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
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 07:13.


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