Updates & Fixes

# Updates & Fixes
- New Commands: Added `!health` and `!plantedbomb` for testing and server management.
- Config: Client commands are now fully registerable via configuration files.
- Jester (Rework):
    - Refactored from a global mode to a per-player system.
    - Improved timer logic to prevent crashes during round resets.
    - Added special handling for bomb planting and defusing.
- SkillUtils: `AddHealth` now supports an optional `maxHealth` parameter.
- KillerFlash, LongKnife & LongZeus: Added `friendlyFire` options to skill configs.
This commit is contained in:
Juzlus 2026-04-03 04:09:30 +02:00
parent 97887118bf
commit 8634665983
12 changed files with 219 additions and 62 deletions

View file

@ -1,5 +1,4 @@
using CounterStrikeSharp.API;
using CounterStrikeSharp.API.Core;
using CounterStrikeSharp.API.Core;
using CounterStrikeSharp.API.Modules.Entities.Constants;
using CounterStrikeSharp.API.Modules.Utils;
using CS2TraceRay.Class;
@ -62,6 +61,8 @@ namespace src.player.skills
return;
if (target.Handle == player.Handle) return;
if (!SkillsInfo.GetValue<bool>(skillName, "friendlyFire") && player.Team == target.Team) return;
SkillUtils.TakeHealth(target.PlayerPawn.Value, 9999);
}
@ -70,9 +71,10 @@ namespace src.player.skills
SkillUtils.TryGiveWeapon(player, CsItem.Zeus);
}
public class SkillConfig(Skills skill = skillName, bool active = true, string color = "#6effc7", CsTeam onlyTeam = CsTeam.None, bool disableOnFreezeTime = false, bool needsTeammates = false, string requiredPermission = "", float maxDistance = 4096f) : SkillsInfo.DefaultSkillInfo(skill, active, color, onlyTeam, disableOnFreezeTime, needsTeammates, requiredPermission)
public class SkillConfig(Skills skill = skillName, bool active = true, string color = "#6effc7", CsTeam onlyTeam = CsTeam.None, bool disableOnFreezeTime = false, bool needsTeammates = false, string requiredPermission = "", float maxDistance = 4096f, bool friendlyFire = false) : SkillsInfo.DefaultSkillInfo(skill, active, color, onlyTeam, disableOnFreezeTime, needsTeammates, requiredPermission)
{
public float MaxDistance { get; set; } = maxDistance;
public bool FriendlyFire { get; set; } = friendlyFire;
}
}
}