1.2.5a
-Minor changes - Fixed `css_speed`
This commit is contained in:
parent
5dc14e3301
commit
18122cdc08
12 changed files with 205 additions and 81 deletions
|
|
@ -1,6 +1,5 @@
|
|||
using CounterStrikeSharp.API.Core;
|
||||
using CounterStrikeSharp.API.Modules.Admin;
|
||||
using CounterStrikeSharp.API.Modules.Menu;
|
||||
using CounterStrikeSharp.API.Modules.Utils;
|
||||
using System.Text;
|
||||
|
||||
|
|
@ -12,6 +11,7 @@ public static class PlayerUtils
|
|||
{
|
||||
PerformSlap(pawn, damage);
|
||||
}
|
||||
|
||||
public static void Print(this CCSPlayerController controller, string message = "")
|
||||
{
|
||||
StringBuilder _message = new(CS2_SimpleAdmin._localizer!["sa_prefix"]);
|
||||
|
|
@ -25,6 +25,14 @@ public static class PlayerUtils
|
|||
return AdminManager.CanPlayerTarget(controller, target);
|
||||
}
|
||||
|
||||
public static void SetSpeed(this CCSPlayerController controller, float speed)
|
||||
{
|
||||
CCSPlayerPawn? playerPawnValue = controller.PlayerPawn.Value;
|
||||
if (playerPawnValue == null) return;
|
||||
|
||||
playerPawnValue.VelocityModifier = speed;
|
||||
}
|
||||
|
||||
public static void SetHp(this CCSPlayerController controller, int health = 100)
|
||||
{
|
||||
if (health <= 0 || !controller.PawnIsAlive || controller.PlayerPawn.Value == null) return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue