I'm trying to fix that one Foundation can't put nine pillars - and only four.I did the time - but does not remove the validation
Code:
function On_EntityDeployed(Player, Entity) {
if (Player.SteamID != null && Entity.Name != null) {
if (Entity.Name == "WoodPillar") {
if (CheckWoodPillar(Player, Entity)) {
Entity.Destroy();
}
}
}
}
function CheckWoodPillar(Player, Entity) {
var resBool = false;
Server.Broadcast(Player.Name);
for (var x in World.Entities)
if ((x.Name == "WoodPillar") && (x.X != Entity.X) && (x.Y != Entity.Y))
if ((x.X > Entity.X - 1) && (x.X < Entity.X + 1))
if ((x.Y > Entity.Y - 1) && (x.Y < Entity.Y + 1))
if ((x.Z > Entity.Z - 1) && (x.Z < Entity.Z + 1)) {
resBool = true;
}
return resBool;
}
Last edited: