This commit is contained in:
Juzlus 2025-11-08 00:03:32 +01:00
parent 4b2bff91b1
commit 868372e6b7
124 changed files with 261 additions and 222 deletions

View file

@ -101,7 +101,7 @@ namespace src.utils
AlternativeSkillButton = null;
SkillTimeBeforeStart = 7;
SkillHudDuration = 999;
SkillDescriptionDuration = 7;
SkillDescriptionDuration = 999;
DisplayAlwaysDescription = false;
FlashingHtmlHudFix = true;
CS2TraceRayDebug = false;
@ -260,7 +260,8 @@ namespace src.utils
TeamSkills = 1,
SameSkills = 2,
NoRepeat = 3,
Debug = 4
FullRandom = 4,
Debug = 5
}
}
}

View file

@ -4,13 +4,14 @@ using CounterStrikeSharp.API.Modules.Cvars;
using CounterStrikeSharp.API.Modules.Entities.Constants;
using CounterStrikeSharp.API.Modules.Memory;
using CounterStrikeSharp.API.Modules.Memory.DynamicFunctions;
using CounterStrikeSharp.API.Modules.UserMessages;
using CounterStrikeSharp.API.Modules.Utils;
using src.player;
using src.player.skills;
using System.Collections.Concurrent;
using System.Runtime.InteropServices;
using WASDMenuAPI.Classes;
using WASDSharedAPI;
using System.Collections.Concurrent;
using src.player;
using src.player.skills;
namespace src.utils
{
@ -76,6 +77,21 @@ namespace src.utils
return new Vector(x, y, z);
}
public static void ApplyScreenColor(CCSPlayerController player, int r, int g, int b, int a, int duration, int holdTime, int flags = 1)
{
using var msg = UserMessage.FromPartialName("Fade");
if (msg == null) return;
int packageColor = (a << 24) | (r << 16) | (g << 8) | b;
msg.SetInt("duration", duration);
msg.SetInt("hold_time", holdTime);
msg.SetInt("flags", flags);
msg.SetInt("color", packageColor);
msg.Send(player);
}
public static void ChangePlayerScale(CCSPlayerController? player, float scale)
{
if (player == null || !player.IsValid) return;

View file

@ -126,7 +126,7 @@ namespace src.utils
}
}
public class DefaultSkillInfo(Skills skill, bool active = true, string color = "#ffffff", CsTeam onlyTeam = CsTeam.None, bool disableOnFreezeTime = false, bool needsTeammates = false)
public class DefaultSkillInfo(Skills skill, bool active = true, string color = "#ffffff", CsTeam onlyTeam = CsTeam.None, bool disableOnFreezeTime = false, bool needsTeammates = false, string requiredPermission = "")
{
public bool NeedsTeammates { get; set; } = needsTeammates;
public bool DisableOnFreezeTime { get; set; } = disableOnFreezeTime;
@ -134,6 +134,7 @@ namespace src.utils
public string Color { get; set; } = color;
public bool Active { get; set; } = active;
public string Name { get; set; } = skill.ToString();
public string RequiredPermission { get; set; } = requiredPermission;
}
}
}