kakozuzo/Code/PlayerDresser.cs
2024-10-30 03:03:27 +03:00

15 lines
340 B
C#

using Sandbox;
public class PlayerDresser : Component, Component.INetworkSpawn
{
[Property]
public SkinnedModelRenderer BodyRenderer { get; set; }
public void OnNetworkSpawn( Connection owner )
{
var clothing = new ClothingContainer();
clothing.Deserialize( owner.GetUserData( "avatar" ) );
clothing.Apply( BodyRenderer );
}
}