public string GetMyHouseNamePositionInside(string PlayerName, int x, int y)
{
Player player = Server.GetPlayerByName(PlayerName);
int playerHouseIndex = GetPlayerHouseIndex(PlayerName);
if (playerHouseIndex < 0)
return null;
foreach (PlayerHouseCoords playerHouseCoord in playerHouses[playerHouseIndex].Houses)
{
if (x >= playerHouseCoord.TopLeft.X && x <= playerHouseCoord.BottomRight.X &&
y >= playerHouseCoord.TopLeft.Y && y <= playerHouseCoord.BottomRight.Y)
return playerHouseCoord.HouseName;
}
return null;
}