How to damage BuildingBlock and BasePlayer use custom spawn MLRD? not system MLRS.

How to damage BuildingBlock and BasePlayer use custom spawn MLRS? not system MLRS.
My spawn function is as follows:

TimedExplosive rocket = GameManager.server.CreateEntity("assets/content/vehicles/mlrs/rocket_mlrs.prefab", new Vector3(x, 450f,z)) as TimedExplosive;
rocket.timerAmountMin = 150;
rocket.timerAmountMax = 150;
rocket.explosionRadius = 15f;
rocket.creatorEntity = MLRSSender; // as a BasePlayer
ServerProjectile projectile = rocket.GetComponent<ServerProjectile>();
projectile.gravityModifier = Core.Random.Range(1.5f, 1.6f);
projectile.InitializeVelocity(new Vector3(0, -18, 0));
rocket.Spawn();​

and how to damage BuildingBlock if MLRS's creatorEntity is BradleyAPC?

hi, damage dealt by BradleyApc is always allowed unless you explicitly create a rule to block it. if its blocked then another plugin is blocking it, or you have not set the creatorEntity to the BradleyAPC.

if you set creatorEntity to a BasePlayer then it must use `players can hurt XXX` rules. you shouldn't do this as players could use the MLRS to launch MLRSRocket on any base due to your code allowing it.

plugins should always use the hooks provided by TruePVE. use CanEntityTakeDamage hook. set a unique skin to your rocket and check for that in the CanEntityTakeDamage hook

adjust your code as follows:
rocket.creatorEntity = rocket;
rocket.skinID = 439123;
rocket.Spawn();

CanEntityTakeDamage hook:

        private object CanEntityTakeDamage(BaseCombatEntity entity, HitInfo info)
        {
            if (info?.Initiator is MLRSRocket && info.Initiator.skinID == 439123) return true;
            return null;
        }​