cBarricade.ReceiveHealth((byte)Math.Max(0, currentHealth - decayAmount)); barricade.Barricade.GetServersideData().barricade.health = (ushort)Math.Max(0, currentHealth - decayAmount);
I tried both of these, I could neither lower nor raise my health in both ways, I’m using rocket unturned and I don’t know how to solve this problem.
Hey, you can use BarricadeManager.repair method
Transform transform = barricadeDrop.model // Transform instance of the barricade int damage = 10; // 10 HP int times = 1; // damage * times = the total amount of HP to restore BarricadeManager.repair(transform, damage, times);
The similar method exists for structures: StructureManager.repair