mirror of
https://github.com/Jackzmc/sourcemod-plugins.git
synced 2025-05-06 02:53:21 +00:00
Update TKSTopper
This commit is contained in:
parent
8c99de0a98
commit
9dd192d66d
3 changed files with 6 additions and 1 deletions
|
@ -281,6 +281,7 @@ An idea that you can either manually or have events (friendly fire, new player j
|
||||||
Currently **in development.**
|
Currently **in development.**
|
||||||
|
|
||||||
Currently auto triggers:
|
Currently auto triggers:
|
||||||
|
|
||||||
1. On any recent friendly fire (only triggers once per 100 game ticks)
|
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)
|
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.
|
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
|
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
|
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.
|
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.
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -12,6 +12,8 @@
|
||||||
#include <sdktools>
|
#include <sdktools>
|
||||||
#include <sdkhooks>
|
#include <sdkhooks>
|
||||||
#include <jutils>
|
#include <jutils>
|
||||||
|
#include <left4dhooks>
|
||||||
|
|
||||||
bool lateLoaded, IsFinaleEnding;
|
bool lateLoaded, IsFinaleEnding;
|
||||||
int iJoinTime[MAXPLAYERS+1];
|
int iJoinTime[MAXPLAYERS+1];
|
||||||
float playerTotalDamageFF[MAXPLAYERS+1];
|
float playerTotalDamageFF[MAXPLAYERS+1];
|
||||||
|
@ -100,7 +102,7 @@ public Action Event_OnTakeDamage(int victim, int& attacker, int& inflictor, flo
|
||||||
return Plugin_Stop;
|
return Plugin_Stop;
|
||||||
}
|
}
|
||||||
//If the amount of MS is <= join time threshold * 60000 ms then cancel
|
//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;
|
return Plugin_Stop;
|
||||||
}else {
|
}else {
|
||||||
SDKHooks_TakeDamage(attacker, attacker, attacker, IsFinaleEnding ? damage * 2.0 : damage / 2.0);
|
SDKHooks_TakeDamage(attacker, attacker, attacker, IsFinaleEnding ? damage * 2.0 : damage / 2.0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue