private void CreatePlayerEntity(Vector Position, QAngle Rotation, bool ct=true)
{
var model = Utilities.CreateEntityByName<CDynamicProp>("prop_dynamic");
if (model == null)
return;
if(ct)model.SetModel("characters/models/ctm_fbi/ctm_fbi_variantf.vmdl");
else model.SetModel("characters/models/tm_professional/tm_professional_varf4.vmdl");
model.UseAnimGraph = false;
model.AcceptInput("SetAnimation", value: "tools_preview");
model.DispatchSpawn();
model.Teleport(Position, Rotation, new Vector(0, 0, 0));
}
- 参考:https://discord.com/channels/1160907911501991946/1160925208203493468/1284960997081092127