Release Anti SpawnKills
#1
Hi everyone,

Sorry for my bad English again, but I'm still a Swiss since my last topic Wink

I would like to release this small anti spawnkills plugin.
I made it because this week i played a lot on the face off maps, and sometimes the respawns were terribly bads....
You can set a deadline by which the players can not kill or be killed. (after spawn)
And you can chosse if it tells to players when they shot/are shoted by players during that free spawn time...

Add those lines to the sv_config.ini :
Code:
[AntiSpawnKills] Enabled=1 // 0 or 1 SpawnFreeDelay=3 // Free time with no kills / deaths possible in seconds SpawnFreeDelayShotInfo=1 // Indicate to the attacker and the victim when they shot/are shoted by players during the free spawn delay

Csharp source code :
Code:
using System; using System.Collections; using System.Text; using Addon; namespace AntiSpawnKills { public class Class1 : CPlugin { // Create an array of datetimes private DateTime[] players_list = new DateTime[18]; // Store the plugin status private string enabled = "0"; // Store the free spawn delay private int free_spawn_delay = 0; // Store the free spawn delay shot info private int free_spawn_delay_shot_info = 0; public override void OnServerLoad() { // Get the plugin status enabled = GetServerCFG("AntiSpawnKills", "Enabled", "0"); // Get the free spawn delay free_spawn_delay = Int32.Parse(GetServerCFG("AntiSpawnKills", "SpawnFreeDelay", "2")); // Get the free spawn delay shot info free_spawn_delay_shot_info = Int32.Parse(GetServerCFG("AntiSpawnKills", "SpawnFreeDelayShotInfo", "1")); // Print plugin loaded ServerPrint("Plugin AntiSpawnKills loaded! (Enabled => " + enabled + ")"); } public override void OnPlayerSpawned(ServerClient Client) { // If plugin is enabled if (enabled == "1") { // Store the player spawn DateTime players_list[Client.ClientNum] = DateTime.Now; } } public override int OnPlayerDamaged(ServerClient Attacker, ServerClient Victim, String Weapon, int Damage) { // If plugin is enabled if (enabled == "1") { // If the attacker is not the victim if (Attacker.XUID != Victim.XUID) { if (DateTime.Now.Subtract(players_list[Attacker.ClientNum]).TotalSeconds <= free_spawn_delay) { // If the Attacker is in free spawn delay // Set damage to 0 Damage = 0; // If free spawn delay shot info is enabled if (free_spawn_delay_shot_info == 1) { TellClient(Attacker.ClientNum, "Impossible to kill during free spawn (" + Math.Round(free_spawn_delay - DateTime.Now.Subtract(players_list[Attacker.ClientNum]).TotalSeconds, 2) + " s. left)", true); TellClient(Victim.ClientNum, "You were shoted by a player in free spawn (" + Math.Round(free_spawn_delay - DateTime.Now.Subtract(players_list[Attacker.ClientNum]).TotalSeconds, 2) + " s. left)", true); } } else if (DateTime.Now.Subtract(players_list[Victim.ClientNum]).TotalSeconds <= free_spawn_delay) { // If the Victim is in free spawn delay // Set damage to 0 Damage = 0; // If free spawn delay shot info is enabled if (free_spawn_delay_shot_info == 1) { TellClient(Attacker.ClientNum, "The player is in free spawn (" + Math.Round(free_spawn_delay - DateTime.Now.Subtract(players_list[Victim.ClientNum]).TotalSeconds, 2) + " s. left)", true); TellClient(Victim.ClientNum, "You were shoted during free spawn (" + Math.Round(free_spawn_delay - DateTime.Now.Subtract(players_list[Victim.ClientNum]).TotalSeconds, 2) + " s. left)", true); } } } } // Return the final damage return Damage; } } }

I'm open to every suggestions or comments.
Have Fun!


Attached Files
.zip   AntiSpawnKills.zip (Size: 2.46 KB / Downloads: 178)
Reply

#2
Nice release, is nice to see new plugins getting released everyday Cool
Reply

#3
Thanks!
I'll do my best to do good plugins Wink
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [Release] iSnipe anti hardscope mutant 0 4,788 11-06-2013, 11:27
Last Post: mutant
  Need An Anti Hack Manuadminmod worldclass 2 4,814 10-14-2013, 09:57
Last Post: d0h!
  Searching for Anti HS ExoGamer* 10 9,494 08-08-2013, 12:39
Last Post: aceed
  [Release] Anti-Invisible Name master131 24 27,476 05-02-2013, 14:15
Last Post: .sepultura.
Wink Preview ANTI ZOOMBYE! [HARD] Tony. 9 8,554 03-02-2013, 17:35
Last Post: Nukem
  [Request] MW3 anti TI smasher MADD_DOGG 3 4,581 12-17-2012, 13:52
Last Post: MADD_DOGG
  Mw3 anti-cheat estebespt 18 19,761 12-04-2012, 22:50
Last Post: claudiocorona
  anti-hack ersin_ 8 8,632 10-29-2012, 14:45
Last Post: SuperNovaAO
  [Request] Anti block Plugin | Infected Kasperle 2 3,975 10-06-2012, 18:41
Last Post: DidUknowiPwn
  [Tutorial] Anti-Lag Guide iPaddie 5 7,081 09-28-2012, 18:56
Last Post: JariZ

Forum Jump:


Users browsing this thread:

Forum Powered By MyBB, Theme by © 2002-2026 Melroy van den Berg.