CounterStrikeSharp icon indicating copy to clipboard operation
CounterStrikeSharp copied to clipboard

SetParent Not Set to Entities

Open oppars01 opened this issue 1 year ago • 1 comments

var coin = Utilities.CreateEntityByName<CDynamicProp>("prop_dynamic");
coin.SetModel("models/inventory_items/coin_csgo.vmdl");
coin.Teleport(origin, angle, velocity);
coin.DispatchSpawn();
coin.AcceptInput("SetParent", player, coin, "!activator", 0);

In the above figure, I want to set the Parent of the entity as player and I want it to move with the player, but it does not work.

oppars01 avatar Feb 14 '24 19:02 oppars01

entity.AcceptInput("SetParent", @event.Userid.PlayerPawn.Value, null, "!activator"); This work

darkerz7 avatar May 04 '24 13:05 darkerz7