v1.0.4
This commit is contained in:
parent
6422436252
commit
714624d96a
45 changed files with 488 additions and 141 deletions
|
|
@ -1,6 +1,7 @@
|
|||
using CounterStrikeSharp.API;
|
||||
using CounterStrikeSharp.API.Core;
|
||||
using CounterStrikeSharp.API.Modules.Cvars;
|
||||
using CounterStrikeSharp.API.Modules.Entities;
|
||||
using CounterStrikeSharp.API.Modules.Entities.Constants;
|
||||
using CounterStrikeSharp.API.Modules.Memory;
|
||||
using CounterStrikeSharp.API.Modules.Memory.DynamicFunctions;
|
||||
|
|
@ -69,6 +70,18 @@ namespace jRandomSkills
|
|||
return new Vector(x, y, z);
|
||||
}
|
||||
|
||||
public static void ChangePlayerScale(CCSPlayerController? player, float scale)
|
||||
{
|
||||
if (player == null || !player.IsValid) return;
|
||||
var playerPawn = player.PlayerPawn.Value;
|
||||
if (playerPawn == null || !playerPawn.IsValid || playerPawn.CBodyComponent == null || playerPawn.CBodyComponent.SceneNode == null) return;
|
||||
|
||||
playerPawn.CBodyComponent.SceneNode.Scale = scale;
|
||||
playerPawn.CBodyComponent.SceneNode.GetSkeletonInstance().Scale = scale;
|
||||
playerPawn.AcceptInput("SetScale", null, null, scale.ToString());
|
||||
Server.NextFrame(() => Utilities.SetStateChanged(playerPawn, "CBaseEntity", "m_CBodyComponent"));
|
||||
}
|
||||
|
||||
public static void TakeHealth(CCSPlayerPawn? pawn, int damage)
|
||||
{
|
||||
if (pawn == null || !pawn.IsValid || pawn.LifeState != (byte)LifeState_t.LIFE_ALIVE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue