diff --git a/README.md b/README.md index 8b0f686..dc0c96f 100644 --- a/README.md +++ b/README.md @@ -281,6 +281,7 @@ An idea that you can either manually or have events (friendly fire, new player j Currently **in development.** Currently auto triggers: + 1. On any recent friendly fire (only triggers once per 100 game ticks) 2. Any new player joins (only triggers once per 100 game ticks) @@ -300,6 +301,8 @@ Any survivor that attacks another survivor 1. If within first 2 minutes of joining, no damage is dealt to either victim or attacker. This prevents the next person to join being punished. 2. If during the finale vehicle arrival, they do 0x damage to victim and take 2x reverse friendly fire 3. If neither #1 or #2, both the victim and the attacker take 1/2 the original damage +4. If victim is in a saferoom, no damage is dealt. + During any of the above three conditions, if they deal (or attempt to deal) over 75 HP in 15 seconds they will be instantly banned for a set period of time (60 minutes). If they are for sure a team killer, it can be extended to a permanent ban. diff --git a/plugins/l4d2_TKStopper.smx b/plugins/l4d2_TKStopper.smx index 7b2f090..7860844 100644 Binary files a/plugins/l4d2_TKStopper.smx and b/plugins/l4d2_TKStopper.smx differ diff --git a/scripting/l4d2_TKStopper.sp b/scripting/l4d2_TKStopper.sp index 9b5ab21..8630e12 100644 --- a/scripting/l4d2_TKStopper.sp +++ b/scripting/l4d2_TKStopper.sp @@ -12,6 +12,8 @@ #include #include #include +#include + bool lateLoaded, IsFinaleEnding; int iJoinTime[MAXPLAYERS+1]; float playerTotalDamageFF[MAXPLAYERS+1]; @@ -100,7 +102,7 @@ public Action Event_OnTakeDamage(int victim, int& attacker, int& inflictor, flo return Plugin_Stop; } //If the amount of MS is <= join time threshold * 60000 ms then cancel - if(GetTime() - iJoinTime[attacker] <= hJoinTime.IntValue * 60000) { + if(L4D_IsInFirstCheckpoint(victim) || L4D_IsInLastCheckpoint(victim) || time - iJoinTime[attacker] <= hJoinTime.IntValue * 60000) { return Plugin_Stop; }else { SDKHooks_TakeDamage(attacker, attacker, attacker, IsFinaleEnding ? damage * 2.0 : damage / 2.0);