Hi guys. To check that player within the building. I use:
How to check the other objects?Code:buildingPrivlidges = typeof(BasePlayer).GetField("buildingPrivlidges", (BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance | BindingFlags.NonPublic)); List<BuildingPrivlidge> playerpriv = buildingPrivlidges.GetValue(player) as List<BuildingPrivlidge>; if (playerpriv.Count == 0)
Check object within a radius building
Discussion in 'Rust Development' started by Sanlerus, May 28, 2015.
-
you can look at my zone manager, i use a lot this.
-
This code can be optimized? I do not understand how to work with masks and what they do.Code:
bool findCupboard = false; foreach(Collider col in Physics.OverlapSphere(entity.transform.position, 30)) { if(col.name == "items/cupboard.tool.deployed") { findCupboard = true; break; } }
Sorry for my bad English ...
