1.3.6a
- Minor changes - Added `css_gravity` command - Added `css_money` command - Changed Utc time to LocalTime - Updated translations (ChatGPT generated) - Updated css version
This commit is contained in:
parent
da6fb2fc22
commit
2ab2f9c4dc
27 changed files with 731 additions and 489 deletions
|
|
@ -38,6 +38,24 @@ public static class PlayerExtensions
|
|||
playerPawnValue.VelocityModifier = speed;
|
||||
}
|
||||
|
||||
public static void SetGravity(this CCSPlayerController controller, float gravity)
|
||||
{
|
||||
CCSPlayerPawn? playerPawnValue = controller.PlayerPawn.Value;
|
||||
if (playerPawnValue == null) return;
|
||||
|
||||
playerPawnValue.GravityScale = gravity;
|
||||
}
|
||||
|
||||
public static void SetMoney(this CCSPlayerController controller, int money)
|
||||
{
|
||||
var moneyServices = controller.InGameMoneyServices;
|
||||
if (moneyServices == null) return;
|
||||
|
||||
moneyServices.Account = money;
|
||||
|
||||
Utilities.SetStateChanged(controller, "CCSPlayerController", "m_pInGameMoneyServices");
|
||||
}
|
||||
|
||||
public static void SetHp(this CCSPlayerController controller, int health = 100)
|
||||
{
|
||||
if (health <= 0 || !controller.PawnIsAlive || controller.PlayerPawn.Value == null) return;
|
||||
|
|
@ -103,6 +121,8 @@ public static class PlayerExtensions
|
|||
if (CS2_SimpleAdmin.Instance == null)
|
||||
return;
|
||||
|
||||
newName = CS2_SimpleAdmin._localizer?["sa_unknown"] ?? "Unknown";
|
||||
|
||||
SchemaString<CBasePlayerController> playerName = new SchemaString<CBasePlayerController>(controller, "m_iszPlayerName");
|
||||
playerName.Set(newName + " ");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue